From 89c32fb4e6d7467fc80aad1c1c00eed15ba256e8 Mon Sep 17 00:00:00 2001 From: s2 Date: Fri, 29 Mar 2019 15:56:41 +0100 Subject: [PATCH] update node modules --- .vscode/settings.json | 3 + example/dist/dist.css | 1 - example/dist/dist.js | 1 - minifyfromhtml.js | 4 + node_modules/.bin/acorn | 16 +- node_modules/.bin/acorn.cmd | 7 + node_modules/.bin/babel-minify | 16 +- node_modules/.bin/babel-minify.cmd | 7 + node_modules/.bin/babylon | 16 +- node_modules/.bin/babylon.cmd | 7 + node_modules/.bin/escodegen | 16 +- node_modules/.bin/escodegen.cmd | 7 + node_modules/.bin/esgenerate | 16 +- node_modules/.bin/esgenerate.cmd | 7 + node_modules/.bin/esparse | 16 +- node_modules/.bin/esparse.cmd | 7 + node_modules/.bin/esvalidate | 16 +- node_modules/.bin/esvalidate.cmd | 7 + node_modules/.bin/jsesc | 16 +- node_modules/.bin/jsesc.cmd | 7 + node_modules/.bin/json5 | 16 +- node_modules/.bin/json5.cmd | 7 + node_modules/.bin/loose-envify | 16 +- node_modules/.bin/loose-envify.cmd | 7 + node_modules/.bin/minify | 16 +- node_modules/.bin/minify.cmd | 7 + node_modules/.bin/mkdirp | 16 +- node_modules/.bin/mkdirp.cmd | 7 + node_modules/.bin/parser | 15 + node_modules/.bin/parser.cmd | 7 + node_modules/.bin/semver | 16 +- node_modules/.bin/semver.cmd | 7 + node_modules/.bin/sshpk-conv | 16 +- node_modules/.bin/sshpk-conv.cmd | 7 + node_modules/.bin/sshpk-sign | 16 +- node_modules/.bin/sshpk-sign.cmd | 7 + node_modules/.bin/sshpk-verify | 16 +- node_modules/.bin/sshpk-verify.cmd | 7 + node_modules/.bin/uuid | 16 +- node_modules/.bin/uuid.cmd | 7 + node_modules/@babel/code-frame/README.md | 142 - node_modules/@babel/code-frame/lib/index.js | 185 - node_modules/@babel/code-frame/package.json | 51 - node_modules/@babel/core/LICENSE | 22 + node_modules/@babel/core/README.md | 251 +- .../@babel/core/lib/config/caching.js | 130 +- .../@babel/core/lib/config/config-chain.js | 549 +- .../core/lib/config/config-descriptors.js | 213 +- .../core/lib/config/files/configuration.js | 212 +- .../core/lib/config/files/index-browser.js | 19 +- .../@babel/core/lib/config/files/index.js | 22 +- .../@babel/core/lib/config/files/package.js | 38 +- .../@babel/core/lib/config/files/plugins.js | 79 +- .../@babel/core/lib/config/files/types.js | 1 - .../@babel/core/lib/config/files/utils.js | 10 +- node_modules/@babel/core/lib/config/full.js | 199 +- .../core/lib/config/helpers/config-api.js | 52 +- .../core/lib/config/helpers/environment.js | 6 +- node_modules/@babel/core/lib/config/index.js | 23 +- node_modules/@babel/core/lib/config/item.js | 52 +- .../@babel/core/lib/config/partial.js | 108 +- .../core/lib/config/pattern-to-regex.js | 52 + node_modules/@babel/core/lib/config/plugin.js | 23 +- node_modules/@babel/core/lib/config/util.js | 27 +- .../config/validation/option-assertions.js | 165 +- .../core/lib/config/validation/options.js | 159 +- .../core/lib/config/validation/plugins.js | 22 +- node_modules/@babel/core/lib/index.js | 163 +- node_modules/@babel/core/lib/parse.js | 50 +- .../core/lib/tools/build-external-helpers.js | 89 +- .../@babel/core/lib/transform-ast-sync.js | 19 - node_modules/@babel/core/lib/transform-ast.js | 35 +- .../@babel/core/lib/transform-file-browser.js | 20 +- .../core/lib/transform-file-sync-browser.js | 10 - .../@babel/core/lib/transform-file-sync.js | 40 - .../@babel/core/lib/transform-file.js | 52 +- .../@babel/core/lib/transform-sync.js | 18 - node_modules/@babel/core/lib/transform.js | 34 +- .../lib/transformation/block-hoist-plugin.js | 24 +- .../core/lib/transformation/file/file.js | 231 +- .../core/lib/transformation/file/generate.js | 124 +- .../core/lib/transformation/file/merge-map.js | 255 + .../@babel/core/lib/transformation/index.js | 85 +- .../core/lib/transformation/normalize-file.js | 176 +- .../core/lib/transformation/normalize-opts.js | 81 +- .../core/lib/transformation/plugin-pass.js | 40 +- .../util/missing-plugin-helper.js | 89 +- .../@babel/core/node_modules/.bin/babylon | 1 - .../@babel/core/node_modules/.bin/jsesc | 15 + .../@babel/core/node_modules/.bin/jsesc.cmd | 7 + .../@babel/core/node_modules/.bin/json5 | 15 + .../@babel/core/node_modules/.bin/json5.cmd | 7 + .../node_modules/@babel/code-frame/LICENSE | 22 + .../node_modules/@babel/code-frame/README.md | 19 + .../@babel/code-frame/lib/index.js | 173 + .../@babel/code-frame/package.json | 51 + .../node_modules/@babel/generator/LICENSE | 22 + .../node_modules/@babel/generator/README.md | 19 + .../@babel/generator/lib/buffer.js | 257 + .../@babel/generator/lib/generators/base.js | 97 + .../generator/lib/generators/classes.js | 15 +- .../generator/lib/generators/expressions.js | 23 +- .../@babel/generator/lib/generators/flow.js | 628 + .../@babel/generator/lib/generators/index.js | 137 + .../@babel/generator/lib/generators/jsx.js | 145 + .../generator/lib/generators/methods.js | 30 +- .../generator/lib/generators/modules.js | 20 +- .../generator/lib/generators/statements.js | 56 +- .../lib/generators/template-literals.js | 33 + .../@babel/generator/lib/generators/types.js | 198 + .../generator/lib/generators/typescript.js | 715 + .../@babel/generator/lib/index.js | 92 + .../@babel/generator/lib/node/index.js | 117 + .../@babel}/generator/lib/node/parentheses.js | 58 +- .../@babel}/generator/lib/node/whitespace.js | 79 +- .../@babel/generator/lib/printer.js | 501 + .../@babel/generator/lib/source-map.js | 81 + .../@babel/generator/package.json | 61 + .../@babel/helper-function-name/LICENSE | 22 + .../@babel/helper-function-name/README.md | 19 + .../@babel/helper-function-name/lib/index.js | 198 + .../@babel/helper-function-name/package.json | 45 + .../@babel/helper-get-function-arity/LICENSE | 22 + .../helper-get-function-arity/README.md | 19 + .../helper-get-function-arity/lib/index.js | 32 + .../helper-get-function-arity/package.json | 40 + .../helper-split-export-declaration/LICENSE | 22 + .../helper-split-export-declaration/README.md | 19 + .../lib/index.js | 68 + .../package.json | 44 + .../core/node_modules/@babel/helpers/LICENSE | 22 + .../node_modules/@babel/helpers/README.md | 19 + .../@babel/helpers/lib/helpers.js | 1816 ++ .../node_modules/@babel/helpers/lib/index.js | 285 + .../node_modules/@babel/helpers/package.json | 54 + .../node_modules/@babel/highlight/LICENSE | 22 + .../node_modules/@babel/highlight/README.md | 19 + .../@babel/highlight/lib/index.js | 129 + .../@babel/highlight/package.json | 50 + .../core/node_modules/@babel/template/LICENSE | 22 + .../node_modules/@babel/template/README.md | 19 + .../@babel/template/lib/builder.js | 83 + .../@babel/template/lib/formatters.js | 63 + .../node_modules/@babel/template/lib/index.js | 36 + .../@babel/template/lib/literal.js | 82 + .../@babel/template/lib/options.js | 82 + .../node_modules/@babel/template/lib/parse.js | 193 + .../@babel/template/lib/populate.js | 133 + .../@babel/template/lib/string.js | 24 + .../node_modules/@babel/template/package.json | 53 + .../core/node_modules/@babel/traverse/LICENSE | 22 + .../node_modules/@babel/traverse/README.md | 19 + .../@babel}/traverse/lib/cache.js | 4 +- .../@babel/traverse/lib/context.js | 152 + .../node_modules/@babel/traverse/lib/hub.js | 23 + .../node_modules/@babel/traverse/lib/index.js | 130 + .../@babel/traverse/lib/path/ancestry.js | 188 + .../@babel}/traverse/lib/path/comments.js | 18 +- .../@babel/traverse/lib/path/context.js | 245 + .../@babel/traverse/lib/path/conversion.js | 463 + .../@babel/traverse/lib/path/evaluation.js | 404 + .../@babel}/traverse/lib/path/family.js | 67 +- .../@babel/traverse/lib/path/index.js | 219 + .../traverse/lib/path/inference/index.js | 132 + .../lib/path/inference/inferer-reference.js | 181 + .../traverse/lib/path/inference/inferers.js | 39 +- .../@babel/traverse/lib/path/introspection.js | 371 + .../@babel/traverse/lib/path/lib/hoister.js | 188 + .../traverse/lib/path/lib/removal-hooks.js | 38 + .../traverse/lib/path/lib/virtual-types.js | 216 + .../@babel/traverse/lib/path/modification.js | 222 + .../@babel}/traverse/lib/path/removal.js | 13 +- .../@babel/traverse/lib/path/replacement.js | 258 + .../@babel/traverse/lib/scope/binding.js | 71 + .../@babel/traverse/lib/scope/index.js | 892 + .../@babel/traverse/lib/scope/lib/renamer.js | 138 + .../@babel/traverse/lib/visitors.js | 254 + .../node_modules/@babel/traverse/package.json | 61 + .../core/node_modules/@babel/types/LICENSE | 22 + .../core/node_modules/@babel/types/README.md | 19 + .../@babel/types/lib/asserts/assertNode.js | 17 + .../types/lib/asserts/generated/index.js | 1364 ++ .../@babel/types/lib/builders/builder.js | 50 + .../flow/createTypeAnnotationBasedOnTypeof.js | 0 .../flow/createUnionTypeAnnotation.js | 2 +- .../types/lib/builders/generated/index.js | 1148 ++ .../types/lib/builders/react/buildChildren.js | 6 +- .../@babel}/types/lib/clone/clone.js | 0 .../@babel}/types/lib/clone/cloneDeep.js | 0 .../@babel/types/lib/clone/cloneNode.js | 78 + .../types/lib/clone/cloneWithoutLoc.js | 2 +- .../@babel}/types/lib/comments/addComment.js | 0 .../@babel}/types/lib/comments/addComments.js | 2 +- .../lib/comments/inheritInnerComments.js | 0 .../lib/comments/inheritLeadingComments.js | 0 .../lib/comments/inheritTrailingComments.js | 0 .../types/lib/comments/inheritsComments.js | 0 .../types/lib/comments/removeComments.js | 2 +- .../types/lib/constants/generated/index.js | 93 + .../@babel/types/lib/constants/index.js | 47 + .../types/lib/converters/ensureBlock.js | 6 +- .../converters/gatherSequenceExpressions.js | 73 + .../lib/converters/toBindingIdentifierName.js | 0 .../@babel}/types/lib/converters/toBlock.js | 2 +- .../types/lib/converters/toComputedKey.js | 6 +- .../types/lib/converters/toExpression.js | 2 +- .../types/lib/converters/toIdentifier.js | 2 +- .../types/lib/converters/toKeyAlias.js | 12 +- .../lib/converters/toSequenceExpression.js | 23 + .../types/lib/converters/toStatement.js | 6 +- .../types/lib/converters/valueToNode.js | 104 + .../@babel/types/lib/definitions/core.js | 725 + .../@babel}/types/lib/definitions/es2015.js | 49 +- .../types/lib/definitions/experimental.js | 205 + .../@babel/types/lib/definitions/flow.js | 386 + .../@babel/types/lib/definitions/index.js | 101 + .../@babel/types/lib/definitions/jsx.js | 160 + .../@babel/types/lib/definitions/misc.js | 23 + .../types/lib/definitions/placeholders.js | 33 + .../types/lib/definitions/typescript.js | 411 + .../@babel/types/lib/definitions/utils.js | 220 + .../node_modules/@babel/types/lib/index.d.ts | 2072 ++ .../node_modules/@babel/types/lib/index.js | 579 + .../@babel/types/lib/index.js.flow | 1974 ++ .../modifications/appendToMemberExpression.js | 15 + .../flow/removeTypeDuplicates.js | 22 +- .../types/lib/modifications/inherits.js | 33 + .../prependToMemberExpression.js | 0 .../lib/modifications/removeProperties.js | 30 + .../lib/modifications/removePropertiesDeep.js | 0 .../lib/retrievers/getBindingIdentifiers.js | 17 +- .../retrievers/getOuterBindingIdentifiers.js | 0 .../@babel/types/lib/traverse/traverse.js | 55 + .../@babel/types/lib/traverse/traverseFast.js | 28 + .../@babel}/types/lib/utils/inherit.js | 4 +- .../react/cleanJSXElementLiteralChild.js | 47 + .../@babel/types/lib/utils/shallowEqual.js | 18 + .../validators/buildMatchMemberExpression.js | 15 + .../types/lib/validators/generated/index.js | 4317 ++++ .../@babel/types/lib/validators/is.js | 35 + .../@babel/types/lib/validators/isBinding.js | 33 + .../types/lib/validators/isBlockScoped.js | 0 .../types/lib/validators/isImmutable.js | 0 .../@babel}/types/lib/validators/isLet.js | 0 .../@babel}/types/lib/validators/isNode.js | 0 .../types/lib/validators/isNodesEquivalent.js | 67 + .../types/lib/validators/isPlaceholderType.js | 21 + .../types/lib/validators/isReferenced.js | 26 +- .../@babel}/types/lib/validators/isScope.js | 0 .../lib/validators/isSpecifierDefault.js | 0 .../@babel/types/lib/validators/isType.js | 24 + .../lib/validators/isValidES3Identifier.js | 16 + .../types/lib/validators/isValidIdentifier.js | 4 +- .../@babel}/types/lib/validators/isVar.js | 0 .../types/lib/validators/matchesPattern.js | 40 + .../types/lib/validators/react/isCompatTag.js | 0 .../lib/validators/react/isReactComponent.js | 14 + .../@babel}/types/lib/validators/validate.js | 4 +- .../node_modules/@babel/types/package.json | 60 + .../types/scripts/generateTypeHelpers.js | 29 + .../@babel/types/scripts/generators/docs.js | 117 + .../@babel/types/scripts/generators/flow.js | 153 + .../scripts/generators/generateAsserts.js | 0 .../scripts/generators/generateBuilders.js | 0 .../scripts/generators/generateConstants.js | 0 .../scripts/generators/generateValidators.js | 78 + .../types/scripts/generators/typescript.js | 200 + .../types/scripts/utils/formatBuilderName.js | 0 .../@babel}/types/scripts/utils/lowerFirst.js | 0 .../types/scripts/utils/stringifyValidator.js | 43 + .../types/scripts/utils/toFunctionName.js | 4 + .../node_modules/ansi-styles/index.js | 0 .../node_modules/ansi-styles/license | 0 .../node_modules/ansi-styles/package.json | 94 + .../node_modules/ansi-styles/readme.md | 0 .../core/node_modules/babylon/CHANGELOG.md | 1073 - .../core/node_modules/babylon/README.md | 167 - .../core/node_modules/babylon/bin/babylon.js | 16 - .../core/node_modules/babylon/lib/index.js | 10116 --------- .../core/node_modules/babylon/package.json | 67 - .../node_modules/chalk/index.js | 0 .../core/node_modules/chalk/index.js.flow | 93 + .../node_modules/chalk/license | 0 .../core/node_modules/chalk/package.json | 103 + .../node_modules/chalk/readme.md | 0 .../node_modules/chalk/templates.js | 0 .../node_modules/chalk/types/index.d.ts | 0 .../core/node_modules/debug/.coveralls.yml | 1 - .../@babel/core/node_modules/debug/.eslintrc | 14 - .../@babel/core/node_modules/debug/.npmignore | 9 - .../core/node_modules/debug/.travis.yml | 20 - .../@babel/core/node_modules/debug/Makefile | 58 - .../@babel/core/node_modules/debug/README.md | 91 +- .../core/node_modules/debug/dist/debug.js | 912 + .../core/node_modules/debug/karma.conf.js | 70 - .../@babel/core/node_modules/debug/node.js | 1 - .../core/node_modules/debug/package.json | 61 +- .../core/node_modules/debug/src/browser.js | 291 +- .../core/node_modules/debug/src/common.js | 266 + .../core/node_modules/debug/src/debug.js | 225 - .../core/node_modules/debug/src/index.js | 8 +- .../core/node_modules/debug/src/node.js | 257 +- .../node_modules/globals/globals.json | 99 +- .../node_modules/globals/index.js | 0 .../node_modules/globals}/license | 0 .../core/node_modules/globals/package.json | 73 + .../node_modules/globals/readme.md | 0 .../core/node_modules/js-tokens/CHANGELOG.md | 151 + .../core/node_modules/js-tokens/LICENSE | 21 + .../core/node_modules/js-tokens/README.md | 240 + .../core/node_modules/js-tokens/index.js | 23 + .../core/node_modules/js-tokens/package.json | 64 + .../node_modules/jsesc/LICENSE-MIT.txt | 0 .../node_modules/jsesc/README.md | 0 .../node_modules/jsesc/bin/jsesc | 0 .../node_modules/jsesc/jsesc.js | 4 +- .../node_modules/jsesc/man/jsesc.1 | 0 .../core/node_modules/jsesc/package.json | 85 + .../core/node_modules/json5/CHANGELOG.md | 315 + .../@babel/core/node_modules/json5/LICENSE.md | 23 + .../@babel/core/node_modules/json5/README.md | 234 + .../core/node_modules/json5/dist/index.js | 1688 ++ .../core/node_modules/json5/dist/index.min.js | 1 + .../node_modules/json5/dist/index.min.mjs | 1 + .../core/node_modules/json5/dist/index.mjs | 1392 ++ .../@babel/core/node_modules/json5/lib/cli.js | 112 + .../core/node_modules/json5/lib/index.js | 9 + .../core/node_modules/json5/lib/parse.js | 1087 + .../core/node_modules/json5/lib/register.js | 13 + .../core/node_modules/json5/lib/require.js | 4 + .../core/node_modules/json5/lib/stringify.js | 254 + .../core/node_modules/json5/lib/unicode.js | 4 + .../core/node_modules/json5/lib/util.js | 35 + .../core/node_modules/json5/package.json | 109 + .../@babel/core/node_modules/ms/index.js | 162 + .../@babel/core/node_modules/ms/license.md | 21 + .../@babel/core/node_modules/ms/package.json | 69 + .../@babel/core/node_modules/ms/readme.md | 60 + .../node_modules/supports-color/browser.js | 0 .../core/node_modules/supports-color/index.js | 131 + .../node_modules/supports-color}/license | 0 .../node_modules/supports-color/package.json | 85 + .../node_modules/supports-color/readme.md | 0 .../node_modules/to-fast-properties/index.js | 0 .../node_modules/to-fast-properties/license | 0 .../to-fast-properties/package.json | 73 + .../node_modules/to-fast-properties/readme.md | 0 node_modules/@babel/core/package.json | 71 +- node_modules/@babel/core/yarn.lock | 1126 - node_modules/@babel/generator/README.md | 78 - node_modules/@babel/generator/lib/buffer.js | 217 - .../@babel/generator/lib/generators/base.js | 60 - .../@babel/generator/lib/generators/flow.js | 588 - .../@babel/generator/lib/generators/index.js | 137 - .../@babel/generator/lib/generators/jsx.js | 148 - .../lib/generators/template-literals.js | 32 - .../@babel/generator/lib/generators/types.js | 167 - .../generator/lib/generators/typescript.js | 661 - node_modules/@babel/generator/lib/index.js | 108 - .../@babel/generator/lib/node/index.js | 132 - node_modules/@babel/generator/lib/printer.js | 549 - .../@babel/generator/lib/source-map.js | 84 - .../@babel/generator/node_modules/.bin/jsesc | 1 - .../generator/node_modules/jsesc/package.json | 85 - node_modules/@babel/generator/package.json | 57 - .../@babel/helper-function-name/README.md | 5 - .../@babel/helper-function-name/lib/index.js | 179 - .../@babel/helper-function-name/package.json | 42 - .../helper-get-function-arity/README.md | 21 - .../helper-get-function-arity/lib/index.js | 32 - .../helper-get-function-arity/package.json | 40 - .../helper-split-export-declaration/README.md | 23 - .../lib/index.js | 68 - .../package.json | 40 - node_modules/@babel/helpers/README.md | 56 - node_modules/@babel/helpers/lib/helpers.js | 300 - node_modules/@babel/helpers/lib/index.js | 295 - node_modules/@babel/helpers/package.json | 50 - node_modules/@babel/highlight/README.md | 41 - node_modules/@babel/highlight/lib/index.js | 142 - .../node_modules/ansi-styles/package.json | 88 - .../node_modules/chalk/index.js.flow | 93 - .../highlight/node_modules/chalk/package.json | 103 - .../node_modules/supports-color/index.js | 131 - .../node_modules/supports-color/package.json | 85 - node_modules/@babel/highlight/package.json | 54 - node_modules/@babel/parser/CHANGELOG.md | 1073 + .../node_modules/babylon => parser}/LICENSE | 0 node_modules/@babel/parser/README.md | 19 + .../@babel/parser/bin/babel-parser.js | 16 + node_modules/@babel/parser/lib/index.js | 11180 ++++++++++ node_modules/@babel/parser/package.json | 74 + .../@babel/parser/typings/babel-parser.d.ts | 135 + node_modules/@babel/template/README.md | 172 - node_modules/@babel/template/lib/builder.js | 91 - .../@babel/template/lib/formatters.js | 75 - node_modules/@babel/template/lib/index.js | 36 - node_modules/@babel/template/lib/literal.js | 83 - node_modules/@babel/template/lib/options.js | 69 - node_modules/@babel/template/lib/parse.js | 156 - node_modules/@babel/template/lib/populate.js | 131 - node_modules/@babel/template/lib/string.js | 24 - .../@babel/template/node_modules/.bin/babylon | 1 - .../node_modules/babylon/CHANGELOG.md | 1073 - .../template/node_modules/babylon/LICENSE | 19 - .../template/node_modules/babylon/README.md | 167 - .../node_modules/babylon/bin/babylon.js | 16 - .../node_modules/babylon/lib/index.js | 10116 --------- .../node_modules/babylon/package.json | 67 - node_modules/@babel/template/package.json | 50 - node_modules/@babel/traverse/README.md | 33 - node_modules/@babel/traverse/lib/context.js | 192 - node_modules/@babel/traverse/lib/hub.js | 12 - node_modules/@babel/traverse/lib/index.js | 142 - .../@babel/traverse/lib/path/ancestry.js | 202 - .../@babel/traverse/lib/path/context.js | 273 - .../@babel/traverse/lib/path/conversion.js | 472 - .../@babel/traverse/lib/path/evaluation.js | 451 - .../@babel/traverse/lib/path/index.js | 246 - .../traverse/lib/path/inference/index.js | 136 - .../lib/path/inference/inferer-reference.js | 185 - .../@babel/traverse/lib/path/introspection.js | 418 - .../@babel/traverse/lib/path/lib/hoister.js | 196 - .../traverse/lib/path/lib/removal-hooks.js | 38 - .../traverse/lib/path/lib/virtual-types.js | 182 - .../@babel/traverse/lib/path/modification.js | 236 - .../@babel/traverse/lib/path/replacement.js | 276 - .../@babel/traverse/lib/scope/binding.js | 73 - .../@babel/traverse/lib/scope/index.js | 1019 - .../@babel/traverse/lib/scope/lib/renamer.js | 132 - node_modules/@babel/traverse/lib/visitors.js | 312 - .../@babel/traverse/node_modules/.bin/babylon | 1 - .../node_modules/babylon/CHANGELOG.md | 1073 - .../traverse/node_modules/babylon/LICENSE | 19 - .../traverse/node_modules/babylon/README.md | 167 - .../node_modules/babylon/bin/babylon.js | 16 - .../node_modules/babylon/lib/index.js | 10116 --------- .../node_modules/babylon/package.json | 67 - .../node_modules/debug/.coveralls.yml | 1 - .../traverse/node_modules/debug/.eslintrc | 14 - .../traverse/node_modules/debug/.npmignore | 9 - .../traverse/node_modules/debug/.travis.yml | 20 - .../traverse/node_modules/debug/CHANGELOG.md | 395 - .../traverse/node_modules/debug/LICENSE | 19 - .../traverse/node_modules/debug/Makefile | 58 - .../traverse/node_modules/debug/README.md | 368 - .../traverse/node_modules/debug/karma.conf.js | 70 - .../traverse/node_modules/debug/node.js | 1 - .../traverse/node_modules/debug/package.json | 82 - .../node_modules/debug/src/browser.js | 195 - .../traverse/node_modules/debug/src/debug.js | 225 - .../traverse/node_modules/debug/src/index.js | 10 - .../traverse/node_modules/debug/src/node.js | 186 - .../node_modules/globals/package.json | 73 - node_modules/@babel/traverse/package.json | 60 - node_modules/@babel/types/README.md | 2955 --- .../@babel/types/lib/asserts/assertNode.js | 17 - .../types/lib/asserts/generated/index.js | 2298 --- .../@babel/types/lib/builders/builder.js | 54 - .../types/lib/builders/generated/index.js | 1934 -- .../@babel/types/lib/clone/cloneNode.js | 78 - .../types/lib/constants/generated/index.js | 93 - .../@babel/types/lib/constants/index.js | 47 - .../converters/gatherSequenceExpressions.js | 87 - .../lib/converters/toSequenceExpression.js | 24 - .../types/lib/converters/valueToNode.js | 84 - .../@babel/types/lib/definitions/core.js | 705 - .../types/lib/definitions/experimental.js | 165 - .../@babel/types/lib/definitions/flow.js | 368 - .../@babel/types/lib/definitions/index.js | 79 - .../@babel/types/lib/definitions/jsx.js | 156 - .../@babel/types/lib/definitions/misc.js | 18 - .../types/lib/definitions/typescript.js | 393 - .../@babel/types/lib/definitions/utils.js | 248 - node_modules/@babel/types/lib/index.d.ts | 1880 -- node_modules/@babel/types/lib/index.js | 570 - node_modules/@babel/types/lib/index.js.flow | 1851 -- .../modifications/appendToMemberExpression.js | 19 - .../types/lib/modifications/inherits.js | 39 - .../lib/modifications/removeProperties.js | 58 - .../@babel/types/lib/traverse/traverse.js | 66 - .../@babel/types/lib/traverse/traverseFast.js | 52 - .../react/cleanJSXElementLiteralChild.js | 47 - .../@babel/types/lib/utils/shallowEqual.js | 21 - .../validators/buildMatchMemberExpression.js | 17 - .../types/lib/validators/generated/index.js | 4093 ---- .../@babel/types/lib/validators/is.js | 24 - .../@babel/types/lib/validators/isBinding.js | 29 - .../types/lib/validators/isNodesEquivalent.js | 52 - .../@babel/types/lib/validators/isType.js | 36 - .../lib/validators/isValidES3Identifier.js | 16 - .../types/lib/validators/matchesPattern.js | 40 - .../lib/validators/react/isReactComponent.js | 14 - .../to-fast-properties/package.json | 67 - node_modules/@babel/types/package.json | 59 - .../types/scripts/generateTypeHelpers.js | 31 - .../scripts/generators/generateValidators.js | 55 - .../@babel/types/scripts/utils/formatCode.js | 9 - node_modules/abab/CHANGELOG.md | 9 + node_modules/abab/README.md | 16 +- node_modules/abab/index.js | 10 +- node_modules/abab/lib/atob.js | 118 +- node_modules/abab/lib/btoa.js | 41 +- node_modules/abab/package.json | 47 +- node_modules/acorn-globals/index.js | 12 +- node_modules/acorn-globals/package.json | 25 +- node_modules/acorn-walk/CHANGELOG.md | 97 + node_modules/acorn-walk/LICENSE | 19 + node_modules/acorn-walk/README.md | 126 + .../{acorn => acorn-walk}/dist/walk.js | 121 +- node_modules/acorn-walk/dist/walk.js.map | 1 + node_modules/acorn-walk/dist/walk.mjs | 436 + node_modules/acorn-walk/dist/walk.mjs.map | 1 + node_modules/acorn-walk/package.json | 63 + node_modules/acorn/AUTHORS | 75 - node_modules/acorn/CHANGELOG.md | 272 +- node_modules/acorn/README.md | 312 +- node_modules/acorn/bin/_acorn.js | 69 - node_modules/acorn/bin/acorn | 2 +- node_modules/acorn/bin/run_test262.js | 22 - node_modules/acorn/bin/test262.whitelist | 409 - node_modules/acorn/dist/acorn.d.ts | 209 + node_modules/acorn/dist/acorn.es.js | 5305 ----- node_modules/acorn/dist/acorn.js | 1344 +- node_modules/acorn/dist/acorn.js.map | 1 + node_modules/acorn/dist/acorn.mjs | 4987 +++++ node_modules/acorn/dist/acorn.mjs.map | 1 + node_modules/acorn/dist/acorn_loose.es.js | 1412 -- node_modules/acorn/dist/acorn_loose.js | 1422 -- node_modules/acorn/dist/bin.js | 68 + node_modules/acorn/dist/walk.es.js | 419 - node_modules/acorn/package.json | 280 +- node_modules/acorn/yarn-error.log | 91 - node_modules/ajv/LICENSE | 2 +- node_modules/ajv/README.md | 371 +- node_modules/ajv/dist/ajv.bundle.js | 4052 ++-- node_modules/ajv/dist/ajv.min.js | 4 +- node_modules/ajv/dist/ajv.min.js.map | 2 +- node_modules/ajv/dist/nodent.min.js | 2 - node_modules/ajv/dist/regenerator.min.js | 2 - node_modules/ajv/lib/$data.js | 49 - node_modules/ajv/lib/.DS_Store | Bin 0 -> 6148 bytes node_modules/ajv/lib/ajv.d.ts | 129 +- node_modules/ajv/lib/ajv.js | 47 +- node_modules/ajv/lib/compile/_rules.js | 31 - node_modules/ajv/lib/compile/equal.js | 2 + node_modules/ajv/lib/compile/formats.js | 38 +- node_modules/ajv/lib/compile/index.js | 31 +- node_modules/ajv/lib/compile/resolve.js | 21 +- node_modules/ajv/lib/compile/rules.js | 20 +- node_modules/ajv/lib/compile/util.js | 7 + node_modules/ajv/lib/data.js | 49 + node_modules/ajv/lib/dot/_limit.jst | 8 + node_modules/ajv/lib/dot/comment.jst | 9 + node_modules/ajv/lib/dot/custom.jst | 4 +- node_modules/ajv/lib/dot/defaults.def | 27 +- node_modules/ajv/lib/dot/errors.def | 16 +- node_modules/ajv/lib/dot/format.jst | 4 +- node_modules/ajv/lib/dot/if.jst | 75 + node_modules/ajv/lib/dot/oneOf.jst | 24 +- node_modules/ajv/lib/dot/properties.jst | 89 +- node_modules/ajv/lib/dot/propertyNames.jst | 4 +- node_modules/ajv/lib/dot/ref.jst | 4 +- node_modules/ajv/lib/dot/uniqueItems.jst | 44 +- node_modules/ajv/lib/dot/validate.jst | 66 +- node_modules/ajv/lib/dotjs/_limit.js | 14 +- node_modules/ajv/lib/dotjs/_limitItems.js | 5 +- node_modules/ajv/lib/dotjs/_limitLength.js | 3 +- .../ajv/lib/dotjs/_limitProperties.js | 5 +- node_modules/ajv/lib/dotjs/anyOf.js | 3 +- node_modules/ajv/lib/dotjs/comment.js | 14 + node_modules/ajv/lib/dotjs/const.js | 5 +- node_modules/ajv/lib/dotjs/contains.js | 3 +- node_modules/ajv/lib/dotjs/custom.js | 10 +- node_modules/ajv/lib/dotjs/dependencies.js | 3 +- node_modules/ajv/lib/dotjs/enum.js | 3 +- node_modules/ajv/lib/dotjs/format.js | 7 +- node_modules/ajv/lib/dotjs/if.js | 104 + node_modules/ajv/lib/dotjs/index.js | 33 + node_modules/ajv/lib/dotjs/items.js | 3 +- node_modules/ajv/lib/dotjs/multipleOf.js | 3 +- node_modules/ajv/lib/dotjs/not.js | 3 +- node_modules/ajv/lib/dotjs/oneOf.js | 15 +- node_modules/ajv/lib/dotjs/pattern.js | 3 +- node_modules/ajv/lib/dotjs/properties.js | 190 +- node_modules/ajv/lib/dotjs/propertyNames.js | 5 +- node_modules/ajv/lib/dotjs/ref.js | 7 +- node_modules/ajv/lib/dotjs/required.js | 6 +- node_modules/ajv/lib/dotjs/uniqueItems.js | 19 +- node_modules/ajv/lib/dotjs/validate.js | 108 +- node_modules/ajv/lib/keyword.js | 81 +- node_modules/ajv/lib/patternGroups.js | 36 - node_modules/ajv/lib/refs/$data.json | 17 - node_modules/ajv/lib/refs/data.json | 17 + .../ajv/lib/refs/json-schema-draft-04.json | 7 +- .../ajv/lib/refs/json-schema-draft-07.json | 168 + .../ajv/lib/refs/json-schema-secure.json | 94 + node_modules/ajv/lib/refs/json-schema-v5.json | 250 - node_modules/ajv/package.json | 91 +- node_modules/ajv/scripts/prepare-tests | 5 +- .../ajv/scripts/publish-built-version | 32 + node_modules/ansi-regex/package.json | 23 +- node_modules/ansi-styles/package.json | 23 +- node_modules/arr-diff/LICENSE | 21 - node_modules/arr-diff/README.md | 74 - node_modules/arr-diff/index.js | 58 - node_modules/arr-diff/package.json | 80 - node_modules/arr-flatten/LICENSE | 21 - node_modules/arr-flatten/README.md | 86 - node_modules/arr-flatten/index.js | 22 - node_modules/arr-flatten/package.json | 113 - node_modules/array-equal/package.json | 23 +- node_modules/array-unique/LICENSE | 21 - node_modules/array-unique/README.md | 51 - node_modules/array-unique/index.js | 28 - node_modules/array-unique/package.json | 62 - node_modules/asn1/.npmignore | 2 - node_modules/asn1/.travis.yml | 4 - node_modules/asn1/README.md | 4 +- node_modules/asn1/lib/ber/errors.js | 2 +- node_modules/asn1/lib/ber/index.js | 2 +- node_modules/asn1/lib/ber/reader.js | 37 +- node_modules/asn1/lib/ber/writer.js | 93 +- node_modules/asn1/lib/index.js | 2 +- node_modules/asn1/package.json | 38 +- node_modules/asn1/tst/ber/reader.test.js | 208 - node_modules/asn1/tst/ber/writer.test.js | 370 - node_modules/assert-plus/package.json | 23 +- node_modules/async-limiter/package.json | 23 +- node_modules/asynckit/package.json | 23 +- node_modules/aws-sign2/package.json | 23 +- node_modules/aws4/aws4.js | 2 +- node_modules/aws4/package.json | 22 +- node_modules/babel-code-frame/package.json | 23 +- .../babel-core/node_modules/lodash/LICENSE | 47 + .../babel-core/node_modules/lodash/README.md | 39 + .../node_modules/lodash/_DataView.js | 7 + .../babel-core/node_modules/lodash/_Hash.js | 32 + .../node_modules/lodash/_LazyWrapper.js | 28 + .../node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash/_LodashWrapper.js | 22 + .../babel-core/node_modules/lodash/_Map.js | 7 + .../node_modules/lodash/_MapCache.js | 32 + .../node_modules/lodash/_Promise.js | 7 + .../babel-core/node_modules/lodash/_Set.js | 7 + .../node_modules/lodash/_SetCache.js | 27 + .../babel-core/node_modules/lodash/_Stack.js | 27 + .../babel-core/node_modules/lodash/_Symbol.js | 6 + .../node_modules/lodash/_Uint8Array.js | 6 + .../node_modules/lodash/_WeakMap.js | 7 + .../babel-core/node_modules/lodash/_apply.js | 21 + .../node_modules/lodash/_arrayAggregator.js | 22 + .../node_modules/lodash/_arrayEach.js | 22 + .../node_modules/lodash/_arrayEachRight.js | 21 + .../node_modules/lodash/_arrayEvery.js | 23 + .../node_modules/lodash/_arrayFilter.js | 25 + .../node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../node_modules/lodash/_arrayMap.js | 21 + .../node_modules/lodash/_arrayPush.js | 20 + .../node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash/_arraySome.js | 23 + .../node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + .../node_modules/lodash/_assignValue.js | 28 + .../node_modules/lodash/_assocIndexOf.js | 21 + .../node_modules/lodash/_baseAggregator.js | 21 + .../node_modules/lodash/_baseAssign.js | 17 + .../node_modules/lodash/_baseAssignIn.js | 17 + .../node_modules/lodash/_baseAssignValue.js | 25 + .../babel-core/node_modules/lodash/_baseAt.js | 23 + .../node_modules/lodash/_baseClamp.js | 22 + .../node_modules/lodash/_baseClone.js | 171 + .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../node_modules/lodash/_baseCreate.js | 30 + .../node_modules/lodash/_baseDelay.js | 21 + .../node_modules/lodash/_baseDifference.js | 67 + .../node_modules/lodash/_baseEach.js | 14 + .../node_modules/lodash/_baseEachRight.js | 14 + .../node_modules/lodash/_baseEvery.js | 21 + .../node_modules/lodash/_baseExtremum.js | 32 + .../node_modules/lodash/_baseFill.js | 32 + .../node_modules/lodash/_baseFilter.js | 21 + .../node_modules/lodash/_baseFindIndex.js | 24 + .../node_modules/lodash/_baseFindKey.js | 23 + .../node_modules/lodash/_baseFlatten.js | 38 + .../node_modules/lodash/_baseFor.js | 16 + .../node_modules/lodash/_baseForOwn.js | 16 + .../node_modules/lodash/_baseForOwnRight.js | 16 + .../node_modules/lodash/_baseForRight.js | 15 + .../node_modules/lodash/_baseFunctions.js | 19 + .../node_modules/lodash/_baseGet.js | 24 + .../node_modules/lodash/_baseGetAllKeys.js | 20 + .../node_modules/lodash/_baseGetTag.js | 28 + .../babel-core/node_modules/lodash/_baseGt.js | 14 + .../node_modules/lodash/_baseHas.js | 19 + .../node_modules/lodash/_baseHasIn.js | 13 + .../node_modules/lodash/_baseInRange.js | 18 + .../node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + .../node_modules/lodash/_baseInverter.js | 21 + .../node_modules/lodash/_baseInvoke.js | 24 + .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../node_modules/lodash/_baseIsDate.js | 18 + .../node_modules/lodash/_baseIsEqual.js | 28 + .../node_modules/lodash/_baseIsEqualDeep.js | 83 + .../node_modules/lodash/_baseIsMap.js | 18 + .../node_modules/lodash/_baseIsMatch.js | 62 + .../node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js | 47 + .../node_modules/lodash/_baseIsRegExp.js | 18 + .../node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + .../node_modules/lodash/_baseIteratee.js | 31 + .../node_modules/lodash/_baseKeys.js | 30 + .../node_modules/lodash/_baseKeysIn.js | 33 + .../node_modules/lodash/_baseLodash.js | 10 + .../babel-core/node_modules/lodash/_baseLt.js | 14 + .../node_modules/lodash/_baseMap.js | 22 + .../node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + .../node_modules/lodash/_baseMean.js | 20 + .../node_modules/lodash/_baseMerge.js | 42 + .../node_modules/lodash/_baseMergeDeep.js | 94 + .../node_modules/lodash/_baseNth.js | 20 + .../node_modules/lodash/_baseOrderBy.js | 34 + .../node_modules/lodash/_basePick.js | 19 + .../node_modules/lodash/_basePickBy.js | 30 + .../node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + .../node_modules/lodash/_basePropertyOf.js | 14 + .../node_modules/lodash/_basePullAll.js | 51 + .../node_modules/lodash/_basePullAt.js | 37 + .../node_modules/lodash/_baseRandom.js | 18 + .../node_modules/lodash/_baseRange.js | 28 + .../node_modules/lodash/_baseReduce.js | 23 + .../node_modules/lodash/_baseRepeat.js | 35 + .../node_modules/lodash/_baseRest.js | 17 + .../node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash/_baseSet.js | 47 + .../node_modules/lodash/_baseSetData.js | 17 + .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash/_baseSlice.js | 31 + .../node_modules/lodash/_baseSome.js | 22 + .../node_modules/lodash/_baseSortBy.js | 21 + .../node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 64 + .../node_modules/lodash/_baseSortedUniq.js | 30 + .../node_modules/lodash/_baseSum.js | 24 + .../node_modules/lodash/_baseTimes.js | 20 + .../node_modules/lodash/_baseToNumber.js | 24 + .../node_modules/lodash/_baseToPairs.js | 18 + .../node_modules/lodash/_baseToString.js | 37 + .../node_modules/lodash/_baseUnary.js | 14 + .../node_modules/lodash/_baseUniq.js | 72 + .../node_modules/lodash/_baseUnset.js | 20 + .../node_modules/lodash/_baseUpdate.js | 18 + .../node_modules/lodash/_baseValues.js | 19 + .../node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + .../node_modules/lodash/_baseXor.js | 36 + .../node_modules/lodash/_baseZipObject.js | 23 + .../node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + .../node_modules/lodash/_castFunction.js | 14 + .../node_modules/lodash/_castPath.js | 21 + .../node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash/_castSlice.js | 18 + .../node_modules/lodash/_charsEndIndex.js | 19 + .../node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + .../node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash/_cloneDataView.js | 16 + .../node_modules/lodash/_cloneRegExp.js | 17 + .../node_modules/lodash/_cloneSymbol.js | 18 + .../node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + .../node_modules/lodash/_compareMultiple.js | 44 + .../node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + .../node_modules/lodash/_copyArray.js | 20 + .../node_modules/lodash/_copyObject.js | 40 + .../node_modules/lodash/_copySymbols.js | 16 + .../node_modules/lodash/_copySymbolsIn.js | 16 + .../node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + .../node_modules/lodash/_createAssigner.js | 37 + .../node_modules/lodash/_createBaseEach.js | 32 + .../node_modules/lodash/_createBaseFor.js | 25 + .../node_modules/lodash/_createBind.js | 28 + .../node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + .../node_modules/lodash/_createCtor.js | 37 + .../node_modules/lodash/_createCurry.js | 46 + .../node_modules/lodash/_createFind.js | 25 + .../node_modules/lodash/_createFlow.js | 78 + .../node_modules/lodash/_createHybrid.js | 92 + .../node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + .../node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash/_createPadding.js | 33 + .../node_modules/lodash/_createPartial.js | 43 + .../node_modules/lodash/_createRange.js | 30 + .../node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + .../node_modules/lodash/_createRound.js | 33 + .../node_modules/lodash/_createSet.js | 19 + .../node_modules/lodash/_createToPairs.js | 30 + .../node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + .../node_modules/lodash/_customOmitClone.js | 16 + .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../node_modules/lodash/_equalArrays.js | 83 + .../node_modules/lodash/_equalByTag.js | 112 + .../node_modules/lodash/_equalObjects.js | 89 + .../node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + .../node_modules/lodash/_flatRest.js | 16 + .../node_modules/lodash/_freeGlobal.js | 4 + .../node_modules/lodash/_getAllKeys.js | 16 + .../node_modules/lodash/_getAllKeysIn.js | 17 + .../node_modules/lodash/_getData.js | 15 + .../node_modules/lodash/_getFuncName.js | 31 + .../node_modules/lodash/_getHolder.js | 13 + .../node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash/_getMatchData.js | 24 + .../node_modules/lodash/_getNative.js | 17 + .../node_modules/lodash/_getPrototype.js | 6 + .../node_modules/lodash/_getRawTag.js | 46 + .../node_modules/lodash/_getSymbols.js | 30 + .../node_modules/lodash/_getSymbolsIn.js | 25 + .../babel-core/node_modules/lodash/_getTag.js | 58 + .../node_modules/lodash/_getValue.js | 13 + .../node_modules/lodash/_getView.js | 33 + .../node_modules/lodash/_getWrapDetails.js | 17 + .../node_modules/lodash/_hasPath.js | 39 + .../node_modules/lodash/_hasUnicode.js | 26 + .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../node_modules/lodash/_hashClear.js | 15 + .../node_modules/lodash/_hashDelete.js | 17 + .../node_modules/lodash/_hashGet.js | 30 + .../node_modules/lodash/_hashHas.js | 23 + .../node_modules/lodash/_hashSet.js | 23 + .../node_modules/lodash/_initCloneArray.js | 26 + .../node_modules/lodash/_initCloneByTag.js | 77 + .../node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../node_modules/lodash/_isIndex.js | 25 + .../node_modules/lodash/_isIterateeCall.js | 30 + .../babel-core/node_modules/lodash/_isKey.js | 29 + .../node_modules/lodash/_isKeyable.js | 15 + .../node_modules/lodash/_isLaziable.js | 28 + .../node_modules/lodash/_isMaskable.js | 14 + .../node_modules/lodash/_isMasked.js | 20 + .../node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + .../node_modules/lodash/_iteratorToArray.js | 18 + .../node_modules/lodash/_lazyClone.js | 23 + .../node_modules/lodash/_lazyReverse.js | 23 + .../node_modules/lodash/_lazyValue.js | 69 + .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js | 35 + .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js | 16 + .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js | 21 + .../node_modules/lodash/_mapCacheDelete.js | 18 + .../node_modules/lodash/_mapCacheGet.js | 16 + .../node_modules/lodash/_mapCacheHas.js | 16 + .../node_modules/lodash/_mapCacheSet.js | 22 + .../node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + .../node_modules/lodash/_memoizeCapped.js | 26 + .../node_modules/lodash/_mergeData.js | 90 + .../node_modules/lodash/_metaMap.js | 6 + .../node_modules/lodash/_nativeCreate.js | 6 + .../node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../node_modules/lodash/_nodeUtil.js | 30 + .../node_modules/lodash/_objectToString.js | 22 + .../node_modules/lodash/_overArg.js | 15 + .../node_modules/lodash/_overRest.js | 36 + .../babel-core/node_modules/lodash/_parent.js | 16 + .../node_modules/lodash/_reEscape.js | 4 + .../node_modules/lodash/_reEvaluate.js | 4 + .../node_modules/lodash/_reInterpolate.js | 4 + .../node_modules/lodash/_realNames.js | 4 + .../node_modules/lodash/_reorder.js | 29 + .../node_modules/lodash/_replaceHolders.js | 29 + .../babel-core/node_modules/lodash/_root.js | 9 + .../node_modules/lodash/_safeGet.js | 17 + .../node_modules/lodash/_setCacheAdd.js | 19 + .../node_modules/lodash/_setCacheHas.js | 14 + .../node_modules/lodash/_setData.js | 20 + .../node_modules/lodash/_setToArray.js | 18 + .../node_modules/lodash/_setToPairs.js | 18 + .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../node_modules/lodash/_stackClear.js | 15 + .../node_modules/lodash/_stackDelete.js | 18 + .../node_modules/lodash/_stackGet.js | 14 + .../node_modules/lodash/_stackHas.js | 14 + .../node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash/_stringToPath.js | 27 + .../babel-core/node_modules/lodash/_toKey.js | 21 + .../node_modules/lodash/_toSource.js | 26 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + .../node_modules/lodash/_unicodeSize.js | 44 + .../node_modules/lodash/_unicodeToArray.js | 40 + .../node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash/_wrapperClone.js | 23 + .../babel-core/node_modules/lodash/add.js | 22 + .../babel-core/node_modules/lodash/after.js | 42 + .../babel-core/node_modules/lodash/array.js | 67 + .../babel-core/node_modules/lodash/ary.js | 29 + .../babel-core/node_modules/lodash/assign.js | 58 + .../node_modules/lodash/assignIn.js | 40 + .../node_modules/lodash/assignInWith.js | 38 + .../node_modules/lodash/assignWith.js | 37 + .../babel-core/node_modules/lodash/at.js | 23 + .../babel-core/node_modules/lodash/attempt.js | 35 + .../babel-core/node_modules/lodash/before.js | 40 + .../babel-core/node_modules/lodash/bind.js | 57 + .../babel-core/node_modules/lodash/bindAll.js | 41 + .../babel-core/node_modules/lodash/bindKey.js | 68 + .../node_modules/lodash/camelCase.js | 29 + .../node_modules/lodash/capitalize.js | 23 + .../node_modules/lodash/castArray.js | 44 + .../babel-core/node_modules/lodash/ceil.js | 26 + .../babel-core/node_modules/lodash/chain.js | 38 + .../babel-core/node_modules/lodash/chunk.js | 50 + .../babel-core/node_modules/lodash/clamp.js | 39 + .../babel-core/node_modules/lodash/clone.js | 36 + .../node_modules/lodash/cloneDeep.js | 29 + .../node_modules/lodash/cloneDeepWith.js | 40 + .../node_modules/lodash/cloneWith.js | 42 + .../node_modules/lodash/collection.js | 30 + .../babel-core/node_modules/lodash/commit.js | 33 + .../babel-core/node_modules/lodash/compact.js | 31 + .../babel-core/node_modules/lodash/concat.js | 43 + .../babel-core/node_modules/lodash/cond.js | 60 + .../node_modules/lodash/conforms.js | 35 + .../node_modules/lodash/conformsTo.js | 32 + .../node_modules/lodash/constant.js | 26 + .../babel-core/node_modules/lodash/core.js | 3854 ++++ .../node_modules/lodash/core.min.js | 29 + .../babel-core/node_modules/lodash/countBy.js | 40 + .../babel-core/node_modules/lodash/create.js | 43 + .../babel-core/node_modules/lodash/curry.js | 57 + .../node_modules/lodash/curryRight.js | 54 + .../babel-core/node_modules/lodash/date.js | 3 + .../node_modules/lodash/debounce.js | 190 + .../babel-core/node_modules/lodash/deburr.js | 45 + .../node_modules/lodash/defaultTo.js | 25 + .../node_modules/lodash/defaults.js | 64 + .../node_modules/lodash/defaultsDeep.js | 30 + .../babel-core/node_modules/lodash/defer.js | 26 + .../babel-core/node_modules/lodash/delay.js | 28 + .../node_modules/lodash/difference.js | 33 + .../node_modules/lodash/differenceBy.js | 44 + .../node_modules/lodash/differenceWith.js | 40 + .../babel-core/node_modules/lodash/divide.js | 22 + .../babel-core/node_modules/lodash/drop.js | 38 + .../node_modules/lodash/dropRight.js | 39 + .../node_modules/lodash/dropRightWhile.js | 45 + .../node_modules/lodash/dropWhile.js | 45 + .../babel-core/node_modules/lodash/each.js | 1 + .../node_modules/lodash/eachRight.js | 1 + .../node_modules/lodash/endsWith.js | 43 + .../babel-core/node_modules/lodash/entries.js | 1 + .../node_modules/lodash/entriesIn.js | 1 + .../babel-core/node_modules/lodash/eq.js | 37 + .../babel-core/node_modules/lodash/escape.js | 43 + .../node_modules/lodash/escapeRegExp.js | 32 + .../babel-core/node_modules/lodash/every.js | 56 + .../babel-core/node_modules/lodash/extend.js | 1 + .../node_modules/lodash/extendWith.js | 1 + .../babel-core/node_modules/lodash/fill.js | 45 + .../babel-core/node_modules/lodash/filter.js | 48 + .../babel-core/node_modules/lodash/find.js | 42 + .../node_modules/lodash/findIndex.js | 55 + .../babel-core/node_modules/lodash/findKey.js | 44 + .../node_modules/lodash/findLast.js | 25 + .../node_modules/lodash/findLastIndex.js | 59 + .../node_modules/lodash/findLastKey.js | 44 + .../babel-core/node_modules/lodash/first.js | 1 + .../babel-core/node_modules/lodash/flatMap.js | 29 + .../node_modules/lodash/flatMapDeep.js | 31 + .../node_modules/lodash/flatMapDepth.js | 31 + .../babel-core/node_modules/lodash/flatten.js | 22 + .../node_modules/lodash/flattenDeep.js | 25 + .../node_modules/lodash/flattenDepth.js | 33 + .../babel-core/node_modules/lodash/flip.js | 28 + .../babel-core/node_modules/lodash/floor.js | 26 + .../babel-core/node_modules/lodash/flow.js | 27 + .../node_modules/lodash/flowRight.js | 26 + .../babel-core/node_modules/lodash/forEach.js | 41 + .../node_modules/lodash/forEachRight.js | 31 + .../babel-core/node_modules/lodash/forIn.js | 39 + .../node_modules/lodash/forInRight.js | 37 + .../babel-core/node_modules/lodash/forOwn.js | 36 + .../node_modules/lodash/forOwnRight.js | 34 + .../babel-core/node_modules/lodash/fp.js | 2 + .../babel-core/node_modules/lodash/fp/F.js | 1 + .../babel-core/node_modules/lodash/fp/T.js | 1 + .../babel-core/node_modules/lodash/fp/__.js | 1 + .../node_modules/lodash/fp/_baseConvert.js | 569 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + .../node_modules/lodash/fp/_falseOptions.js | 7 + .../node_modules/lodash/fp/_mapping.js | 358 + .../node_modules/lodash/fp/_util.js | 16 + .../babel-core/node_modules/lodash/fp/add.js | 5 + .../node_modules/lodash/fp/after.js | 5 + .../babel-core/node_modules/lodash/fp/all.js | 1 + .../node_modules/lodash/fp/allPass.js | 1 + .../node_modules/lodash/fp/always.js | 1 + .../babel-core/node_modules/lodash/fp/any.js | 1 + .../node_modules/lodash/fp/anyPass.js | 1 + .../node_modules/lodash/fp/apply.js | 1 + .../node_modules/lodash/fp/array.js | 2 + .../babel-core/node_modules/lodash/fp/ary.js | 5 + .../node_modules/lodash/fp/assign.js | 5 + .../node_modules/lodash/fp/assignAll.js | 5 + .../node_modules/lodash/fp/assignAllWith.js | 5 + .../node_modules/lodash/fp/assignIn.js | 5 + .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash/fp/assignInWith.js | 5 + .../node_modules/lodash/fp/assignWith.js | 5 + .../node_modules/lodash/fp/assoc.js | 1 + .../node_modules/lodash/fp/assocPath.js | 1 + .../babel-core/node_modules/lodash/fp/at.js | 5 + .../node_modules/lodash/fp/attempt.js | 5 + .../node_modules/lodash/fp/before.js | 5 + .../babel-core/node_modules/lodash/fp/bind.js | 5 + .../node_modules/lodash/fp/bindAll.js | 5 + .../node_modules/lodash/fp/bindKey.js | 5 + .../node_modules/lodash/fp/camelCase.js | 5 + .../node_modules/lodash/fp/capitalize.js | 5 + .../node_modules/lodash/fp/castArray.js | 5 + .../babel-core/node_modules/lodash/fp/ceil.js | 5 + .../node_modules/lodash/fp/chain.js | 5 + .../node_modules/lodash/fp/chunk.js | 5 + .../node_modules/lodash/fp/clamp.js | 5 + .../node_modules/lodash/fp/clone.js | 5 + .../node_modules/lodash/fp/cloneDeep.js | 5 + .../node_modules/lodash/fp/cloneDeepWith.js | 5 + .../node_modules/lodash/fp/cloneWith.js | 5 + .../node_modules/lodash/fp/collection.js | 2 + .../node_modules/lodash/fp/commit.js | 5 + .../node_modules/lodash/fp/compact.js | 5 + .../node_modules/lodash/fp/complement.js | 1 + .../node_modules/lodash/fp/compose.js | 1 + .../node_modules/lodash/fp/concat.js | 5 + .../babel-core/node_modules/lodash/fp/cond.js | 5 + .../node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../node_modules/lodash/fp/constant.js | 5 + .../node_modules/lodash/fp/contains.js | 1 + .../node_modules/lodash/fp/convert.js | 18 + .../node_modules/lodash/fp/countBy.js | 5 + .../node_modules/lodash/fp/create.js | 5 + .../node_modules/lodash/fp/curry.js | 5 + .../node_modules/lodash/fp/curryN.js | 5 + .../node_modules/lodash/fp/curryRight.js | 5 + .../node_modules/lodash/fp/curryRightN.js | 5 + .../babel-core/node_modules/lodash/fp/date.js | 2 + .../node_modules/lodash/fp/debounce.js | 5 + .../node_modules/lodash/fp/deburr.js | 5 + .../node_modules/lodash/fp/defaultTo.js | 5 + .../node_modules/lodash/fp/defaults.js | 5 + .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../node_modules/lodash/fp/defer.js | 5 + .../node_modules/lodash/fp/delay.js | 5 + .../node_modules/lodash/fp/difference.js | 5 + .../node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + .../node_modules/lodash/fp/dissoc.js | 1 + .../node_modules/lodash/fp/dissocPath.js | 1 + .../node_modules/lodash/fp/divide.js | 5 + .../babel-core/node_modules/lodash/fp/drop.js | 5 + .../node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + .../node_modules/lodash/fp/dropWhile.js | 5 + .../babel-core/node_modules/lodash/fp/each.js | 1 + .../node_modules/lodash/fp/eachRight.js | 1 + .../node_modules/lodash/fp/endsWith.js | 5 + .../node_modules/lodash/fp/entries.js | 1 + .../node_modules/lodash/fp/entriesIn.js | 1 + .../babel-core/node_modules/lodash/fp/eq.js | 5 + .../node_modules/lodash/fp/equals.js | 1 + .../node_modules/lodash/fp/escape.js | 5 + .../node_modules/lodash/fp/escapeRegExp.js | 5 + .../node_modules/lodash/fp/every.js | 5 + .../node_modules/lodash/fp/extend.js | 1 + .../node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash/fp/extendWith.js | 1 + .../babel-core/node_modules/lodash/fp/fill.js | 5 + .../node_modules/lodash/fp/filter.js | 5 + .../babel-core/node_modules/lodash/fp/find.js | 5 + .../node_modules/lodash/fp/findFrom.js | 5 + .../node_modules/lodash/fp/findIndex.js | 5 + .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../node_modules/lodash/fp/findKey.js | 5 + .../node_modules/lodash/fp/findLast.js | 5 + .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash/fp/findLastKey.js | 5 + .../node_modules/lodash/fp/first.js | 1 + .../node_modules/lodash/fp/flatMap.js | 5 + .../node_modules/lodash/fp/flatMapDeep.js | 5 + .../node_modules/lodash/fp/flatMapDepth.js | 5 + .../node_modules/lodash/fp/flatten.js | 5 + .../node_modules/lodash/fp/flattenDeep.js | 5 + .../node_modules/lodash/fp/flattenDepth.js | 5 + .../babel-core/node_modules/lodash/fp/flip.js | 5 + .../node_modules/lodash/fp/floor.js | 5 + .../babel-core/node_modules/lodash/fp/flow.js | 5 + .../node_modules/lodash/fp/flowRight.js | 5 + .../node_modules/lodash/fp/forEach.js | 5 + .../node_modules/lodash/fp/forEachRight.js | 5 + .../node_modules/lodash/fp/forIn.js | 5 + .../node_modules/lodash/fp/forInRight.js | 5 + .../node_modules/lodash/fp/forOwn.js | 5 + .../node_modules/lodash/fp/forOwnRight.js | 5 + .../node_modules/lodash/fp/fromPairs.js | 5 + .../node_modules/lodash/fp/function.js | 2 + .../node_modules/lodash/fp/functions.js | 5 + .../node_modules/lodash/fp/functionsIn.js | 5 + .../babel-core/node_modules/lodash/fp/get.js | 5 + .../node_modules/lodash/fp/getOr.js | 5 + .../node_modules/lodash/fp/groupBy.js | 5 + .../babel-core/node_modules/lodash/fp/gt.js | 5 + .../babel-core/node_modules/lodash/fp/gte.js | 5 + .../babel-core/node_modules/lodash/fp/has.js | 5 + .../node_modules/lodash/fp/hasIn.js | 5 + .../babel-core/node_modules/lodash/fp/head.js | 5 + .../node_modules/lodash/fp/identical.js | 1 + .../node_modules/lodash/fp/identity.js | 5 + .../node_modules/lodash/fp/inRange.js | 5 + .../node_modules/lodash/fp/includes.js | 5 + .../node_modules/lodash/fp/includesFrom.js | 5 + .../node_modules/lodash/fp/indexBy.js | 1 + .../node_modules/lodash/fp/indexOf.js | 5 + .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../babel-core/node_modules/lodash/fp/init.js | 1 + .../node_modules/lodash/fp/initial.js | 5 + .../node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + .../node_modules/lodash/fp/invert.js | 5 + .../node_modules/lodash/fp/invertBy.js | 5 + .../node_modules/lodash/fp/invertObj.js | 1 + .../node_modules/lodash/fp/invoke.js | 5 + .../node_modules/lodash/fp/invokeArgs.js | 5 + .../node_modules/lodash/fp/invokeArgsMap.js | 5 + .../node_modules/lodash/fp/invokeMap.js | 5 + .../node_modules/lodash/fp/isArguments.js | 5 + .../node_modules/lodash/fp/isArray.js | 5 + .../node_modules/lodash/fp/isArrayBuffer.js | 5 + .../node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + .../node_modules/lodash/fp/isBoolean.js | 5 + .../node_modules/lodash/fp/isBuffer.js | 5 + .../node_modules/lodash/fp/isDate.js | 5 + .../node_modules/lodash/fp/isElement.js | 5 + .../node_modules/lodash/fp/isEmpty.js | 5 + .../node_modules/lodash/fp/isEqual.js | 5 + .../node_modules/lodash/fp/isEqualWith.js | 5 + .../node_modules/lodash/fp/isError.js | 5 + .../node_modules/lodash/fp/isFinite.js | 5 + .../node_modules/lodash/fp/isFunction.js | 5 + .../node_modules/lodash/fp/isInteger.js | 5 + .../node_modules/lodash/fp/isLength.js | 5 + .../node_modules/lodash/fp/isMap.js | 5 + .../node_modules/lodash/fp/isMatch.js | 5 + .../node_modules/lodash/fp/isMatchWith.js | 5 + .../node_modules/lodash/fp/isNaN.js | 5 + .../node_modules/lodash/fp/isNative.js | 5 + .../node_modules/lodash/fp/isNil.js | 5 + .../node_modules/lodash/fp/isNull.js | 5 + .../node_modules/lodash/fp/isNumber.js | 5 + .../node_modules/lodash/fp/isObject.js | 5 + .../node_modules/lodash/fp/isObjectLike.js | 5 + .../node_modules/lodash/fp/isPlainObject.js | 5 + .../node_modules/lodash/fp/isRegExp.js | 5 + .../node_modules/lodash/fp/isSafeInteger.js | 5 + .../node_modules/lodash/fp/isSet.js | 5 + .../node_modules/lodash/fp/isString.js | 5 + .../node_modules/lodash/fp/isSymbol.js | 5 + .../node_modules/lodash/fp/isTypedArray.js | 5 + .../node_modules/lodash/fp/isUndefined.js | 5 + .../node_modules/lodash/fp/isWeakMap.js | 5 + .../node_modules/lodash/fp/isWeakSet.js | 5 + .../node_modules/lodash/fp/iteratee.js | 5 + .../babel-core/node_modules/lodash/fp/join.js | 5 + .../babel-core/node_modules/lodash/fp/juxt.js | 1 + .../node_modules/lodash/fp/kebabCase.js | 5 + .../node_modules/lodash/fp/keyBy.js | 5 + .../babel-core/node_modules/lodash/fp/keys.js | 5 + .../node_modules/lodash/fp/keysIn.js | 5 + .../babel-core/node_modules/lodash/fp/lang.js | 2 + .../babel-core/node_modules/lodash/fp/last.js | 5 + .../node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../node_modules/lodash/fp/lowerCase.js | 5 + .../node_modules/lodash/fp/lowerFirst.js | 5 + .../babel-core/node_modules/lodash/fp/lt.js | 5 + .../babel-core/node_modules/lodash/fp/lte.js | 5 + .../babel-core/node_modules/lodash/fp/map.js | 5 + .../node_modules/lodash/fp/mapKeys.js | 5 + .../node_modules/lodash/fp/mapValues.js | 5 + .../node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + .../babel-core/node_modules/lodash/fp/math.js | 2 + .../babel-core/node_modules/lodash/fp/max.js | 5 + .../node_modules/lodash/fp/maxBy.js | 5 + .../babel-core/node_modules/lodash/fp/mean.js | 5 + .../node_modules/lodash/fp/meanBy.js | 5 + .../node_modules/lodash/fp/memoize.js | 5 + .../node_modules/lodash/fp/merge.js | 5 + .../node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../node_modules/lodash/fp/mergeWith.js | 5 + .../node_modules/lodash/fp/method.js | 5 + .../node_modules/lodash/fp/methodOf.js | 5 + .../babel-core/node_modules/lodash/fp/min.js | 5 + .../node_modules/lodash/fp/minBy.js | 5 + .../node_modules/lodash/fp/mixin.js | 5 + .../node_modules/lodash/fp/multiply.js | 5 + .../babel-core/node_modules/lodash/fp/nAry.js | 1 + .../node_modules/lodash/fp/negate.js | 5 + .../babel-core/node_modules/lodash/fp/next.js | 5 + .../babel-core/node_modules/lodash/fp/noop.js | 5 + .../babel-core/node_modules/lodash/fp/now.js | 5 + .../babel-core/node_modules/lodash/fp/nth.js | 5 + .../node_modules/lodash/fp/nthArg.js | 5 + .../node_modules/lodash/fp/number.js | 2 + .../node_modules/lodash/fp/object.js | 2 + .../babel-core/node_modules/lodash/fp/omit.js | 5 + .../node_modules/lodash/fp/omitAll.js | 1 + .../node_modules/lodash/fp/omitBy.js | 5 + .../babel-core/node_modules/lodash/fp/once.js | 5 + .../node_modules/lodash/fp/orderBy.js | 5 + .../babel-core/node_modules/lodash/fp/over.js | 5 + .../node_modules/lodash/fp/overArgs.js | 5 + .../node_modules/lodash/fp/overEvery.js | 5 + .../node_modules/lodash/fp/overSome.js | 5 + .../babel-core/node_modules/lodash/fp/pad.js | 5 + .../node_modules/lodash/fp/padChars.js | 5 + .../node_modules/lodash/fp/padCharsEnd.js | 5 + .../node_modules/lodash/fp/padCharsStart.js | 5 + .../node_modules/lodash/fp/padEnd.js | 5 + .../node_modules/lodash/fp/padStart.js | 5 + .../node_modules/lodash/fp/parseInt.js | 5 + .../node_modules/lodash/fp/partial.js | 5 + .../node_modules/lodash/fp/partialRight.js | 5 + .../node_modules/lodash/fp/partition.js | 5 + .../babel-core/node_modules/lodash/fp/path.js | 1 + .../node_modules/lodash/fp/pathEq.js | 1 + .../node_modules/lodash/fp/pathOr.js | 1 + .../node_modules/lodash/fp/paths.js | 1 + .../babel-core/node_modules/lodash/fp/pick.js | 5 + .../node_modules/lodash/fp/pickAll.js | 1 + .../node_modules/lodash/fp/pickBy.js | 5 + .../babel-core/node_modules/lodash/fp/pipe.js | 1 + .../node_modules/lodash/fp/placeholder.js | 6 + .../node_modules/lodash/fp/plant.js | 5 + .../node_modules/lodash/fp/pluck.js | 1 + .../babel-core/node_modules/lodash/fp/prop.js | 1 + .../node_modules/lodash/fp/propEq.js | 1 + .../node_modules/lodash/fp/propOr.js | 1 + .../node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../node_modules/lodash/fp/props.js | 1 + .../babel-core/node_modules/lodash/fp/pull.js | 5 + .../node_modules/lodash/fp/pullAll.js | 5 + .../node_modules/lodash/fp/pullAllBy.js | 5 + .../node_modules/lodash/fp/pullAllWith.js | 5 + .../node_modules/lodash/fp/pullAt.js | 5 + .../node_modules/lodash/fp/random.js | 5 + .../node_modules/lodash/fp/range.js | 5 + .../node_modules/lodash/fp/rangeRight.js | 5 + .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../node_modules/lodash/fp/rearg.js | 5 + .../node_modules/lodash/fp/reduce.js | 5 + .../node_modules/lodash/fp/reduceRight.js | 5 + .../node_modules/lodash/fp/reject.js | 5 + .../node_modules/lodash/fp/remove.js | 5 + .../node_modules/lodash/fp/repeat.js | 5 + .../node_modules/lodash/fp/replace.js | 5 + .../babel-core/node_modules/lodash/fp/rest.js | 5 + .../node_modules/lodash/fp/restFrom.js | 5 + .../node_modules/lodash/fp/result.js | 5 + .../node_modules/lodash/fp/reverse.js | 5 + .../node_modules/lodash/fp/round.js | 5 + .../node_modules/lodash/fp/sample.js | 5 + .../node_modules/lodash/fp/sampleSize.js | 5 + .../babel-core/node_modules/lodash/fp/seq.js | 2 + .../babel-core/node_modules/lodash/fp/set.js | 5 + .../node_modules/lodash/fp/setWith.js | 5 + .../node_modules/lodash/fp/shuffle.js | 5 + .../babel-core/node_modules/lodash/fp/size.js | 5 + .../node_modules/lodash/fp/slice.js | 5 + .../node_modules/lodash/fp/snakeCase.js | 5 + .../babel-core/node_modules/lodash/fp/some.js | 5 + .../node_modules/lodash/fp/sortBy.js | 5 + .../node_modules/lodash/fp/sortedIndex.js | 5 + .../node_modules/lodash/fp/sortedIndexBy.js | 5 + .../node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + .../node_modules/lodash/fp/sortedUniq.js | 5 + .../node_modules/lodash/fp/sortedUniqBy.js | 5 + .../node_modules/lodash/fp/split.js | 5 + .../node_modules/lodash/fp/spread.js | 5 + .../node_modules/lodash/fp/spreadFrom.js | 5 + .../node_modules/lodash/fp/startCase.js | 5 + .../node_modules/lodash/fp/startsWith.js | 5 + .../node_modules/lodash/fp/string.js | 2 + .../node_modules/lodash/fp/stubArray.js | 5 + .../node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js | 5 + .../node_modules/lodash/fp/stubString.js | 5 + .../node_modules/lodash/fp/stubTrue.js | 5 + .../node_modules/lodash/fp/subtract.js | 5 + .../babel-core/node_modules/lodash/fp/sum.js | 5 + .../node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../babel-core/node_modules/lodash/fp/tail.js | 5 + .../babel-core/node_modules/lodash/fp/take.js | 5 + .../node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + .../node_modules/lodash/fp/takeWhile.js | 5 + .../babel-core/node_modules/lodash/fp/tap.js | 5 + .../node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + .../node_modules/lodash/fp/throttle.js | 5 + .../babel-core/node_modules/lodash/fp/thru.js | 5 + .../node_modules/lodash/fp/times.js | 5 + .../node_modules/lodash/fp/toArray.js | 5 + .../node_modules/lodash/fp/toFinite.js | 5 + .../node_modules/lodash/fp/toInteger.js | 5 + .../node_modules/lodash/fp/toIterator.js | 5 + .../node_modules/lodash/fp/toJSON.js | 5 + .../node_modules/lodash/fp/toLength.js | 5 + .../node_modules/lodash/fp/toLower.js | 5 + .../node_modules/lodash/fp/toNumber.js | 5 + .../node_modules/lodash/fp/toPairs.js | 5 + .../node_modules/lodash/fp/toPairsIn.js | 5 + .../node_modules/lodash/fp/toPath.js | 5 + .../node_modules/lodash/fp/toPlainObject.js | 5 + .../node_modules/lodash/fp/toSafeInteger.js | 5 + .../node_modules/lodash/fp/toString.js | 5 + .../node_modules/lodash/fp/toUpper.js | 5 + .../node_modules/lodash/fp/transform.js | 5 + .../babel-core/node_modules/lodash/fp/trim.js | 5 + .../node_modules/lodash/fp/trimChars.js | 5 + .../node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + .../node_modules/lodash/fp/trimEnd.js | 5 + .../node_modules/lodash/fp/trimStart.js | 5 + .../node_modules/lodash/fp/truncate.js | 5 + .../node_modules/lodash/fp/unapply.js | 1 + .../node_modules/lodash/fp/unary.js | 5 + .../node_modules/lodash/fp/unescape.js | 5 + .../node_modules/lodash/fp/union.js | 5 + .../node_modules/lodash/fp/unionBy.js | 5 + .../node_modules/lodash/fp/unionWith.js | 5 + .../babel-core/node_modules/lodash/fp/uniq.js | 5 + .../node_modules/lodash/fp/uniqBy.js | 5 + .../node_modules/lodash/fp/uniqWith.js | 5 + .../node_modules/lodash/fp/uniqueId.js | 5 + .../node_modules/lodash/fp/unnest.js | 1 + .../node_modules/lodash/fp/unset.js | 5 + .../node_modules/lodash/fp/unzip.js | 5 + .../node_modules/lodash/fp/unzipWith.js | 5 + .../node_modules/lodash/fp/update.js | 5 + .../node_modules/lodash/fp/updateWith.js | 5 + .../node_modules/lodash/fp/upperCase.js | 5 + .../node_modules/lodash/fp/upperFirst.js | 5 + .../node_modules/lodash/fp/useWith.js | 1 + .../babel-core/node_modules/lodash/fp/util.js | 2 + .../node_modules/lodash/fp/value.js | 5 + .../node_modules/lodash/fp/valueOf.js | 5 + .../node_modules/lodash/fp/values.js | 5 + .../node_modules/lodash/fp/valuesIn.js | 5 + .../node_modules/lodash/fp/where.js | 1 + .../node_modules/lodash/fp/whereEq.js | 1 + .../node_modules/lodash/fp/without.js | 5 + .../node_modules/lodash/fp/words.js | 5 + .../babel-core/node_modules/lodash/fp/wrap.js | 5 + .../node_modules/lodash/fp/wrapperAt.js | 5 + .../node_modules/lodash/fp/wrapperChain.js | 5 + .../node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + .../node_modules/lodash/fp/wrapperValue.js | 5 + .../babel-core/node_modules/lodash/fp/xor.js | 5 + .../node_modules/lodash/fp/xorBy.js | 5 + .../node_modules/lodash/fp/xorWith.js | 5 + .../babel-core/node_modules/lodash/fp/zip.js | 5 + .../node_modules/lodash/fp/zipAll.js | 5 + .../node_modules/lodash/fp/zipObj.js | 1 + .../node_modules/lodash/fp/zipObject.js | 5 + .../node_modules/lodash/fp/zipObjectDeep.js | 5 + .../node_modules/lodash/fp/zipWith.js | 5 + .../node_modules/lodash/fromPairs.js | 28 + .../node_modules/lodash/function.js | 25 + .../node_modules/lodash/functions.js | 31 + .../node_modules/lodash/functionsIn.js | 31 + .../babel-core/node_modules/lodash/get.js | 33 + .../babel-core/node_modules/lodash/groupBy.js | 41 + .../babel-core/node_modules/lodash/gt.js | 29 + .../babel-core/node_modules/lodash/gte.js | 30 + .../babel-core/node_modules/lodash/has.js | 35 + .../babel-core/node_modules/lodash/hasIn.js | 34 + .../babel-core/node_modules/lodash/head.js | 23 + .../node_modules/lodash/identity.js | 21 + .../babel-core/node_modules/lodash/inRange.js | 55 + .../node_modules/lodash/includes.js | 53 + .../babel-core/node_modules/lodash/index.js | 1 + .../babel-core/node_modules/lodash/indexOf.js | 42 + .../babel-core/node_modules/lodash/initial.js | 22 + .../node_modules/lodash/intersection.js | 30 + .../node_modules/lodash/intersectionBy.js | 45 + .../node_modules/lodash/intersectionWith.js | 41 + .../babel-core/node_modules/lodash/invert.js | 42 + .../node_modules/lodash/invertBy.js | 56 + .../babel-core/node_modules/lodash/invoke.js | 24 + .../node_modules/lodash/invokeMap.js | 41 + .../node_modules/lodash/isArguments.js | 36 + .../babel-core/node_modules/lodash/isArray.js | 26 + .../node_modules/lodash/isArrayBuffer.js | 27 + .../node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + .../node_modules/lodash/isBoolean.js | 29 + .../node_modules/lodash/isBuffer.js | 38 + .../babel-core/node_modules/lodash/isDate.js | 27 + .../node_modules/lodash/isElement.js | 25 + .../babel-core/node_modules/lodash/isEmpty.js | 77 + .../babel-core/node_modules/lodash/isEqual.js | 35 + .../node_modules/lodash/isEqualWith.js | 41 + .../babel-core/node_modules/lodash/isError.js | 36 + .../node_modules/lodash/isFinite.js | 36 + .../node_modules/lodash/isFunction.js | 37 + .../node_modules/lodash/isInteger.js | 33 + .../node_modules/lodash/isLength.js | 35 + .../babel-core/node_modules/lodash/isMap.js | 27 + .../babel-core/node_modules/lodash/isMatch.js | 36 + .../node_modules/lodash/isMatchWith.js | 41 + .../babel-core/node_modules/lodash/isNaN.js | 38 + .../node_modules/lodash/isNative.js | 40 + .../babel-core/node_modules/lodash/isNil.js | 25 + .../babel-core/node_modules/lodash/isNull.js | 22 + .../node_modules/lodash/isNumber.js | 38 + .../node_modules/lodash/isObject.js | 31 + .../node_modules/lodash/isObjectLike.js | 29 + .../node_modules/lodash/isPlainObject.js | 62 + .../node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash/isSafeInteger.js | 37 + .../babel-core/node_modules/lodash/isSet.js | 27 + .../node_modules/lodash/isString.js | 30 + .../node_modules/lodash/isSymbol.js | 29 + .../node_modules/lodash/isTypedArray.js | 27 + .../node_modules/lodash/isUndefined.js | 22 + .../node_modules/lodash/isWeakMap.js | 28 + .../node_modules/lodash/isWeakSet.js | 28 + .../node_modules/lodash/iteratee.js | 53 + .../babel-core/node_modules/lodash/join.js | 26 + .../node_modules/lodash/kebabCase.js | 28 + .../babel-core/node_modules/lodash/keyBy.js | 36 + .../babel-core/node_modules/lodash/keys.js | 37 + .../babel-core/node_modules/lodash/keysIn.js | 32 + .../babel-core/node_modules/lodash/lang.js | 58 + .../babel-core/node_modules/lodash/last.js | 20 + .../node_modules/lodash/lastIndexOf.js | 46 + .../babel-core/node_modules/lodash/lodash.js | 17107 ++++++++++++++++ .../node_modules/lodash/lodash.min.js | 137 + .../node_modules/lodash/lowerCase.js | 27 + .../node_modules/lodash/lowerFirst.js | 22 + .../babel-core/node_modules/lodash/lt.js | 29 + .../babel-core/node_modules/lodash/lte.js | 30 + .../babel-core/node_modules/lodash/map.js | 53 + .../babel-core/node_modules/lodash/mapKeys.js | 36 + .../node_modules/lodash/mapValues.js | 43 + .../babel-core/node_modules/lodash/matches.js | 39 + .../node_modules/lodash/matchesProperty.js | 37 + .../babel-core/node_modules/lodash/math.js | 17 + .../babel-core/node_modules/lodash/max.js | 29 + .../babel-core/node_modules/lodash/maxBy.js | 34 + .../babel-core/node_modules/lodash/mean.js | 22 + .../babel-core/node_modules/lodash/meanBy.js | 31 + .../babel-core/node_modules/lodash/memoize.js | 73 + .../babel-core/node_modules/lodash/merge.js | 39 + .../node_modules/lodash/mergeWith.js | 39 + .../babel-core/node_modules/lodash/method.js | 34 + .../node_modules/lodash/methodOf.js | 33 + .../babel-core/node_modules/lodash/min.js | 29 + .../babel-core/node_modules/lodash/minBy.js | 34 + .../babel-core/node_modules/lodash/mixin.js | 74 + .../node_modules/lodash/multiply.js | 22 + .../babel-core/node_modules/lodash/negate.js | 40 + .../babel-core/node_modules/lodash/next.js | 35 + .../babel-core/node_modules/lodash/noop.js | 17 + .../babel-core/node_modules/lodash/now.js | 23 + .../babel-core/node_modules/lodash/nth.js | 29 + .../babel-core/node_modules/lodash/nthArg.js | 32 + .../babel-core/node_modules/lodash/number.js | 5 + .../babel-core/node_modules/lodash/object.js | 49 + .../babel-core/node_modules/lodash/omit.js | 57 + .../babel-core/node_modules/lodash/omitBy.js | 29 + .../babel-core/node_modules/lodash/once.js | 25 + .../babel-core/node_modules/lodash/orderBy.js | 47 + .../babel-core/node_modules/lodash/over.js | 24 + .../node_modules/lodash/overArgs.js | 61 + .../node_modules/lodash/overEvery.js | 30 + .../node_modules/lodash/overSome.js | 30 + .../node_modules/lodash/package.json | 66 + .../babel-core/node_modules/lodash/pad.js | 49 + .../babel-core/node_modules/lodash/padEnd.js | 39 + .../node_modules/lodash/padStart.js | 39 + .../node_modules/lodash/parseInt.js | 43 + .../babel-core/node_modules/lodash/partial.js | 50 + .../node_modules/lodash/partialRight.js | 49 + .../node_modules/lodash/partition.js | 43 + .../babel-core/node_modules/lodash/pick.js | 25 + .../babel-core/node_modules/lodash/pickBy.js | 37 + .../babel-core/node_modules/lodash/plant.js | 48 + .../node_modules/lodash/property.js | 32 + .../node_modules/lodash/propertyOf.js | 30 + .../babel-core/node_modules/lodash/pull.js | 29 + .../babel-core/node_modules/lodash/pullAll.js | 29 + .../node_modules/lodash/pullAllBy.js | 33 + .../node_modules/lodash/pullAllWith.js | 32 + .../babel-core/node_modules/lodash/pullAt.js | 43 + .../babel-core/node_modules/lodash/random.js | 82 + .../babel-core/node_modules/lodash/range.js | 46 + .../node_modules/lodash/rangeRight.js | 41 + .../babel-core/node_modules/lodash/rearg.js | 33 + .../babel-core/node_modules/lodash/reduce.js | 51 + .../node_modules/lodash/reduceRight.js | 36 + .../babel-core/node_modules/lodash/reject.js | 46 + .../babel-core/node_modules/lodash/remove.js | 53 + .../babel-core/node_modules/lodash/repeat.js | 37 + .../babel-core/node_modules/lodash/replace.js | 29 + .../babel-core/node_modules/lodash/rest.js | 40 + .../babel-core/node_modules/lodash/result.js | 56 + .../babel-core/node_modules/lodash/reverse.js | 34 + .../babel-core/node_modules/lodash/round.js | 26 + .../babel-core/node_modules/lodash/sample.js | 24 + .../node_modules/lodash/sampleSize.js | 37 + .../babel-core/node_modules/lodash/seq.js | 16 + .../babel-core/node_modules/lodash/set.js | 35 + .../babel-core/node_modules/lodash/setWith.js | 32 + .../babel-core/node_modules/lodash/shuffle.js | 25 + .../babel-core/node_modules/lodash/size.js | 46 + .../babel-core/node_modules/lodash/slice.js | 37 + .../node_modules/lodash/snakeCase.js | 28 + .../babel-core/node_modules/lodash/some.js | 51 + .../babel-core/node_modules/lodash/sortBy.js | 48 + .../node_modules/lodash/sortedIndex.js | 24 + .../node_modules/lodash/sortedIndexBy.js | 33 + .../node_modules/lodash/sortedIndexOf.js | 31 + .../node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + .../node_modules/lodash/sortedUniq.js | 24 + .../node_modules/lodash/sortedUniqBy.js | 26 + .../babel-core/node_modules/lodash/split.js | 52 + .../babel-core/node_modules/lodash/spread.js | 63 + .../node_modules/lodash/startCase.js | 29 + .../node_modules/lodash/startsWith.js | 39 + .../babel-core/node_modules/lodash/string.js | 33 + .../node_modules/lodash/stubArray.js | 23 + .../node_modules/lodash/stubFalse.js | 18 + .../node_modules/lodash/stubObject.js | 23 + .../node_modules/lodash/stubString.js | 18 + .../node_modules/lodash/stubTrue.js | 18 + .../node_modules/lodash/subtract.js | 22 + .../babel-core/node_modules/lodash/sum.js | 24 + .../babel-core/node_modules/lodash/sumBy.js | 33 + .../babel-core/node_modules/lodash/tail.js | 22 + .../babel-core/node_modules/lodash/take.js | 37 + .../node_modules/lodash/takeRight.js | 39 + .../node_modules/lodash/takeRightWhile.js | 45 + .../node_modules/lodash/takeWhile.js | 45 + .../babel-core/node_modules/lodash/tap.js | 29 + .../node_modules/lodash/template.js | 238 + .../node_modules/lodash/templateSettings.js | 67 + .../node_modules/lodash/throttle.js | 69 + .../babel-core/node_modules/lodash/thru.js | 28 + .../babel-core/node_modules/lodash/times.js | 51 + .../babel-core/node_modules/lodash/toArray.js | 58 + .../node_modules/lodash/toFinite.js | 42 + .../node_modules/lodash/toInteger.js | 36 + .../node_modules/lodash/toIterator.js | 23 + .../babel-core/node_modules/lodash/toJSON.js | 1 + .../node_modules/lodash/toLength.js | 38 + .../babel-core/node_modules/lodash/toLower.js | 28 + .../node_modules/lodash/toNumber.js | 66 + .../babel-core/node_modules/lodash/toPairs.js | 30 + .../node_modules/lodash/toPairsIn.js | 30 + .../babel-core/node_modules/lodash/toPath.js | 33 + .../node_modules/lodash/toPlainObject.js | 32 + .../node_modules/lodash/toSafeInteger.js | 37 + .../node_modules/lodash/toString.js | 28 + .../babel-core/node_modules/lodash/toUpper.js | 28 + .../node_modules/lodash/transform.js | 65 + .../babel-core/node_modules/lodash/trim.js | 49 + .../babel-core/node_modules/lodash/trimEnd.js | 43 + .../node_modules/lodash/trimStart.js | 43 + .../node_modules/lodash/truncate.js | 111 + .../babel-core/node_modules/lodash/unary.js | 22 + .../node_modules/lodash/unescape.js | 34 + .../babel-core/node_modules/lodash/union.js | 26 + .../babel-core/node_modules/lodash/unionBy.js | 39 + .../node_modules/lodash/unionWith.js | 34 + .../babel-core/node_modules/lodash/uniq.js | 25 + .../babel-core/node_modules/lodash/uniqBy.js | 31 + .../node_modules/lodash/uniqWith.js | 28 + .../node_modules/lodash/uniqueId.js | 28 + .../babel-core/node_modules/lodash/unset.js | 34 + .../babel-core/node_modules/lodash/unzip.js | 45 + .../node_modules/lodash/unzipWith.js | 39 + .../babel-core/node_modules/lodash/update.js | 35 + .../node_modules/lodash/updateWith.js | 33 + .../node_modules/lodash/upperCase.js | 27 + .../node_modules/lodash/upperFirst.js | 22 + .../babel-core/node_modules/lodash/util.js | 34 + .../babel-core/node_modules/lodash/value.js | 1 + .../babel-core/node_modules/lodash/valueOf.js | 1 + .../babel-core/node_modules/lodash/values.js | 34 + .../node_modules/lodash/valuesIn.js | 32 + .../babel-core/node_modules/lodash/without.js | 31 + .../babel-core/node_modules/lodash/words.js | 35 + .../babel-core/node_modules/lodash/wrap.js | 30 + .../node_modules/lodash/wrapperAt.js | 48 + .../node_modules/lodash/wrapperChain.js | 34 + .../node_modules/lodash/wrapperLodash.js | 147 + .../node_modules/lodash/wrapperReverse.js | 44 + .../node_modules/lodash/wrapperValue.js | 21 + .../babel-core/node_modules/lodash/xor.js | 28 + .../babel-core/node_modules/lodash/xorBy.js | 39 + .../babel-core/node_modules/lodash/xorWith.js | 34 + .../babel-core/node_modules/lodash/zip.js | 22 + .../node_modules/lodash/zipObject.js | 24 + .../node_modules/lodash/zipObjectDeep.js | 23 + .../babel-core/node_modules/lodash/zipWith.js | 32 + node_modules/babel-core/package.json | 24 +- .../node_modules/lodash/LICENSE | 47 + .../node_modules/lodash/README.md | 39 + .../node_modules/lodash/_DataView.js | 7 + .../node_modules/lodash/_Hash.js | 32 + .../node_modules/lodash/_LazyWrapper.js | 28 + .../node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash/_LodashWrapper.js | 22 + .../node_modules/lodash/_Map.js | 7 + .../node_modules/lodash/_MapCache.js | 32 + .../node_modules/lodash/_Promise.js | 7 + .../node_modules/lodash/_Set.js | 7 + .../node_modules/lodash/_SetCache.js | 27 + .../node_modules/lodash/_Stack.js | 27 + .../node_modules/lodash/_Symbol.js | 6 + .../node_modules/lodash/_Uint8Array.js | 6 + .../node_modules/lodash/_WeakMap.js | 7 + .../node_modules/lodash/_apply.js | 21 + .../node_modules/lodash/_arrayAggregator.js | 22 + .../node_modules/lodash/_arrayEach.js | 22 + .../node_modules/lodash/_arrayEachRight.js | 21 + .../node_modules/lodash/_arrayEvery.js | 23 + .../node_modules/lodash/_arrayFilter.js | 25 + .../node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../node_modules/lodash/_arrayMap.js | 21 + .../node_modules/lodash/_arrayPush.js | 20 + .../node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash/_arraySome.js | 23 + .../node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + .../node_modules/lodash/_assignValue.js | 28 + .../node_modules/lodash/_assocIndexOf.js | 21 + .../node_modules/lodash/_baseAggregator.js | 21 + .../node_modules/lodash/_baseAssign.js | 17 + .../node_modules/lodash/_baseAssignIn.js | 17 + .../node_modules/lodash/_baseAssignValue.js | 25 + .../node_modules/lodash/_baseAt.js | 23 + .../node_modules/lodash/_baseClamp.js | 22 + .../node_modules/lodash/_baseClone.js | 171 + .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../node_modules/lodash/_baseCreate.js | 30 + .../node_modules/lodash/_baseDelay.js | 21 + .../node_modules/lodash/_baseDifference.js | 67 + .../node_modules/lodash/_baseEach.js | 14 + .../node_modules/lodash/_baseEachRight.js | 14 + .../node_modules/lodash/_baseEvery.js | 21 + .../node_modules/lodash/_baseExtremum.js | 32 + .../node_modules/lodash/_baseFill.js | 32 + .../node_modules/lodash/_baseFilter.js | 21 + .../node_modules/lodash/_baseFindIndex.js | 24 + .../node_modules/lodash/_baseFindKey.js | 23 + .../node_modules/lodash/_baseFlatten.js | 38 + .../node_modules/lodash/_baseFor.js | 16 + .../node_modules/lodash/_baseForOwn.js | 16 + .../node_modules/lodash/_baseForOwnRight.js | 16 + .../node_modules/lodash/_baseForRight.js | 15 + .../node_modules/lodash/_baseFunctions.js | 19 + .../node_modules/lodash/_baseGet.js | 24 + .../node_modules/lodash/_baseGetAllKeys.js | 20 + .../node_modules/lodash/_baseGetTag.js | 28 + .../node_modules/lodash/_baseGt.js | 14 + .../node_modules/lodash/_baseHas.js | 19 + .../node_modules/lodash/_baseHasIn.js | 13 + .../node_modules/lodash/_baseInRange.js | 18 + .../node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + .../node_modules/lodash/_baseInverter.js | 21 + .../node_modules/lodash/_baseInvoke.js | 24 + .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../node_modules/lodash/_baseIsDate.js | 18 + .../node_modules/lodash/_baseIsEqual.js | 28 + .../node_modules/lodash/_baseIsEqualDeep.js | 83 + .../node_modules/lodash/_baseIsMap.js | 18 + .../node_modules/lodash/_baseIsMatch.js | 62 + .../node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js | 47 + .../node_modules/lodash/_baseIsRegExp.js | 18 + .../node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + .../node_modules/lodash/_baseIteratee.js | 31 + .../node_modules/lodash/_baseKeys.js | 30 + .../node_modules/lodash/_baseKeysIn.js | 33 + .../node_modules/lodash/_baseLodash.js | 10 + .../node_modules/lodash/_baseLt.js | 14 + .../node_modules/lodash/_baseMap.js | 22 + .../node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + .../node_modules/lodash/_baseMean.js | 20 + .../node_modules/lodash/_baseMerge.js | 42 + .../node_modules/lodash/_baseMergeDeep.js | 94 + .../node_modules/lodash/_baseNth.js | 20 + .../node_modules/lodash/_baseOrderBy.js | 34 + .../node_modules/lodash/_basePick.js | 19 + .../node_modules/lodash/_basePickBy.js | 30 + .../node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + .../node_modules/lodash/_basePropertyOf.js | 14 + .../node_modules/lodash/_basePullAll.js | 51 + .../node_modules/lodash/_basePullAt.js | 37 + .../node_modules/lodash/_baseRandom.js | 18 + .../node_modules/lodash/_baseRange.js | 28 + .../node_modules/lodash/_baseReduce.js | 23 + .../node_modules/lodash/_baseRepeat.js | 35 + .../node_modules/lodash/_baseRest.js | 17 + .../node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash/_baseSet.js | 47 + .../node_modules/lodash/_baseSetData.js | 17 + .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash/_baseSlice.js | 31 + .../node_modules/lodash/_baseSome.js | 22 + .../node_modules/lodash/_baseSortBy.js | 21 + .../node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 64 + .../node_modules/lodash/_baseSortedUniq.js | 30 + .../node_modules/lodash/_baseSum.js | 24 + .../node_modules/lodash/_baseTimes.js | 20 + .../node_modules/lodash/_baseToNumber.js | 24 + .../node_modules/lodash/_baseToPairs.js | 18 + .../node_modules/lodash/_baseToString.js | 37 + .../node_modules/lodash/_baseUnary.js | 14 + .../node_modules/lodash/_baseUniq.js | 72 + .../node_modules/lodash/_baseUnset.js | 20 + .../node_modules/lodash/_baseUpdate.js | 18 + .../node_modules/lodash/_baseValues.js | 19 + .../node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + .../node_modules/lodash/_baseXor.js | 36 + .../node_modules/lodash/_baseZipObject.js | 23 + .../node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + .../node_modules/lodash/_castFunction.js | 14 + .../node_modules/lodash/_castPath.js | 21 + .../node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash/_castSlice.js | 18 + .../node_modules/lodash/_charsEndIndex.js | 19 + .../node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + .../node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash/_cloneDataView.js | 16 + .../node_modules/lodash/_cloneRegExp.js | 17 + .../node_modules/lodash/_cloneSymbol.js | 18 + .../node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + .../node_modules/lodash/_compareMultiple.js | 44 + .../node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + .../node_modules/lodash/_copyArray.js | 20 + .../node_modules/lodash/_copyObject.js | 40 + .../node_modules/lodash/_copySymbols.js | 16 + .../node_modules/lodash/_copySymbolsIn.js | 16 + .../node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + .../node_modules/lodash/_createAssigner.js | 37 + .../node_modules/lodash/_createBaseEach.js | 32 + .../node_modules/lodash/_createBaseFor.js | 25 + .../node_modules/lodash/_createBind.js | 28 + .../node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + .../node_modules/lodash/_createCtor.js | 37 + .../node_modules/lodash/_createCurry.js | 46 + .../node_modules/lodash/_createFind.js | 25 + .../node_modules/lodash/_createFlow.js | 78 + .../node_modules/lodash/_createHybrid.js | 92 + .../node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + .../node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash/_createPadding.js | 33 + .../node_modules/lodash/_createPartial.js | 43 + .../node_modules/lodash/_createRange.js | 30 + .../node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + .../node_modules/lodash/_createRound.js | 33 + .../node_modules/lodash/_createSet.js | 19 + .../node_modules/lodash/_createToPairs.js | 30 + .../node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + .../node_modules/lodash/_customOmitClone.js | 16 + .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../node_modules/lodash/_equalArrays.js | 83 + .../node_modules/lodash/_equalByTag.js | 112 + .../node_modules/lodash/_equalObjects.js | 89 + .../node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + .../node_modules/lodash/_flatRest.js | 16 + .../node_modules/lodash/_freeGlobal.js | 4 + .../node_modules/lodash/_getAllKeys.js | 16 + .../node_modules/lodash/_getAllKeysIn.js | 17 + .../node_modules/lodash/_getData.js | 15 + .../node_modules/lodash/_getFuncName.js | 31 + .../node_modules/lodash/_getHolder.js | 13 + .../node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash/_getMatchData.js | 24 + .../node_modules/lodash/_getNative.js | 17 + .../node_modules/lodash/_getPrototype.js | 6 + .../node_modules/lodash/_getRawTag.js | 46 + .../node_modules/lodash/_getSymbols.js | 30 + .../node_modules/lodash/_getSymbolsIn.js | 25 + .../node_modules/lodash/_getTag.js | 58 + .../node_modules/lodash/_getValue.js | 13 + .../node_modules/lodash/_getView.js | 33 + .../node_modules/lodash/_getWrapDetails.js | 17 + .../node_modules/lodash/_hasPath.js | 39 + .../node_modules/lodash/_hasUnicode.js | 26 + .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../node_modules/lodash/_hashClear.js | 15 + .../node_modules/lodash/_hashDelete.js | 17 + .../node_modules/lodash/_hashGet.js | 30 + .../node_modules/lodash/_hashHas.js | 23 + .../node_modules/lodash/_hashSet.js | 23 + .../node_modules/lodash/_initCloneArray.js | 26 + .../node_modules/lodash/_initCloneByTag.js | 77 + .../node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../node_modules/lodash/_isIndex.js | 25 + .../node_modules/lodash/_isIterateeCall.js | 30 + .../node_modules/lodash/_isKey.js | 29 + .../node_modules/lodash/_isKeyable.js | 15 + .../node_modules/lodash/_isLaziable.js | 28 + .../node_modules/lodash/_isMaskable.js | 14 + .../node_modules/lodash/_isMasked.js | 20 + .../node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + .../node_modules/lodash/_iteratorToArray.js | 18 + .../node_modules/lodash/_lazyClone.js | 23 + .../node_modules/lodash/_lazyReverse.js | 23 + .../node_modules/lodash/_lazyValue.js | 69 + .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js | 35 + .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js | 16 + .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js | 21 + .../node_modules/lodash/_mapCacheDelete.js | 18 + .../node_modules/lodash/_mapCacheGet.js | 16 + .../node_modules/lodash/_mapCacheHas.js | 16 + .../node_modules/lodash/_mapCacheSet.js | 22 + .../node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + .../node_modules/lodash/_memoizeCapped.js | 26 + .../node_modules/lodash/_mergeData.js | 90 + .../node_modules/lodash/_metaMap.js | 6 + .../node_modules/lodash/_nativeCreate.js | 6 + .../node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../node_modules/lodash/_nodeUtil.js | 30 + .../node_modules/lodash/_objectToString.js | 22 + .../node_modules/lodash/_overArg.js | 15 + .../node_modules/lodash/_overRest.js | 36 + .../node_modules/lodash/_parent.js | 16 + .../node_modules/lodash/_reEscape.js | 4 + .../node_modules/lodash/_reEvaluate.js | 4 + .../node_modules/lodash/_reInterpolate.js | 4 + .../node_modules/lodash/_realNames.js | 4 + .../node_modules/lodash/_reorder.js | 29 + .../node_modules/lodash/_replaceHolders.js | 29 + .../node_modules/lodash/_root.js | 9 + .../node_modules/lodash/_safeGet.js | 17 + .../node_modules/lodash/_setCacheAdd.js | 19 + .../node_modules/lodash/_setCacheHas.js | 14 + .../node_modules/lodash/_setData.js | 20 + .../node_modules/lodash/_setToArray.js | 18 + .../node_modules/lodash/_setToPairs.js | 18 + .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../node_modules/lodash/_stackClear.js | 15 + .../node_modules/lodash/_stackDelete.js | 18 + .../node_modules/lodash/_stackGet.js | 14 + .../node_modules/lodash/_stackHas.js | 14 + .../node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash/_stringToPath.js | 27 + .../node_modules/lodash/_toKey.js | 21 + .../node_modules/lodash/_toSource.js | 26 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + .../node_modules/lodash/_unicodeSize.js | 44 + .../node_modules/lodash/_unicodeToArray.js | 40 + .../node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash/_wrapperClone.js | 23 + .../node_modules/lodash/add.js | 22 + .../node_modules/lodash/after.js | 42 + .../node_modules/lodash/array.js | 67 + .../node_modules/lodash/ary.js | 29 + .../node_modules/lodash/assign.js | 58 + .../node_modules/lodash/assignIn.js | 40 + .../node_modules/lodash/assignInWith.js | 38 + .../node_modules/lodash/assignWith.js | 37 + .../babel-generator/node_modules/lodash/at.js | 23 + .../node_modules/lodash/attempt.js | 35 + .../node_modules/lodash/before.js | 40 + .../node_modules/lodash/bind.js | 57 + .../node_modules/lodash/bindAll.js | 41 + .../node_modules/lodash/bindKey.js | 68 + .../node_modules/lodash/camelCase.js | 29 + .../node_modules/lodash/capitalize.js | 23 + .../node_modules/lodash/castArray.js | 44 + .../node_modules/lodash/ceil.js | 26 + .../node_modules/lodash/chain.js | 38 + .../node_modules/lodash/chunk.js | 50 + .../node_modules/lodash/clamp.js | 39 + .../node_modules/lodash/clone.js | 36 + .../node_modules/lodash/cloneDeep.js | 29 + .../node_modules/lodash/cloneDeepWith.js | 40 + .../node_modules/lodash/cloneWith.js | 42 + .../node_modules/lodash/collection.js | 30 + .../node_modules/lodash/commit.js | 33 + .../node_modules/lodash/compact.js | 31 + .../node_modules/lodash/concat.js | 43 + .../node_modules/lodash/cond.js | 60 + .../node_modules/lodash/conforms.js | 35 + .../node_modules/lodash/conformsTo.js | 32 + .../node_modules/lodash/constant.js | 26 + .../node_modules/lodash/core.js | 3854 ++++ .../node_modules/lodash/core.min.js | 29 + .../node_modules/lodash/countBy.js | 40 + .../node_modules/lodash/create.js | 43 + .../node_modules/lodash/curry.js | 57 + .../node_modules/lodash/curryRight.js | 54 + .../node_modules/lodash/date.js | 3 + .../node_modules/lodash/debounce.js | 190 + .../node_modules/lodash/deburr.js | 45 + .../node_modules/lodash/defaultTo.js | 25 + .../node_modules/lodash/defaults.js | 64 + .../node_modules/lodash/defaultsDeep.js | 30 + .../node_modules/lodash/defer.js | 26 + .../node_modules/lodash/delay.js | 28 + .../node_modules/lodash/difference.js | 33 + .../node_modules/lodash/differenceBy.js | 44 + .../node_modules/lodash/differenceWith.js | 40 + .../node_modules/lodash/divide.js | 22 + .../node_modules/lodash/drop.js | 38 + .../node_modules/lodash/dropRight.js | 39 + .../node_modules/lodash/dropRightWhile.js | 45 + .../node_modules/lodash/dropWhile.js | 45 + .../node_modules/lodash/each.js | 1 + .../node_modules/lodash/eachRight.js | 1 + .../node_modules/lodash/endsWith.js | 43 + .../node_modules/lodash/entries.js | 1 + .../node_modules/lodash/entriesIn.js | 1 + .../babel-generator/node_modules/lodash/eq.js | 37 + .../node_modules/lodash/escape.js | 43 + .../node_modules/lodash/escapeRegExp.js | 32 + .../node_modules/lodash/every.js | 56 + .../node_modules/lodash/extend.js | 1 + .../node_modules/lodash/extendWith.js | 1 + .../node_modules/lodash/fill.js | 45 + .../node_modules/lodash/filter.js | 48 + .../node_modules/lodash/find.js | 42 + .../node_modules/lodash/findIndex.js | 55 + .../node_modules/lodash/findKey.js | 44 + .../node_modules/lodash/findLast.js | 25 + .../node_modules/lodash/findLastIndex.js | 59 + .../node_modules/lodash/findLastKey.js | 44 + .../node_modules/lodash/first.js | 1 + .../node_modules/lodash/flatMap.js | 29 + .../node_modules/lodash/flatMapDeep.js | 31 + .../node_modules/lodash/flatMapDepth.js | 31 + .../node_modules/lodash/flatten.js | 22 + .../node_modules/lodash/flattenDeep.js | 25 + .../node_modules/lodash/flattenDepth.js | 33 + .../node_modules/lodash/flip.js | 28 + .../node_modules/lodash/floor.js | 26 + .../node_modules/lodash/flow.js | 27 + .../node_modules/lodash/flowRight.js | 26 + .../node_modules/lodash/forEach.js | 41 + .../node_modules/lodash/forEachRight.js | 31 + .../node_modules/lodash/forIn.js | 39 + .../node_modules/lodash/forInRight.js | 37 + .../node_modules/lodash/forOwn.js | 36 + .../node_modules/lodash/forOwnRight.js | 34 + .../babel-generator/node_modules/lodash/fp.js | 2 + .../node_modules/lodash/fp/F.js | 1 + .../node_modules/lodash/fp/T.js | 1 + .../node_modules/lodash/fp/__.js | 1 + .../node_modules/lodash/fp/_baseConvert.js | 569 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + .../node_modules/lodash/fp/_falseOptions.js | 7 + .../node_modules/lodash/fp/_mapping.js | 358 + .../node_modules/lodash/fp/_util.js | 16 + .../node_modules/lodash/fp/add.js | 5 + .../node_modules/lodash/fp/after.js | 5 + .../node_modules/lodash/fp/all.js | 1 + .../node_modules/lodash/fp/allPass.js | 1 + .../node_modules/lodash/fp/always.js | 1 + .../node_modules/lodash/fp/any.js | 1 + .../node_modules/lodash/fp/anyPass.js | 1 + .../node_modules/lodash/fp/apply.js | 1 + .../node_modules/lodash/fp/array.js | 2 + .../node_modules/lodash/fp/ary.js | 5 + .../node_modules/lodash/fp/assign.js | 5 + .../node_modules/lodash/fp/assignAll.js | 5 + .../node_modules/lodash/fp/assignAllWith.js | 5 + .../node_modules/lodash/fp/assignIn.js | 5 + .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash/fp/assignInWith.js | 5 + .../node_modules/lodash/fp/assignWith.js | 5 + .../node_modules/lodash/fp/assoc.js | 1 + .../node_modules/lodash/fp/assocPath.js | 1 + .../node_modules/lodash/fp/at.js | 5 + .../node_modules/lodash/fp/attempt.js | 5 + .../node_modules/lodash/fp/before.js | 5 + .../node_modules/lodash/fp/bind.js | 5 + .../node_modules/lodash/fp/bindAll.js | 5 + .../node_modules/lodash/fp/bindKey.js | 5 + .../node_modules/lodash/fp/camelCase.js | 5 + .../node_modules/lodash/fp/capitalize.js | 5 + .../node_modules/lodash/fp/castArray.js | 5 + .../node_modules/lodash/fp/ceil.js | 5 + .../node_modules/lodash/fp/chain.js | 5 + .../node_modules/lodash/fp/chunk.js | 5 + .../node_modules/lodash/fp/clamp.js | 5 + .../node_modules/lodash/fp/clone.js | 5 + .../node_modules/lodash/fp/cloneDeep.js | 5 + .../node_modules/lodash/fp/cloneDeepWith.js | 5 + .../node_modules/lodash/fp/cloneWith.js | 5 + .../node_modules/lodash/fp/collection.js | 2 + .../node_modules/lodash/fp/commit.js | 5 + .../node_modules/lodash/fp/compact.js | 5 + .../node_modules/lodash/fp/complement.js | 1 + .../node_modules/lodash/fp/compose.js | 1 + .../node_modules/lodash/fp/concat.js | 5 + .../node_modules/lodash/fp/cond.js | 5 + .../node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../node_modules/lodash/fp/constant.js | 5 + .../node_modules/lodash/fp/contains.js | 1 + .../node_modules/lodash/fp/convert.js | 18 + .../node_modules/lodash/fp/countBy.js | 5 + .../node_modules/lodash/fp/create.js | 5 + .../node_modules/lodash/fp/curry.js | 5 + .../node_modules/lodash/fp/curryN.js | 5 + .../node_modules/lodash/fp/curryRight.js | 5 + .../node_modules/lodash/fp/curryRightN.js | 5 + .../node_modules/lodash/fp/date.js | 2 + .../node_modules/lodash/fp/debounce.js | 5 + .../node_modules/lodash/fp/deburr.js | 5 + .../node_modules/lodash/fp/defaultTo.js | 5 + .../node_modules/lodash/fp/defaults.js | 5 + .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../node_modules/lodash/fp/defer.js | 5 + .../node_modules/lodash/fp/delay.js | 5 + .../node_modules/lodash/fp/difference.js | 5 + .../node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + .../node_modules/lodash/fp/dissoc.js | 1 + .../node_modules/lodash/fp/dissocPath.js | 1 + .../node_modules/lodash/fp/divide.js | 5 + .../node_modules/lodash/fp/drop.js | 5 + .../node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + .../node_modules/lodash/fp/dropWhile.js | 5 + .../node_modules/lodash/fp/each.js | 1 + .../node_modules/lodash/fp/eachRight.js | 1 + .../node_modules/lodash/fp/endsWith.js | 5 + .../node_modules/lodash/fp/entries.js | 1 + .../node_modules/lodash/fp/entriesIn.js | 1 + .../node_modules/lodash/fp/eq.js | 5 + .../node_modules/lodash/fp/equals.js | 1 + .../node_modules/lodash/fp/escape.js | 5 + .../node_modules/lodash/fp/escapeRegExp.js | 5 + .../node_modules/lodash/fp/every.js | 5 + .../node_modules/lodash/fp/extend.js | 1 + .../node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash/fp/extendWith.js | 1 + .../node_modules/lodash/fp/fill.js | 5 + .../node_modules/lodash/fp/filter.js | 5 + .../node_modules/lodash/fp/find.js | 5 + .../node_modules/lodash/fp/findFrom.js | 5 + .../node_modules/lodash/fp/findIndex.js | 5 + .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../node_modules/lodash/fp/findKey.js | 5 + .../node_modules/lodash/fp/findLast.js | 5 + .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash/fp/findLastKey.js | 5 + .../node_modules/lodash/fp/first.js | 1 + .../node_modules/lodash/fp/flatMap.js | 5 + .../node_modules/lodash/fp/flatMapDeep.js | 5 + .../node_modules/lodash/fp/flatMapDepth.js | 5 + .../node_modules/lodash/fp/flatten.js | 5 + .../node_modules/lodash/fp/flattenDeep.js | 5 + .../node_modules/lodash/fp/flattenDepth.js | 5 + .../node_modules/lodash/fp/flip.js | 5 + .../node_modules/lodash/fp/floor.js | 5 + .../node_modules/lodash/fp/flow.js | 5 + .../node_modules/lodash/fp/flowRight.js | 5 + .../node_modules/lodash/fp/forEach.js | 5 + .../node_modules/lodash/fp/forEachRight.js | 5 + .../node_modules/lodash/fp/forIn.js | 5 + .../node_modules/lodash/fp/forInRight.js | 5 + .../node_modules/lodash/fp/forOwn.js | 5 + .../node_modules/lodash/fp/forOwnRight.js | 5 + .../node_modules/lodash/fp/fromPairs.js | 5 + .../node_modules/lodash/fp/function.js | 2 + .../node_modules/lodash/fp/functions.js | 5 + .../node_modules/lodash/fp/functionsIn.js | 5 + .../node_modules/lodash/fp/get.js | 5 + .../node_modules/lodash/fp/getOr.js | 5 + .../node_modules/lodash/fp/groupBy.js | 5 + .../node_modules/lodash/fp/gt.js | 5 + .../node_modules/lodash/fp/gte.js | 5 + .../node_modules/lodash/fp/has.js | 5 + .../node_modules/lodash/fp/hasIn.js | 5 + .../node_modules/lodash/fp/head.js | 5 + .../node_modules/lodash/fp/identical.js | 1 + .../node_modules/lodash/fp/identity.js | 5 + .../node_modules/lodash/fp/inRange.js | 5 + .../node_modules/lodash/fp/includes.js | 5 + .../node_modules/lodash/fp/includesFrom.js | 5 + .../node_modules/lodash/fp/indexBy.js | 1 + .../node_modules/lodash/fp/indexOf.js | 5 + .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../node_modules/lodash/fp/init.js | 1 + .../node_modules/lodash/fp/initial.js | 5 + .../node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + .../node_modules/lodash/fp/invert.js | 5 + .../node_modules/lodash/fp/invertBy.js | 5 + .../node_modules/lodash/fp/invertObj.js | 1 + .../node_modules/lodash/fp/invoke.js | 5 + .../node_modules/lodash/fp/invokeArgs.js | 5 + .../node_modules/lodash/fp/invokeArgsMap.js | 5 + .../node_modules/lodash/fp/invokeMap.js | 5 + .../node_modules/lodash/fp/isArguments.js | 5 + .../node_modules/lodash/fp/isArray.js | 5 + .../node_modules/lodash/fp/isArrayBuffer.js | 5 + .../node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + .../node_modules/lodash/fp/isBoolean.js | 5 + .../node_modules/lodash/fp/isBuffer.js | 5 + .../node_modules/lodash/fp/isDate.js | 5 + .../node_modules/lodash/fp/isElement.js | 5 + .../node_modules/lodash/fp/isEmpty.js | 5 + .../node_modules/lodash/fp/isEqual.js | 5 + .../node_modules/lodash/fp/isEqualWith.js | 5 + .../node_modules/lodash/fp/isError.js | 5 + .../node_modules/lodash/fp/isFinite.js | 5 + .../node_modules/lodash/fp/isFunction.js | 5 + .../node_modules/lodash/fp/isInteger.js | 5 + .../node_modules/lodash/fp/isLength.js | 5 + .../node_modules/lodash/fp/isMap.js | 5 + .../node_modules/lodash/fp/isMatch.js | 5 + .../node_modules/lodash/fp/isMatchWith.js | 5 + .../node_modules/lodash/fp/isNaN.js | 5 + .../node_modules/lodash/fp/isNative.js | 5 + .../node_modules/lodash/fp/isNil.js | 5 + .../node_modules/lodash/fp/isNull.js | 5 + .../node_modules/lodash/fp/isNumber.js | 5 + .../node_modules/lodash/fp/isObject.js | 5 + .../node_modules/lodash/fp/isObjectLike.js | 5 + .../node_modules/lodash/fp/isPlainObject.js | 5 + .../node_modules/lodash/fp/isRegExp.js | 5 + .../node_modules/lodash/fp/isSafeInteger.js | 5 + .../node_modules/lodash/fp/isSet.js | 5 + .../node_modules/lodash/fp/isString.js | 5 + .../node_modules/lodash/fp/isSymbol.js | 5 + .../node_modules/lodash/fp/isTypedArray.js | 5 + .../node_modules/lodash/fp/isUndefined.js | 5 + .../node_modules/lodash/fp/isWeakMap.js | 5 + .../node_modules/lodash/fp/isWeakSet.js | 5 + .../node_modules/lodash/fp/iteratee.js | 5 + .../node_modules/lodash/fp/join.js | 5 + .../node_modules/lodash/fp/juxt.js | 1 + .../node_modules/lodash/fp/kebabCase.js | 5 + .../node_modules/lodash/fp/keyBy.js | 5 + .../node_modules/lodash/fp/keys.js | 5 + .../node_modules/lodash/fp/keysIn.js | 5 + .../node_modules/lodash/fp/lang.js | 2 + .../node_modules/lodash/fp/last.js | 5 + .../node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../node_modules/lodash/fp/lowerCase.js | 5 + .../node_modules/lodash/fp/lowerFirst.js | 5 + .../node_modules/lodash/fp/lt.js | 5 + .../node_modules/lodash/fp/lte.js | 5 + .../node_modules/lodash/fp/map.js | 5 + .../node_modules/lodash/fp/mapKeys.js | 5 + .../node_modules/lodash/fp/mapValues.js | 5 + .../node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + .../node_modules/lodash/fp/math.js | 2 + .../node_modules/lodash/fp/max.js | 5 + .../node_modules/lodash/fp/maxBy.js | 5 + .../node_modules/lodash/fp/mean.js | 5 + .../node_modules/lodash/fp/meanBy.js | 5 + .../node_modules/lodash/fp/memoize.js | 5 + .../node_modules/lodash/fp/merge.js | 5 + .../node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../node_modules/lodash/fp/mergeWith.js | 5 + .../node_modules/lodash/fp/method.js | 5 + .../node_modules/lodash/fp/methodOf.js | 5 + .../node_modules/lodash/fp/min.js | 5 + .../node_modules/lodash/fp/minBy.js | 5 + .../node_modules/lodash/fp/mixin.js | 5 + .../node_modules/lodash/fp/multiply.js | 5 + .../node_modules/lodash/fp/nAry.js | 1 + .../node_modules/lodash/fp/negate.js | 5 + .../node_modules/lodash/fp/next.js | 5 + .../node_modules/lodash/fp/noop.js | 5 + .../node_modules/lodash/fp/now.js | 5 + .../node_modules/lodash/fp/nth.js | 5 + .../node_modules/lodash/fp/nthArg.js | 5 + .../node_modules/lodash/fp/number.js | 2 + .../node_modules/lodash/fp/object.js | 2 + .../node_modules/lodash/fp/omit.js | 5 + .../node_modules/lodash/fp/omitAll.js | 1 + .../node_modules/lodash/fp/omitBy.js | 5 + .../node_modules/lodash/fp/once.js | 5 + .../node_modules/lodash/fp/orderBy.js | 5 + .../node_modules/lodash/fp/over.js | 5 + .../node_modules/lodash/fp/overArgs.js | 5 + .../node_modules/lodash/fp/overEvery.js | 5 + .../node_modules/lodash/fp/overSome.js | 5 + .../node_modules/lodash/fp/pad.js | 5 + .../node_modules/lodash/fp/padChars.js | 5 + .../node_modules/lodash/fp/padCharsEnd.js | 5 + .../node_modules/lodash/fp/padCharsStart.js | 5 + .../node_modules/lodash/fp/padEnd.js | 5 + .../node_modules/lodash/fp/padStart.js | 5 + .../node_modules/lodash/fp/parseInt.js | 5 + .../node_modules/lodash/fp/partial.js | 5 + .../node_modules/lodash/fp/partialRight.js | 5 + .../node_modules/lodash/fp/partition.js | 5 + .../node_modules/lodash/fp/path.js | 1 + .../node_modules/lodash/fp/pathEq.js | 1 + .../node_modules/lodash/fp/pathOr.js | 1 + .../node_modules/lodash/fp/paths.js | 1 + .../node_modules/lodash/fp/pick.js | 5 + .../node_modules/lodash/fp/pickAll.js | 1 + .../node_modules/lodash/fp/pickBy.js | 5 + .../node_modules/lodash/fp/pipe.js | 1 + .../node_modules/lodash/fp/placeholder.js | 6 + .../node_modules/lodash/fp/plant.js | 5 + .../node_modules/lodash/fp/pluck.js | 1 + .../node_modules/lodash/fp/prop.js | 1 + .../node_modules/lodash/fp/propEq.js | 1 + .../node_modules/lodash/fp/propOr.js | 1 + .../node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../node_modules/lodash/fp/props.js | 1 + .../node_modules/lodash/fp/pull.js | 5 + .../node_modules/lodash/fp/pullAll.js | 5 + .../node_modules/lodash/fp/pullAllBy.js | 5 + .../node_modules/lodash/fp/pullAllWith.js | 5 + .../node_modules/lodash/fp/pullAt.js | 5 + .../node_modules/lodash/fp/random.js | 5 + .../node_modules/lodash/fp/range.js | 5 + .../node_modules/lodash/fp/rangeRight.js | 5 + .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../node_modules/lodash/fp/rearg.js | 5 + .../node_modules/lodash/fp/reduce.js | 5 + .../node_modules/lodash/fp/reduceRight.js | 5 + .../node_modules/lodash/fp/reject.js | 5 + .../node_modules/lodash/fp/remove.js | 5 + .../node_modules/lodash/fp/repeat.js | 5 + .../node_modules/lodash/fp/replace.js | 5 + .../node_modules/lodash/fp/rest.js | 5 + .../node_modules/lodash/fp/restFrom.js | 5 + .../node_modules/lodash/fp/result.js | 5 + .../node_modules/lodash/fp/reverse.js | 5 + .../node_modules/lodash/fp/round.js | 5 + .../node_modules/lodash/fp/sample.js | 5 + .../node_modules/lodash/fp/sampleSize.js | 5 + .../node_modules/lodash/fp/seq.js | 2 + .../node_modules/lodash/fp/set.js | 5 + .../node_modules/lodash/fp/setWith.js | 5 + .../node_modules/lodash/fp/shuffle.js | 5 + .../node_modules/lodash/fp/size.js | 5 + .../node_modules/lodash/fp/slice.js | 5 + .../node_modules/lodash/fp/snakeCase.js | 5 + .../node_modules/lodash/fp/some.js | 5 + .../node_modules/lodash/fp/sortBy.js | 5 + .../node_modules/lodash/fp/sortedIndex.js | 5 + .../node_modules/lodash/fp/sortedIndexBy.js | 5 + .../node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + .../node_modules/lodash/fp/sortedUniq.js | 5 + .../node_modules/lodash/fp/sortedUniqBy.js | 5 + .../node_modules/lodash/fp/split.js | 5 + .../node_modules/lodash/fp/spread.js | 5 + .../node_modules/lodash/fp/spreadFrom.js | 5 + .../node_modules/lodash/fp/startCase.js | 5 + .../node_modules/lodash/fp/startsWith.js | 5 + .../node_modules/lodash/fp/string.js | 2 + .../node_modules/lodash/fp/stubArray.js | 5 + .../node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js | 5 + .../node_modules/lodash/fp/stubString.js | 5 + .../node_modules/lodash/fp/stubTrue.js | 5 + .../node_modules/lodash/fp/subtract.js | 5 + .../node_modules/lodash/fp/sum.js | 5 + .../node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../node_modules/lodash/fp/tail.js | 5 + .../node_modules/lodash/fp/take.js | 5 + .../node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + .../node_modules/lodash/fp/takeWhile.js | 5 + .../node_modules/lodash/fp/tap.js | 5 + .../node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + .../node_modules/lodash/fp/throttle.js | 5 + .../node_modules/lodash/fp/thru.js | 5 + .../node_modules/lodash/fp/times.js | 5 + .../node_modules/lodash/fp/toArray.js | 5 + .../node_modules/lodash/fp/toFinite.js | 5 + .../node_modules/lodash/fp/toInteger.js | 5 + .../node_modules/lodash/fp/toIterator.js | 5 + .../node_modules/lodash/fp/toJSON.js | 5 + .../node_modules/lodash/fp/toLength.js | 5 + .../node_modules/lodash/fp/toLower.js | 5 + .../node_modules/lodash/fp/toNumber.js | 5 + .../node_modules/lodash/fp/toPairs.js | 5 + .../node_modules/lodash/fp/toPairsIn.js | 5 + .../node_modules/lodash/fp/toPath.js | 5 + .../node_modules/lodash/fp/toPlainObject.js | 5 + .../node_modules/lodash/fp/toSafeInteger.js | 5 + .../node_modules/lodash/fp/toString.js | 5 + .../node_modules/lodash/fp/toUpper.js | 5 + .../node_modules/lodash/fp/transform.js | 5 + .../node_modules/lodash/fp/trim.js | 5 + .../node_modules/lodash/fp/trimChars.js | 5 + .../node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + .../node_modules/lodash/fp/trimEnd.js | 5 + .../node_modules/lodash/fp/trimStart.js | 5 + .../node_modules/lodash/fp/truncate.js | 5 + .../node_modules/lodash/fp/unapply.js | 1 + .../node_modules/lodash/fp/unary.js | 5 + .../node_modules/lodash/fp/unescape.js | 5 + .../node_modules/lodash/fp/union.js | 5 + .../node_modules/lodash/fp/unionBy.js | 5 + .../node_modules/lodash/fp/unionWith.js | 5 + .../node_modules/lodash/fp/uniq.js | 5 + .../node_modules/lodash/fp/uniqBy.js | 5 + .../node_modules/lodash/fp/uniqWith.js | 5 + .../node_modules/lodash/fp/uniqueId.js | 5 + .../node_modules/lodash/fp/unnest.js | 1 + .../node_modules/lodash/fp/unset.js | 5 + .../node_modules/lodash/fp/unzip.js | 5 + .../node_modules/lodash/fp/unzipWith.js | 5 + .../node_modules/lodash/fp/update.js | 5 + .../node_modules/lodash/fp/updateWith.js | 5 + .../node_modules/lodash/fp/upperCase.js | 5 + .../node_modules/lodash/fp/upperFirst.js | 5 + .../node_modules/lodash/fp/useWith.js | 1 + .../node_modules/lodash/fp/util.js | 2 + .../node_modules/lodash/fp/value.js | 5 + .../node_modules/lodash/fp/valueOf.js | 5 + .../node_modules/lodash/fp/values.js | 5 + .../node_modules/lodash/fp/valuesIn.js | 5 + .../node_modules/lodash/fp/where.js | 1 + .../node_modules/lodash/fp/whereEq.js | 1 + .../node_modules/lodash/fp/without.js | 5 + .../node_modules/lodash/fp/words.js | 5 + .../node_modules/lodash/fp/wrap.js | 5 + .../node_modules/lodash/fp/wrapperAt.js | 5 + .../node_modules/lodash/fp/wrapperChain.js | 5 + .../node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + .../node_modules/lodash/fp/wrapperValue.js | 5 + .../node_modules/lodash/fp/xor.js | 5 + .../node_modules/lodash/fp/xorBy.js | 5 + .../node_modules/lodash/fp/xorWith.js | 5 + .../node_modules/lodash/fp/zip.js | 5 + .../node_modules/lodash/fp/zipAll.js | 5 + .../node_modules/lodash/fp/zipObj.js | 1 + .../node_modules/lodash/fp/zipObject.js | 5 + .../node_modules/lodash/fp/zipObjectDeep.js | 5 + .../node_modules/lodash/fp/zipWith.js | 5 + .../node_modules/lodash/fromPairs.js | 28 + .../node_modules/lodash/function.js | 25 + .../node_modules/lodash/functions.js | 31 + .../node_modules/lodash/functionsIn.js | 31 + .../node_modules/lodash/get.js | 33 + .../node_modules/lodash/groupBy.js | 41 + .../babel-generator/node_modules/lodash/gt.js | 29 + .../node_modules/lodash/gte.js | 30 + .../node_modules/lodash/has.js | 35 + .../node_modules/lodash/hasIn.js | 34 + .../node_modules/lodash/head.js | 23 + .../node_modules/lodash/identity.js | 21 + .../node_modules/lodash/inRange.js | 55 + .../node_modules/lodash/includes.js | 53 + .../node_modules/lodash/index.js | 1 + .../node_modules/lodash/indexOf.js | 42 + .../node_modules/lodash/initial.js | 22 + .../node_modules/lodash/intersection.js | 30 + .../node_modules/lodash/intersectionBy.js | 45 + .../node_modules/lodash/intersectionWith.js | 41 + .../node_modules/lodash/invert.js | 42 + .../node_modules/lodash/invertBy.js | 56 + .../node_modules/lodash/invoke.js | 24 + .../node_modules/lodash/invokeMap.js | 41 + .../node_modules/lodash/isArguments.js | 36 + .../node_modules/lodash/isArray.js | 26 + .../node_modules/lodash/isArrayBuffer.js | 27 + .../node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + .../node_modules/lodash/isBoolean.js | 29 + .../node_modules/lodash/isBuffer.js | 38 + .../node_modules/lodash/isDate.js | 27 + .../node_modules/lodash/isElement.js | 25 + .../node_modules/lodash/isEmpty.js | 77 + .../node_modules/lodash/isEqual.js | 35 + .../node_modules/lodash/isEqualWith.js | 41 + .../node_modules/lodash/isError.js | 36 + .../node_modules/lodash/isFinite.js | 36 + .../node_modules/lodash/isFunction.js | 37 + .../node_modules/lodash/isInteger.js | 33 + .../node_modules/lodash/isLength.js | 35 + .../node_modules/lodash/isMap.js | 27 + .../node_modules/lodash/isMatch.js | 36 + .../node_modules/lodash/isMatchWith.js | 41 + .../node_modules/lodash/isNaN.js | 38 + .../node_modules/lodash/isNative.js | 40 + .../node_modules/lodash/isNil.js | 25 + .../node_modules/lodash/isNull.js | 22 + .../node_modules/lodash/isNumber.js | 38 + .../node_modules/lodash/isObject.js | 31 + .../node_modules/lodash/isObjectLike.js | 29 + .../node_modules/lodash/isPlainObject.js | 62 + .../node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash/isSafeInteger.js | 37 + .../node_modules/lodash/isSet.js | 27 + .../node_modules/lodash/isString.js | 30 + .../node_modules/lodash/isSymbol.js | 29 + .../node_modules/lodash/isTypedArray.js | 27 + .../node_modules/lodash/isUndefined.js | 22 + .../node_modules/lodash/isWeakMap.js | 28 + .../node_modules/lodash/isWeakSet.js | 28 + .../node_modules/lodash/iteratee.js | 53 + .../node_modules/lodash/join.js | 26 + .../node_modules/lodash/kebabCase.js | 28 + .../node_modules/lodash/keyBy.js | 36 + .../node_modules/lodash/keys.js | 37 + .../node_modules/lodash/keysIn.js | 32 + .../node_modules/lodash/lang.js | 58 + .../node_modules/lodash/last.js | 20 + .../node_modules/lodash/lastIndexOf.js | 46 + .../node_modules/lodash/lodash.js | 17107 ++++++++++++++++ .../node_modules/lodash/lodash.min.js | 137 + .../node_modules/lodash/lowerCase.js | 27 + .../node_modules/lodash/lowerFirst.js | 22 + .../babel-generator/node_modules/lodash/lt.js | 29 + .../node_modules/lodash/lte.js | 30 + .../node_modules/lodash/map.js | 53 + .../node_modules/lodash/mapKeys.js | 36 + .../node_modules/lodash/mapValues.js | 43 + .../node_modules/lodash/matches.js | 39 + .../node_modules/lodash/matchesProperty.js | 37 + .../node_modules/lodash/math.js | 17 + .../node_modules/lodash/max.js | 29 + .../node_modules/lodash/maxBy.js | 34 + .../node_modules/lodash/mean.js | 22 + .../node_modules/lodash/meanBy.js | 31 + .../node_modules/lodash/memoize.js | 73 + .../node_modules/lodash/merge.js | 39 + .../node_modules/lodash/mergeWith.js | 39 + .../node_modules/lodash/method.js | 34 + .../node_modules/lodash/methodOf.js | 33 + .../node_modules/lodash/min.js | 29 + .../node_modules/lodash/minBy.js | 34 + .../node_modules/lodash/mixin.js | 74 + .../node_modules/lodash/multiply.js | 22 + .../node_modules/lodash/negate.js | 40 + .../node_modules/lodash/next.js | 35 + .../node_modules/lodash/noop.js | 17 + .../node_modules/lodash/now.js | 23 + .../node_modules/lodash/nth.js | 29 + .../node_modules/lodash/nthArg.js | 32 + .../node_modules/lodash/number.js | 5 + .../node_modules/lodash/object.js | 49 + .../node_modules/lodash/omit.js | 57 + .../node_modules/lodash/omitBy.js | 29 + .../node_modules/lodash/once.js | 25 + .../node_modules/lodash/orderBy.js | 47 + .../node_modules/lodash/over.js | 24 + .../node_modules/lodash/overArgs.js | 61 + .../node_modules/lodash/overEvery.js | 30 + .../node_modules/lodash/overSome.js | 30 + .../node_modules/lodash/package.json | 66 + .../node_modules/lodash/pad.js | 49 + .../node_modules/lodash/padEnd.js | 39 + .../node_modules/lodash/padStart.js | 39 + .../node_modules/lodash/parseInt.js | 43 + .../node_modules/lodash/partial.js | 50 + .../node_modules/lodash/partialRight.js | 49 + .../node_modules/lodash/partition.js | 43 + .../node_modules/lodash/pick.js | 25 + .../node_modules/lodash/pickBy.js | 37 + .../node_modules/lodash/plant.js | 48 + .../node_modules/lodash/property.js | 32 + .../node_modules/lodash/propertyOf.js | 30 + .../node_modules/lodash/pull.js | 29 + .../node_modules/lodash/pullAll.js | 29 + .../node_modules/lodash/pullAllBy.js | 33 + .../node_modules/lodash/pullAllWith.js | 32 + .../node_modules/lodash/pullAt.js | 43 + .../node_modules/lodash/random.js | 82 + .../node_modules/lodash/range.js | 46 + .../node_modules/lodash/rangeRight.js | 41 + .../node_modules/lodash/rearg.js | 33 + .../node_modules/lodash/reduce.js | 51 + .../node_modules/lodash/reduceRight.js | 36 + .../node_modules/lodash/reject.js | 46 + .../node_modules/lodash/remove.js | 53 + .../node_modules/lodash/repeat.js | 37 + .../node_modules/lodash/replace.js | 29 + .../node_modules/lodash/rest.js | 40 + .../node_modules/lodash/result.js | 56 + .../node_modules/lodash/reverse.js | 34 + .../node_modules/lodash/round.js | 26 + .../node_modules/lodash/sample.js | 24 + .../node_modules/lodash/sampleSize.js | 37 + .../node_modules/lodash/seq.js | 16 + .../node_modules/lodash/set.js | 35 + .../node_modules/lodash/setWith.js | 32 + .../node_modules/lodash/shuffle.js | 25 + .../node_modules/lodash/size.js | 46 + .../node_modules/lodash/slice.js | 37 + .../node_modules/lodash/snakeCase.js | 28 + .../node_modules/lodash/some.js | 51 + .../node_modules/lodash/sortBy.js | 48 + .../node_modules/lodash/sortedIndex.js | 24 + .../node_modules/lodash/sortedIndexBy.js | 33 + .../node_modules/lodash/sortedIndexOf.js | 31 + .../node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + .../node_modules/lodash/sortedUniq.js | 24 + .../node_modules/lodash/sortedUniqBy.js | 26 + .../node_modules/lodash/split.js | 52 + .../node_modules/lodash/spread.js | 63 + .../node_modules/lodash/startCase.js | 29 + .../node_modules/lodash/startsWith.js | 39 + .../node_modules/lodash/string.js | 33 + .../node_modules/lodash/stubArray.js | 23 + .../node_modules/lodash/stubFalse.js | 18 + .../node_modules/lodash/stubObject.js | 23 + .../node_modules/lodash/stubString.js | 18 + .../node_modules/lodash/stubTrue.js | 18 + .../node_modules/lodash/subtract.js | 22 + .../node_modules/lodash/sum.js | 24 + .../node_modules/lodash/sumBy.js | 33 + .../node_modules/lodash/tail.js | 22 + .../node_modules/lodash/take.js | 37 + .../node_modules/lodash/takeRight.js | 39 + .../node_modules/lodash/takeRightWhile.js | 45 + .../node_modules/lodash/takeWhile.js | 45 + .../node_modules/lodash/tap.js | 29 + .../node_modules/lodash/template.js | 238 + .../node_modules/lodash/templateSettings.js | 67 + .../node_modules/lodash/throttle.js | 69 + .../node_modules/lodash/thru.js | 28 + .../node_modules/lodash/times.js | 51 + .../node_modules/lodash/toArray.js | 58 + .../node_modules/lodash/toFinite.js | 42 + .../node_modules/lodash/toInteger.js | 36 + .../node_modules/lodash/toIterator.js | 23 + .../node_modules/lodash/toJSON.js | 1 + .../node_modules/lodash/toLength.js | 38 + .../node_modules/lodash/toLower.js | 28 + .../node_modules/lodash/toNumber.js | 66 + .../node_modules/lodash/toPairs.js | 30 + .../node_modules/lodash/toPairsIn.js | 30 + .../node_modules/lodash/toPath.js | 33 + .../node_modules/lodash/toPlainObject.js | 32 + .../node_modules/lodash/toSafeInteger.js | 37 + .../node_modules/lodash/toString.js | 28 + .../node_modules/lodash/toUpper.js | 28 + .../node_modules/lodash/transform.js | 65 + .../node_modules/lodash/trim.js | 49 + .../node_modules/lodash/trimEnd.js | 43 + .../node_modules/lodash/trimStart.js | 43 + .../node_modules/lodash/truncate.js | 111 + .../node_modules/lodash/unary.js | 22 + .../node_modules/lodash/unescape.js | 34 + .../node_modules/lodash/union.js | 26 + .../node_modules/lodash/unionBy.js | 39 + .../node_modules/lodash/unionWith.js | 34 + .../node_modules/lodash/uniq.js | 25 + .../node_modules/lodash/uniqBy.js | 31 + .../node_modules/lodash/uniqWith.js | 28 + .../node_modules/lodash/uniqueId.js | 28 + .../node_modules/lodash/unset.js | 34 + .../node_modules/lodash/unzip.js | 45 + .../node_modules/lodash/unzipWith.js | 39 + .../node_modules/lodash/update.js | 35 + .../node_modules/lodash/updateWith.js | 33 + .../node_modules/lodash/upperCase.js | 27 + .../node_modules/lodash/upperFirst.js | 22 + .../node_modules/lodash/util.js | 34 + .../node_modules/lodash/value.js | 1 + .../node_modules/lodash/valueOf.js | 1 + .../node_modules/lodash/values.js | 34 + .../node_modules/lodash/valuesIn.js | 32 + .../node_modules/lodash/without.js | 31 + .../node_modules/lodash/words.js | 35 + .../node_modules/lodash/wrap.js | 30 + .../node_modules/lodash/wrapperAt.js | 48 + .../node_modules/lodash/wrapperChain.js | 34 + .../node_modules/lodash/wrapperLodash.js | 147 + .../node_modules/lodash/wrapperReverse.js | 44 + .../node_modules/lodash/wrapperValue.js | 21 + .../node_modules/lodash/xor.js | 28 + .../node_modules/lodash/xorBy.js | 39 + .../node_modules/lodash/xorWith.js | 34 + .../node_modules/lodash/zip.js | 22 + .../node_modules/lodash/zipObject.js | 24 + .../node_modules/lodash/zipObjectDeep.js | 23 + .../node_modules/lodash/zipWith.js | 32 + node_modules/babel-generator/package.json | 23 +- .../babel-helper-evaluate-path/package.json | 23 +- .../package.json | 23 +- .../babel-helper-is-nodes-equiv/package.json | 23 +- .../babel-helper-is-void-0/package.json | 23 +- .../package.json | 23 +- .../babel-helper-remove-or-void/package.json | 23 +- .../package.json | 23 +- node_modules/babel-helpers/package.json | 23 +- node_modules/babel-messages/package.json | 23 +- node_modules/babel-minify/package.json | 40 +- .../babel-plugin-minify-builtins/package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../babel-plugin-minify-infinity/package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../babel-plugin-minify-replace/package.json | 23 +- .../babel-plugin-minify-simplify/package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- .../package.json | 23 +- node_modules/babel-preset-minify/package.json | 27 +- .../node_modules/lodash/LICENSE | 47 + .../node_modules/lodash/README.md | 39 + .../node_modules/lodash/_DataView.js | 7 + .../node_modules/lodash/_Hash.js | 32 + .../node_modules/lodash/_LazyWrapper.js | 28 + .../node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash/_LodashWrapper.js | 22 + .../node_modules/lodash/_Map.js | 7 + .../node_modules/lodash/_MapCache.js | 32 + .../node_modules/lodash/_Promise.js | 7 + .../node_modules/lodash/_Set.js | 7 + .../node_modules/lodash/_SetCache.js | 27 + .../node_modules/lodash/_Stack.js | 27 + .../node_modules/lodash/_Symbol.js | 6 + .../node_modules/lodash/_Uint8Array.js | 6 + .../node_modules/lodash/_WeakMap.js | 7 + .../node_modules/lodash/_apply.js | 21 + .../node_modules/lodash/_arrayAggregator.js | 22 + .../node_modules/lodash/_arrayEach.js | 22 + .../node_modules/lodash/_arrayEachRight.js | 21 + .../node_modules/lodash/_arrayEvery.js | 23 + .../node_modules/lodash/_arrayFilter.js | 25 + .../node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../node_modules/lodash/_arrayMap.js | 21 + .../node_modules/lodash/_arrayPush.js | 20 + .../node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash/_arraySome.js | 23 + .../node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + .../node_modules/lodash/_assignValue.js | 28 + .../node_modules/lodash/_assocIndexOf.js | 21 + .../node_modules/lodash/_baseAggregator.js | 21 + .../node_modules/lodash/_baseAssign.js | 17 + .../node_modules/lodash/_baseAssignIn.js | 17 + .../node_modules/lodash/_baseAssignValue.js | 25 + .../node_modules/lodash/_baseAt.js | 23 + .../node_modules/lodash/_baseClamp.js | 22 + .../node_modules/lodash/_baseClone.js | 171 + .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../node_modules/lodash/_baseCreate.js | 30 + .../node_modules/lodash/_baseDelay.js | 21 + .../node_modules/lodash/_baseDifference.js | 67 + .../node_modules/lodash/_baseEach.js | 14 + .../node_modules/lodash/_baseEachRight.js | 14 + .../node_modules/lodash/_baseEvery.js | 21 + .../node_modules/lodash/_baseExtremum.js | 32 + .../node_modules/lodash/_baseFill.js | 32 + .../node_modules/lodash/_baseFilter.js | 21 + .../node_modules/lodash/_baseFindIndex.js | 24 + .../node_modules/lodash/_baseFindKey.js | 23 + .../node_modules/lodash/_baseFlatten.js | 38 + .../node_modules/lodash/_baseFor.js | 16 + .../node_modules/lodash/_baseForOwn.js | 16 + .../node_modules/lodash/_baseForOwnRight.js | 16 + .../node_modules/lodash/_baseForRight.js | 15 + .../node_modules/lodash/_baseFunctions.js | 19 + .../node_modules/lodash/_baseGet.js | 24 + .../node_modules/lodash/_baseGetAllKeys.js | 20 + .../node_modules/lodash/_baseGetTag.js | 28 + .../node_modules/lodash/_baseGt.js | 14 + .../node_modules/lodash/_baseHas.js | 19 + .../node_modules/lodash/_baseHasIn.js | 13 + .../node_modules/lodash/_baseInRange.js | 18 + .../node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + .../node_modules/lodash/_baseInverter.js | 21 + .../node_modules/lodash/_baseInvoke.js | 24 + .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../node_modules/lodash/_baseIsDate.js | 18 + .../node_modules/lodash/_baseIsEqual.js | 28 + .../node_modules/lodash/_baseIsEqualDeep.js | 83 + .../node_modules/lodash/_baseIsMap.js | 18 + .../node_modules/lodash/_baseIsMatch.js | 62 + .../node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js | 47 + .../node_modules/lodash/_baseIsRegExp.js | 18 + .../node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + .../node_modules/lodash/_baseIteratee.js | 31 + .../node_modules/lodash/_baseKeys.js | 30 + .../node_modules/lodash/_baseKeysIn.js | 33 + .../node_modules/lodash/_baseLodash.js | 10 + .../node_modules/lodash/_baseLt.js | 14 + .../node_modules/lodash/_baseMap.js | 22 + .../node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + .../node_modules/lodash/_baseMean.js | 20 + .../node_modules/lodash/_baseMerge.js | 42 + .../node_modules/lodash/_baseMergeDeep.js | 94 + .../node_modules/lodash/_baseNth.js | 20 + .../node_modules/lodash/_baseOrderBy.js | 34 + .../node_modules/lodash/_basePick.js | 19 + .../node_modules/lodash/_basePickBy.js | 30 + .../node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + .../node_modules/lodash/_basePropertyOf.js | 14 + .../node_modules/lodash/_basePullAll.js | 51 + .../node_modules/lodash/_basePullAt.js | 37 + .../node_modules/lodash/_baseRandom.js | 18 + .../node_modules/lodash/_baseRange.js | 28 + .../node_modules/lodash/_baseReduce.js | 23 + .../node_modules/lodash/_baseRepeat.js | 35 + .../node_modules/lodash/_baseRest.js | 17 + .../node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash/_baseSet.js | 47 + .../node_modules/lodash/_baseSetData.js | 17 + .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash/_baseSlice.js | 31 + .../node_modules/lodash/_baseSome.js | 22 + .../node_modules/lodash/_baseSortBy.js | 21 + .../node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 64 + .../node_modules/lodash/_baseSortedUniq.js | 30 + .../node_modules/lodash/_baseSum.js | 24 + .../node_modules/lodash/_baseTimes.js | 20 + .../node_modules/lodash/_baseToNumber.js | 24 + .../node_modules/lodash/_baseToPairs.js | 18 + .../node_modules/lodash/_baseToString.js | 37 + .../node_modules/lodash/_baseUnary.js | 14 + .../node_modules/lodash/_baseUniq.js | 72 + .../node_modules/lodash/_baseUnset.js | 20 + .../node_modules/lodash/_baseUpdate.js | 18 + .../node_modules/lodash/_baseValues.js | 19 + .../node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + .../node_modules/lodash/_baseXor.js | 36 + .../node_modules/lodash/_baseZipObject.js | 23 + .../node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + .../node_modules/lodash/_castFunction.js | 14 + .../node_modules/lodash/_castPath.js | 21 + .../node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash/_castSlice.js | 18 + .../node_modules/lodash/_charsEndIndex.js | 19 + .../node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + .../node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash/_cloneDataView.js | 16 + .../node_modules/lodash/_cloneRegExp.js | 17 + .../node_modules/lodash/_cloneSymbol.js | 18 + .../node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + .../node_modules/lodash/_compareMultiple.js | 44 + .../node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + .../node_modules/lodash/_copyArray.js | 20 + .../node_modules/lodash/_copyObject.js | 40 + .../node_modules/lodash/_copySymbols.js | 16 + .../node_modules/lodash/_copySymbolsIn.js | 16 + .../node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + .../node_modules/lodash/_createAssigner.js | 37 + .../node_modules/lodash/_createBaseEach.js | 32 + .../node_modules/lodash/_createBaseFor.js | 25 + .../node_modules/lodash/_createBind.js | 28 + .../node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + .../node_modules/lodash/_createCtor.js | 37 + .../node_modules/lodash/_createCurry.js | 46 + .../node_modules/lodash/_createFind.js | 25 + .../node_modules/lodash/_createFlow.js | 78 + .../node_modules/lodash/_createHybrid.js | 92 + .../node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + .../node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash/_createPadding.js | 33 + .../node_modules/lodash/_createPartial.js | 43 + .../node_modules/lodash/_createRange.js | 30 + .../node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + .../node_modules/lodash/_createRound.js | 33 + .../node_modules/lodash/_createSet.js | 19 + .../node_modules/lodash/_createToPairs.js | 30 + .../node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + .../node_modules/lodash/_customOmitClone.js | 16 + .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../node_modules/lodash/_equalArrays.js | 83 + .../node_modules/lodash/_equalByTag.js | 112 + .../node_modules/lodash/_equalObjects.js | 89 + .../node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + .../node_modules/lodash/_flatRest.js | 16 + .../node_modules/lodash/_freeGlobal.js | 4 + .../node_modules/lodash/_getAllKeys.js | 16 + .../node_modules/lodash/_getAllKeysIn.js | 17 + .../node_modules/lodash/_getData.js | 15 + .../node_modules/lodash/_getFuncName.js | 31 + .../node_modules/lodash/_getHolder.js | 13 + .../node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash/_getMatchData.js | 24 + .../node_modules/lodash/_getNative.js | 17 + .../node_modules/lodash/_getPrototype.js | 6 + .../node_modules/lodash/_getRawTag.js | 46 + .../node_modules/lodash/_getSymbols.js | 30 + .../node_modules/lodash/_getSymbolsIn.js | 25 + .../node_modules/lodash/_getTag.js | 58 + .../node_modules/lodash/_getValue.js | 13 + .../node_modules/lodash/_getView.js | 33 + .../node_modules/lodash/_getWrapDetails.js | 17 + .../node_modules/lodash/_hasPath.js | 39 + .../node_modules/lodash/_hasUnicode.js | 26 + .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../node_modules/lodash/_hashClear.js | 15 + .../node_modules/lodash/_hashDelete.js | 17 + .../node_modules/lodash/_hashGet.js | 30 + .../node_modules/lodash/_hashHas.js | 23 + .../node_modules/lodash/_hashSet.js | 23 + .../node_modules/lodash/_initCloneArray.js | 26 + .../node_modules/lodash/_initCloneByTag.js | 77 + .../node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../node_modules/lodash/_isIndex.js | 25 + .../node_modules/lodash/_isIterateeCall.js | 30 + .../node_modules/lodash/_isKey.js | 29 + .../node_modules/lodash/_isKeyable.js | 15 + .../node_modules/lodash/_isLaziable.js | 28 + .../node_modules/lodash/_isMaskable.js | 14 + .../node_modules/lodash/_isMasked.js | 20 + .../node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + .../node_modules/lodash/_iteratorToArray.js | 18 + .../node_modules/lodash/_lazyClone.js | 23 + .../node_modules/lodash/_lazyReverse.js | 23 + .../node_modules/lodash/_lazyValue.js | 69 + .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js | 35 + .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js | 16 + .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js | 21 + .../node_modules/lodash/_mapCacheDelete.js | 18 + .../node_modules/lodash/_mapCacheGet.js | 16 + .../node_modules/lodash/_mapCacheHas.js | 16 + .../node_modules/lodash/_mapCacheSet.js | 22 + .../node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + .../node_modules/lodash/_memoizeCapped.js | 26 + .../node_modules/lodash/_mergeData.js | 90 + .../node_modules/lodash/_metaMap.js | 6 + .../node_modules/lodash/_nativeCreate.js | 6 + .../node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../node_modules/lodash/_nodeUtil.js | 30 + .../node_modules/lodash/_objectToString.js | 22 + .../node_modules/lodash/_overArg.js | 15 + .../node_modules/lodash/_overRest.js | 36 + .../node_modules/lodash/_parent.js | 16 + .../node_modules/lodash/_reEscape.js | 4 + .../node_modules/lodash/_reEvaluate.js | 4 + .../node_modules/lodash/_reInterpolate.js | 4 + .../node_modules/lodash/_realNames.js | 4 + .../node_modules/lodash/_reorder.js | 29 + .../node_modules/lodash/_replaceHolders.js | 29 + .../node_modules/lodash/_root.js | 9 + .../node_modules/lodash/_safeGet.js | 17 + .../node_modules/lodash/_setCacheAdd.js | 19 + .../node_modules/lodash/_setCacheHas.js | 14 + .../node_modules/lodash/_setData.js | 20 + .../node_modules/lodash/_setToArray.js | 18 + .../node_modules/lodash/_setToPairs.js | 18 + .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../node_modules/lodash/_stackClear.js | 15 + .../node_modules/lodash/_stackDelete.js | 18 + .../node_modules/lodash/_stackGet.js | 14 + .../node_modules/lodash/_stackHas.js | 14 + .../node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash/_stringToPath.js | 27 + .../node_modules/lodash/_toKey.js | 21 + .../node_modules/lodash/_toSource.js | 26 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + .../node_modules/lodash/_unicodeSize.js | 44 + .../node_modules/lodash/_unicodeToArray.js | 40 + .../node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash/_wrapperClone.js | 23 + .../babel-register/node_modules/lodash/add.js | 22 + .../node_modules/lodash/after.js | 42 + .../node_modules/lodash/array.js | 67 + .../babel-register/node_modules/lodash/ary.js | 29 + .../node_modules/lodash/assign.js | 58 + .../node_modules/lodash/assignIn.js | 40 + .../node_modules/lodash/assignInWith.js | 38 + .../node_modules/lodash/assignWith.js | 37 + .../babel-register/node_modules/lodash/at.js | 23 + .../node_modules/lodash/attempt.js | 35 + .../node_modules/lodash/before.js | 40 + .../node_modules/lodash/bind.js | 57 + .../node_modules/lodash/bindAll.js | 41 + .../node_modules/lodash/bindKey.js | 68 + .../node_modules/lodash/camelCase.js | 29 + .../node_modules/lodash/capitalize.js | 23 + .../node_modules/lodash/castArray.js | 44 + .../node_modules/lodash/ceil.js | 26 + .../node_modules/lodash/chain.js | 38 + .../node_modules/lodash/chunk.js | 50 + .../node_modules/lodash/clamp.js | 39 + .../node_modules/lodash/clone.js | 36 + .../node_modules/lodash/cloneDeep.js | 29 + .../node_modules/lodash/cloneDeepWith.js | 40 + .../node_modules/lodash/cloneWith.js | 42 + .../node_modules/lodash/collection.js | 30 + .../node_modules/lodash/commit.js | 33 + .../node_modules/lodash/compact.js | 31 + .../node_modules/lodash/concat.js | 43 + .../node_modules/lodash/cond.js | 60 + .../node_modules/lodash/conforms.js | 35 + .../node_modules/lodash/conformsTo.js | 32 + .../node_modules/lodash/constant.js | 26 + .../node_modules/lodash/core.js | 3854 ++++ .../node_modules/lodash/core.min.js | 29 + .../node_modules/lodash/countBy.js | 40 + .../node_modules/lodash/create.js | 43 + .../node_modules/lodash/curry.js | 57 + .../node_modules/lodash/curryRight.js | 54 + .../node_modules/lodash/date.js | 3 + .../node_modules/lodash/debounce.js | 190 + .../node_modules/lodash/deburr.js | 45 + .../node_modules/lodash/defaultTo.js | 25 + .../node_modules/lodash/defaults.js | 64 + .../node_modules/lodash/defaultsDeep.js | 30 + .../node_modules/lodash/defer.js | 26 + .../node_modules/lodash/delay.js | 28 + .../node_modules/lodash/difference.js | 33 + .../node_modules/lodash/differenceBy.js | 44 + .../node_modules/lodash/differenceWith.js | 40 + .../node_modules/lodash/divide.js | 22 + .../node_modules/lodash/drop.js | 38 + .../node_modules/lodash/dropRight.js | 39 + .../node_modules/lodash/dropRightWhile.js | 45 + .../node_modules/lodash/dropWhile.js | 45 + .../node_modules/lodash/each.js | 1 + .../node_modules/lodash/eachRight.js | 1 + .../node_modules/lodash/endsWith.js | 43 + .../node_modules/lodash/entries.js | 1 + .../node_modules/lodash/entriesIn.js | 1 + .../babel-register/node_modules/lodash/eq.js | 37 + .../node_modules/lodash/escape.js | 43 + .../node_modules/lodash/escapeRegExp.js | 32 + .../node_modules/lodash/every.js | 56 + .../node_modules/lodash/extend.js | 1 + .../node_modules/lodash/extendWith.js | 1 + .../node_modules/lodash/fill.js | 45 + .../node_modules/lodash/filter.js | 48 + .../node_modules/lodash/find.js | 42 + .../node_modules/lodash/findIndex.js | 55 + .../node_modules/lodash/findKey.js | 44 + .../node_modules/lodash/findLast.js | 25 + .../node_modules/lodash/findLastIndex.js | 59 + .../node_modules/lodash/findLastKey.js | 44 + .../node_modules/lodash/first.js | 1 + .../node_modules/lodash/flatMap.js | 29 + .../node_modules/lodash/flatMapDeep.js | 31 + .../node_modules/lodash/flatMapDepth.js | 31 + .../node_modules/lodash/flatten.js | 22 + .../node_modules/lodash/flattenDeep.js | 25 + .../node_modules/lodash/flattenDepth.js | 33 + .../node_modules/lodash/flip.js | 28 + .../node_modules/lodash/floor.js | 26 + .../node_modules/lodash/flow.js | 27 + .../node_modules/lodash/flowRight.js | 26 + .../node_modules/lodash/forEach.js | 41 + .../node_modules/lodash/forEachRight.js | 31 + .../node_modules/lodash/forIn.js | 39 + .../node_modules/lodash/forInRight.js | 37 + .../node_modules/lodash/forOwn.js | 36 + .../node_modules/lodash/forOwnRight.js | 34 + .../babel-register/node_modules/lodash/fp.js | 2 + .../node_modules/lodash/fp/F.js | 1 + .../node_modules/lodash/fp/T.js | 1 + .../node_modules/lodash/fp/__.js | 1 + .../node_modules/lodash/fp/_baseConvert.js | 569 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + .../node_modules/lodash/fp/_falseOptions.js | 7 + .../node_modules/lodash/fp/_mapping.js | 358 + .../node_modules/lodash/fp/_util.js | 16 + .../node_modules/lodash/fp/add.js | 5 + .../node_modules/lodash/fp/after.js | 5 + .../node_modules/lodash/fp/all.js | 1 + .../node_modules/lodash/fp/allPass.js | 1 + .../node_modules/lodash/fp/always.js | 1 + .../node_modules/lodash/fp/any.js | 1 + .../node_modules/lodash/fp/anyPass.js | 1 + .../node_modules/lodash/fp/apply.js | 1 + .../node_modules/lodash/fp/array.js | 2 + .../node_modules/lodash/fp/ary.js | 5 + .../node_modules/lodash/fp/assign.js | 5 + .../node_modules/lodash/fp/assignAll.js | 5 + .../node_modules/lodash/fp/assignAllWith.js | 5 + .../node_modules/lodash/fp/assignIn.js | 5 + .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash/fp/assignInWith.js | 5 + .../node_modules/lodash/fp/assignWith.js | 5 + .../node_modules/lodash/fp/assoc.js | 1 + .../node_modules/lodash/fp/assocPath.js | 1 + .../node_modules/lodash/fp/at.js | 5 + .../node_modules/lodash/fp/attempt.js | 5 + .../node_modules/lodash/fp/before.js | 5 + .../node_modules/lodash/fp/bind.js | 5 + .../node_modules/lodash/fp/bindAll.js | 5 + .../node_modules/lodash/fp/bindKey.js | 5 + .../node_modules/lodash/fp/camelCase.js | 5 + .../node_modules/lodash/fp/capitalize.js | 5 + .../node_modules/lodash/fp/castArray.js | 5 + .../node_modules/lodash/fp/ceil.js | 5 + .../node_modules/lodash/fp/chain.js | 5 + .../node_modules/lodash/fp/chunk.js | 5 + .../node_modules/lodash/fp/clamp.js | 5 + .../node_modules/lodash/fp/clone.js | 5 + .../node_modules/lodash/fp/cloneDeep.js | 5 + .../node_modules/lodash/fp/cloneDeepWith.js | 5 + .../node_modules/lodash/fp/cloneWith.js | 5 + .../node_modules/lodash/fp/collection.js | 2 + .../node_modules/lodash/fp/commit.js | 5 + .../node_modules/lodash/fp/compact.js | 5 + .../node_modules/lodash/fp/complement.js | 1 + .../node_modules/lodash/fp/compose.js | 1 + .../node_modules/lodash/fp/concat.js | 5 + .../node_modules/lodash/fp/cond.js | 5 + .../node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../node_modules/lodash/fp/constant.js | 5 + .../node_modules/lodash/fp/contains.js | 1 + .../node_modules/lodash/fp/convert.js | 18 + .../node_modules/lodash/fp/countBy.js | 5 + .../node_modules/lodash/fp/create.js | 5 + .../node_modules/lodash/fp/curry.js | 5 + .../node_modules/lodash/fp/curryN.js | 5 + .../node_modules/lodash/fp/curryRight.js | 5 + .../node_modules/lodash/fp/curryRightN.js | 5 + .../node_modules/lodash/fp/date.js | 2 + .../node_modules/lodash/fp/debounce.js | 5 + .../node_modules/lodash/fp/deburr.js | 5 + .../node_modules/lodash/fp/defaultTo.js | 5 + .../node_modules/lodash/fp/defaults.js | 5 + .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../node_modules/lodash/fp/defer.js | 5 + .../node_modules/lodash/fp/delay.js | 5 + .../node_modules/lodash/fp/difference.js | 5 + .../node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + .../node_modules/lodash/fp/dissoc.js | 1 + .../node_modules/lodash/fp/dissocPath.js | 1 + .../node_modules/lodash/fp/divide.js | 5 + .../node_modules/lodash/fp/drop.js | 5 + .../node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + .../node_modules/lodash/fp/dropWhile.js | 5 + .../node_modules/lodash/fp/each.js | 1 + .../node_modules/lodash/fp/eachRight.js | 1 + .../node_modules/lodash/fp/endsWith.js | 5 + .../node_modules/lodash/fp/entries.js | 1 + .../node_modules/lodash/fp/entriesIn.js | 1 + .../node_modules/lodash/fp/eq.js | 5 + .../node_modules/lodash/fp/equals.js | 1 + .../node_modules/lodash/fp/escape.js | 5 + .../node_modules/lodash/fp/escapeRegExp.js | 5 + .../node_modules/lodash/fp/every.js | 5 + .../node_modules/lodash/fp/extend.js | 1 + .../node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash/fp/extendWith.js | 1 + .../node_modules/lodash/fp/fill.js | 5 + .../node_modules/lodash/fp/filter.js | 5 + .../node_modules/lodash/fp/find.js | 5 + .../node_modules/lodash/fp/findFrom.js | 5 + .../node_modules/lodash/fp/findIndex.js | 5 + .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../node_modules/lodash/fp/findKey.js | 5 + .../node_modules/lodash/fp/findLast.js | 5 + .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash/fp/findLastKey.js | 5 + .../node_modules/lodash/fp/first.js | 1 + .../node_modules/lodash/fp/flatMap.js | 5 + .../node_modules/lodash/fp/flatMapDeep.js | 5 + .../node_modules/lodash/fp/flatMapDepth.js | 5 + .../node_modules/lodash/fp/flatten.js | 5 + .../node_modules/lodash/fp/flattenDeep.js | 5 + .../node_modules/lodash/fp/flattenDepth.js | 5 + .../node_modules/lodash/fp/flip.js | 5 + .../node_modules/lodash/fp/floor.js | 5 + .../node_modules/lodash/fp/flow.js | 5 + .../node_modules/lodash/fp/flowRight.js | 5 + .../node_modules/lodash/fp/forEach.js | 5 + .../node_modules/lodash/fp/forEachRight.js | 5 + .../node_modules/lodash/fp/forIn.js | 5 + .../node_modules/lodash/fp/forInRight.js | 5 + .../node_modules/lodash/fp/forOwn.js | 5 + .../node_modules/lodash/fp/forOwnRight.js | 5 + .../node_modules/lodash/fp/fromPairs.js | 5 + .../node_modules/lodash/fp/function.js | 2 + .../node_modules/lodash/fp/functions.js | 5 + .../node_modules/lodash/fp/functionsIn.js | 5 + .../node_modules/lodash/fp/get.js | 5 + .../node_modules/lodash/fp/getOr.js | 5 + .../node_modules/lodash/fp/groupBy.js | 5 + .../node_modules/lodash/fp/gt.js | 5 + .../node_modules/lodash/fp/gte.js | 5 + .../node_modules/lodash/fp/has.js | 5 + .../node_modules/lodash/fp/hasIn.js | 5 + .../node_modules/lodash/fp/head.js | 5 + .../node_modules/lodash/fp/identical.js | 1 + .../node_modules/lodash/fp/identity.js | 5 + .../node_modules/lodash/fp/inRange.js | 5 + .../node_modules/lodash/fp/includes.js | 5 + .../node_modules/lodash/fp/includesFrom.js | 5 + .../node_modules/lodash/fp/indexBy.js | 1 + .../node_modules/lodash/fp/indexOf.js | 5 + .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../node_modules/lodash/fp/init.js | 1 + .../node_modules/lodash/fp/initial.js | 5 + .../node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + .../node_modules/lodash/fp/invert.js | 5 + .../node_modules/lodash/fp/invertBy.js | 5 + .../node_modules/lodash/fp/invertObj.js | 1 + .../node_modules/lodash/fp/invoke.js | 5 + .../node_modules/lodash/fp/invokeArgs.js | 5 + .../node_modules/lodash/fp/invokeArgsMap.js | 5 + .../node_modules/lodash/fp/invokeMap.js | 5 + .../node_modules/lodash/fp/isArguments.js | 5 + .../node_modules/lodash/fp/isArray.js | 5 + .../node_modules/lodash/fp/isArrayBuffer.js | 5 + .../node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + .../node_modules/lodash/fp/isBoolean.js | 5 + .../node_modules/lodash/fp/isBuffer.js | 5 + .../node_modules/lodash/fp/isDate.js | 5 + .../node_modules/lodash/fp/isElement.js | 5 + .../node_modules/lodash/fp/isEmpty.js | 5 + .../node_modules/lodash/fp/isEqual.js | 5 + .../node_modules/lodash/fp/isEqualWith.js | 5 + .../node_modules/lodash/fp/isError.js | 5 + .../node_modules/lodash/fp/isFinite.js | 5 + .../node_modules/lodash/fp/isFunction.js | 5 + .../node_modules/lodash/fp/isInteger.js | 5 + .../node_modules/lodash/fp/isLength.js | 5 + .../node_modules/lodash/fp/isMap.js | 5 + .../node_modules/lodash/fp/isMatch.js | 5 + .../node_modules/lodash/fp/isMatchWith.js | 5 + .../node_modules/lodash/fp/isNaN.js | 5 + .../node_modules/lodash/fp/isNative.js | 5 + .../node_modules/lodash/fp/isNil.js | 5 + .../node_modules/lodash/fp/isNull.js | 5 + .../node_modules/lodash/fp/isNumber.js | 5 + .../node_modules/lodash/fp/isObject.js | 5 + .../node_modules/lodash/fp/isObjectLike.js | 5 + .../node_modules/lodash/fp/isPlainObject.js | 5 + .../node_modules/lodash/fp/isRegExp.js | 5 + .../node_modules/lodash/fp/isSafeInteger.js | 5 + .../node_modules/lodash/fp/isSet.js | 5 + .../node_modules/lodash/fp/isString.js | 5 + .../node_modules/lodash/fp/isSymbol.js | 5 + .../node_modules/lodash/fp/isTypedArray.js | 5 + .../node_modules/lodash/fp/isUndefined.js | 5 + .../node_modules/lodash/fp/isWeakMap.js | 5 + .../node_modules/lodash/fp/isWeakSet.js | 5 + .../node_modules/lodash/fp/iteratee.js | 5 + .../node_modules/lodash/fp/join.js | 5 + .../node_modules/lodash/fp/juxt.js | 1 + .../node_modules/lodash/fp/kebabCase.js | 5 + .../node_modules/lodash/fp/keyBy.js | 5 + .../node_modules/lodash/fp/keys.js | 5 + .../node_modules/lodash/fp/keysIn.js | 5 + .../node_modules/lodash/fp/lang.js | 2 + .../node_modules/lodash/fp/last.js | 5 + .../node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../node_modules/lodash/fp/lowerCase.js | 5 + .../node_modules/lodash/fp/lowerFirst.js | 5 + .../node_modules/lodash/fp/lt.js | 5 + .../node_modules/lodash/fp/lte.js | 5 + .../node_modules/lodash/fp/map.js | 5 + .../node_modules/lodash/fp/mapKeys.js | 5 + .../node_modules/lodash/fp/mapValues.js | 5 + .../node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + .../node_modules/lodash/fp/math.js | 2 + .../node_modules/lodash/fp/max.js | 5 + .../node_modules/lodash/fp/maxBy.js | 5 + .../node_modules/lodash/fp/mean.js | 5 + .../node_modules/lodash/fp/meanBy.js | 5 + .../node_modules/lodash/fp/memoize.js | 5 + .../node_modules/lodash/fp/merge.js | 5 + .../node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../node_modules/lodash/fp/mergeWith.js | 5 + .../node_modules/lodash/fp/method.js | 5 + .../node_modules/lodash/fp/methodOf.js | 5 + .../node_modules/lodash/fp/min.js | 5 + .../node_modules/lodash/fp/minBy.js | 5 + .../node_modules/lodash/fp/mixin.js | 5 + .../node_modules/lodash/fp/multiply.js | 5 + .../node_modules/lodash/fp/nAry.js | 1 + .../node_modules/lodash/fp/negate.js | 5 + .../node_modules/lodash/fp/next.js | 5 + .../node_modules/lodash/fp/noop.js | 5 + .../node_modules/lodash/fp/now.js | 5 + .../node_modules/lodash/fp/nth.js | 5 + .../node_modules/lodash/fp/nthArg.js | 5 + .../node_modules/lodash/fp/number.js | 2 + .../node_modules/lodash/fp/object.js | 2 + .../node_modules/lodash/fp/omit.js | 5 + .../node_modules/lodash/fp/omitAll.js | 1 + .../node_modules/lodash/fp/omitBy.js | 5 + .../node_modules/lodash/fp/once.js | 5 + .../node_modules/lodash/fp/orderBy.js | 5 + .../node_modules/lodash/fp/over.js | 5 + .../node_modules/lodash/fp/overArgs.js | 5 + .../node_modules/lodash/fp/overEvery.js | 5 + .../node_modules/lodash/fp/overSome.js | 5 + .../node_modules/lodash/fp/pad.js | 5 + .../node_modules/lodash/fp/padChars.js | 5 + .../node_modules/lodash/fp/padCharsEnd.js | 5 + .../node_modules/lodash/fp/padCharsStart.js | 5 + .../node_modules/lodash/fp/padEnd.js | 5 + .../node_modules/lodash/fp/padStart.js | 5 + .../node_modules/lodash/fp/parseInt.js | 5 + .../node_modules/lodash/fp/partial.js | 5 + .../node_modules/lodash/fp/partialRight.js | 5 + .../node_modules/lodash/fp/partition.js | 5 + .../node_modules/lodash/fp/path.js | 1 + .../node_modules/lodash/fp/pathEq.js | 1 + .../node_modules/lodash/fp/pathOr.js | 1 + .../node_modules/lodash/fp/paths.js | 1 + .../node_modules/lodash/fp/pick.js | 5 + .../node_modules/lodash/fp/pickAll.js | 1 + .../node_modules/lodash/fp/pickBy.js | 5 + .../node_modules/lodash/fp/pipe.js | 1 + .../node_modules/lodash/fp/placeholder.js | 6 + .../node_modules/lodash/fp/plant.js | 5 + .../node_modules/lodash/fp/pluck.js | 1 + .../node_modules/lodash/fp/prop.js | 1 + .../node_modules/lodash/fp/propEq.js | 1 + .../node_modules/lodash/fp/propOr.js | 1 + .../node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../node_modules/lodash/fp/props.js | 1 + .../node_modules/lodash/fp/pull.js | 5 + .../node_modules/lodash/fp/pullAll.js | 5 + .../node_modules/lodash/fp/pullAllBy.js | 5 + .../node_modules/lodash/fp/pullAllWith.js | 5 + .../node_modules/lodash/fp/pullAt.js | 5 + .../node_modules/lodash/fp/random.js | 5 + .../node_modules/lodash/fp/range.js | 5 + .../node_modules/lodash/fp/rangeRight.js | 5 + .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../node_modules/lodash/fp/rearg.js | 5 + .../node_modules/lodash/fp/reduce.js | 5 + .../node_modules/lodash/fp/reduceRight.js | 5 + .../node_modules/lodash/fp/reject.js | 5 + .../node_modules/lodash/fp/remove.js | 5 + .../node_modules/lodash/fp/repeat.js | 5 + .../node_modules/lodash/fp/replace.js | 5 + .../node_modules/lodash/fp/rest.js | 5 + .../node_modules/lodash/fp/restFrom.js | 5 + .../node_modules/lodash/fp/result.js | 5 + .../node_modules/lodash/fp/reverse.js | 5 + .../node_modules/lodash/fp/round.js | 5 + .../node_modules/lodash/fp/sample.js | 5 + .../node_modules/lodash/fp/sampleSize.js | 5 + .../node_modules/lodash/fp/seq.js | 2 + .../node_modules/lodash/fp/set.js | 5 + .../node_modules/lodash/fp/setWith.js | 5 + .../node_modules/lodash/fp/shuffle.js | 5 + .../node_modules/lodash/fp/size.js | 5 + .../node_modules/lodash/fp/slice.js | 5 + .../node_modules/lodash/fp/snakeCase.js | 5 + .../node_modules/lodash/fp/some.js | 5 + .../node_modules/lodash/fp/sortBy.js | 5 + .../node_modules/lodash/fp/sortedIndex.js | 5 + .../node_modules/lodash/fp/sortedIndexBy.js | 5 + .../node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + .../node_modules/lodash/fp/sortedUniq.js | 5 + .../node_modules/lodash/fp/sortedUniqBy.js | 5 + .../node_modules/lodash/fp/split.js | 5 + .../node_modules/lodash/fp/spread.js | 5 + .../node_modules/lodash/fp/spreadFrom.js | 5 + .../node_modules/lodash/fp/startCase.js | 5 + .../node_modules/lodash/fp/startsWith.js | 5 + .../node_modules/lodash/fp/string.js | 2 + .../node_modules/lodash/fp/stubArray.js | 5 + .../node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js | 5 + .../node_modules/lodash/fp/stubString.js | 5 + .../node_modules/lodash/fp/stubTrue.js | 5 + .../node_modules/lodash/fp/subtract.js | 5 + .../node_modules/lodash/fp/sum.js | 5 + .../node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../node_modules/lodash/fp/tail.js | 5 + .../node_modules/lodash/fp/take.js | 5 + .../node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + .../node_modules/lodash/fp/takeWhile.js | 5 + .../node_modules/lodash/fp/tap.js | 5 + .../node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + .../node_modules/lodash/fp/throttle.js | 5 + .../node_modules/lodash/fp/thru.js | 5 + .../node_modules/lodash/fp/times.js | 5 + .../node_modules/lodash/fp/toArray.js | 5 + .../node_modules/lodash/fp/toFinite.js | 5 + .../node_modules/lodash/fp/toInteger.js | 5 + .../node_modules/lodash/fp/toIterator.js | 5 + .../node_modules/lodash/fp/toJSON.js | 5 + .../node_modules/lodash/fp/toLength.js | 5 + .../node_modules/lodash/fp/toLower.js | 5 + .../node_modules/lodash/fp/toNumber.js | 5 + .../node_modules/lodash/fp/toPairs.js | 5 + .../node_modules/lodash/fp/toPairsIn.js | 5 + .../node_modules/lodash/fp/toPath.js | 5 + .../node_modules/lodash/fp/toPlainObject.js | 5 + .../node_modules/lodash/fp/toSafeInteger.js | 5 + .../node_modules/lodash/fp/toString.js | 5 + .../node_modules/lodash/fp/toUpper.js | 5 + .../node_modules/lodash/fp/transform.js | 5 + .../node_modules/lodash/fp/trim.js | 5 + .../node_modules/lodash/fp/trimChars.js | 5 + .../node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + .../node_modules/lodash/fp/trimEnd.js | 5 + .../node_modules/lodash/fp/trimStart.js | 5 + .../node_modules/lodash/fp/truncate.js | 5 + .../node_modules/lodash/fp/unapply.js | 1 + .../node_modules/lodash/fp/unary.js | 5 + .../node_modules/lodash/fp/unescape.js | 5 + .../node_modules/lodash/fp/union.js | 5 + .../node_modules/lodash/fp/unionBy.js | 5 + .../node_modules/lodash/fp/unionWith.js | 5 + .../node_modules/lodash/fp/uniq.js | 5 + .../node_modules/lodash/fp/uniqBy.js | 5 + .../node_modules/lodash/fp/uniqWith.js | 5 + .../node_modules/lodash/fp/uniqueId.js | 5 + .../node_modules/lodash/fp/unnest.js | 1 + .../node_modules/lodash/fp/unset.js | 5 + .../node_modules/lodash/fp/unzip.js | 5 + .../node_modules/lodash/fp/unzipWith.js | 5 + .../node_modules/lodash/fp/update.js | 5 + .../node_modules/lodash/fp/updateWith.js | 5 + .../node_modules/lodash/fp/upperCase.js | 5 + .../node_modules/lodash/fp/upperFirst.js | 5 + .../node_modules/lodash/fp/useWith.js | 1 + .../node_modules/lodash/fp/util.js | 2 + .../node_modules/lodash/fp/value.js | 5 + .../node_modules/lodash/fp/valueOf.js | 5 + .../node_modules/lodash/fp/values.js | 5 + .../node_modules/lodash/fp/valuesIn.js | 5 + .../node_modules/lodash/fp/where.js | 1 + .../node_modules/lodash/fp/whereEq.js | 1 + .../node_modules/lodash/fp/without.js | 5 + .../node_modules/lodash/fp/words.js | 5 + .../node_modules/lodash/fp/wrap.js | 5 + .../node_modules/lodash/fp/wrapperAt.js | 5 + .../node_modules/lodash/fp/wrapperChain.js | 5 + .../node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + .../node_modules/lodash/fp/wrapperValue.js | 5 + .../node_modules/lodash/fp/xor.js | 5 + .../node_modules/lodash/fp/xorBy.js | 5 + .../node_modules/lodash/fp/xorWith.js | 5 + .../node_modules/lodash/fp/zip.js | 5 + .../node_modules/lodash/fp/zipAll.js | 5 + .../node_modules/lodash/fp/zipObj.js | 1 + .../node_modules/lodash/fp/zipObject.js | 5 + .../node_modules/lodash/fp/zipObjectDeep.js | 5 + .../node_modules/lodash/fp/zipWith.js | 5 + .../node_modules/lodash/fromPairs.js | 28 + .../node_modules/lodash/function.js | 25 + .../node_modules/lodash/functions.js | 31 + .../node_modules/lodash/functionsIn.js | 31 + .../babel-register/node_modules/lodash/get.js | 33 + .../node_modules/lodash/groupBy.js | 41 + .../babel-register/node_modules/lodash/gt.js | 29 + .../babel-register/node_modules/lodash/gte.js | 30 + .../babel-register/node_modules/lodash/has.js | 35 + .../node_modules/lodash/hasIn.js | 34 + .../node_modules/lodash/head.js | 23 + .../node_modules/lodash/identity.js | 21 + .../node_modules/lodash/inRange.js | 55 + .../node_modules/lodash/includes.js | 53 + .../node_modules/lodash/index.js | 1 + .../node_modules/lodash/indexOf.js | 42 + .../node_modules/lodash/initial.js | 22 + .../node_modules/lodash/intersection.js | 30 + .../node_modules/lodash/intersectionBy.js | 45 + .../node_modules/lodash/intersectionWith.js | 41 + .../node_modules/lodash/invert.js | 42 + .../node_modules/lodash/invertBy.js | 56 + .../node_modules/lodash/invoke.js | 24 + .../node_modules/lodash/invokeMap.js | 41 + .../node_modules/lodash/isArguments.js | 36 + .../node_modules/lodash/isArray.js | 26 + .../node_modules/lodash/isArrayBuffer.js | 27 + .../node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + .../node_modules/lodash/isBoolean.js | 29 + .../node_modules/lodash/isBuffer.js | 38 + .../node_modules/lodash/isDate.js | 27 + .../node_modules/lodash/isElement.js | 25 + .../node_modules/lodash/isEmpty.js | 77 + .../node_modules/lodash/isEqual.js | 35 + .../node_modules/lodash/isEqualWith.js | 41 + .../node_modules/lodash/isError.js | 36 + .../node_modules/lodash/isFinite.js | 36 + .../node_modules/lodash/isFunction.js | 37 + .../node_modules/lodash/isInteger.js | 33 + .../node_modules/lodash/isLength.js | 35 + .../node_modules/lodash/isMap.js | 27 + .../node_modules/lodash/isMatch.js | 36 + .../node_modules/lodash/isMatchWith.js | 41 + .../node_modules/lodash/isNaN.js | 38 + .../node_modules/lodash/isNative.js | 40 + .../node_modules/lodash/isNil.js | 25 + .../node_modules/lodash/isNull.js | 22 + .../node_modules/lodash/isNumber.js | 38 + .../node_modules/lodash/isObject.js | 31 + .../node_modules/lodash/isObjectLike.js | 29 + .../node_modules/lodash/isPlainObject.js | 62 + .../node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash/isSafeInteger.js | 37 + .../node_modules/lodash/isSet.js | 27 + .../node_modules/lodash/isString.js | 30 + .../node_modules/lodash/isSymbol.js | 29 + .../node_modules/lodash/isTypedArray.js | 27 + .../node_modules/lodash/isUndefined.js | 22 + .../node_modules/lodash/isWeakMap.js | 28 + .../node_modules/lodash/isWeakSet.js | 28 + .../node_modules/lodash/iteratee.js | 53 + .../node_modules/lodash/join.js | 26 + .../node_modules/lodash/kebabCase.js | 28 + .../node_modules/lodash/keyBy.js | 36 + .../node_modules/lodash/keys.js | 37 + .../node_modules/lodash/keysIn.js | 32 + .../node_modules/lodash/lang.js | 58 + .../node_modules/lodash/last.js | 20 + .../node_modules/lodash/lastIndexOf.js | 46 + .../node_modules/lodash/lodash.js | 17107 ++++++++++++++++ .../node_modules/lodash/lodash.min.js | 137 + .../node_modules/lodash/lowerCase.js | 27 + .../node_modules/lodash/lowerFirst.js | 22 + .../babel-register/node_modules/lodash/lt.js | 29 + .../babel-register/node_modules/lodash/lte.js | 30 + .../babel-register/node_modules/lodash/map.js | 53 + .../node_modules/lodash/mapKeys.js | 36 + .../node_modules/lodash/mapValues.js | 43 + .../node_modules/lodash/matches.js | 39 + .../node_modules/lodash/matchesProperty.js | 37 + .../node_modules/lodash/math.js | 17 + .../babel-register/node_modules/lodash/max.js | 29 + .../node_modules/lodash/maxBy.js | 34 + .../node_modules/lodash/mean.js | 22 + .../node_modules/lodash/meanBy.js | 31 + .../node_modules/lodash/memoize.js | 73 + .../node_modules/lodash/merge.js | 39 + .../node_modules/lodash/mergeWith.js | 39 + .../node_modules/lodash/method.js | 34 + .../node_modules/lodash/methodOf.js | 33 + .../babel-register/node_modules/lodash/min.js | 29 + .../node_modules/lodash/minBy.js | 34 + .../node_modules/lodash/mixin.js | 74 + .../node_modules/lodash/multiply.js | 22 + .../node_modules/lodash/negate.js | 40 + .../node_modules/lodash/next.js | 35 + .../node_modules/lodash/noop.js | 17 + .../babel-register/node_modules/lodash/now.js | 23 + .../babel-register/node_modules/lodash/nth.js | 29 + .../node_modules/lodash/nthArg.js | 32 + .../node_modules/lodash/number.js | 5 + .../node_modules/lodash/object.js | 49 + .../node_modules/lodash/omit.js | 57 + .../node_modules/lodash/omitBy.js | 29 + .../node_modules/lodash/once.js | 25 + .../node_modules/lodash/orderBy.js | 47 + .../node_modules/lodash/over.js | 24 + .../node_modules/lodash/overArgs.js | 61 + .../node_modules/lodash/overEvery.js | 30 + .../node_modules/lodash/overSome.js | 30 + .../node_modules/lodash/package.json | 66 + .../babel-register/node_modules/lodash/pad.js | 49 + .../node_modules/lodash/padEnd.js | 39 + .../node_modules/lodash/padStart.js | 39 + .../node_modules/lodash/parseInt.js | 43 + .../node_modules/lodash/partial.js | 50 + .../node_modules/lodash/partialRight.js | 49 + .../node_modules/lodash/partition.js | 43 + .../node_modules/lodash/pick.js | 25 + .../node_modules/lodash/pickBy.js | 37 + .../node_modules/lodash/plant.js | 48 + .../node_modules/lodash/property.js | 32 + .../node_modules/lodash/propertyOf.js | 30 + .../node_modules/lodash/pull.js | 29 + .../node_modules/lodash/pullAll.js | 29 + .../node_modules/lodash/pullAllBy.js | 33 + .../node_modules/lodash/pullAllWith.js | 32 + .../node_modules/lodash/pullAt.js | 43 + .../node_modules/lodash/random.js | 82 + .../node_modules/lodash/range.js | 46 + .../node_modules/lodash/rangeRight.js | 41 + .../node_modules/lodash/rearg.js | 33 + .../node_modules/lodash/reduce.js | 51 + .../node_modules/lodash/reduceRight.js | 36 + .../node_modules/lodash/reject.js | 46 + .../node_modules/lodash/remove.js | 53 + .../node_modules/lodash/repeat.js | 37 + .../node_modules/lodash/replace.js | 29 + .../node_modules/lodash/rest.js | 40 + .../node_modules/lodash/result.js | 56 + .../node_modules/lodash/reverse.js | 34 + .../node_modules/lodash/round.js | 26 + .../node_modules/lodash/sample.js | 24 + .../node_modules/lodash/sampleSize.js | 37 + .../babel-register/node_modules/lodash/seq.js | 16 + .../babel-register/node_modules/lodash/set.js | 35 + .../node_modules/lodash/setWith.js | 32 + .../node_modules/lodash/shuffle.js | 25 + .../node_modules/lodash/size.js | 46 + .../node_modules/lodash/slice.js | 37 + .../node_modules/lodash/snakeCase.js | 28 + .../node_modules/lodash/some.js | 51 + .../node_modules/lodash/sortBy.js | 48 + .../node_modules/lodash/sortedIndex.js | 24 + .../node_modules/lodash/sortedIndexBy.js | 33 + .../node_modules/lodash/sortedIndexOf.js | 31 + .../node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + .../node_modules/lodash/sortedUniq.js | 24 + .../node_modules/lodash/sortedUniqBy.js | 26 + .../node_modules/lodash/split.js | 52 + .../node_modules/lodash/spread.js | 63 + .../node_modules/lodash/startCase.js | 29 + .../node_modules/lodash/startsWith.js | 39 + .../node_modules/lodash/string.js | 33 + .../node_modules/lodash/stubArray.js | 23 + .../node_modules/lodash/stubFalse.js | 18 + .../node_modules/lodash/stubObject.js | 23 + .../node_modules/lodash/stubString.js | 18 + .../node_modules/lodash/stubTrue.js | 18 + .../node_modules/lodash/subtract.js | 22 + .../babel-register/node_modules/lodash/sum.js | 24 + .../node_modules/lodash/sumBy.js | 33 + .../node_modules/lodash/tail.js | 22 + .../node_modules/lodash/take.js | 37 + .../node_modules/lodash/takeRight.js | 39 + .../node_modules/lodash/takeRightWhile.js | 45 + .../node_modules/lodash/takeWhile.js | 45 + .../babel-register/node_modules/lodash/tap.js | 29 + .../node_modules/lodash/template.js | 238 + .../node_modules/lodash/templateSettings.js | 67 + .../node_modules/lodash/throttle.js | 69 + .../node_modules/lodash/thru.js | 28 + .../node_modules/lodash/times.js | 51 + .../node_modules/lodash/toArray.js | 58 + .../node_modules/lodash/toFinite.js | 42 + .../node_modules/lodash/toInteger.js | 36 + .../node_modules/lodash/toIterator.js | 23 + .../node_modules/lodash/toJSON.js | 1 + .../node_modules/lodash/toLength.js | 38 + .../node_modules/lodash/toLower.js | 28 + .../node_modules/lodash/toNumber.js | 66 + .../node_modules/lodash/toPairs.js | 30 + .../node_modules/lodash/toPairsIn.js | 30 + .../node_modules/lodash/toPath.js | 33 + .../node_modules/lodash/toPlainObject.js | 32 + .../node_modules/lodash/toSafeInteger.js | 37 + .../node_modules/lodash/toString.js | 28 + .../node_modules/lodash/toUpper.js | 28 + .../node_modules/lodash/transform.js | 65 + .../node_modules/lodash/trim.js | 49 + .../node_modules/lodash/trimEnd.js | 43 + .../node_modules/lodash/trimStart.js | 43 + .../node_modules/lodash/truncate.js | 111 + .../node_modules/lodash/unary.js | 22 + .../node_modules/lodash/unescape.js | 34 + .../node_modules/lodash/union.js | 26 + .../node_modules/lodash/unionBy.js | 39 + .../node_modules/lodash/unionWith.js | 34 + .../node_modules/lodash/uniq.js | 25 + .../node_modules/lodash/uniqBy.js | 31 + .../node_modules/lodash/uniqWith.js | 28 + .../node_modules/lodash/uniqueId.js | 28 + .../node_modules/lodash/unset.js | 34 + .../node_modules/lodash/unzip.js | 45 + .../node_modules/lodash/unzipWith.js | 39 + .../node_modules/lodash/update.js | 35 + .../node_modules/lodash/updateWith.js | 33 + .../node_modules/lodash/upperCase.js | 27 + .../node_modules/lodash/upperFirst.js | 22 + .../node_modules/lodash/util.js | 34 + .../node_modules/lodash/value.js | 1 + .../node_modules/lodash/valueOf.js | 1 + .../node_modules/lodash/values.js | 34 + .../node_modules/lodash/valuesIn.js | 32 + .../node_modules/lodash/without.js | 31 + .../node_modules/lodash/words.js | 35 + .../node_modules/lodash/wrap.js | 30 + .../node_modules/lodash/wrapperAt.js | 48 + .../node_modules/lodash/wrapperChain.js | 34 + .../node_modules/lodash/wrapperLodash.js | 147 + .../node_modules/lodash/wrapperReverse.js | 44 + .../node_modules/lodash/wrapperValue.js | 21 + .../babel-register/node_modules/lodash/xor.js | 28 + .../node_modules/lodash/xorBy.js | 39 + .../node_modules/lodash/xorWith.js | 34 + .../babel-register/node_modules/lodash/zip.js | 22 + .../node_modules/lodash/zipObject.js | 24 + .../node_modules/lodash/zipObjectDeep.js | 23 + .../node_modules/lodash/zipWith.js | 32 + node_modules/babel-register/package.json | 23 +- node_modules/babel-runtime/package.json | 25 +- .../node_modules/lodash/LICENSE | 47 + .../node_modules/lodash/README.md | 39 + .../node_modules/lodash/_DataView.js | 7 + .../node_modules/lodash/_Hash.js | 32 + .../node_modules/lodash/_LazyWrapper.js | 28 + .../node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash/_LodashWrapper.js | 22 + .../node_modules/lodash/_Map.js | 7 + .../node_modules/lodash/_MapCache.js | 32 + .../node_modules/lodash/_Promise.js | 7 + .../node_modules/lodash/_Set.js | 7 + .../node_modules/lodash/_SetCache.js | 27 + .../node_modules/lodash/_Stack.js | 27 + .../node_modules/lodash/_Symbol.js | 6 + .../node_modules/lodash/_Uint8Array.js | 6 + .../node_modules/lodash/_WeakMap.js | 7 + .../node_modules/lodash/_apply.js | 21 + .../node_modules/lodash/_arrayAggregator.js | 22 + .../node_modules/lodash/_arrayEach.js | 22 + .../node_modules/lodash/_arrayEachRight.js | 21 + .../node_modules/lodash/_arrayEvery.js | 23 + .../node_modules/lodash/_arrayFilter.js | 25 + .../node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../node_modules/lodash/_arrayMap.js | 21 + .../node_modules/lodash/_arrayPush.js | 20 + .../node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash/_arraySome.js | 23 + .../node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + .../node_modules/lodash/_assignValue.js | 28 + .../node_modules/lodash/_assocIndexOf.js | 21 + .../node_modules/lodash/_baseAggregator.js | 21 + .../node_modules/lodash/_baseAssign.js | 17 + .../node_modules/lodash/_baseAssignIn.js | 17 + .../node_modules/lodash/_baseAssignValue.js | 25 + .../node_modules/lodash/_baseAt.js | 23 + .../node_modules/lodash/_baseClamp.js | 22 + .../node_modules/lodash/_baseClone.js | 171 + .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../node_modules/lodash/_baseCreate.js | 30 + .../node_modules/lodash/_baseDelay.js | 21 + .../node_modules/lodash/_baseDifference.js | 67 + .../node_modules/lodash/_baseEach.js | 14 + .../node_modules/lodash/_baseEachRight.js | 14 + .../node_modules/lodash/_baseEvery.js | 21 + .../node_modules/lodash/_baseExtremum.js | 32 + .../node_modules/lodash/_baseFill.js | 32 + .../node_modules/lodash/_baseFilter.js | 21 + .../node_modules/lodash/_baseFindIndex.js | 24 + .../node_modules/lodash/_baseFindKey.js | 23 + .../node_modules/lodash/_baseFlatten.js | 38 + .../node_modules/lodash/_baseFor.js | 16 + .../node_modules/lodash/_baseForOwn.js | 16 + .../node_modules/lodash/_baseForOwnRight.js | 16 + .../node_modules/lodash/_baseForRight.js | 15 + .../node_modules/lodash/_baseFunctions.js | 19 + .../node_modules/lodash/_baseGet.js | 24 + .../node_modules/lodash/_baseGetAllKeys.js | 20 + .../node_modules/lodash/_baseGetTag.js | 28 + .../node_modules/lodash/_baseGt.js | 14 + .../node_modules/lodash/_baseHas.js | 19 + .../node_modules/lodash/_baseHasIn.js | 13 + .../node_modules/lodash/_baseInRange.js | 18 + .../node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + .../node_modules/lodash/_baseInverter.js | 21 + .../node_modules/lodash/_baseInvoke.js | 24 + .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../node_modules/lodash/_baseIsDate.js | 18 + .../node_modules/lodash/_baseIsEqual.js | 28 + .../node_modules/lodash/_baseIsEqualDeep.js | 83 + .../node_modules/lodash/_baseIsMap.js | 18 + .../node_modules/lodash/_baseIsMatch.js | 62 + .../node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js | 47 + .../node_modules/lodash/_baseIsRegExp.js | 18 + .../node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + .../node_modules/lodash/_baseIteratee.js | 31 + .../node_modules/lodash/_baseKeys.js | 30 + .../node_modules/lodash/_baseKeysIn.js | 33 + .../node_modules/lodash/_baseLodash.js | 10 + .../node_modules/lodash/_baseLt.js | 14 + .../node_modules/lodash/_baseMap.js | 22 + .../node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + .../node_modules/lodash/_baseMean.js | 20 + .../node_modules/lodash/_baseMerge.js | 42 + .../node_modules/lodash/_baseMergeDeep.js | 94 + .../node_modules/lodash/_baseNth.js | 20 + .../node_modules/lodash/_baseOrderBy.js | 34 + .../node_modules/lodash/_basePick.js | 19 + .../node_modules/lodash/_basePickBy.js | 30 + .../node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + .../node_modules/lodash/_basePropertyOf.js | 14 + .../node_modules/lodash/_basePullAll.js | 51 + .../node_modules/lodash/_basePullAt.js | 37 + .../node_modules/lodash/_baseRandom.js | 18 + .../node_modules/lodash/_baseRange.js | 28 + .../node_modules/lodash/_baseReduce.js | 23 + .../node_modules/lodash/_baseRepeat.js | 35 + .../node_modules/lodash/_baseRest.js | 17 + .../node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash/_baseSet.js | 47 + .../node_modules/lodash/_baseSetData.js | 17 + .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash/_baseSlice.js | 31 + .../node_modules/lodash/_baseSome.js | 22 + .../node_modules/lodash/_baseSortBy.js | 21 + .../node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 64 + .../node_modules/lodash/_baseSortedUniq.js | 30 + .../node_modules/lodash/_baseSum.js | 24 + .../node_modules/lodash/_baseTimes.js | 20 + .../node_modules/lodash/_baseToNumber.js | 24 + .../node_modules/lodash/_baseToPairs.js | 18 + .../node_modules/lodash/_baseToString.js | 37 + .../node_modules/lodash/_baseUnary.js | 14 + .../node_modules/lodash/_baseUniq.js | 72 + .../node_modules/lodash/_baseUnset.js | 20 + .../node_modules/lodash/_baseUpdate.js | 18 + .../node_modules/lodash/_baseValues.js | 19 + .../node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + .../node_modules/lodash/_baseXor.js | 36 + .../node_modules/lodash/_baseZipObject.js | 23 + .../node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + .../node_modules/lodash/_castFunction.js | 14 + .../node_modules/lodash/_castPath.js | 21 + .../node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash/_castSlice.js | 18 + .../node_modules/lodash/_charsEndIndex.js | 19 + .../node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + .../node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash/_cloneDataView.js | 16 + .../node_modules/lodash/_cloneRegExp.js | 17 + .../node_modules/lodash/_cloneSymbol.js | 18 + .../node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + .../node_modules/lodash/_compareMultiple.js | 44 + .../node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + .../node_modules/lodash/_copyArray.js | 20 + .../node_modules/lodash/_copyObject.js | 40 + .../node_modules/lodash/_copySymbols.js | 16 + .../node_modules/lodash/_copySymbolsIn.js | 16 + .../node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + .../node_modules/lodash/_createAssigner.js | 37 + .../node_modules/lodash/_createBaseEach.js | 32 + .../node_modules/lodash/_createBaseFor.js | 25 + .../node_modules/lodash/_createBind.js | 28 + .../node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + .../node_modules/lodash/_createCtor.js | 37 + .../node_modules/lodash/_createCurry.js | 46 + .../node_modules/lodash/_createFind.js | 25 + .../node_modules/lodash/_createFlow.js | 78 + .../node_modules/lodash/_createHybrid.js | 92 + .../node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + .../node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash/_createPadding.js | 33 + .../node_modules/lodash/_createPartial.js | 43 + .../node_modules/lodash/_createRange.js | 30 + .../node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + .../node_modules/lodash/_createRound.js | 33 + .../node_modules/lodash/_createSet.js | 19 + .../node_modules/lodash/_createToPairs.js | 30 + .../node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + .../node_modules/lodash/_customOmitClone.js | 16 + .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../node_modules/lodash/_equalArrays.js | 83 + .../node_modules/lodash/_equalByTag.js | 112 + .../node_modules/lodash/_equalObjects.js | 89 + .../node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + .../node_modules/lodash/_flatRest.js | 16 + .../node_modules/lodash/_freeGlobal.js | 4 + .../node_modules/lodash/_getAllKeys.js | 16 + .../node_modules/lodash/_getAllKeysIn.js | 17 + .../node_modules/lodash/_getData.js | 15 + .../node_modules/lodash/_getFuncName.js | 31 + .../node_modules/lodash/_getHolder.js | 13 + .../node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash/_getMatchData.js | 24 + .../node_modules/lodash/_getNative.js | 17 + .../node_modules/lodash/_getPrototype.js | 6 + .../node_modules/lodash/_getRawTag.js | 46 + .../node_modules/lodash/_getSymbols.js | 30 + .../node_modules/lodash/_getSymbolsIn.js | 25 + .../node_modules/lodash/_getTag.js | 58 + .../node_modules/lodash/_getValue.js | 13 + .../node_modules/lodash/_getView.js | 33 + .../node_modules/lodash/_getWrapDetails.js | 17 + .../node_modules/lodash/_hasPath.js | 39 + .../node_modules/lodash/_hasUnicode.js | 26 + .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../node_modules/lodash/_hashClear.js | 15 + .../node_modules/lodash/_hashDelete.js | 17 + .../node_modules/lodash/_hashGet.js | 30 + .../node_modules/lodash/_hashHas.js | 23 + .../node_modules/lodash/_hashSet.js | 23 + .../node_modules/lodash/_initCloneArray.js | 26 + .../node_modules/lodash/_initCloneByTag.js | 77 + .../node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../node_modules/lodash/_isIndex.js | 25 + .../node_modules/lodash/_isIterateeCall.js | 30 + .../node_modules/lodash/_isKey.js | 29 + .../node_modules/lodash/_isKeyable.js | 15 + .../node_modules/lodash/_isLaziable.js | 28 + .../node_modules/lodash/_isMaskable.js | 14 + .../node_modules/lodash/_isMasked.js | 20 + .../node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + .../node_modules/lodash/_iteratorToArray.js | 18 + .../node_modules/lodash/_lazyClone.js | 23 + .../node_modules/lodash/_lazyReverse.js | 23 + .../node_modules/lodash/_lazyValue.js | 69 + .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js | 35 + .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js | 16 + .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js | 21 + .../node_modules/lodash/_mapCacheDelete.js | 18 + .../node_modules/lodash/_mapCacheGet.js | 16 + .../node_modules/lodash/_mapCacheHas.js | 16 + .../node_modules/lodash/_mapCacheSet.js | 22 + .../node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + .../node_modules/lodash/_memoizeCapped.js | 26 + .../node_modules/lodash/_mergeData.js | 90 + .../node_modules/lodash/_metaMap.js | 6 + .../node_modules/lodash/_nativeCreate.js | 6 + .../node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../node_modules/lodash/_nodeUtil.js | 30 + .../node_modules/lodash/_objectToString.js | 22 + .../node_modules/lodash/_overArg.js | 15 + .../node_modules/lodash/_overRest.js | 36 + .../node_modules/lodash/_parent.js | 16 + .../node_modules/lodash/_reEscape.js | 4 + .../node_modules/lodash/_reEvaluate.js | 4 + .../node_modules/lodash/_reInterpolate.js | 4 + .../node_modules/lodash/_realNames.js | 4 + .../node_modules/lodash/_reorder.js | 29 + .../node_modules/lodash/_replaceHolders.js | 29 + .../node_modules/lodash/_root.js | 9 + .../node_modules/lodash/_safeGet.js | 17 + .../node_modules/lodash/_setCacheAdd.js | 19 + .../node_modules/lodash/_setCacheHas.js | 14 + .../node_modules/lodash/_setData.js | 20 + .../node_modules/lodash/_setToArray.js | 18 + .../node_modules/lodash/_setToPairs.js | 18 + .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../node_modules/lodash/_stackClear.js | 15 + .../node_modules/lodash/_stackDelete.js | 18 + .../node_modules/lodash/_stackGet.js | 14 + .../node_modules/lodash/_stackHas.js | 14 + .../node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash/_stringToPath.js | 27 + .../node_modules/lodash/_toKey.js | 21 + .../node_modules/lodash/_toSource.js | 26 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + .../node_modules/lodash/_unicodeSize.js | 44 + .../node_modules/lodash/_unicodeToArray.js | 40 + .../node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash/_wrapperClone.js | 23 + .../babel-template/node_modules/lodash/add.js | 22 + .../node_modules/lodash/after.js | 42 + .../node_modules/lodash/array.js | 67 + .../babel-template/node_modules/lodash/ary.js | 29 + .../node_modules/lodash/assign.js | 58 + .../node_modules/lodash/assignIn.js | 40 + .../node_modules/lodash/assignInWith.js | 38 + .../node_modules/lodash/assignWith.js | 37 + .../babel-template/node_modules/lodash/at.js | 23 + .../node_modules/lodash/attempt.js | 35 + .../node_modules/lodash/before.js | 40 + .../node_modules/lodash/bind.js | 57 + .../node_modules/lodash/bindAll.js | 41 + .../node_modules/lodash/bindKey.js | 68 + .../node_modules/lodash/camelCase.js | 29 + .../node_modules/lodash/capitalize.js | 23 + .../node_modules/lodash/castArray.js | 44 + .../node_modules/lodash/ceil.js | 26 + .../node_modules/lodash/chain.js | 38 + .../node_modules/lodash/chunk.js | 50 + .../node_modules/lodash/clamp.js | 39 + .../node_modules/lodash/clone.js | 36 + .../node_modules/lodash/cloneDeep.js | 29 + .../node_modules/lodash/cloneDeepWith.js | 40 + .../node_modules/lodash/cloneWith.js | 42 + .../node_modules/lodash/collection.js | 30 + .../node_modules/lodash/commit.js | 33 + .../node_modules/lodash/compact.js | 31 + .../node_modules/lodash/concat.js | 43 + .../node_modules/lodash/cond.js | 60 + .../node_modules/lodash/conforms.js | 35 + .../node_modules/lodash/conformsTo.js | 32 + .../node_modules/lodash/constant.js | 26 + .../node_modules/lodash/core.js | 3854 ++++ .../node_modules/lodash/core.min.js | 29 + .../node_modules/lodash/countBy.js | 40 + .../node_modules/lodash/create.js | 43 + .../node_modules/lodash/curry.js | 57 + .../node_modules/lodash/curryRight.js | 54 + .../node_modules/lodash/date.js | 3 + .../node_modules/lodash/debounce.js | 190 + .../node_modules/lodash/deburr.js | 45 + .../node_modules/lodash/defaultTo.js | 25 + .../node_modules/lodash/defaults.js | 64 + .../node_modules/lodash/defaultsDeep.js | 30 + .../node_modules/lodash/defer.js | 26 + .../node_modules/lodash/delay.js | 28 + .../node_modules/lodash/difference.js | 33 + .../node_modules/lodash/differenceBy.js | 44 + .../node_modules/lodash/differenceWith.js | 40 + .../node_modules/lodash/divide.js | 22 + .../node_modules/lodash/drop.js | 38 + .../node_modules/lodash/dropRight.js | 39 + .../node_modules/lodash/dropRightWhile.js | 45 + .../node_modules/lodash/dropWhile.js | 45 + .../node_modules/lodash/each.js | 1 + .../node_modules/lodash/eachRight.js | 1 + .../node_modules/lodash/endsWith.js | 43 + .../node_modules/lodash/entries.js | 1 + .../node_modules/lodash/entriesIn.js | 1 + .../babel-template/node_modules/lodash/eq.js | 37 + .../node_modules/lodash/escape.js | 43 + .../node_modules/lodash/escapeRegExp.js | 32 + .../node_modules/lodash/every.js | 56 + .../node_modules/lodash/extend.js | 1 + .../node_modules/lodash/extendWith.js | 1 + .../node_modules/lodash/fill.js | 45 + .../node_modules/lodash/filter.js | 48 + .../node_modules/lodash/find.js | 42 + .../node_modules/lodash/findIndex.js | 55 + .../node_modules/lodash/findKey.js | 44 + .../node_modules/lodash/findLast.js | 25 + .../node_modules/lodash/findLastIndex.js | 59 + .../node_modules/lodash/findLastKey.js | 44 + .../node_modules/lodash/first.js | 1 + .../node_modules/lodash/flatMap.js | 29 + .../node_modules/lodash/flatMapDeep.js | 31 + .../node_modules/lodash/flatMapDepth.js | 31 + .../node_modules/lodash/flatten.js | 22 + .../node_modules/lodash/flattenDeep.js | 25 + .../node_modules/lodash/flattenDepth.js | 33 + .../node_modules/lodash/flip.js | 28 + .../node_modules/lodash/floor.js | 26 + .../node_modules/lodash/flow.js | 27 + .../node_modules/lodash/flowRight.js | 26 + .../node_modules/lodash/forEach.js | 41 + .../node_modules/lodash/forEachRight.js | 31 + .../node_modules/lodash/forIn.js | 39 + .../node_modules/lodash/forInRight.js | 37 + .../node_modules/lodash/forOwn.js | 36 + .../node_modules/lodash/forOwnRight.js | 34 + .../babel-template/node_modules/lodash/fp.js | 2 + .../node_modules/lodash/fp/F.js | 1 + .../node_modules/lodash/fp/T.js | 1 + .../node_modules/lodash/fp/__.js | 1 + .../node_modules/lodash/fp/_baseConvert.js | 569 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + .../node_modules/lodash/fp/_falseOptions.js | 7 + .../node_modules/lodash/fp/_mapping.js | 358 + .../node_modules/lodash/fp/_util.js | 16 + .../node_modules/lodash/fp/add.js | 5 + .../node_modules/lodash/fp/after.js | 5 + .../node_modules/lodash/fp/all.js | 1 + .../node_modules/lodash/fp/allPass.js | 1 + .../node_modules/lodash/fp/always.js | 1 + .../node_modules/lodash/fp/any.js | 1 + .../node_modules/lodash/fp/anyPass.js | 1 + .../node_modules/lodash/fp/apply.js | 1 + .../node_modules/lodash/fp/array.js | 2 + .../node_modules/lodash/fp/ary.js | 5 + .../node_modules/lodash/fp/assign.js | 5 + .../node_modules/lodash/fp/assignAll.js | 5 + .../node_modules/lodash/fp/assignAllWith.js | 5 + .../node_modules/lodash/fp/assignIn.js | 5 + .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash/fp/assignInWith.js | 5 + .../node_modules/lodash/fp/assignWith.js | 5 + .../node_modules/lodash/fp/assoc.js | 1 + .../node_modules/lodash/fp/assocPath.js | 1 + .../node_modules/lodash/fp/at.js | 5 + .../node_modules/lodash/fp/attempt.js | 5 + .../node_modules/lodash/fp/before.js | 5 + .../node_modules/lodash/fp/bind.js | 5 + .../node_modules/lodash/fp/bindAll.js | 5 + .../node_modules/lodash/fp/bindKey.js | 5 + .../node_modules/lodash/fp/camelCase.js | 5 + .../node_modules/lodash/fp/capitalize.js | 5 + .../node_modules/lodash/fp/castArray.js | 5 + .../node_modules/lodash/fp/ceil.js | 5 + .../node_modules/lodash/fp/chain.js | 5 + .../node_modules/lodash/fp/chunk.js | 5 + .../node_modules/lodash/fp/clamp.js | 5 + .../node_modules/lodash/fp/clone.js | 5 + .../node_modules/lodash/fp/cloneDeep.js | 5 + .../node_modules/lodash/fp/cloneDeepWith.js | 5 + .../node_modules/lodash/fp/cloneWith.js | 5 + .../node_modules/lodash/fp/collection.js | 2 + .../node_modules/lodash/fp/commit.js | 5 + .../node_modules/lodash/fp/compact.js | 5 + .../node_modules/lodash/fp/complement.js | 1 + .../node_modules/lodash/fp/compose.js | 1 + .../node_modules/lodash/fp/concat.js | 5 + .../node_modules/lodash/fp/cond.js | 5 + .../node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../node_modules/lodash/fp/constant.js | 5 + .../node_modules/lodash/fp/contains.js | 1 + .../node_modules/lodash/fp/convert.js | 18 + .../node_modules/lodash/fp/countBy.js | 5 + .../node_modules/lodash/fp/create.js | 5 + .../node_modules/lodash/fp/curry.js | 5 + .../node_modules/lodash/fp/curryN.js | 5 + .../node_modules/lodash/fp/curryRight.js | 5 + .../node_modules/lodash/fp/curryRightN.js | 5 + .../node_modules/lodash/fp/date.js | 2 + .../node_modules/lodash/fp/debounce.js | 5 + .../node_modules/lodash/fp/deburr.js | 5 + .../node_modules/lodash/fp/defaultTo.js | 5 + .../node_modules/lodash/fp/defaults.js | 5 + .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../node_modules/lodash/fp/defer.js | 5 + .../node_modules/lodash/fp/delay.js | 5 + .../node_modules/lodash/fp/difference.js | 5 + .../node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + .../node_modules/lodash/fp/dissoc.js | 1 + .../node_modules/lodash/fp/dissocPath.js | 1 + .../node_modules/lodash/fp/divide.js | 5 + .../node_modules/lodash/fp/drop.js | 5 + .../node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + .../node_modules/lodash/fp/dropWhile.js | 5 + .../node_modules/lodash/fp/each.js | 1 + .../node_modules/lodash/fp/eachRight.js | 1 + .../node_modules/lodash/fp/endsWith.js | 5 + .../node_modules/lodash/fp/entries.js | 1 + .../node_modules/lodash/fp/entriesIn.js | 1 + .../node_modules/lodash/fp/eq.js | 5 + .../node_modules/lodash/fp/equals.js | 1 + .../node_modules/lodash/fp/escape.js | 5 + .../node_modules/lodash/fp/escapeRegExp.js | 5 + .../node_modules/lodash/fp/every.js | 5 + .../node_modules/lodash/fp/extend.js | 1 + .../node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash/fp/extendWith.js | 1 + .../node_modules/lodash/fp/fill.js | 5 + .../node_modules/lodash/fp/filter.js | 5 + .../node_modules/lodash/fp/find.js | 5 + .../node_modules/lodash/fp/findFrom.js | 5 + .../node_modules/lodash/fp/findIndex.js | 5 + .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../node_modules/lodash/fp/findKey.js | 5 + .../node_modules/lodash/fp/findLast.js | 5 + .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash/fp/findLastKey.js | 5 + .../node_modules/lodash/fp/first.js | 1 + .../node_modules/lodash/fp/flatMap.js | 5 + .../node_modules/lodash/fp/flatMapDeep.js | 5 + .../node_modules/lodash/fp/flatMapDepth.js | 5 + .../node_modules/lodash/fp/flatten.js | 5 + .../node_modules/lodash/fp/flattenDeep.js | 5 + .../node_modules/lodash/fp/flattenDepth.js | 5 + .../node_modules/lodash/fp/flip.js | 5 + .../node_modules/lodash/fp/floor.js | 5 + .../node_modules/lodash/fp/flow.js | 5 + .../node_modules/lodash/fp/flowRight.js | 5 + .../node_modules/lodash/fp/forEach.js | 5 + .../node_modules/lodash/fp/forEachRight.js | 5 + .../node_modules/lodash/fp/forIn.js | 5 + .../node_modules/lodash/fp/forInRight.js | 5 + .../node_modules/lodash/fp/forOwn.js | 5 + .../node_modules/lodash/fp/forOwnRight.js | 5 + .../node_modules/lodash/fp/fromPairs.js | 5 + .../node_modules/lodash/fp/function.js | 2 + .../node_modules/lodash/fp/functions.js | 5 + .../node_modules/lodash/fp/functionsIn.js | 5 + .../node_modules/lodash/fp/get.js | 5 + .../node_modules/lodash/fp/getOr.js | 5 + .../node_modules/lodash/fp/groupBy.js | 5 + .../node_modules/lodash/fp/gt.js | 5 + .../node_modules/lodash/fp/gte.js | 5 + .../node_modules/lodash/fp/has.js | 5 + .../node_modules/lodash/fp/hasIn.js | 5 + .../node_modules/lodash/fp/head.js | 5 + .../node_modules/lodash/fp/identical.js | 1 + .../node_modules/lodash/fp/identity.js | 5 + .../node_modules/lodash/fp/inRange.js | 5 + .../node_modules/lodash/fp/includes.js | 5 + .../node_modules/lodash/fp/includesFrom.js | 5 + .../node_modules/lodash/fp/indexBy.js | 1 + .../node_modules/lodash/fp/indexOf.js | 5 + .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../node_modules/lodash/fp/init.js | 1 + .../node_modules/lodash/fp/initial.js | 5 + .../node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + .../node_modules/lodash/fp/invert.js | 5 + .../node_modules/lodash/fp/invertBy.js | 5 + .../node_modules/lodash/fp/invertObj.js | 1 + .../node_modules/lodash/fp/invoke.js | 5 + .../node_modules/lodash/fp/invokeArgs.js | 5 + .../node_modules/lodash/fp/invokeArgsMap.js | 5 + .../node_modules/lodash/fp/invokeMap.js | 5 + .../node_modules/lodash/fp/isArguments.js | 5 + .../node_modules/lodash/fp/isArray.js | 5 + .../node_modules/lodash/fp/isArrayBuffer.js | 5 + .../node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + .../node_modules/lodash/fp/isBoolean.js | 5 + .../node_modules/lodash/fp/isBuffer.js | 5 + .../node_modules/lodash/fp/isDate.js | 5 + .../node_modules/lodash/fp/isElement.js | 5 + .../node_modules/lodash/fp/isEmpty.js | 5 + .../node_modules/lodash/fp/isEqual.js | 5 + .../node_modules/lodash/fp/isEqualWith.js | 5 + .../node_modules/lodash/fp/isError.js | 5 + .../node_modules/lodash/fp/isFinite.js | 5 + .../node_modules/lodash/fp/isFunction.js | 5 + .../node_modules/lodash/fp/isInteger.js | 5 + .../node_modules/lodash/fp/isLength.js | 5 + .../node_modules/lodash/fp/isMap.js | 5 + .../node_modules/lodash/fp/isMatch.js | 5 + .../node_modules/lodash/fp/isMatchWith.js | 5 + .../node_modules/lodash/fp/isNaN.js | 5 + .../node_modules/lodash/fp/isNative.js | 5 + .../node_modules/lodash/fp/isNil.js | 5 + .../node_modules/lodash/fp/isNull.js | 5 + .../node_modules/lodash/fp/isNumber.js | 5 + .../node_modules/lodash/fp/isObject.js | 5 + .../node_modules/lodash/fp/isObjectLike.js | 5 + .../node_modules/lodash/fp/isPlainObject.js | 5 + .../node_modules/lodash/fp/isRegExp.js | 5 + .../node_modules/lodash/fp/isSafeInteger.js | 5 + .../node_modules/lodash/fp/isSet.js | 5 + .../node_modules/lodash/fp/isString.js | 5 + .../node_modules/lodash/fp/isSymbol.js | 5 + .../node_modules/lodash/fp/isTypedArray.js | 5 + .../node_modules/lodash/fp/isUndefined.js | 5 + .../node_modules/lodash/fp/isWeakMap.js | 5 + .../node_modules/lodash/fp/isWeakSet.js | 5 + .../node_modules/lodash/fp/iteratee.js | 5 + .../node_modules/lodash/fp/join.js | 5 + .../node_modules/lodash/fp/juxt.js | 1 + .../node_modules/lodash/fp/kebabCase.js | 5 + .../node_modules/lodash/fp/keyBy.js | 5 + .../node_modules/lodash/fp/keys.js | 5 + .../node_modules/lodash/fp/keysIn.js | 5 + .../node_modules/lodash/fp/lang.js | 2 + .../node_modules/lodash/fp/last.js | 5 + .../node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../node_modules/lodash/fp/lowerCase.js | 5 + .../node_modules/lodash/fp/lowerFirst.js | 5 + .../node_modules/lodash/fp/lt.js | 5 + .../node_modules/lodash/fp/lte.js | 5 + .../node_modules/lodash/fp/map.js | 5 + .../node_modules/lodash/fp/mapKeys.js | 5 + .../node_modules/lodash/fp/mapValues.js | 5 + .../node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + .../node_modules/lodash/fp/math.js | 2 + .../node_modules/lodash/fp/max.js | 5 + .../node_modules/lodash/fp/maxBy.js | 5 + .../node_modules/lodash/fp/mean.js | 5 + .../node_modules/lodash/fp/meanBy.js | 5 + .../node_modules/lodash/fp/memoize.js | 5 + .../node_modules/lodash/fp/merge.js | 5 + .../node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../node_modules/lodash/fp/mergeWith.js | 5 + .../node_modules/lodash/fp/method.js | 5 + .../node_modules/lodash/fp/methodOf.js | 5 + .../node_modules/lodash/fp/min.js | 5 + .../node_modules/lodash/fp/minBy.js | 5 + .../node_modules/lodash/fp/mixin.js | 5 + .../node_modules/lodash/fp/multiply.js | 5 + .../node_modules/lodash/fp/nAry.js | 1 + .../node_modules/lodash/fp/negate.js | 5 + .../node_modules/lodash/fp/next.js | 5 + .../node_modules/lodash/fp/noop.js | 5 + .../node_modules/lodash/fp/now.js | 5 + .../node_modules/lodash/fp/nth.js | 5 + .../node_modules/lodash/fp/nthArg.js | 5 + .../node_modules/lodash/fp/number.js | 2 + .../node_modules/lodash/fp/object.js | 2 + .../node_modules/lodash/fp/omit.js | 5 + .../node_modules/lodash/fp/omitAll.js | 1 + .../node_modules/lodash/fp/omitBy.js | 5 + .../node_modules/lodash/fp/once.js | 5 + .../node_modules/lodash/fp/orderBy.js | 5 + .../node_modules/lodash/fp/over.js | 5 + .../node_modules/lodash/fp/overArgs.js | 5 + .../node_modules/lodash/fp/overEvery.js | 5 + .../node_modules/lodash/fp/overSome.js | 5 + .../node_modules/lodash/fp/pad.js | 5 + .../node_modules/lodash/fp/padChars.js | 5 + .../node_modules/lodash/fp/padCharsEnd.js | 5 + .../node_modules/lodash/fp/padCharsStart.js | 5 + .../node_modules/lodash/fp/padEnd.js | 5 + .../node_modules/lodash/fp/padStart.js | 5 + .../node_modules/lodash/fp/parseInt.js | 5 + .../node_modules/lodash/fp/partial.js | 5 + .../node_modules/lodash/fp/partialRight.js | 5 + .../node_modules/lodash/fp/partition.js | 5 + .../node_modules/lodash/fp/path.js | 1 + .../node_modules/lodash/fp/pathEq.js | 1 + .../node_modules/lodash/fp/pathOr.js | 1 + .../node_modules/lodash/fp/paths.js | 1 + .../node_modules/lodash/fp/pick.js | 5 + .../node_modules/lodash/fp/pickAll.js | 1 + .../node_modules/lodash/fp/pickBy.js | 5 + .../node_modules/lodash/fp/pipe.js | 1 + .../node_modules/lodash/fp/placeholder.js | 6 + .../node_modules/lodash/fp/plant.js | 5 + .../node_modules/lodash/fp/pluck.js | 1 + .../node_modules/lodash/fp/prop.js | 1 + .../node_modules/lodash/fp/propEq.js | 1 + .../node_modules/lodash/fp/propOr.js | 1 + .../node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../node_modules/lodash/fp/props.js | 1 + .../node_modules/lodash/fp/pull.js | 5 + .../node_modules/lodash/fp/pullAll.js | 5 + .../node_modules/lodash/fp/pullAllBy.js | 5 + .../node_modules/lodash/fp/pullAllWith.js | 5 + .../node_modules/lodash/fp/pullAt.js | 5 + .../node_modules/lodash/fp/random.js | 5 + .../node_modules/lodash/fp/range.js | 5 + .../node_modules/lodash/fp/rangeRight.js | 5 + .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../node_modules/lodash/fp/rearg.js | 5 + .../node_modules/lodash/fp/reduce.js | 5 + .../node_modules/lodash/fp/reduceRight.js | 5 + .../node_modules/lodash/fp/reject.js | 5 + .../node_modules/lodash/fp/remove.js | 5 + .../node_modules/lodash/fp/repeat.js | 5 + .../node_modules/lodash/fp/replace.js | 5 + .../node_modules/lodash/fp/rest.js | 5 + .../node_modules/lodash/fp/restFrom.js | 5 + .../node_modules/lodash/fp/result.js | 5 + .../node_modules/lodash/fp/reverse.js | 5 + .../node_modules/lodash/fp/round.js | 5 + .../node_modules/lodash/fp/sample.js | 5 + .../node_modules/lodash/fp/sampleSize.js | 5 + .../node_modules/lodash/fp/seq.js | 2 + .../node_modules/lodash/fp/set.js | 5 + .../node_modules/lodash/fp/setWith.js | 5 + .../node_modules/lodash/fp/shuffle.js | 5 + .../node_modules/lodash/fp/size.js | 5 + .../node_modules/lodash/fp/slice.js | 5 + .../node_modules/lodash/fp/snakeCase.js | 5 + .../node_modules/lodash/fp/some.js | 5 + .../node_modules/lodash/fp/sortBy.js | 5 + .../node_modules/lodash/fp/sortedIndex.js | 5 + .../node_modules/lodash/fp/sortedIndexBy.js | 5 + .../node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + .../node_modules/lodash/fp/sortedUniq.js | 5 + .../node_modules/lodash/fp/sortedUniqBy.js | 5 + .../node_modules/lodash/fp/split.js | 5 + .../node_modules/lodash/fp/spread.js | 5 + .../node_modules/lodash/fp/spreadFrom.js | 5 + .../node_modules/lodash/fp/startCase.js | 5 + .../node_modules/lodash/fp/startsWith.js | 5 + .../node_modules/lodash/fp/string.js | 2 + .../node_modules/lodash/fp/stubArray.js | 5 + .../node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js | 5 + .../node_modules/lodash/fp/stubString.js | 5 + .../node_modules/lodash/fp/stubTrue.js | 5 + .../node_modules/lodash/fp/subtract.js | 5 + .../node_modules/lodash/fp/sum.js | 5 + .../node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../node_modules/lodash/fp/tail.js | 5 + .../node_modules/lodash/fp/take.js | 5 + .../node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + .../node_modules/lodash/fp/takeWhile.js | 5 + .../node_modules/lodash/fp/tap.js | 5 + .../node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + .../node_modules/lodash/fp/throttle.js | 5 + .../node_modules/lodash/fp/thru.js | 5 + .../node_modules/lodash/fp/times.js | 5 + .../node_modules/lodash/fp/toArray.js | 5 + .../node_modules/lodash/fp/toFinite.js | 5 + .../node_modules/lodash/fp/toInteger.js | 5 + .../node_modules/lodash/fp/toIterator.js | 5 + .../node_modules/lodash/fp/toJSON.js | 5 + .../node_modules/lodash/fp/toLength.js | 5 + .../node_modules/lodash/fp/toLower.js | 5 + .../node_modules/lodash/fp/toNumber.js | 5 + .../node_modules/lodash/fp/toPairs.js | 5 + .../node_modules/lodash/fp/toPairsIn.js | 5 + .../node_modules/lodash/fp/toPath.js | 5 + .../node_modules/lodash/fp/toPlainObject.js | 5 + .../node_modules/lodash/fp/toSafeInteger.js | 5 + .../node_modules/lodash/fp/toString.js | 5 + .../node_modules/lodash/fp/toUpper.js | 5 + .../node_modules/lodash/fp/transform.js | 5 + .../node_modules/lodash/fp/trim.js | 5 + .../node_modules/lodash/fp/trimChars.js | 5 + .../node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + .../node_modules/lodash/fp/trimEnd.js | 5 + .../node_modules/lodash/fp/trimStart.js | 5 + .../node_modules/lodash/fp/truncate.js | 5 + .../node_modules/lodash/fp/unapply.js | 1 + .../node_modules/lodash/fp/unary.js | 5 + .../node_modules/lodash/fp/unescape.js | 5 + .../node_modules/lodash/fp/union.js | 5 + .../node_modules/lodash/fp/unionBy.js | 5 + .../node_modules/lodash/fp/unionWith.js | 5 + .../node_modules/lodash/fp/uniq.js | 5 + .../node_modules/lodash/fp/uniqBy.js | 5 + .../node_modules/lodash/fp/uniqWith.js | 5 + .../node_modules/lodash/fp/uniqueId.js | 5 + .../node_modules/lodash/fp/unnest.js | 1 + .../node_modules/lodash/fp/unset.js | 5 + .../node_modules/lodash/fp/unzip.js | 5 + .../node_modules/lodash/fp/unzipWith.js | 5 + .../node_modules/lodash/fp/update.js | 5 + .../node_modules/lodash/fp/updateWith.js | 5 + .../node_modules/lodash/fp/upperCase.js | 5 + .../node_modules/lodash/fp/upperFirst.js | 5 + .../node_modules/lodash/fp/useWith.js | 1 + .../node_modules/lodash/fp/util.js | 2 + .../node_modules/lodash/fp/value.js | 5 + .../node_modules/lodash/fp/valueOf.js | 5 + .../node_modules/lodash/fp/values.js | 5 + .../node_modules/lodash/fp/valuesIn.js | 5 + .../node_modules/lodash/fp/where.js | 1 + .../node_modules/lodash/fp/whereEq.js | 1 + .../node_modules/lodash/fp/without.js | 5 + .../node_modules/lodash/fp/words.js | 5 + .../node_modules/lodash/fp/wrap.js | 5 + .../node_modules/lodash/fp/wrapperAt.js | 5 + .../node_modules/lodash/fp/wrapperChain.js | 5 + .../node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + .../node_modules/lodash/fp/wrapperValue.js | 5 + .../node_modules/lodash/fp/xor.js | 5 + .../node_modules/lodash/fp/xorBy.js | 5 + .../node_modules/lodash/fp/xorWith.js | 5 + .../node_modules/lodash/fp/zip.js | 5 + .../node_modules/lodash/fp/zipAll.js | 5 + .../node_modules/lodash/fp/zipObj.js | 1 + .../node_modules/lodash/fp/zipObject.js | 5 + .../node_modules/lodash/fp/zipObjectDeep.js | 5 + .../node_modules/lodash/fp/zipWith.js | 5 + .../node_modules/lodash/fromPairs.js | 28 + .../node_modules/lodash/function.js | 25 + .../node_modules/lodash/functions.js | 31 + .../node_modules/lodash/functionsIn.js | 31 + .../babel-template/node_modules/lodash/get.js | 33 + .../node_modules/lodash/groupBy.js | 41 + .../babel-template/node_modules/lodash/gt.js | 29 + .../babel-template/node_modules/lodash/gte.js | 30 + .../babel-template/node_modules/lodash/has.js | 35 + .../node_modules/lodash/hasIn.js | 34 + .../node_modules/lodash/head.js | 23 + .../node_modules/lodash/identity.js | 21 + .../node_modules/lodash/inRange.js | 55 + .../node_modules/lodash/includes.js | 53 + .../node_modules/lodash/index.js | 1 + .../node_modules/lodash/indexOf.js | 42 + .../node_modules/lodash/initial.js | 22 + .../node_modules/lodash/intersection.js | 30 + .../node_modules/lodash/intersectionBy.js | 45 + .../node_modules/lodash/intersectionWith.js | 41 + .../node_modules/lodash/invert.js | 42 + .../node_modules/lodash/invertBy.js | 56 + .../node_modules/lodash/invoke.js | 24 + .../node_modules/lodash/invokeMap.js | 41 + .../node_modules/lodash/isArguments.js | 36 + .../node_modules/lodash/isArray.js | 26 + .../node_modules/lodash/isArrayBuffer.js | 27 + .../node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + .../node_modules/lodash/isBoolean.js | 29 + .../node_modules/lodash/isBuffer.js | 38 + .../node_modules/lodash/isDate.js | 27 + .../node_modules/lodash/isElement.js | 25 + .../node_modules/lodash/isEmpty.js | 77 + .../node_modules/lodash/isEqual.js | 35 + .../node_modules/lodash/isEqualWith.js | 41 + .../node_modules/lodash/isError.js | 36 + .../node_modules/lodash/isFinite.js | 36 + .../node_modules/lodash/isFunction.js | 37 + .../node_modules/lodash/isInteger.js | 33 + .../node_modules/lodash/isLength.js | 35 + .../node_modules/lodash/isMap.js | 27 + .../node_modules/lodash/isMatch.js | 36 + .../node_modules/lodash/isMatchWith.js | 41 + .../node_modules/lodash/isNaN.js | 38 + .../node_modules/lodash/isNative.js | 40 + .../node_modules/lodash/isNil.js | 25 + .../node_modules/lodash/isNull.js | 22 + .../node_modules/lodash/isNumber.js | 38 + .../node_modules/lodash/isObject.js | 31 + .../node_modules/lodash/isObjectLike.js | 29 + .../node_modules/lodash/isPlainObject.js | 62 + .../node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash/isSafeInteger.js | 37 + .../node_modules/lodash/isSet.js | 27 + .../node_modules/lodash/isString.js | 30 + .../node_modules/lodash/isSymbol.js | 29 + .../node_modules/lodash/isTypedArray.js | 27 + .../node_modules/lodash/isUndefined.js | 22 + .../node_modules/lodash/isWeakMap.js | 28 + .../node_modules/lodash/isWeakSet.js | 28 + .../node_modules/lodash/iteratee.js | 53 + .../node_modules/lodash/join.js | 26 + .../node_modules/lodash/kebabCase.js | 28 + .../node_modules/lodash/keyBy.js | 36 + .../node_modules/lodash/keys.js | 37 + .../node_modules/lodash/keysIn.js | 32 + .../node_modules/lodash/lang.js | 58 + .../node_modules/lodash/last.js | 20 + .../node_modules/lodash/lastIndexOf.js | 46 + .../node_modules/lodash/lodash.js | 17107 ++++++++++++++++ .../node_modules/lodash/lodash.min.js | 137 + .../node_modules/lodash/lowerCase.js | 27 + .../node_modules/lodash/lowerFirst.js | 22 + .../babel-template/node_modules/lodash/lt.js | 29 + .../babel-template/node_modules/lodash/lte.js | 30 + .../babel-template/node_modules/lodash/map.js | 53 + .../node_modules/lodash/mapKeys.js | 36 + .../node_modules/lodash/mapValues.js | 43 + .../node_modules/lodash/matches.js | 39 + .../node_modules/lodash/matchesProperty.js | 37 + .../node_modules/lodash/math.js | 17 + .../babel-template/node_modules/lodash/max.js | 29 + .../node_modules/lodash/maxBy.js | 34 + .../node_modules/lodash/mean.js | 22 + .../node_modules/lodash/meanBy.js | 31 + .../node_modules/lodash/memoize.js | 73 + .../node_modules/lodash/merge.js | 39 + .../node_modules/lodash/mergeWith.js | 39 + .../node_modules/lodash/method.js | 34 + .../node_modules/lodash/methodOf.js | 33 + .../babel-template/node_modules/lodash/min.js | 29 + .../node_modules/lodash/minBy.js | 34 + .../node_modules/lodash/mixin.js | 74 + .../node_modules/lodash/multiply.js | 22 + .../node_modules/lodash/negate.js | 40 + .../node_modules/lodash/next.js | 35 + .../node_modules/lodash/noop.js | 17 + .../babel-template/node_modules/lodash/now.js | 23 + .../babel-template/node_modules/lodash/nth.js | 29 + .../node_modules/lodash/nthArg.js | 32 + .../node_modules/lodash/number.js | 5 + .../node_modules/lodash/object.js | 49 + .../node_modules/lodash/omit.js | 57 + .../node_modules/lodash/omitBy.js | 29 + .../node_modules/lodash/once.js | 25 + .../node_modules/lodash/orderBy.js | 47 + .../node_modules/lodash/over.js | 24 + .../node_modules/lodash/overArgs.js | 61 + .../node_modules/lodash/overEvery.js | 30 + .../node_modules/lodash/overSome.js | 30 + .../node_modules/lodash/package.json | 66 + .../babel-template/node_modules/lodash/pad.js | 49 + .../node_modules/lodash/padEnd.js | 39 + .../node_modules/lodash/padStart.js | 39 + .../node_modules/lodash/parseInt.js | 43 + .../node_modules/lodash/partial.js | 50 + .../node_modules/lodash/partialRight.js | 49 + .../node_modules/lodash/partition.js | 43 + .../node_modules/lodash/pick.js | 25 + .../node_modules/lodash/pickBy.js | 37 + .../node_modules/lodash/plant.js | 48 + .../node_modules/lodash/property.js | 32 + .../node_modules/lodash/propertyOf.js | 30 + .../node_modules/lodash/pull.js | 29 + .../node_modules/lodash/pullAll.js | 29 + .../node_modules/lodash/pullAllBy.js | 33 + .../node_modules/lodash/pullAllWith.js | 32 + .../node_modules/lodash/pullAt.js | 43 + .../node_modules/lodash/random.js | 82 + .../node_modules/lodash/range.js | 46 + .../node_modules/lodash/rangeRight.js | 41 + .../node_modules/lodash/rearg.js | 33 + .../node_modules/lodash/reduce.js | 51 + .../node_modules/lodash/reduceRight.js | 36 + .../node_modules/lodash/reject.js | 46 + .../node_modules/lodash/remove.js | 53 + .../node_modules/lodash/repeat.js | 37 + .../node_modules/lodash/replace.js | 29 + .../node_modules/lodash/rest.js | 40 + .../node_modules/lodash/result.js | 56 + .../node_modules/lodash/reverse.js | 34 + .../node_modules/lodash/round.js | 26 + .../node_modules/lodash/sample.js | 24 + .../node_modules/lodash/sampleSize.js | 37 + .../babel-template/node_modules/lodash/seq.js | 16 + .../babel-template/node_modules/lodash/set.js | 35 + .../node_modules/lodash/setWith.js | 32 + .../node_modules/lodash/shuffle.js | 25 + .../node_modules/lodash/size.js | 46 + .../node_modules/lodash/slice.js | 37 + .../node_modules/lodash/snakeCase.js | 28 + .../node_modules/lodash/some.js | 51 + .../node_modules/lodash/sortBy.js | 48 + .../node_modules/lodash/sortedIndex.js | 24 + .../node_modules/lodash/sortedIndexBy.js | 33 + .../node_modules/lodash/sortedIndexOf.js | 31 + .../node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + .../node_modules/lodash/sortedUniq.js | 24 + .../node_modules/lodash/sortedUniqBy.js | 26 + .../node_modules/lodash/split.js | 52 + .../node_modules/lodash/spread.js | 63 + .../node_modules/lodash/startCase.js | 29 + .../node_modules/lodash/startsWith.js | 39 + .../node_modules/lodash/string.js | 33 + .../node_modules/lodash/stubArray.js | 23 + .../node_modules/lodash/stubFalse.js | 18 + .../node_modules/lodash/stubObject.js | 23 + .../node_modules/lodash/stubString.js | 18 + .../node_modules/lodash/stubTrue.js | 18 + .../node_modules/lodash/subtract.js | 22 + .../babel-template/node_modules/lodash/sum.js | 24 + .../node_modules/lodash/sumBy.js | 33 + .../node_modules/lodash/tail.js | 22 + .../node_modules/lodash/take.js | 37 + .../node_modules/lodash/takeRight.js | 39 + .../node_modules/lodash/takeRightWhile.js | 45 + .../node_modules/lodash/takeWhile.js | 45 + .../babel-template/node_modules/lodash/tap.js | 29 + .../node_modules/lodash/template.js | 238 + .../node_modules/lodash/templateSettings.js | 67 + .../node_modules/lodash/throttle.js | 69 + .../node_modules/lodash/thru.js | 28 + .../node_modules/lodash/times.js | 51 + .../node_modules/lodash/toArray.js | 58 + .../node_modules/lodash/toFinite.js | 42 + .../node_modules/lodash/toInteger.js | 36 + .../node_modules/lodash/toIterator.js | 23 + .../node_modules/lodash/toJSON.js | 1 + .../node_modules/lodash/toLength.js | 38 + .../node_modules/lodash/toLower.js | 28 + .../node_modules/lodash/toNumber.js | 66 + .../node_modules/lodash/toPairs.js | 30 + .../node_modules/lodash/toPairsIn.js | 30 + .../node_modules/lodash/toPath.js | 33 + .../node_modules/lodash/toPlainObject.js | 32 + .../node_modules/lodash/toSafeInteger.js | 37 + .../node_modules/lodash/toString.js | 28 + .../node_modules/lodash/toUpper.js | 28 + .../node_modules/lodash/transform.js | 65 + .../node_modules/lodash/trim.js | 49 + .../node_modules/lodash/trimEnd.js | 43 + .../node_modules/lodash/trimStart.js | 43 + .../node_modules/lodash/truncate.js | 111 + .../node_modules/lodash/unary.js | 22 + .../node_modules/lodash/unescape.js | 34 + .../node_modules/lodash/union.js | 26 + .../node_modules/lodash/unionBy.js | 39 + .../node_modules/lodash/unionWith.js | 34 + .../node_modules/lodash/uniq.js | 25 + .../node_modules/lodash/uniqBy.js | 31 + .../node_modules/lodash/uniqWith.js | 28 + .../node_modules/lodash/uniqueId.js | 28 + .../node_modules/lodash/unset.js | 34 + .../node_modules/lodash/unzip.js | 45 + .../node_modules/lodash/unzipWith.js | 39 + .../node_modules/lodash/update.js | 35 + .../node_modules/lodash/updateWith.js | 33 + .../node_modules/lodash/upperCase.js | 27 + .../node_modules/lodash/upperFirst.js | 22 + .../node_modules/lodash/util.js | 34 + .../node_modules/lodash/value.js | 1 + .../node_modules/lodash/valueOf.js | 1 + .../node_modules/lodash/values.js | 34 + .../node_modules/lodash/valuesIn.js | 32 + .../node_modules/lodash/without.js | 31 + .../node_modules/lodash/words.js | 35 + .../node_modules/lodash/wrap.js | 30 + .../node_modules/lodash/wrapperAt.js | 48 + .../node_modules/lodash/wrapperChain.js | 34 + .../node_modules/lodash/wrapperLodash.js | 147 + .../node_modules/lodash/wrapperReverse.js | 44 + .../node_modules/lodash/wrapperValue.js | 21 + .../babel-template/node_modules/lodash/xor.js | 28 + .../node_modules/lodash/xorBy.js | 39 + .../node_modules/lodash/xorWith.js | 34 + .../babel-template/node_modules/lodash/zip.js | 22 + .../node_modules/lodash/zipObject.js | 24 + .../node_modules/lodash/zipObjectDeep.js | 23 + .../node_modules/lodash/zipWith.js | 32 + node_modules/babel-template/package.json | 23 +- .../node_modules/lodash/LICENSE | 47 + .../node_modules/lodash/README.md | 39 + .../node_modules/lodash/_DataView.js | 7 + .../node_modules/lodash/_Hash.js | 32 + .../node_modules/lodash/_LazyWrapper.js | 28 + .../node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash/_LodashWrapper.js | 22 + .../node_modules/lodash/_Map.js | 7 + .../node_modules/lodash/_MapCache.js | 32 + .../node_modules/lodash/_Promise.js | 7 + .../node_modules/lodash/_Set.js | 7 + .../node_modules/lodash/_SetCache.js | 27 + .../node_modules/lodash/_Stack.js | 27 + .../node_modules/lodash/_Symbol.js | 6 + .../node_modules/lodash/_Uint8Array.js | 6 + .../node_modules/lodash/_WeakMap.js | 7 + .../node_modules/lodash/_apply.js | 21 + .../node_modules/lodash/_arrayAggregator.js | 22 + .../node_modules/lodash/_arrayEach.js | 22 + .../node_modules/lodash/_arrayEachRight.js | 21 + .../node_modules/lodash/_arrayEvery.js | 23 + .../node_modules/lodash/_arrayFilter.js | 25 + .../node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../node_modules/lodash/_arrayMap.js | 21 + .../node_modules/lodash/_arrayPush.js | 20 + .../node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash/_arraySome.js | 23 + .../node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + .../node_modules/lodash/_assignValue.js | 28 + .../node_modules/lodash/_assocIndexOf.js | 21 + .../node_modules/lodash/_baseAggregator.js | 21 + .../node_modules/lodash/_baseAssign.js | 17 + .../node_modules/lodash/_baseAssignIn.js | 17 + .../node_modules/lodash/_baseAssignValue.js | 25 + .../node_modules/lodash/_baseAt.js | 23 + .../node_modules/lodash/_baseClamp.js | 22 + .../node_modules/lodash/_baseClone.js | 171 + .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../node_modules/lodash/_baseCreate.js | 30 + .../node_modules/lodash/_baseDelay.js | 21 + .../node_modules/lodash/_baseDifference.js | 67 + .../node_modules/lodash/_baseEach.js | 14 + .../node_modules/lodash/_baseEachRight.js | 14 + .../node_modules/lodash/_baseEvery.js | 21 + .../node_modules/lodash/_baseExtremum.js | 32 + .../node_modules/lodash/_baseFill.js | 32 + .../node_modules/lodash/_baseFilter.js | 21 + .../node_modules/lodash/_baseFindIndex.js | 24 + .../node_modules/lodash/_baseFindKey.js | 23 + .../node_modules/lodash/_baseFlatten.js | 38 + .../node_modules/lodash/_baseFor.js | 16 + .../node_modules/lodash/_baseForOwn.js | 16 + .../node_modules/lodash/_baseForOwnRight.js | 16 + .../node_modules/lodash/_baseForRight.js | 15 + .../node_modules/lodash/_baseFunctions.js | 19 + .../node_modules/lodash/_baseGet.js | 24 + .../node_modules/lodash/_baseGetAllKeys.js | 20 + .../node_modules/lodash/_baseGetTag.js | 28 + .../node_modules/lodash/_baseGt.js | 14 + .../node_modules/lodash/_baseHas.js | 19 + .../node_modules/lodash/_baseHasIn.js | 13 + .../node_modules/lodash/_baseInRange.js | 18 + .../node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + .../node_modules/lodash/_baseInverter.js | 21 + .../node_modules/lodash/_baseInvoke.js | 24 + .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../node_modules/lodash/_baseIsDate.js | 18 + .../node_modules/lodash/_baseIsEqual.js | 28 + .../node_modules/lodash/_baseIsEqualDeep.js | 83 + .../node_modules/lodash/_baseIsMap.js | 18 + .../node_modules/lodash/_baseIsMatch.js | 62 + .../node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js | 47 + .../node_modules/lodash/_baseIsRegExp.js | 18 + .../node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + .../node_modules/lodash/_baseIteratee.js | 31 + .../node_modules/lodash/_baseKeys.js | 30 + .../node_modules/lodash/_baseKeysIn.js | 33 + .../node_modules/lodash/_baseLodash.js | 10 + .../node_modules/lodash/_baseLt.js | 14 + .../node_modules/lodash/_baseMap.js | 22 + .../node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + .../node_modules/lodash/_baseMean.js | 20 + .../node_modules/lodash/_baseMerge.js | 42 + .../node_modules/lodash/_baseMergeDeep.js | 94 + .../node_modules/lodash/_baseNth.js | 20 + .../node_modules/lodash/_baseOrderBy.js | 34 + .../node_modules/lodash/_basePick.js | 19 + .../node_modules/lodash/_basePickBy.js | 30 + .../node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + .../node_modules/lodash/_basePropertyOf.js | 14 + .../node_modules/lodash/_basePullAll.js | 51 + .../node_modules/lodash/_basePullAt.js | 37 + .../node_modules/lodash/_baseRandom.js | 18 + .../node_modules/lodash/_baseRange.js | 28 + .../node_modules/lodash/_baseReduce.js | 23 + .../node_modules/lodash/_baseRepeat.js | 35 + .../node_modules/lodash/_baseRest.js | 17 + .../node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash/_baseSet.js | 47 + .../node_modules/lodash/_baseSetData.js | 17 + .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash/_baseSlice.js | 31 + .../node_modules/lodash/_baseSome.js | 22 + .../node_modules/lodash/_baseSortBy.js | 21 + .../node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 64 + .../node_modules/lodash/_baseSortedUniq.js | 30 + .../node_modules/lodash/_baseSum.js | 24 + .../node_modules/lodash/_baseTimes.js | 20 + .../node_modules/lodash/_baseToNumber.js | 24 + .../node_modules/lodash/_baseToPairs.js | 18 + .../node_modules/lodash/_baseToString.js | 37 + .../node_modules/lodash/_baseUnary.js | 14 + .../node_modules/lodash/_baseUniq.js | 72 + .../node_modules/lodash/_baseUnset.js | 20 + .../node_modules/lodash/_baseUpdate.js | 18 + .../node_modules/lodash/_baseValues.js | 19 + .../node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + .../node_modules/lodash/_baseXor.js | 36 + .../node_modules/lodash/_baseZipObject.js | 23 + .../node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + .../node_modules/lodash/_castFunction.js | 14 + .../node_modules/lodash/_castPath.js | 21 + .../node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash/_castSlice.js | 18 + .../node_modules/lodash/_charsEndIndex.js | 19 + .../node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + .../node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash/_cloneDataView.js | 16 + .../node_modules/lodash/_cloneRegExp.js | 17 + .../node_modules/lodash/_cloneSymbol.js | 18 + .../node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + .../node_modules/lodash/_compareMultiple.js | 44 + .../node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + .../node_modules/lodash/_copyArray.js | 20 + .../node_modules/lodash/_copyObject.js | 40 + .../node_modules/lodash/_copySymbols.js | 16 + .../node_modules/lodash/_copySymbolsIn.js | 16 + .../node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + .../node_modules/lodash/_createAssigner.js | 37 + .../node_modules/lodash/_createBaseEach.js | 32 + .../node_modules/lodash/_createBaseFor.js | 25 + .../node_modules/lodash/_createBind.js | 28 + .../node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + .../node_modules/lodash/_createCtor.js | 37 + .../node_modules/lodash/_createCurry.js | 46 + .../node_modules/lodash/_createFind.js | 25 + .../node_modules/lodash/_createFlow.js | 78 + .../node_modules/lodash/_createHybrid.js | 92 + .../node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + .../node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash/_createPadding.js | 33 + .../node_modules/lodash/_createPartial.js | 43 + .../node_modules/lodash/_createRange.js | 30 + .../node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + .../node_modules/lodash/_createRound.js | 33 + .../node_modules/lodash/_createSet.js | 19 + .../node_modules/lodash/_createToPairs.js | 30 + .../node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + .../node_modules/lodash/_customOmitClone.js | 16 + .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../node_modules/lodash/_equalArrays.js | 83 + .../node_modules/lodash/_equalByTag.js | 112 + .../node_modules/lodash/_equalObjects.js | 89 + .../node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + .../node_modules/lodash/_flatRest.js | 16 + .../node_modules/lodash/_freeGlobal.js | 4 + .../node_modules/lodash/_getAllKeys.js | 16 + .../node_modules/lodash/_getAllKeysIn.js | 17 + .../node_modules/lodash/_getData.js | 15 + .../node_modules/lodash/_getFuncName.js | 31 + .../node_modules/lodash/_getHolder.js | 13 + .../node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash/_getMatchData.js | 24 + .../node_modules/lodash/_getNative.js | 17 + .../node_modules/lodash/_getPrototype.js | 6 + .../node_modules/lodash/_getRawTag.js | 46 + .../node_modules/lodash/_getSymbols.js | 30 + .../node_modules/lodash/_getSymbolsIn.js | 25 + .../node_modules/lodash/_getTag.js | 58 + .../node_modules/lodash/_getValue.js | 13 + .../node_modules/lodash/_getView.js | 33 + .../node_modules/lodash/_getWrapDetails.js | 17 + .../node_modules/lodash/_hasPath.js | 39 + .../node_modules/lodash/_hasUnicode.js | 26 + .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../node_modules/lodash/_hashClear.js | 15 + .../node_modules/lodash/_hashDelete.js | 17 + .../node_modules/lodash/_hashGet.js | 30 + .../node_modules/lodash/_hashHas.js | 23 + .../node_modules/lodash/_hashSet.js | 23 + .../node_modules/lodash/_initCloneArray.js | 26 + .../node_modules/lodash/_initCloneByTag.js | 77 + .../node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../node_modules/lodash/_isIndex.js | 25 + .../node_modules/lodash/_isIterateeCall.js | 30 + .../node_modules/lodash/_isKey.js | 29 + .../node_modules/lodash/_isKeyable.js | 15 + .../node_modules/lodash/_isLaziable.js | 28 + .../node_modules/lodash/_isMaskable.js | 14 + .../node_modules/lodash/_isMasked.js | 20 + .../node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + .../node_modules/lodash/_iteratorToArray.js | 18 + .../node_modules/lodash/_lazyClone.js | 23 + .../node_modules/lodash/_lazyReverse.js | 23 + .../node_modules/lodash/_lazyValue.js | 69 + .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js | 35 + .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js | 16 + .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js | 21 + .../node_modules/lodash/_mapCacheDelete.js | 18 + .../node_modules/lodash/_mapCacheGet.js | 16 + .../node_modules/lodash/_mapCacheHas.js | 16 + .../node_modules/lodash/_mapCacheSet.js | 22 + .../node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + .../node_modules/lodash/_memoizeCapped.js | 26 + .../node_modules/lodash/_mergeData.js | 90 + .../node_modules/lodash/_metaMap.js | 6 + .../node_modules/lodash/_nativeCreate.js | 6 + .../node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../node_modules/lodash/_nodeUtil.js | 30 + .../node_modules/lodash/_objectToString.js | 22 + .../node_modules/lodash/_overArg.js | 15 + .../node_modules/lodash/_overRest.js | 36 + .../node_modules/lodash/_parent.js | 16 + .../node_modules/lodash/_reEscape.js | 4 + .../node_modules/lodash/_reEvaluate.js | 4 + .../node_modules/lodash/_reInterpolate.js | 4 + .../node_modules/lodash/_realNames.js | 4 + .../node_modules/lodash/_reorder.js | 29 + .../node_modules/lodash/_replaceHolders.js | 29 + .../node_modules/lodash/_root.js | 9 + .../node_modules/lodash/_safeGet.js | 17 + .../node_modules/lodash/_setCacheAdd.js | 19 + .../node_modules/lodash/_setCacheHas.js | 14 + .../node_modules/lodash/_setData.js | 20 + .../node_modules/lodash/_setToArray.js | 18 + .../node_modules/lodash/_setToPairs.js | 18 + .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../node_modules/lodash/_stackClear.js | 15 + .../node_modules/lodash/_stackDelete.js | 18 + .../node_modules/lodash/_stackGet.js | 14 + .../node_modules/lodash/_stackHas.js | 14 + .../node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash/_stringToPath.js | 27 + .../node_modules/lodash/_toKey.js | 21 + .../node_modules/lodash/_toSource.js | 26 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + .../node_modules/lodash/_unicodeSize.js | 44 + .../node_modules/lodash/_unicodeToArray.js | 40 + .../node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash/_wrapperClone.js | 23 + .../babel-traverse/node_modules/lodash/add.js | 22 + .../node_modules/lodash/after.js | 42 + .../node_modules/lodash/array.js | 67 + .../babel-traverse/node_modules/lodash/ary.js | 29 + .../node_modules/lodash/assign.js | 58 + .../node_modules/lodash/assignIn.js | 40 + .../node_modules/lodash/assignInWith.js | 38 + .../node_modules/lodash/assignWith.js | 37 + .../babel-traverse/node_modules/lodash/at.js | 23 + .../node_modules/lodash/attempt.js | 35 + .../node_modules/lodash/before.js | 40 + .../node_modules/lodash/bind.js | 57 + .../node_modules/lodash/bindAll.js | 41 + .../node_modules/lodash/bindKey.js | 68 + .../node_modules/lodash/camelCase.js | 29 + .../node_modules/lodash/capitalize.js | 23 + .../node_modules/lodash/castArray.js | 44 + .../node_modules/lodash/ceil.js | 26 + .../node_modules/lodash/chain.js | 38 + .../node_modules/lodash/chunk.js | 50 + .../node_modules/lodash/clamp.js | 39 + .../node_modules/lodash/clone.js | 36 + .../node_modules/lodash/cloneDeep.js | 29 + .../node_modules/lodash/cloneDeepWith.js | 40 + .../node_modules/lodash/cloneWith.js | 42 + .../node_modules/lodash/collection.js | 30 + .../node_modules/lodash/commit.js | 33 + .../node_modules/lodash/compact.js | 31 + .../node_modules/lodash/concat.js | 43 + .../node_modules/lodash/cond.js | 60 + .../node_modules/lodash/conforms.js | 35 + .../node_modules/lodash/conformsTo.js | 32 + .../node_modules/lodash/constant.js | 26 + .../node_modules/lodash/core.js | 3854 ++++ .../node_modules/lodash/core.min.js | 29 + .../node_modules/lodash/countBy.js | 40 + .../node_modules/lodash/create.js | 43 + .../node_modules/lodash/curry.js | 57 + .../node_modules/lodash/curryRight.js | 54 + .../node_modules/lodash/date.js | 3 + .../node_modules/lodash/debounce.js | 190 + .../node_modules/lodash/deburr.js | 45 + .../node_modules/lodash/defaultTo.js | 25 + .../node_modules/lodash/defaults.js | 64 + .../node_modules/lodash/defaultsDeep.js | 30 + .../node_modules/lodash/defer.js | 26 + .../node_modules/lodash/delay.js | 28 + .../node_modules/lodash/difference.js | 33 + .../node_modules/lodash/differenceBy.js | 44 + .../node_modules/lodash/differenceWith.js | 40 + .../node_modules/lodash/divide.js | 22 + .../node_modules/lodash/drop.js | 38 + .../node_modules/lodash/dropRight.js | 39 + .../node_modules/lodash/dropRightWhile.js | 45 + .../node_modules/lodash/dropWhile.js | 45 + .../node_modules/lodash/each.js | 1 + .../node_modules/lodash/eachRight.js | 1 + .../node_modules/lodash/endsWith.js | 43 + .../node_modules/lodash/entries.js | 1 + .../node_modules/lodash/entriesIn.js | 1 + .../babel-traverse/node_modules/lodash/eq.js | 37 + .../node_modules/lodash/escape.js | 43 + .../node_modules/lodash/escapeRegExp.js | 32 + .../node_modules/lodash/every.js | 56 + .../node_modules/lodash/extend.js | 1 + .../node_modules/lodash/extendWith.js | 1 + .../node_modules/lodash/fill.js | 45 + .../node_modules/lodash/filter.js | 48 + .../node_modules/lodash/find.js | 42 + .../node_modules/lodash/findIndex.js | 55 + .../node_modules/lodash/findKey.js | 44 + .../node_modules/lodash/findLast.js | 25 + .../node_modules/lodash/findLastIndex.js | 59 + .../node_modules/lodash/findLastKey.js | 44 + .../node_modules/lodash/first.js | 1 + .../node_modules/lodash/flatMap.js | 29 + .../node_modules/lodash/flatMapDeep.js | 31 + .../node_modules/lodash/flatMapDepth.js | 31 + .../node_modules/lodash/flatten.js | 22 + .../node_modules/lodash/flattenDeep.js | 25 + .../node_modules/lodash/flattenDepth.js | 33 + .../node_modules/lodash/flip.js | 28 + .../node_modules/lodash/floor.js | 26 + .../node_modules/lodash/flow.js | 27 + .../node_modules/lodash/flowRight.js | 26 + .../node_modules/lodash/forEach.js | 41 + .../node_modules/lodash/forEachRight.js | 31 + .../node_modules/lodash/forIn.js | 39 + .../node_modules/lodash/forInRight.js | 37 + .../node_modules/lodash/forOwn.js | 36 + .../node_modules/lodash/forOwnRight.js | 34 + .../babel-traverse/node_modules/lodash/fp.js | 2 + .../node_modules/lodash/fp/F.js | 1 + .../node_modules/lodash/fp/T.js | 1 + .../node_modules/lodash/fp/__.js | 1 + .../node_modules/lodash/fp/_baseConvert.js | 569 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + .../node_modules/lodash/fp/_falseOptions.js | 7 + .../node_modules/lodash/fp/_mapping.js | 358 + .../node_modules/lodash/fp/_util.js | 16 + .../node_modules/lodash/fp/add.js | 5 + .../node_modules/lodash/fp/after.js | 5 + .../node_modules/lodash/fp/all.js | 1 + .../node_modules/lodash/fp/allPass.js | 1 + .../node_modules/lodash/fp/always.js | 1 + .../node_modules/lodash/fp/any.js | 1 + .../node_modules/lodash/fp/anyPass.js | 1 + .../node_modules/lodash/fp/apply.js | 1 + .../node_modules/lodash/fp/array.js | 2 + .../node_modules/lodash/fp/ary.js | 5 + .../node_modules/lodash/fp/assign.js | 5 + .../node_modules/lodash/fp/assignAll.js | 5 + .../node_modules/lodash/fp/assignAllWith.js | 5 + .../node_modules/lodash/fp/assignIn.js | 5 + .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash/fp/assignInWith.js | 5 + .../node_modules/lodash/fp/assignWith.js | 5 + .../node_modules/lodash/fp/assoc.js | 1 + .../node_modules/lodash/fp/assocPath.js | 1 + .../node_modules/lodash/fp/at.js | 5 + .../node_modules/lodash/fp/attempt.js | 5 + .../node_modules/lodash/fp/before.js | 5 + .../node_modules/lodash/fp/bind.js | 5 + .../node_modules/lodash/fp/bindAll.js | 5 + .../node_modules/lodash/fp/bindKey.js | 5 + .../node_modules/lodash/fp/camelCase.js | 5 + .../node_modules/lodash/fp/capitalize.js | 5 + .../node_modules/lodash/fp/castArray.js | 5 + .../node_modules/lodash/fp/ceil.js | 5 + .../node_modules/lodash/fp/chain.js | 5 + .../node_modules/lodash/fp/chunk.js | 5 + .../node_modules/lodash/fp/clamp.js | 5 + .../node_modules/lodash/fp/clone.js | 5 + .../node_modules/lodash/fp/cloneDeep.js | 5 + .../node_modules/lodash/fp/cloneDeepWith.js | 5 + .../node_modules/lodash/fp/cloneWith.js | 5 + .../node_modules/lodash/fp/collection.js | 2 + .../node_modules/lodash/fp/commit.js | 5 + .../node_modules/lodash/fp/compact.js | 5 + .../node_modules/lodash/fp/complement.js | 1 + .../node_modules/lodash/fp/compose.js | 1 + .../node_modules/lodash/fp/concat.js | 5 + .../node_modules/lodash/fp/cond.js | 5 + .../node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../node_modules/lodash/fp/constant.js | 5 + .../node_modules/lodash/fp/contains.js | 1 + .../node_modules/lodash/fp/convert.js | 18 + .../node_modules/lodash/fp/countBy.js | 5 + .../node_modules/lodash/fp/create.js | 5 + .../node_modules/lodash/fp/curry.js | 5 + .../node_modules/lodash/fp/curryN.js | 5 + .../node_modules/lodash/fp/curryRight.js | 5 + .../node_modules/lodash/fp/curryRightN.js | 5 + .../node_modules/lodash/fp/date.js | 2 + .../node_modules/lodash/fp/debounce.js | 5 + .../node_modules/lodash/fp/deburr.js | 5 + .../node_modules/lodash/fp/defaultTo.js | 5 + .../node_modules/lodash/fp/defaults.js | 5 + .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../node_modules/lodash/fp/defer.js | 5 + .../node_modules/lodash/fp/delay.js | 5 + .../node_modules/lodash/fp/difference.js | 5 + .../node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + .../node_modules/lodash/fp/dissoc.js | 1 + .../node_modules/lodash/fp/dissocPath.js | 1 + .../node_modules/lodash/fp/divide.js | 5 + .../node_modules/lodash/fp/drop.js | 5 + .../node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + .../node_modules/lodash/fp/dropWhile.js | 5 + .../node_modules/lodash/fp/each.js | 1 + .../node_modules/lodash/fp/eachRight.js | 1 + .../node_modules/lodash/fp/endsWith.js | 5 + .../node_modules/lodash/fp/entries.js | 1 + .../node_modules/lodash/fp/entriesIn.js | 1 + .../node_modules/lodash/fp/eq.js | 5 + .../node_modules/lodash/fp/equals.js | 1 + .../node_modules/lodash/fp/escape.js | 5 + .../node_modules/lodash/fp/escapeRegExp.js | 5 + .../node_modules/lodash/fp/every.js | 5 + .../node_modules/lodash/fp/extend.js | 1 + .../node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash/fp/extendWith.js | 1 + .../node_modules/lodash/fp/fill.js | 5 + .../node_modules/lodash/fp/filter.js | 5 + .../node_modules/lodash/fp/find.js | 5 + .../node_modules/lodash/fp/findFrom.js | 5 + .../node_modules/lodash/fp/findIndex.js | 5 + .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../node_modules/lodash/fp/findKey.js | 5 + .../node_modules/lodash/fp/findLast.js | 5 + .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash/fp/findLastKey.js | 5 + .../node_modules/lodash/fp/first.js | 1 + .../node_modules/lodash/fp/flatMap.js | 5 + .../node_modules/lodash/fp/flatMapDeep.js | 5 + .../node_modules/lodash/fp/flatMapDepth.js | 5 + .../node_modules/lodash/fp/flatten.js | 5 + .../node_modules/lodash/fp/flattenDeep.js | 5 + .../node_modules/lodash/fp/flattenDepth.js | 5 + .../node_modules/lodash/fp/flip.js | 5 + .../node_modules/lodash/fp/floor.js | 5 + .../node_modules/lodash/fp/flow.js | 5 + .../node_modules/lodash/fp/flowRight.js | 5 + .../node_modules/lodash/fp/forEach.js | 5 + .../node_modules/lodash/fp/forEachRight.js | 5 + .../node_modules/lodash/fp/forIn.js | 5 + .../node_modules/lodash/fp/forInRight.js | 5 + .../node_modules/lodash/fp/forOwn.js | 5 + .../node_modules/lodash/fp/forOwnRight.js | 5 + .../node_modules/lodash/fp/fromPairs.js | 5 + .../node_modules/lodash/fp/function.js | 2 + .../node_modules/lodash/fp/functions.js | 5 + .../node_modules/lodash/fp/functionsIn.js | 5 + .../node_modules/lodash/fp/get.js | 5 + .../node_modules/lodash/fp/getOr.js | 5 + .../node_modules/lodash/fp/groupBy.js | 5 + .../node_modules/lodash/fp/gt.js | 5 + .../node_modules/lodash/fp/gte.js | 5 + .../node_modules/lodash/fp/has.js | 5 + .../node_modules/lodash/fp/hasIn.js | 5 + .../node_modules/lodash/fp/head.js | 5 + .../node_modules/lodash/fp/identical.js | 1 + .../node_modules/lodash/fp/identity.js | 5 + .../node_modules/lodash/fp/inRange.js | 5 + .../node_modules/lodash/fp/includes.js | 5 + .../node_modules/lodash/fp/includesFrom.js | 5 + .../node_modules/lodash/fp/indexBy.js | 1 + .../node_modules/lodash/fp/indexOf.js | 5 + .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../node_modules/lodash/fp/init.js | 1 + .../node_modules/lodash/fp/initial.js | 5 + .../node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + .../node_modules/lodash/fp/invert.js | 5 + .../node_modules/lodash/fp/invertBy.js | 5 + .../node_modules/lodash/fp/invertObj.js | 1 + .../node_modules/lodash/fp/invoke.js | 5 + .../node_modules/lodash/fp/invokeArgs.js | 5 + .../node_modules/lodash/fp/invokeArgsMap.js | 5 + .../node_modules/lodash/fp/invokeMap.js | 5 + .../node_modules/lodash/fp/isArguments.js | 5 + .../node_modules/lodash/fp/isArray.js | 5 + .../node_modules/lodash/fp/isArrayBuffer.js | 5 + .../node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + .../node_modules/lodash/fp/isBoolean.js | 5 + .../node_modules/lodash/fp/isBuffer.js | 5 + .../node_modules/lodash/fp/isDate.js | 5 + .../node_modules/lodash/fp/isElement.js | 5 + .../node_modules/lodash/fp/isEmpty.js | 5 + .../node_modules/lodash/fp/isEqual.js | 5 + .../node_modules/lodash/fp/isEqualWith.js | 5 + .../node_modules/lodash/fp/isError.js | 5 + .../node_modules/lodash/fp/isFinite.js | 5 + .../node_modules/lodash/fp/isFunction.js | 5 + .../node_modules/lodash/fp/isInteger.js | 5 + .../node_modules/lodash/fp/isLength.js | 5 + .../node_modules/lodash/fp/isMap.js | 5 + .../node_modules/lodash/fp/isMatch.js | 5 + .../node_modules/lodash/fp/isMatchWith.js | 5 + .../node_modules/lodash/fp/isNaN.js | 5 + .../node_modules/lodash/fp/isNative.js | 5 + .../node_modules/lodash/fp/isNil.js | 5 + .../node_modules/lodash/fp/isNull.js | 5 + .../node_modules/lodash/fp/isNumber.js | 5 + .../node_modules/lodash/fp/isObject.js | 5 + .../node_modules/lodash/fp/isObjectLike.js | 5 + .../node_modules/lodash/fp/isPlainObject.js | 5 + .../node_modules/lodash/fp/isRegExp.js | 5 + .../node_modules/lodash/fp/isSafeInteger.js | 5 + .../node_modules/lodash/fp/isSet.js | 5 + .../node_modules/lodash/fp/isString.js | 5 + .../node_modules/lodash/fp/isSymbol.js | 5 + .../node_modules/lodash/fp/isTypedArray.js | 5 + .../node_modules/lodash/fp/isUndefined.js | 5 + .../node_modules/lodash/fp/isWeakMap.js | 5 + .../node_modules/lodash/fp/isWeakSet.js | 5 + .../node_modules/lodash/fp/iteratee.js | 5 + .../node_modules/lodash/fp/join.js | 5 + .../node_modules/lodash/fp/juxt.js | 1 + .../node_modules/lodash/fp/kebabCase.js | 5 + .../node_modules/lodash/fp/keyBy.js | 5 + .../node_modules/lodash/fp/keys.js | 5 + .../node_modules/lodash/fp/keysIn.js | 5 + .../node_modules/lodash/fp/lang.js | 2 + .../node_modules/lodash/fp/last.js | 5 + .../node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../node_modules/lodash/fp/lowerCase.js | 5 + .../node_modules/lodash/fp/lowerFirst.js | 5 + .../node_modules/lodash/fp/lt.js | 5 + .../node_modules/lodash/fp/lte.js | 5 + .../node_modules/lodash/fp/map.js | 5 + .../node_modules/lodash/fp/mapKeys.js | 5 + .../node_modules/lodash/fp/mapValues.js | 5 + .../node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + .../node_modules/lodash/fp/math.js | 2 + .../node_modules/lodash/fp/max.js | 5 + .../node_modules/lodash/fp/maxBy.js | 5 + .../node_modules/lodash/fp/mean.js | 5 + .../node_modules/lodash/fp/meanBy.js | 5 + .../node_modules/lodash/fp/memoize.js | 5 + .../node_modules/lodash/fp/merge.js | 5 + .../node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../node_modules/lodash/fp/mergeWith.js | 5 + .../node_modules/lodash/fp/method.js | 5 + .../node_modules/lodash/fp/methodOf.js | 5 + .../node_modules/lodash/fp/min.js | 5 + .../node_modules/lodash/fp/minBy.js | 5 + .../node_modules/lodash/fp/mixin.js | 5 + .../node_modules/lodash/fp/multiply.js | 5 + .../node_modules/lodash/fp/nAry.js | 1 + .../node_modules/lodash/fp/negate.js | 5 + .../node_modules/lodash/fp/next.js | 5 + .../node_modules/lodash/fp/noop.js | 5 + .../node_modules/lodash/fp/now.js | 5 + .../node_modules/lodash/fp/nth.js | 5 + .../node_modules/lodash/fp/nthArg.js | 5 + .../node_modules/lodash/fp/number.js | 2 + .../node_modules/lodash/fp/object.js | 2 + .../node_modules/lodash/fp/omit.js | 5 + .../node_modules/lodash/fp/omitAll.js | 1 + .../node_modules/lodash/fp/omitBy.js | 5 + .../node_modules/lodash/fp/once.js | 5 + .../node_modules/lodash/fp/orderBy.js | 5 + .../node_modules/lodash/fp/over.js | 5 + .../node_modules/lodash/fp/overArgs.js | 5 + .../node_modules/lodash/fp/overEvery.js | 5 + .../node_modules/lodash/fp/overSome.js | 5 + .../node_modules/lodash/fp/pad.js | 5 + .../node_modules/lodash/fp/padChars.js | 5 + .../node_modules/lodash/fp/padCharsEnd.js | 5 + .../node_modules/lodash/fp/padCharsStart.js | 5 + .../node_modules/lodash/fp/padEnd.js | 5 + .../node_modules/lodash/fp/padStart.js | 5 + .../node_modules/lodash/fp/parseInt.js | 5 + .../node_modules/lodash/fp/partial.js | 5 + .../node_modules/lodash/fp/partialRight.js | 5 + .../node_modules/lodash/fp/partition.js | 5 + .../node_modules/lodash/fp/path.js | 1 + .../node_modules/lodash/fp/pathEq.js | 1 + .../node_modules/lodash/fp/pathOr.js | 1 + .../node_modules/lodash/fp/paths.js | 1 + .../node_modules/lodash/fp/pick.js | 5 + .../node_modules/lodash/fp/pickAll.js | 1 + .../node_modules/lodash/fp/pickBy.js | 5 + .../node_modules/lodash/fp/pipe.js | 1 + .../node_modules/lodash/fp/placeholder.js | 6 + .../node_modules/lodash/fp/plant.js | 5 + .../node_modules/lodash/fp/pluck.js | 1 + .../node_modules/lodash/fp/prop.js | 1 + .../node_modules/lodash/fp/propEq.js | 1 + .../node_modules/lodash/fp/propOr.js | 1 + .../node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../node_modules/lodash/fp/props.js | 1 + .../node_modules/lodash/fp/pull.js | 5 + .../node_modules/lodash/fp/pullAll.js | 5 + .../node_modules/lodash/fp/pullAllBy.js | 5 + .../node_modules/lodash/fp/pullAllWith.js | 5 + .../node_modules/lodash/fp/pullAt.js | 5 + .../node_modules/lodash/fp/random.js | 5 + .../node_modules/lodash/fp/range.js | 5 + .../node_modules/lodash/fp/rangeRight.js | 5 + .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../node_modules/lodash/fp/rearg.js | 5 + .../node_modules/lodash/fp/reduce.js | 5 + .../node_modules/lodash/fp/reduceRight.js | 5 + .../node_modules/lodash/fp/reject.js | 5 + .../node_modules/lodash/fp/remove.js | 5 + .../node_modules/lodash/fp/repeat.js | 5 + .../node_modules/lodash/fp/replace.js | 5 + .../node_modules/lodash/fp/rest.js | 5 + .../node_modules/lodash/fp/restFrom.js | 5 + .../node_modules/lodash/fp/result.js | 5 + .../node_modules/lodash/fp/reverse.js | 5 + .../node_modules/lodash/fp/round.js | 5 + .../node_modules/lodash/fp/sample.js | 5 + .../node_modules/lodash/fp/sampleSize.js | 5 + .../node_modules/lodash/fp/seq.js | 2 + .../node_modules/lodash/fp/set.js | 5 + .../node_modules/lodash/fp/setWith.js | 5 + .../node_modules/lodash/fp/shuffle.js | 5 + .../node_modules/lodash/fp/size.js | 5 + .../node_modules/lodash/fp/slice.js | 5 + .../node_modules/lodash/fp/snakeCase.js | 5 + .../node_modules/lodash/fp/some.js | 5 + .../node_modules/lodash/fp/sortBy.js | 5 + .../node_modules/lodash/fp/sortedIndex.js | 5 + .../node_modules/lodash/fp/sortedIndexBy.js | 5 + .../node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + .../node_modules/lodash/fp/sortedUniq.js | 5 + .../node_modules/lodash/fp/sortedUniqBy.js | 5 + .../node_modules/lodash/fp/split.js | 5 + .../node_modules/lodash/fp/spread.js | 5 + .../node_modules/lodash/fp/spreadFrom.js | 5 + .../node_modules/lodash/fp/startCase.js | 5 + .../node_modules/lodash/fp/startsWith.js | 5 + .../node_modules/lodash/fp/string.js | 2 + .../node_modules/lodash/fp/stubArray.js | 5 + .../node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js | 5 + .../node_modules/lodash/fp/stubString.js | 5 + .../node_modules/lodash/fp/stubTrue.js | 5 + .../node_modules/lodash/fp/subtract.js | 5 + .../node_modules/lodash/fp/sum.js | 5 + .../node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../node_modules/lodash/fp/tail.js | 5 + .../node_modules/lodash/fp/take.js | 5 + .../node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + .../node_modules/lodash/fp/takeWhile.js | 5 + .../node_modules/lodash/fp/tap.js | 5 + .../node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + .../node_modules/lodash/fp/throttle.js | 5 + .../node_modules/lodash/fp/thru.js | 5 + .../node_modules/lodash/fp/times.js | 5 + .../node_modules/lodash/fp/toArray.js | 5 + .../node_modules/lodash/fp/toFinite.js | 5 + .../node_modules/lodash/fp/toInteger.js | 5 + .../node_modules/lodash/fp/toIterator.js | 5 + .../node_modules/lodash/fp/toJSON.js | 5 + .../node_modules/lodash/fp/toLength.js | 5 + .../node_modules/lodash/fp/toLower.js | 5 + .../node_modules/lodash/fp/toNumber.js | 5 + .../node_modules/lodash/fp/toPairs.js | 5 + .../node_modules/lodash/fp/toPairsIn.js | 5 + .../node_modules/lodash/fp/toPath.js | 5 + .../node_modules/lodash/fp/toPlainObject.js | 5 + .../node_modules/lodash/fp/toSafeInteger.js | 5 + .../node_modules/lodash/fp/toString.js | 5 + .../node_modules/lodash/fp/toUpper.js | 5 + .../node_modules/lodash/fp/transform.js | 5 + .../node_modules/lodash/fp/trim.js | 5 + .../node_modules/lodash/fp/trimChars.js | 5 + .../node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + .../node_modules/lodash/fp/trimEnd.js | 5 + .../node_modules/lodash/fp/trimStart.js | 5 + .../node_modules/lodash/fp/truncate.js | 5 + .../node_modules/lodash/fp/unapply.js | 1 + .../node_modules/lodash/fp/unary.js | 5 + .../node_modules/lodash/fp/unescape.js | 5 + .../node_modules/lodash/fp/union.js | 5 + .../node_modules/lodash/fp/unionBy.js | 5 + .../node_modules/lodash/fp/unionWith.js | 5 + .../node_modules/lodash/fp/uniq.js | 5 + .../node_modules/lodash/fp/uniqBy.js | 5 + .../node_modules/lodash/fp/uniqWith.js | 5 + .../node_modules/lodash/fp/uniqueId.js | 5 + .../node_modules/lodash/fp/unnest.js | 1 + .../node_modules/lodash/fp/unset.js | 5 + .../node_modules/lodash/fp/unzip.js | 5 + .../node_modules/lodash/fp/unzipWith.js | 5 + .../node_modules/lodash/fp/update.js | 5 + .../node_modules/lodash/fp/updateWith.js | 5 + .../node_modules/lodash/fp/upperCase.js | 5 + .../node_modules/lodash/fp/upperFirst.js | 5 + .../node_modules/lodash/fp/useWith.js | 1 + .../node_modules/lodash/fp/util.js | 2 + .../node_modules/lodash/fp/value.js | 5 + .../node_modules/lodash/fp/valueOf.js | 5 + .../node_modules/lodash/fp/values.js | 5 + .../node_modules/lodash/fp/valuesIn.js | 5 + .../node_modules/lodash/fp/where.js | 1 + .../node_modules/lodash/fp/whereEq.js | 1 + .../node_modules/lodash/fp/without.js | 5 + .../node_modules/lodash/fp/words.js | 5 + .../node_modules/lodash/fp/wrap.js | 5 + .../node_modules/lodash/fp/wrapperAt.js | 5 + .../node_modules/lodash/fp/wrapperChain.js | 5 + .../node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + .../node_modules/lodash/fp/wrapperValue.js | 5 + .../node_modules/lodash/fp/xor.js | 5 + .../node_modules/lodash/fp/xorBy.js | 5 + .../node_modules/lodash/fp/xorWith.js | 5 + .../node_modules/lodash/fp/zip.js | 5 + .../node_modules/lodash/fp/zipAll.js | 5 + .../node_modules/lodash/fp/zipObj.js | 1 + .../node_modules/lodash/fp/zipObject.js | 5 + .../node_modules/lodash/fp/zipObjectDeep.js | 5 + .../node_modules/lodash/fp/zipWith.js | 5 + .../node_modules/lodash/fromPairs.js | 28 + .../node_modules/lodash/function.js | 25 + .../node_modules/lodash/functions.js | 31 + .../node_modules/lodash/functionsIn.js | 31 + .../babel-traverse/node_modules/lodash/get.js | 33 + .../node_modules/lodash/groupBy.js | 41 + .../babel-traverse/node_modules/lodash/gt.js | 29 + .../babel-traverse/node_modules/lodash/gte.js | 30 + .../babel-traverse/node_modules/lodash/has.js | 35 + .../node_modules/lodash/hasIn.js | 34 + .../node_modules/lodash/head.js | 23 + .../node_modules/lodash/identity.js | 21 + .../node_modules/lodash/inRange.js | 55 + .../node_modules/lodash/includes.js | 53 + .../node_modules/lodash/index.js | 1 + .../node_modules/lodash/indexOf.js | 42 + .../node_modules/lodash/initial.js | 22 + .../node_modules/lodash/intersection.js | 30 + .../node_modules/lodash/intersectionBy.js | 45 + .../node_modules/lodash/intersectionWith.js | 41 + .../node_modules/lodash/invert.js | 42 + .../node_modules/lodash/invertBy.js | 56 + .../node_modules/lodash/invoke.js | 24 + .../node_modules/lodash/invokeMap.js | 41 + .../node_modules/lodash/isArguments.js | 36 + .../node_modules/lodash/isArray.js | 26 + .../node_modules/lodash/isArrayBuffer.js | 27 + .../node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + .../node_modules/lodash/isBoolean.js | 29 + .../node_modules/lodash/isBuffer.js | 38 + .../node_modules/lodash/isDate.js | 27 + .../node_modules/lodash/isElement.js | 25 + .../node_modules/lodash/isEmpty.js | 77 + .../node_modules/lodash/isEqual.js | 35 + .../node_modules/lodash/isEqualWith.js | 41 + .../node_modules/lodash/isError.js | 36 + .../node_modules/lodash/isFinite.js | 36 + .../node_modules/lodash/isFunction.js | 37 + .../node_modules/lodash/isInteger.js | 33 + .../node_modules/lodash/isLength.js | 35 + .../node_modules/lodash/isMap.js | 27 + .../node_modules/lodash/isMatch.js | 36 + .../node_modules/lodash/isMatchWith.js | 41 + .../node_modules/lodash/isNaN.js | 38 + .../node_modules/lodash/isNative.js | 40 + .../node_modules/lodash/isNil.js | 25 + .../node_modules/lodash/isNull.js | 22 + .../node_modules/lodash/isNumber.js | 38 + .../node_modules/lodash/isObject.js | 31 + .../node_modules/lodash/isObjectLike.js | 29 + .../node_modules/lodash/isPlainObject.js | 62 + .../node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash/isSafeInteger.js | 37 + .../node_modules/lodash/isSet.js | 27 + .../node_modules/lodash/isString.js | 30 + .../node_modules/lodash/isSymbol.js | 29 + .../node_modules/lodash/isTypedArray.js | 27 + .../node_modules/lodash/isUndefined.js | 22 + .../node_modules/lodash/isWeakMap.js | 28 + .../node_modules/lodash/isWeakSet.js | 28 + .../node_modules/lodash/iteratee.js | 53 + .../node_modules/lodash/join.js | 26 + .../node_modules/lodash/kebabCase.js | 28 + .../node_modules/lodash/keyBy.js | 36 + .../node_modules/lodash/keys.js | 37 + .../node_modules/lodash/keysIn.js | 32 + .../node_modules/lodash/lang.js | 58 + .../node_modules/lodash/last.js | 20 + .../node_modules/lodash/lastIndexOf.js | 46 + .../node_modules/lodash/lodash.js | 17107 ++++++++++++++++ .../node_modules/lodash/lodash.min.js | 137 + .../node_modules/lodash/lowerCase.js | 27 + .../node_modules/lodash/lowerFirst.js | 22 + .../babel-traverse/node_modules/lodash/lt.js | 29 + .../babel-traverse/node_modules/lodash/lte.js | 30 + .../babel-traverse/node_modules/lodash/map.js | 53 + .../node_modules/lodash/mapKeys.js | 36 + .../node_modules/lodash/mapValues.js | 43 + .../node_modules/lodash/matches.js | 39 + .../node_modules/lodash/matchesProperty.js | 37 + .../node_modules/lodash/math.js | 17 + .../babel-traverse/node_modules/lodash/max.js | 29 + .../node_modules/lodash/maxBy.js | 34 + .../node_modules/lodash/mean.js | 22 + .../node_modules/lodash/meanBy.js | 31 + .../node_modules/lodash/memoize.js | 73 + .../node_modules/lodash/merge.js | 39 + .../node_modules/lodash/mergeWith.js | 39 + .../node_modules/lodash/method.js | 34 + .../node_modules/lodash/methodOf.js | 33 + .../babel-traverse/node_modules/lodash/min.js | 29 + .../node_modules/lodash/minBy.js | 34 + .../node_modules/lodash/mixin.js | 74 + .../node_modules/lodash/multiply.js | 22 + .../node_modules/lodash/negate.js | 40 + .../node_modules/lodash/next.js | 35 + .../node_modules/lodash/noop.js | 17 + .../babel-traverse/node_modules/lodash/now.js | 23 + .../babel-traverse/node_modules/lodash/nth.js | 29 + .../node_modules/lodash/nthArg.js | 32 + .../node_modules/lodash/number.js | 5 + .../node_modules/lodash/object.js | 49 + .../node_modules/lodash/omit.js | 57 + .../node_modules/lodash/omitBy.js | 29 + .../node_modules/lodash/once.js | 25 + .../node_modules/lodash/orderBy.js | 47 + .../node_modules/lodash/over.js | 24 + .../node_modules/lodash/overArgs.js | 61 + .../node_modules/lodash/overEvery.js | 30 + .../node_modules/lodash/overSome.js | 30 + .../node_modules/lodash/package.json | 66 + .../babel-traverse/node_modules/lodash/pad.js | 49 + .../node_modules/lodash/padEnd.js | 39 + .../node_modules/lodash/padStart.js | 39 + .../node_modules/lodash/parseInt.js | 43 + .../node_modules/lodash/partial.js | 50 + .../node_modules/lodash/partialRight.js | 49 + .../node_modules/lodash/partition.js | 43 + .../node_modules/lodash/pick.js | 25 + .../node_modules/lodash/pickBy.js | 37 + .../node_modules/lodash/plant.js | 48 + .../node_modules/lodash/property.js | 32 + .../node_modules/lodash/propertyOf.js | 30 + .../node_modules/lodash/pull.js | 29 + .../node_modules/lodash/pullAll.js | 29 + .../node_modules/lodash/pullAllBy.js | 33 + .../node_modules/lodash/pullAllWith.js | 32 + .../node_modules/lodash/pullAt.js | 43 + .../node_modules/lodash/random.js | 82 + .../node_modules/lodash/range.js | 46 + .../node_modules/lodash/rangeRight.js | 41 + .../node_modules/lodash/rearg.js | 33 + .../node_modules/lodash/reduce.js | 51 + .../node_modules/lodash/reduceRight.js | 36 + .../node_modules/lodash/reject.js | 46 + .../node_modules/lodash/remove.js | 53 + .../node_modules/lodash/repeat.js | 37 + .../node_modules/lodash/replace.js | 29 + .../node_modules/lodash/rest.js | 40 + .../node_modules/lodash/result.js | 56 + .../node_modules/lodash/reverse.js | 34 + .../node_modules/lodash/round.js | 26 + .../node_modules/lodash/sample.js | 24 + .../node_modules/lodash/sampleSize.js | 37 + .../babel-traverse/node_modules/lodash/seq.js | 16 + .../babel-traverse/node_modules/lodash/set.js | 35 + .../node_modules/lodash/setWith.js | 32 + .../node_modules/lodash/shuffle.js | 25 + .../node_modules/lodash/size.js | 46 + .../node_modules/lodash/slice.js | 37 + .../node_modules/lodash/snakeCase.js | 28 + .../node_modules/lodash/some.js | 51 + .../node_modules/lodash/sortBy.js | 48 + .../node_modules/lodash/sortedIndex.js | 24 + .../node_modules/lodash/sortedIndexBy.js | 33 + .../node_modules/lodash/sortedIndexOf.js | 31 + .../node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + .../node_modules/lodash/sortedUniq.js | 24 + .../node_modules/lodash/sortedUniqBy.js | 26 + .../node_modules/lodash/split.js | 52 + .../node_modules/lodash/spread.js | 63 + .../node_modules/lodash/startCase.js | 29 + .../node_modules/lodash/startsWith.js | 39 + .../node_modules/lodash/string.js | 33 + .../node_modules/lodash/stubArray.js | 23 + .../node_modules/lodash/stubFalse.js | 18 + .../node_modules/lodash/stubObject.js | 23 + .../node_modules/lodash/stubString.js | 18 + .../node_modules/lodash/stubTrue.js | 18 + .../node_modules/lodash/subtract.js | 22 + .../babel-traverse/node_modules/lodash/sum.js | 24 + .../node_modules/lodash/sumBy.js | 33 + .../node_modules/lodash/tail.js | 22 + .../node_modules/lodash/take.js | 37 + .../node_modules/lodash/takeRight.js | 39 + .../node_modules/lodash/takeRightWhile.js | 45 + .../node_modules/lodash/takeWhile.js | 45 + .../babel-traverse/node_modules/lodash/tap.js | 29 + .../node_modules/lodash/template.js | 238 + .../node_modules/lodash/templateSettings.js | 67 + .../node_modules/lodash/throttle.js | 69 + .../node_modules/lodash/thru.js | 28 + .../node_modules/lodash/times.js | 51 + .../node_modules/lodash/toArray.js | 58 + .../node_modules/lodash/toFinite.js | 42 + .../node_modules/lodash/toInteger.js | 36 + .../node_modules/lodash/toIterator.js | 23 + .../node_modules/lodash/toJSON.js | 1 + .../node_modules/lodash/toLength.js | 38 + .../node_modules/lodash/toLower.js | 28 + .../node_modules/lodash/toNumber.js | 66 + .../node_modules/lodash/toPairs.js | 30 + .../node_modules/lodash/toPairsIn.js | 30 + .../node_modules/lodash/toPath.js | 33 + .../node_modules/lodash/toPlainObject.js | 32 + .../node_modules/lodash/toSafeInteger.js | 37 + .../node_modules/lodash/toString.js | 28 + .../node_modules/lodash/toUpper.js | 28 + .../node_modules/lodash/transform.js | 65 + .../node_modules/lodash/trim.js | 49 + .../node_modules/lodash/trimEnd.js | 43 + .../node_modules/lodash/trimStart.js | 43 + .../node_modules/lodash/truncate.js | 111 + .../node_modules/lodash/unary.js | 22 + .../node_modules/lodash/unescape.js | 34 + .../node_modules/lodash/union.js | 26 + .../node_modules/lodash/unionBy.js | 39 + .../node_modules/lodash/unionWith.js | 34 + .../node_modules/lodash/uniq.js | 25 + .../node_modules/lodash/uniqBy.js | 31 + .../node_modules/lodash/uniqWith.js | 28 + .../node_modules/lodash/uniqueId.js | 28 + .../node_modules/lodash/unset.js | 34 + .../node_modules/lodash/unzip.js | 45 + .../node_modules/lodash/unzipWith.js | 39 + .../node_modules/lodash/update.js | 35 + .../node_modules/lodash/updateWith.js | 33 + .../node_modules/lodash/upperCase.js | 27 + .../node_modules/lodash/upperFirst.js | 22 + .../node_modules/lodash/util.js | 34 + .../node_modules/lodash/value.js | 1 + .../node_modules/lodash/valueOf.js | 1 + .../node_modules/lodash/values.js | 34 + .../node_modules/lodash/valuesIn.js | 32 + .../node_modules/lodash/without.js | 31 + .../node_modules/lodash/words.js | 35 + .../node_modules/lodash/wrap.js | 30 + .../node_modules/lodash/wrapperAt.js | 48 + .../node_modules/lodash/wrapperChain.js | 34 + .../node_modules/lodash/wrapperLodash.js | 147 + .../node_modules/lodash/wrapperReverse.js | 44 + .../node_modules/lodash/wrapperValue.js | 21 + .../babel-traverse/node_modules/lodash/xor.js | 28 + .../node_modules/lodash/xorBy.js | 39 + .../node_modules/lodash/xorWith.js | 34 + .../babel-traverse/node_modules/lodash/zip.js | 22 + .../node_modules/lodash/zipObject.js | 24 + .../node_modules/lodash/zipObjectDeep.js | 23 + .../node_modules/lodash/zipWith.js | 32 + node_modules/babel-traverse/package.json | 23 +- .../babel-types/node_modules/lodash/LICENSE | 47 + .../babel-types/node_modules/lodash/README.md | 39 + .../node_modules/lodash/_DataView.js | 7 + .../babel-types/node_modules/lodash/_Hash.js | 32 + .../node_modules/lodash/_LazyWrapper.js | 28 + .../node_modules/lodash/_ListCache.js | 32 + .../node_modules/lodash/_LodashWrapper.js | 22 + .../babel-types/node_modules/lodash/_Map.js | 7 + .../node_modules/lodash/_MapCache.js | 32 + .../node_modules/lodash/_Promise.js | 7 + .../babel-types/node_modules/lodash/_Set.js | 7 + .../node_modules/lodash/_SetCache.js | 27 + .../babel-types/node_modules/lodash/_Stack.js | 27 + .../node_modules/lodash/_Symbol.js | 6 + .../node_modules/lodash/_Uint8Array.js | 6 + .../node_modules/lodash/_WeakMap.js | 7 + .../babel-types/node_modules/lodash/_apply.js | 21 + .../node_modules/lodash/_arrayAggregator.js | 22 + .../node_modules/lodash/_arrayEach.js | 22 + .../node_modules/lodash/_arrayEachRight.js | 21 + .../node_modules/lodash/_arrayEvery.js | 23 + .../node_modules/lodash/_arrayFilter.js | 25 + .../node_modules/lodash/_arrayIncludes.js | 17 + .../node_modules/lodash/_arrayIncludesWith.js | 22 + .../node_modules/lodash/_arrayLikeKeys.js | 49 + .../node_modules/lodash/_arrayMap.js | 21 + .../node_modules/lodash/_arrayPush.js | 20 + .../node_modules/lodash/_arrayReduce.js | 26 + .../node_modules/lodash/_arrayReduceRight.js | 24 + .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash/_arraySome.js | 23 + .../node_modules/lodash/_asciiSize.js | 12 + .../node_modules/lodash/_asciiToArray.js | 12 + .../node_modules/lodash/_asciiWords.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 20 + .../node_modules/lodash/_assignValue.js | 28 + .../node_modules/lodash/_assocIndexOf.js | 21 + .../node_modules/lodash/_baseAggregator.js | 21 + .../node_modules/lodash/_baseAssign.js | 17 + .../node_modules/lodash/_baseAssignIn.js | 17 + .../node_modules/lodash/_baseAssignValue.js | 25 + .../node_modules/lodash/_baseAt.js | 23 + .../node_modules/lodash/_baseClamp.js | 22 + .../node_modules/lodash/_baseClone.js | 171 + .../node_modules/lodash/_baseConforms.js | 18 + .../node_modules/lodash/_baseConformsTo.js | 27 + .../node_modules/lodash/_baseCreate.js | 30 + .../node_modules/lodash/_baseDelay.js | 21 + .../node_modules/lodash/_baseDifference.js | 67 + .../node_modules/lodash/_baseEach.js | 14 + .../node_modules/lodash/_baseEachRight.js | 14 + .../node_modules/lodash/_baseEvery.js | 21 + .../node_modules/lodash/_baseExtremum.js | 32 + .../node_modules/lodash/_baseFill.js | 32 + .../node_modules/lodash/_baseFilter.js | 21 + .../node_modules/lodash/_baseFindIndex.js | 24 + .../node_modules/lodash/_baseFindKey.js | 23 + .../node_modules/lodash/_baseFlatten.js | 38 + .../node_modules/lodash/_baseFor.js | 16 + .../node_modules/lodash/_baseForOwn.js | 16 + .../node_modules/lodash/_baseForOwnRight.js | 16 + .../node_modules/lodash/_baseForRight.js | 15 + .../node_modules/lodash/_baseFunctions.js | 19 + .../node_modules/lodash/_baseGet.js | 24 + .../node_modules/lodash/_baseGetAllKeys.js | 20 + .../node_modules/lodash/_baseGetTag.js | 28 + .../node_modules/lodash/_baseGt.js | 14 + .../node_modules/lodash/_baseHas.js | 19 + .../node_modules/lodash/_baseHasIn.js | 13 + .../node_modules/lodash/_baseInRange.js | 18 + .../node_modules/lodash/_baseIndexOf.js | 20 + .../node_modules/lodash/_baseIndexOfWith.js | 23 + .../node_modules/lodash/_baseIntersection.js | 74 + .../node_modules/lodash/_baseInverter.js | 21 + .../node_modules/lodash/_baseInvoke.js | 24 + .../node_modules/lodash/_baseIsArguments.js | 18 + .../node_modules/lodash/_baseIsArrayBuffer.js | 17 + .../node_modules/lodash/_baseIsDate.js | 18 + .../node_modules/lodash/_baseIsEqual.js | 28 + .../node_modules/lodash/_baseIsEqualDeep.js | 83 + .../node_modules/lodash/_baseIsMap.js | 18 + .../node_modules/lodash/_baseIsMatch.js | 62 + .../node_modules/lodash/_baseIsNaN.js | 12 + .../node_modules/lodash/_baseIsNative.js | 47 + .../node_modules/lodash/_baseIsRegExp.js | 18 + .../node_modules/lodash/_baseIsSet.js | 18 + .../node_modules/lodash/_baseIsTypedArray.js | 60 + .../node_modules/lodash/_baseIteratee.js | 31 + .../node_modules/lodash/_baseKeys.js | 30 + .../node_modules/lodash/_baseKeysIn.js | 33 + .../node_modules/lodash/_baseLodash.js | 10 + .../node_modules/lodash/_baseLt.js | 14 + .../node_modules/lodash/_baseMap.js | 22 + .../node_modules/lodash/_baseMatches.js | 22 + .../lodash/_baseMatchesProperty.js | 33 + .../node_modules/lodash/_baseMean.js | 20 + .../node_modules/lodash/_baseMerge.js | 42 + .../node_modules/lodash/_baseMergeDeep.js | 94 + .../node_modules/lodash/_baseNth.js | 20 + .../node_modules/lodash/_baseOrderBy.js | 34 + .../node_modules/lodash/_basePick.js | 19 + .../node_modules/lodash/_basePickBy.js | 30 + .../node_modules/lodash/_baseProperty.js | 14 + .../node_modules/lodash/_basePropertyDeep.js | 16 + .../node_modules/lodash/_basePropertyOf.js | 14 + .../node_modules/lodash/_basePullAll.js | 51 + .../node_modules/lodash/_basePullAt.js | 37 + .../node_modules/lodash/_baseRandom.js | 18 + .../node_modules/lodash/_baseRange.js | 28 + .../node_modules/lodash/_baseReduce.js | 23 + .../node_modules/lodash/_baseRepeat.js | 35 + .../node_modules/lodash/_baseRest.js | 17 + .../node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash/_baseSet.js | 47 + .../node_modules/lodash/_baseSetData.js | 17 + .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash/_baseSlice.js | 31 + .../node_modules/lodash/_baseSome.js | 22 + .../node_modules/lodash/_baseSortBy.js | 21 + .../node_modules/lodash/_baseSortedIndex.js | 42 + .../node_modules/lodash/_baseSortedIndexBy.js | 64 + .../node_modules/lodash/_baseSortedUniq.js | 30 + .../node_modules/lodash/_baseSum.js | 24 + .../node_modules/lodash/_baseTimes.js | 20 + .../node_modules/lodash/_baseToNumber.js | 24 + .../node_modules/lodash/_baseToPairs.js | 18 + .../node_modules/lodash/_baseToString.js | 37 + .../node_modules/lodash/_baseUnary.js | 14 + .../node_modules/lodash/_baseUniq.js | 72 + .../node_modules/lodash/_baseUnset.js | 20 + .../node_modules/lodash/_baseUpdate.js | 18 + .../node_modules/lodash/_baseValues.js | 19 + .../node_modules/lodash/_baseWhile.js | 26 + .../node_modules/lodash/_baseWrapperValue.js | 25 + .../node_modules/lodash/_baseXor.js | 36 + .../node_modules/lodash/_baseZipObject.js | 23 + .../node_modules/lodash/_cacheHas.js | 13 + .../lodash/_castArrayLikeObject.js | 14 + .../node_modules/lodash/_castFunction.js | 14 + .../node_modules/lodash/_castPath.js | 21 + .../node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash/_castSlice.js | 18 + .../node_modules/lodash/_charsEndIndex.js | 19 + .../node_modules/lodash/_charsStartIndex.js | 20 + .../node_modules/lodash/_cloneArrayBuffer.js | 16 + .../node_modules/lodash/_cloneBuffer.js | 35 + .../node_modules/lodash/_cloneDataView.js | 16 + .../node_modules/lodash/_cloneRegExp.js | 17 + .../node_modules/lodash/_cloneSymbol.js | 18 + .../node_modules/lodash/_cloneTypedArray.js | 16 + .../node_modules/lodash/_compareAscending.js | 41 + .../node_modules/lodash/_compareMultiple.js | 44 + .../node_modules/lodash/_composeArgs.js | 39 + .../node_modules/lodash/_composeArgsRight.js | 41 + .../node_modules/lodash/_copyArray.js | 20 + .../node_modules/lodash/_copyObject.js | 40 + .../node_modules/lodash/_copySymbols.js | 16 + .../node_modules/lodash/_copySymbolsIn.js | 16 + .../node_modules/lodash/_coreJsData.js | 6 + .../node_modules/lodash/_countHolders.js | 21 + .../node_modules/lodash/_createAggregator.js | 23 + .../node_modules/lodash/_createAssigner.js | 37 + .../node_modules/lodash/_createBaseEach.js | 32 + .../node_modules/lodash/_createBaseFor.js | 25 + .../node_modules/lodash/_createBind.js | 28 + .../node_modules/lodash/_createCaseFirst.js | 33 + .../node_modules/lodash/_createCompounder.js | 24 + .../node_modules/lodash/_createCtor.js | 37 + .../node_modules/lodash/_createCurry.js | 46 + .../node_modules/lodash/_createFind.js | 25 + .../node_modules/lodash/_createFlow.js | 78 + .../node_modules/lodash/_createHybrid.js | 92 + .../node_modules/lodash/_createInverter.js | 17 + .../lodash/_createMathOperation.js | 38 + .../node_modules/lodash/_createOver.js | 27 + .../node_modules/lodash/_createPadding.js | 33 + .../node_modules/lodash/_createPartial.js | 43 + .../node_modules/lodash/_createRange.js | 30 + .../node_modules/lodash/_createRecurry.js | 56 + .../lodash/_createRelationalOperation.js | 20 + .../node_modules/lodash/_createRound.js | 33 + .../node_modules/lodash/_createSet.js | 19 + .../node_modules/lodash/_createToPairs.js | 30 + .../node_modules/lodash/_createWrap.js | 106 + .../lodash/_customDefaultsAssignIn.js | 29 + .../lodash/_customDefaultsMerge.js | 28 + .../node_modules/lodash/_customOmitClone.js | 16 + .../node_modules/lodash/_deburrLetter.js | 71 + .../node_modules/lodash/_defineProperty.js | 11 + .../node_modules/lodash/_equalArrays.js | 83 + .../node_modules/lodash/_equalByTag.js | 112 + .../node_modules/lodash/_equalObjects.js | 89 + .../node_modules/lodash/_escapeHtmlChar.js | 21 + .../node_modules/lodash/_escapeStringChar.js | 22 + .../node_modules/lodash/_flatRest.js | 16 + .../node_modules/lodash/_freeGlobal.js | 4 + .../node_modules/lodash/_getAllKeys.js | 16 + .../node_modules/lodash/_getAllKeysIn.js | 17 + .../node_modules/lodash/_getData.js | 15 + .../node_modules/lodash/_getFuncName.js | 31 + .../node_modules/lodash/_getHolder.js | 13 + .../node_modules/lodash/_getMapData.js | 18 + .../node_modules/lodash/_getMatchData.js | 24 + .../node_modules/lodash/_getNative.js | 17 + .../node_modules/lodash/_getPrototype.js | 6 + .../node_modules/lodash/_getRawTag.js | 46 + .../node_modules/lodash/_getSymbols.js | 30 + .../node_modules/lodash/_getSymbolsIn.js | 25 + .../node_modules/lodash/_getTag.js | 58 + .../node_modules/lodash/_getValue.js | 13 + .../node_modules/lodash/_getView.js | 33 + .../node_modules/lodash/_getWrapDetails.js | 17 + .../node_modules/lodash/_hasPath.js | 39 + .../node_modules/lodash/_hasUnicode.js | 26 + .../node_modules/lodash/_hasUnicodeWord.js | 15 + .../node_modules/lodash/_hashClear.js | 15 + .../node_modules/lodash/_hashDelete.js | 17 + .../node_modules/lodash/_hashGet.js | 30 + .../node_modules/lodash/_hashHas.js | 23 + .../node_modules/lodash/_hashSet.js | 23 + .../node_modules/lodash/_initCloneArray.js | 26 + .../node_modules/lodash/_initCloneByTag.js | 77 + .../node_modules/lodash/_initCloneObject.js | 18 + .../node_modules/lodash/_insertWrapDetails.js | 23 + .../node_modules/lodash/_isFlattenable.js | 20 + .../node_modules/lodash/_isIndex.js | 25 + .../node_modules/lodash/_isIterateeCall.js | 30 + .../babel-types/node_modules/lodash/_isKey.js | 29 + .../node_modules/lodash/_isKeyable.js | 15 + .../node_modules/lodash/_isLaziable.js | 28 + .../node_modules/lodash/_isMaskable.js | 14 + .../node_modules/lodash/_isMasked.js | 20 + .../node_modules/lodash/_isPrototype.js | 18 + .../lodash/_isStrictComparable.js | 15 + .../node_modules/lodash/_iteratorToArray.js | 18 + .../node_modules/lodash/_lazyClone.js | 23 + .../node_modules/lodash/_lazyReverse.js | 23 + .../node_modules/lodash/_lazyValue.js | 69 + .../node_modules/lodash/_listCacheClear.js | 13 + .../node_modules/lodash/_listCacheDelete.js | 35 + .../node_modules/lodash/_listCacheGet.js | 19 + .../node_modules/lodash/_listCacheHas.js | 16 + .../node_modules/lodash/_listCacheSet.js | 26 + .../node_modules/lodash/_mapCacheClear.js | 21 + .../node_modules/lodash/_mapCacheDelete.js | 18 + .../node_modules/lodash/_mapCacheGet.js | 16 + .../node_modules/lodash/_mapCacheHas.js | 16 + .../node_modules/lodash/_mapCacheSet.js | 22 + .../node_modules/lodash/_mapToArray.js | 18 + .../lodash/_matchesStrictComparable.js | 20 + .../node_modules/lodash/_memoizeCapped.js | 26 + .../node_modules/lodash/_mergeData.js | 90 + .../node_modules/lodash/_metaMap.js | 6 + .../node_modules/lodash/_nativeCreate.js | 6 + .../node_modules/lodash/_nativeKeys.js | 6 + .../node_modules/lodash/_nativeKeysIn.js | 20 + .../node_modules/lodash/_nodeUtil.js | 30 + .../node_modules/lodash/_objectToString.js | 22 + .../node_modules/lodash/_overArg.js | 15 + .../node_modules/lodash/_overRest.js | 36 + .../node_modules/lodash/_parent.js | 16 + .../node_modules/lodash/_reEscape.js | 4 + .../node_modules/lodash/_reEvaluate.js | 4 + .../node_modules/lodash/_reInterpolate.js | 4 + .../node_modules/lodash/_realNames.js | 4 + .../node_modules/lodash/_reorder.js | 29 + .../node_modules/lodash/_replaceHolders.js | 29 + .../babel-types/node_modules/lodash/_root.js | 9 + .../node_modules/lodash/_safeGet.js | 17 + .../node_modules/lodash/_setCacheAdd.js | 19 + .../node_modules/lodash/_setCacheHas.js | 14 + .../node_modules/lodash/_setData.js | 20 + .../node_modules/lodash/_setToArray.js | 18 + .../node_modules/lodash/_setToPairs.js | 18 + .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 21 + .../node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../node_modules/lodash/_stackClear.js | 15 + .../node_modules/lodash/_stackDelete.js | 18 + .../node_modules/lodash/_stackGet.js | 14 + .../node_modules/lodash/_stackHas.js | 14 + .../node_modules/lodash/_stackSet.js | 34 + .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringSize.js | 18 + .../node_modules/lodash/_stringToArray.js | 18 + .../node_modules/lodash/_stringToPath.js | 27 + .../babel-types/node_modules/lodash/_toKey.js | 21 + .../node_modules/lodash/_toSource.js | 26 + .../node_modules/lodash/_unescapeHtmlChar.js | 21 + .../node_modules/lodash/_unicodeSize.js | 44 + .../node_modules/lodash/_unicodeToArray.js | 40 + .../node_modules/lodash/_unicodeWords.js | 69 + .../node_modules/lodash/_updateWrapDetails.js | 46 + .../node_modules/lodash/_wrapperClone.js | 23 + .../babel-types/node_modules/lodash/add.js | 22 + .../babel-types/node_modules/lodash/after.js | 42 + .../babel-types/node_modules/lodash/array.js | 67 + .../babel-types/node_modules/lodash/ary.js | 29 + .../babel-types/node_modules/lodash/assign.js | 58 + .../node_modules/lodash/assignIn.js | 40 + .../node_modules/lodash/assignInWith.js | 38 + .../node_modules/lodash/assignWith.js | 37 + .../babel-types/node_modules/lodash/at.js | 23 + .../node_modules/lodash/attempt.js | 35 + .../babel-types/node_modules/lodash/before.js | 40 + .../babel-types/node_modules/lodash/bind.js | 57 + .../node_modules/lodash/bindAll.js | 41 + .../node_modules/lodash/bindKey.js | 68 + .../node_modules/lodash/camelCase.js | 29 + .../node_modules/lodash/capitalize.js | 23 + .../node_modules/lodash/castArray.js | 44 + .../babel-types/node_modules/lodash/ceil.js | 26 + .../babel-types/node_modules/lodash/chain.js | 38 + .../babel-types/node_modules/lodash/chunk.js | 50 + .../babel-types/node_modules/lodash/clamp.js | 39 + .../babel-types/node_modules/lodash/clone.js | 36 + .../node_modules/lodash/cloneDeep.js | 29 + .../node_modules/lodash/cloneDeepWith.js | 40 + .../node_modules/lodash/cloneWith.js | 42 + .../node_modules/lodash/collection.js | 30 + .../babel-types/node_modules/lodash/commit.js | 33 + .../node_modules/lodash/compact.js | 31 + .../babel-types/node_modules/lodash/concat.js | 43 + .../babel-types/node_modules/lodash/cond.js | 60 + .../node_modules/lodash/conforms.js | 35 + .../node_modules/lodash/conformsTo.js | 32 + .../node_modules/lodash/constant.js | 26 + .../babel-types/node_modules/lodash/core.js | 3854 ++++ .../node_modules/lodash/core.min.js | 29 + .../node_modules/lodash/countBy.js | 40 + .../babel-types/node_modules/lodash/create.js | 43 + .../babel-types/node_modules/lodash/curry.js | 57 + .../node_modules/lodash/curryRight.js | 54 + .../babel-types/node_modules/lodash/date.js | 3 + .../node_modules/lodash/debounce.js | 190 + .../babel-types/node_modules/lodash/deburr.js | 45 + .../node_modules/lodash/defaultTo.js | 25 + .../node_modules/lodash/defaults.js | 64 + .../node_modules/lodash/defaultsDeep.js | 30 + .../babel-types/node_modules/lodash/defer.js | 26 + .../babel-types/node_modules/lodash/delay.js | 28 + .../node_modules/lodash/difference.js | 33 + .../node_modules/lodash/differenceBy.js | 44 + .../node_modules/lodash/differenceWith.js | 40 + .../babel-types/node_modules/lodash/divide.js | 22 + .../babel-types/node_modules/lodash/drop.js | 38 + .../node_modules/lodash/dropRight.js | 39 + .../node_modules/lodash/dropRightWhile.js | 45 + .../node_modules/lodash/dropWhile.js | 45 + .../babel-types/node_modules/lodash/each.js | 1 + .../node_modules/lodash/eachRight.js | 1 + .../node_modules/lodash/endsWith.js | 43 + .../node_modules/lodash/entries.js | 1 + .../node_modules/lodash/entriesIn.js | 1 + .../babel-types/node_modules/lodash/eq.js | 37 + .../babel-types/node_modules/lodash/escape.js | 43 + .../node_modules/lodash/escapeRegExp.js | 32 + .../babel-types/node_modules/lodash/every.js | 56 + .../babel-types/node_modules/lodash/extend.js | 1 + .../node_modules/lodash/extendWith.js | 1 + .../babel-types/node_modules/lodash/fill.js | 45 + .../babel-types/node_modules/lodash/filter.js | 48 + .../babel-types/node_modules/lodash/find.js | 42 + .../node_modules/lodash/findIndex.js | 55 + .../node_modules/lodash/findKey.js | 44 + .../node_modules/lodash/findLast.js | 25 + .../node_modules/lodash/findLastIndex.js | 59 + .../node_modules/lodash/findLastKey.js | 44 + .../babel-types/node_modules/lodash/first.js | 1 + .../node_modules/lodash/flatMap.js | 29 + .../node_modules/lodash/flatMapDeep.js | 31 + .../node_modules/lodash/flatMapDepth.js | 31 + .../node_modules/lodash/flatten.js | 22 + .../node_modules/lodash/flattenDeep.js | 25 + .../node_modules/lodash/flattenDepth.js | 33 + .../babel-types/node_modules/lodash/flip.js | 28 + .../babel-types/node_modules/lodash/floor.js | 26 + .../babel-types/node_modules/lodash/flow.js | 27 + .../node_modules/lodash/flowRight.js | 26 + .../node_modules/lodash/forEach.js | 41 + .../node_modules/lodash/forEachRight.js | 31 + .../babel-types/node_modules/lodash/forIn.js | 39 + .../node_modules/lodash/forInRight.js | 37 + .../babel-types/node_modules/lodash/forOwn.js | 36 + .../node_modules/lodash/forOwnRight.js | 34 + .../babel-types/node_modules/lodash/fp.js | 2 + .../babel-types/node_modules/lodash/fp/F.js | 1 + .../babel-types/node_modules/lodash/fp/T.js | 1 + .../babel-types/node_modules/lodash/fp/__.js | 1 + .../node_modules/lodash/fp/_baseConvert.js | 569 + .../node_modules/lodash/fp/_convertBrowser.js | 18 + .../node_modules/lodash/fp/_falseOptions.js | 7 + .../node_modules/lodash/fp/_mapping.js | 358 + .../node_modules/lodash/fp/_util.js | 16 + .../babel-types/node_modules/lodash/fp/add.js | 5 + .../node_modules/lodash/fp/after.js | 5 + .../babel-types/node_modules/lodash/fp/all.js | 1 + .../node_modules/lodash/fp/allPass.js | 1 + .../node_modules/lodash/fp/always.js | 1 + .../babel-types/node_modules/lodash/fp/any.js | 1 + .../node_modules/lodash/fp/anyPass.js | 1 + .../node_modules/lodash/fp/apply.js | 1 + .../node_modules/lodash/fp/array.js | 2 + .../babel-types/node_modules/lodash/fp/ary.js | 5 + .../node_modules/lodash/fp/assign.js | 5 + .../node_modules/lodash/fp/assignAll.js | 5 + .../node_modules/lodash/fp/assignAllWith.js | 5 + .../node_modules/lodash/fp/assignIn.js | 5 + .../node_modules/lodash/fp/assignInAll.js | 5 + .../node_modules/lodash/fp/assignInAllWith.js | 5 + .../node_modules/lodash/fp/assignInWith.js | 5 + .../node_modules/lodash/fp/assignWith.js | 5 + .../node_modules/lodash/fp/assoc.js | 1 + .../node_modules/lodash/fp/assocPath.js | 1 + .../babel-types/node_modules/lodash/fp/at.js | 5 + .../node_modules/lodash/fp/attempt.js | 5 + .../node_modules/lodash/fp/before.js | 5 + .../node_modules/lodash/fp/bind.js | 5 + .../node_modules/lodash/fp/bindAll.js | 5 + .../node_modules/lodash/fp/bindKey.js | 5 + .../node_modules/lodash/fp/camelCase.js | 5 + .../node_modules/lodash/fp/capitalize.js | 5 + .../node_modules/lodash/fp/castArray.js | 5 + .../node_modules/lodash/fp/ceil.js | 5 + .../node_modules/lodash/fp/chain.js | 5 + .../node_modules/lodash/fp/chunk.js | 5 + .../node_modules/lodash/fp/clamp.js | 5 + .../node_modules/lodash/fp/clone.js | 5 + .../node_modules/lodash/fp/cloneDeep.js | 5 + .../node_modules/lodash/fp/cloneDeepWith.js | 5 + .../node_modules/lodash/fp/cloneWith.js | 5 + .../node_modules/lodash/fp/collection.js | 2 + .../node_modules/lodash/fp/commit.js | 5 + .../node_modules/lodash/fp/compact.js | 5 + .../node_modules/lodash/fp/complement.js | 1 + .../node_modules/lodash/fp/compose.js | 1 + .../node_modules/lodash/fp/concat.js | 5 + .../node_modules/lodash/fp/cond.js | 5 + .../node_modules/lodash/fp/conforms.js | 1 + .../node_modules/lodash/fp/conformsTo.js | 5 + .../node_modules/lodash/fp/constant.js | 5 + .../node_modules/lodash/fp/contains.js | 1 + .../node_modules/lodash/fp/convert.js | 18 + .../node_modules/lodash/fp/countBy.js | 5 + .../node_modules/lodash/fp/create.js | 5 + .../node_modules/lodash/fp/curry.js | 5 + .../node_modules/lodash/fp/curryN.js | 5 + .../node_modules/lodash/fp/curryRight.js | 5 + .../node_modules/lodash/fp/curryRightN.js | 5 + .../node_modules/lodash/fp/date.js | 2 + .../node_modules/lodash/fp/debounce.js | 5 + .../node_modules/lodash/fp/deburr.js | 5 + .../node_modules/lodash/fp/defaultTo.js | 5 + .../node_modules/lodash/fp/defaults.js | 5 + .../node_modules/lodash/fp/defaultsAll.js | 5 + .../node_modules/lodash/fp/defaultsDeep.js | 5 + .../node_modules/lodash/fp/defaultsDeepAll.js | 5 + .../node_modules/lodash/fp/defer.js | 5 + .../node_modules/lodash/fp/delay.js | 5 + .../node_modules/lodash/fp/difference.js | 5 + .../node_modules/lodash/fp/differenceBy.js | 5 + .../node_modules/lodash/fp/differenceWith.js | 5 + .../node_modules/lodash/fp/dissoc.js | 1 + .../node_modules/lodash/fp/dissocPath.js | 1 + .../node_modules/lodash/fp/divide.js | 5 + .../node_modules/lodash/fp/drop.js | 5 + .../node_modules/lodash/fp/dropLast.js | 1 + .../node_modules/lodash/fp/dropLastWhile.js | 1 + .../node_modules/lodash/fp/dropRight.js | 5 + .../node_modules/lodash/fp/dropRightWhile.js | 5 + .../node_modules/lodash/fp/dropWhile.js | 5 + .../node_modules/lodash/fp/each.js | 1 + .../node_modules/lodash/fp/eachRight.js | 1 + .../node_modules/lodash/fp/endsWith.js | 5 + .../node_modules/lodash/fp/entries.js | 1 + .../node_modules/lodash/fp/entriesIn.js | 1 + .../babel-types/node_modules/lodash/fp/eq.js | 5 + .../node_modules/lodash/fp/equals.js | 1 + .../node_modules/lodash/fp/escape.js | 5 + .../node_modules/lodash/fp/escapeRegExp.js | 5 + .../node_modules/lodash/fp/every.js | 5 + .../node_modules/lodash/fp/extend.js | 1 + .../node_modules/lodash/fp/extendAll.js | 1 + .../node_modules/lodash/fp/extendAllWith.js | 1 + .../node_modules/lodash/fp/extendWith.js | 1 + .../node_modules/lodash/fp/fill.js | 5 + .../node_modules/lodash/fp/filter.js | 5 + .../node_modules/lodash/fp/find.js | 5 + .../node_modules/lodash/fp/findFrom.js | 5 + .../node_modules/lodash/fp/findIndex.js | 5 + .../node_modules/lodash/fp/findIndexFrom.js | 5 + .../node_modules/lodash/fp/findKey.js | 5 + .../node_modules/lodash/fp/findLast.js | 5 + .../node_modules/lodash/fp/findLastFrom.js | 5 + .../node_modules/lodash/fp/findLastIndex.js | 5 + .../lodash/fp/findLastIndexFrom.js | 5 + .../node_modules/lodash/fp/findLastKey.js | 5 + .../node_modules/lodash/fp/first.js | 1 + .../node_modules/lodash/fp/flatMap.js | 5 + .../node_modules/lodash/fp/flatMapDeep.js | 5 + .../node_modules/lodash/fp/flatMapDepth.js | 5 + .../node_modules/lodash/fp/flatten.js | 5 + .../node_modules/lodash/fp/flattenDeep.js | 5 + .../node_modules/lodash/fp/flattenDepth.js | 5 + .../node_modules/lodash/fp/flip.js | 5 + .../node_modules/lodash/fp/floor.js | 5 + .../node_modules/lodash/fp/flow.js | 5 + .../node_modules/lodash/fp/flowRight.js | 5 + .../node_modules/lodash/fp/forEach.js | 5 + .../node_modules/lodash/fp/forEachRight.js | 5 + .../node_modules/lodash/fp/forIn.js | 5 + .../node_modules/lodash/fp/forInRight.js | 5 + .../node_modules/lodash/fp/forOwn.js | 5 + .../node_modules/lodash/fp/forOwnRight.js | 5 + .../node_modules/lodash/fp/fromPairs.js | 5 + .../node_modules/lodash/fp/function.js | 2 + .../node_modules/lodash/fp/functions.js | 5 + .../node_modules/lodash/fp/functionsIn.js | 5 + .../babel-types/node_modules/lodash/fp/get.js | 5 + .../node_modules/lodash/fp/getOr.js | 5 + .../node_modules/lodash/fp/groupBy.js | 5 + .../babel-types/node_modules/lodash/fp/gt.js | 5 + .../babel-types/node_modules/lodash/fp/gte.js | 5 + .../babel-types/node_modules/lodash/fp/has.js | 5 + .../node_modules/lodash/fp/hasIn.js | 5 + .../node_modules/lodash/fp/head.js | 5 + .../node_modules/lodash/fp/identical.js | 1 + .../node_modules/lodash/fp/identity.js | 5 + .../node_modules/lodash/fp/inRange.js | 5 + .../node_modules/lodash/fp/includes.js | 5 + .../node_modules/lodash/fp/includesFrom.js | 5 + .../node_modules/lodash/fp/indexBy.js | 1 + .../node_modules/lodash/fp/indexOf.js | 5 + .../node_modules/lodash/fp/indexOfFrom.js | 5 + .../node_modules/lodash/fp/init.js | 1 + .../node_modules/lodash/fp/initial.js | 5 + .../node_modules/lodash/fp/intersection.js | 5 + .../node_modules/lodash/fp/intersectionBy.js | 5 + .../lodash/fp/intersectionWith.js | 5 + .../node_modules/lodash/fp/invert.js | 5 + .../node_modules/lodash/fp/invertBy.js | 5 + .../node_modules/lodash/fp/invertObj.js | 1 + .../node_modules/lodash/fp/invoke.js | 5 + .../node_modules/lodash/fp/invokeArgs.js | 5 + .../node_modules/lodash/fp/invokeArgsMap.js | 5 + .../node_modules/lodash/fp/invokeMap.js | 5 + .../node_modules/lodash/fp/isArguments.js | 5 + .../node_modules/lodash/fp/isArray.js | 5 + .../node_modules/lodash/fp/isArrayBuffer.js | 5 + .../node_modules/lodash/fp/isArrayLike.js | 5 + .../lodash/fp/isArrayLikeObject.js | 5 + .../node_modules/lodash/fp/isBoolean.js | 5 + .../node_modules/lodash/fp/isBuffer.js | 5 + .../node_modules/lodash/fp/isDate.js | 5 + .../node_modules/lodash/fp/isElement.js | 5 + .../node_modules/lodash/fp/isEmpty.js | 5 + .../node_modules/lodash/fp/isEqual.js | 5 + .../node_modules/lodash/fp/isEqualWith.js | 5 + .../node_modules/lodash/fp/isError.js | 5 + .../node_modules/lodash/fp/isFinite.js | 5 + .../node_modules/lodash/fp/isFunction.js | 5 + .../node_modules/lodash/fp/isInteger.js | 5 + .../node_modules/lodash/fp/isLength.js | 5 + .../node_modules/lodash/fp/isMap.js | 5 + .../node_modules/lodash/fp/isMatch.js | 5 + .../node_modules/lodash/fp/isMatchWith.js | 5 + .../node_modules/lodash/fp/isNaN.js | 5 + .../node_modules/lodash/fp/isNative.js | 5 + .../node_modules/lodash/fp/isNil.js | 5 + .../node_modules/lodash/fp/isNull.js | 5 + .../node_modules/lodash/fp/isNumber.js | 5 + .../node_modules/lodash/fp/isObject.js | 5 + .../node_modules/lodash/fp/isObjectLike.js | 5 + .../node_modules/lodash/fp/isPlainObject.js | 5 + .../node_modules/lodash/fp/isRegExp.js | 5 + .../node_modules/lodash/fp/isSafeInteger.js | 5 + .../node_modules/lodash/fp/isSet.js | 5 + .../node_modules/lodash/fp/isString.js | 5 + .../node_modules/lodash/fp/isSymbol.js | 5 + .../node_modules/lodash/fp/isTypedArray.js | 5 + .../node_modules/lodash/fp/isUndefined.js | 5 + .../node_modules/lodash/fp/isWeakMap.js | 5 + .../node_modules/lodash/fp/isWeakSet.js | 5 + .../node_modules/lodash/fp/iteratee.js | 5 + .../node_modules/lodash/fp/join.js | 5 + .../node_modules/lodash/fp/juxt.js | 1 + .../node_modules/lodash/fp/kebabCase.js | 5 + .../node_modules/lodash/fp/keyBy.js | 5 + .../node_modules/lodash/fp/keys.js | 5 + .../node_modules/lodash/fp/keysIn.js | 5 + .../node_modules/lodash/fp/lang.js | 2 + .../node_modules/lodash/fp/last.js | 5 + .../node_modules/lodash/fp/lastIndexOf.js | 5 + .../node_modules/lodash/fp/lastIndexOfFrom.js | 5 + .../node_modules/lodash/fp/lowerCase.js | 5 + .../node_modules/lodash/fp/lowerFirst.js | 5 + .../babel-types/node_modules/lodash/fp/lt.js | 5 + .../babel-types/node_modules/lodash/fp/lte.js | 5 + .../babel-types/node_modules/lodash/fp/map.js | 5 + .../node_modules/lodash/fp/mapKeys.js | 5 + .../node_modules/lodash/fp/mapValues.js | 5 + .../node_modules/lodash/fp/matches.js | 1 + .../node_modules/lodash/fp/matchesProperty.js | 5 + .../node_modules/lodash/fp/math.js | 2 + .../babel-types/node_modules/lodash/fp/max.js | 5 + .../node_modules/lodash/fp/maxBy.js | 5 + .../node_modules/lodash/fp/mean.js | 5 + .../node_modules/lodash/fp/meanBy.js | 5 + .../node_modules/lodash/fp/memoize.js | 5 + .../node_modules/lodash/fp/merge.js | 5 + .../node_modules/lodash/fp/mergeAll.js | 5 + .../node_modules/lodash/fp/mergeAllWith.js | 5 + .../node_modules/lodash/fp/mergeWith.js | 5 + .../node_modules/lodash/fp/method.js | 5 + .../node_modules/lodash/fp/methodOf.js | 5 + .../babel-types/node_modules/lodash/fp/min.js | 5 + .../node_modules/lodash/fp/minBy.js | 5 + .../node_modules/lodash/fp/mixin.js | 5 + .../node_modules/lodash/fp/multiply.js | 5 + .../node_modules/lodash/fp/nAry.js | 1 + .../node_modules/lodash/fp/negate.js | 5 + .../node_modules/lodash/fp/next.js | 5 + .../node_modules/lodash/fp/noop.js | 5 + .../babel-types/node_modules/lodash/fp/now.js | 5 + .../babel-types/node_modules/lodash/fp/nth.js | 5 + .../node_modules/lodash/fp/nthArg.js | 5 + .../node_modules/lodash/fp/number.js | 2 + .../node_modules/lodash/fp/object.js | 2 + .../node_modules/lodash/fp/omit.js | 5 + .../node_modules/lodash/fp/omitAll.js | 1 + .../node_modules/lodash/fp/omitBy.js | 5 + .../node_modules/lodash/fp/once.js | 5 + .../node_modules/lodash/fp/orderBy.js | 5 + .../node_modules/lodash/fp/over.js | 5 + .../node_modules/lodash/fp/overArgs.js | 5 + .../node_modules/lodash/fp/overEvery.js | 5 + .../node_modules/lodash/fp/overSome.js | 5 + .../babel-types/node_modules/lodash/fp/pad.js | 5 + .../node_modules/lodash/fp/padChars.js | 5 + .../node_modules/lodash/fp/padCharsEnd.js | 5 + .../node_modules/lodash/fp/padCharsStart.js | 5 + .../node_modules/lodash/fp/padEnd.js | 5 + .../node_modules/lodash/fp/padStart.js | 5 + .../node_modules/lodash/fp/parseInt.js | 5 + .../node_modules/lodash/fp/partial.js | 5 + .../node_modules/lodash/fp/partialRight.js | 5 + .../node_modules/lodash/fp/partition.js | 5 + .../node_modules/lodash/fp/path.js | 1 + .../node_modules/lodash/fp/pathEq.js | 1 + .../node_modules/lodash/fp/pathOr.js | 1 + .../node_modules/lodash/fp/paths.js | 1 + .../node_modules/lodash/fp/pick.js | 5 + .../node_modules/lodash/fp/pickAll.js | 1 + .../node_modules/lodash/fp/pickBy.js | 5 + .../node_modules/lodash/fp/pipe.js | 1 + .../node_modules/lodash/fp/placeholder.js | 6 + .../node_modules/lodash/fp/plant.js | 5 + .../node_modules/lodash/fp/pluck.js | 1 + .../node_modules/lodash/fp/prop.js | 1 + .../node_modules/lodash/fp/propEq.js | 1 + .../node_modules/lodash/fp/propOr.js | 1 + .../node_modules/lodash/fp/property.js | 1 + .../node_modules/lodash/fp/propertyOf.js | 5 + .../node_modules/lodash/fp/props.js | 1 + .../node_modules/lodash/fp/pull.js | 5 + .../node_modules/lodash/fp/pullAll.js | 5 + .../node_modules/lodash/fp/pullAllBy.js | 5 + .../node_modules/lodash/fp/pullAllWith.js | 5 + .../node_modules/lodash/fp/pullAt.js | 5 + .../node_modules/lodash/fp/random.js | 5 + .../node_modules/lodash/fp/range.js | 5 + .../node_modules/lodash/fp/rangeRight.js | 5 + .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + .../node_modules/lodash/fp/rearg.js | 5 + .../node_modules/lodash/fp/reduce.js | 5 + .../node_modules/lodash/fp/reduceRight.js | 5 + .../node_modules/lodash/fp/reject.js | 5 + .../node_modules/lodash/fp/remove.js | 5 + .../node_modules/lodash/fp/repeat.js | 5 + .../node_modules/lodash/fp/replace.js | 5 + .../node_modules/lodash/fp/rest.js | 5 + .../node_modules/lodash/fp/restFrom.js | 5 + .../node_modules/lodash/fp/result.js | 5 + .../node_modules/lodash/fp/reverse.js | 5 + .../node_modules/lodash/fp/round.js | 5 + .../node_modules/lodash/fp/sample.js | 5 + .../node_modules/lodash/fp/sampleSize.js | 5 + .../babel-types/node_modules/lodash/fp/seq.js | 2 + .../babel-types/node_modules/lodash/fp/set.js | 5 + .../node_modules/lodash/fp/setWith.js | 5 + .../node_modules/lodash/fp/shuffle.js | 5 + .../node_modules/lodash/fp/size.js | 5 + .../node_modules/lodash/fp/slice.js | 5 + .../node_modules/lodash/fp/snakeCase.js | 5 + .../node_modules/lodash/fp/some.js | 5 + .../node_modules/lodash/fp/sortBy.js | 5 + .../node_modules/lodash/fp/sortedIndex.js | 5 + .../node_modules/lodash/fp/sortedIndexBy.js | 5 + .../node_modules/lodash/fp/sortedIndexOf.js | 5 + .../node_modules/lodash/fp/sortedLastIndex.js | 5 + .../lodash/fp/sortedLastIndexBy.js | 5 + .../lodash/fp/sortedLastIndexOf.js | 5 + .../node_modules/lodash/fp/sortedUniq.js | 5 + .../node_modules/lodash/fp/sortedUniqBy.js | 5 + .../node_modules/lodash/fp/split.js | 5 + .../node_modules/lodash/fp/spread.js | 5 + .../node_modules/lodash/fp/spreadFrom.js | 5 + .../node_modules/lodash/fp/startCase.js | 5 + .../node_modules/lodash/fp/startsWith.js | 5 + .../node_modules/lodash/fp/string.js | 2 + .../node_modules/lodash/fp/stubArray.js | 5 + .../node_modules/lodash/fp/stubFalse.js | 5 + .../node_modules/lodash/fp/stubObject.js | 5 + .../node_modules/lodash/fp/stubString.js | 5 + .../node_modules/lodash/fp/stubTrue.js | 5 + .../node_modules/lodash/fp/subtract.js | 5 + .../babel-types/node_modules/lodash/fp/sum.js | 5 + .../node_modules/lodash/fp/sumBy.js | 5 + .../lodash/fp/symmetricDifference.js | 1 + .../lodash/fp/symmetricDifferenceBy.js | 1 + .../lodash/fp/symmetricDifferenceWith.js | 1 + .../node_modules/lodash/fp/tail.js | 5 + .../node_modules/lodash/fp/take.js | 5 + .../node_modules/lodash/fp/takeLast.js | 1 + .../node_modules/lodash/fp/takeLastWhile.js | 1 + .../node_modules/lodash/fp/takeRight.js | 5 + .../node_modules/lodash/fp/takeRightWhile.js | 5 + .../node_modules/lodash/fp/takeWhile.js | 5 + .../babel-types/node_modules/lodash/fp/tap.js | 5 + .../node_modules/lodash/fp/template.js | 5 + .../lodash/fp/templateSettings.js | 5 + .../node_modules/lodash/fp/throttle.js | 5 + .../node_modules/lodash/fp/thru.js | 5 + .../node_modules/lodash/fp/times.js | 5 + .../node_modules/lodash/fp/toArray.js | 5 + .../node_modules/lodash/fp/toFinite.js | 5 + .../node_modules/lodash/fp/toInteger.js | 5 + .../node_modules/lodash/fp/toIterator.js | 5 + .../node_modules/lodash/fp/toJSON.js | 5 + .../node_modules/lodash/fp/toLength.js | 5 + .../node_modules/lodash/fp/toLower.js | 5 + .../node_modules/lodash/fp/toNumber.js | 5 + .../node_modules/lodash/fp/toPairs.js | 5 + .../node_modules/lodash/fp/toPairsIn.js | 5 + .../node_modules/lodash/fp/toPath.js | 5 + .../node_modules/lodash/fp/toPlainObject.js | 5 + .../node_modules/lodash/fp/toSafeInteger.js | 5 + .../node_modules/lodash/fp/toString.js | 5 + .../node_modules/lodash/fp/toUpper.js | 5 + .../node_modules/lodash/fp/transform.js | 5 + .../node_modules/lodash/fp/trim.js | 5 + .../node_modules/lodash/fp/trimChars.js | 5 + .../node_modules/lodash/fp/trimCharsEnd.js | 5 + .../node_modules/lodash/fp/trimCharsStart.js | 5 + .../node_modules/lodash/fp/trimEnd.js | 5 + .../node_modules/lodash/fp/trimStart.js | 5 + .../node_modules/lodash/fp/truncate.js | 5 + .../node_modules/lodash/fp/unapply.js | 1 + .../node_modules/lodash/fp/unary.js | 5 + .../node_modules/lodash/fp/unescape.js | 5 + .../node_modules/lodash/fp/union.js | 5 + .../node_modules/lodash/fp/unionBy.js | 5 + .../node_modules/lodash/fp/unionWith.js | 5 + .../node_modules/lodash/fp/uniq.js | 5 + .../node_modules/lodash/fp/uniqBy.js | 5 + .../node_modules/lodash/fp/uniqWith.js | 5 + .../node_modules/lodash/fp/uniqueId.js | 5 + .../node_modules/lodash/fp/unnest.js | 1 + .../node_modules/lodash/fp/unset.js | 5 + .../node_modules/lodash/fp/unzip.js | 5 + .../node_modules/lodash/fp/unzipWith.js | 5 + .../node_modules/lodash/fp/update.js | 5 + .../node_modules/lodash/fp/updateWith.js | 5 + .../node_modules/lodash/fp/upperCase.js | 5 + .../node_modules/lodash/fp/upperFirst.js | 5 + .../node_modules/lodash/fp/useWith.js | 1 + .../node_modules/lodash/fp/util.js | 2 + .../node_modules/lodash/fp/value.js | 5 + .../node_modules/lodash/fp/valueOf.js | 5 + .../node_modules/lodash/fp/values.js | 5 + .../node_modules/lodash/fp/valuesIn.js | 5 + .../node_modules/lodash/fp/where.js | 1 + .../node_modules/lodash/fp/whereEq.js | 1 + .../node_modules/lodash/fp/without.js | 5 + .../node_modules/lodash/fp/words.js | 5 + .../node_modules/lodash/fp/wrap.js | 5 + .../node_modules/lodash/fp/wrapperAt.js | 5 + .../node_modules/lodash/fp/wrapperChain.js | 5 + .../node_modules/lodash/fp/wrapperLodash.js | 5 + .../node_modules/lodash/fp/wrapperReverse.js | 5 + .../node_modules/lodash/fp/wrapperValue.js | 5 + .../babel-types/node_modules/lodash/fp/xor.js | 5 + .../node_modules/lodash/fp/xorBy.js | 5 + .../node_modules/lodash/fp/xorWith.js | 5 + .../babel-types/node_modules/lodash/fp/zip.js | 5 + .../node_modules/lodash/fp/zipAll.js | 5 + .../node_modules/lodash/fp/zipObj.js | 1 + .../node_modules/lodash/fp/zipObject.js | 5 + .../node_modules/lodash/fp/zipObjectDeep.js | 5 + .../node_modules/lodash/fp/zipWith.js | 5 + .../node_modules/lodash/fromPairs.js | 28 + .../node_modules/lodash/function.js | 25 + .../node_modules/lodash/functions.js | 31 + .../node_modules/lodash/functionsIn.js | 31 + .../babel-types/node_modules/lodash/get.js | 33 + .../node_modules/lodash/groupBy.js | 41 + .../babel-types/node_modules/lodash/gt.js | 29 + .../babel-types/node_modules/lodash/gte.js | 30 + .../babel-types/node_modules/lodash/has.js | 35 + .../babel-types/node_modules/lodash/hasIn.js | 34 + .../babel-types/node_modules/lodash/head.js | 23 + .../node_modules/lodash/identity.js | 21 + .../node_modules/lodash/inRange.js | 55 + .../node_modules/lodash/includes.js | 53 + .../babel-types/node_modules/lodash/index.js | 1 + .../node_modules/lodash/indexOf.js | 42 + .../node_modules/lodash/initial.js | 22 + .../node_modules/lodash/intersection.js | 30 + .../node_modules/lodash/intersectionBy.js | 45 + .../node_modules/lodash/intersectionWith.js | 41 + .../babel-types/node_modules/lodash/invert.js | 42 + .../node_modules/lodash/invertBy.js | 56 + .../babel-types/node_modules/lodash/invoke.js | 24 + .../node_modules/lodash/invokeMap.js | 41 + .../node_modules/lodash/isArguments.js | 36 + .../node_modules/lodash/isArray.js | 26 + .../node_modules/lodash/isArrayBuffer.js | 27 + .../node_modules/lodash/isArrayLike.js | 33 + .../node_modules/lodash/isArrayLikeObject.js | 33 + .../node_modules/lodash/isBoolean.js | 29 + .../node_modules/lodash/isBuffer.js | 38 + .../babel-types/node_modules/lodash/isDate.js | 27 + .../node_modules/lodash/isElement.js | 25 + .../node_modules/lodash/isEmpty.js | 77 + .../node_modules/lodash/isEqual.js | 35 + .../node_modules/lodash/isEqualWith.js | 41 + .../node_modules/lodash/isError.js | 36 + .../node_modules/lodash/isFinite.js | 36 + .../node_modules/lodash/isFunction.js | 37 + .../node_modules/lodash/isInteger.js | 33 + .../node_modules/lodash/isLength.js | 35 + .../babel-types/node_modules/lodash/isMap.js | 27 + .../node_modules/lodash/isMatch.js | 36 + .../node_modules/lodash/isMatchWith.js | 41 + .../babel-types/node_modules/lodash/isNaN.js | 38 + .../node_modules/lodash/isNative.js | 40 + .../babel-types/node_modules/lodash/isNil.js | 25 + .../babel-types/node_modules/lodash/isNull.js | 22 + .../node_modules/lodash/isNumber.js | 38 + .../node_modules/lodash/isObject.js | 31 + .../node_modules/lodash/isObjectLike.js | 29 + .../node_modules/lodash/isPlainObject.js | 62 + .../node_modules/lodash/isRegExp.js | 27 + .../node_modules/lodash/isSafeInteger.js | 37 + .../babel-types/node_modules/lodash/isSet.js | 27 + .../node_modules/lodash/isString.js | 30 + .../node_modules/lodash/isSymbol.js | 29 + .../node_modules/lodash/isTypedArray.js | 27 + .../node_modules/lodash/isUndefined.js | 22 + .../node_modules/lodash/isWeakMap.js | 28 + .../node_modules/lodash/isWeakSet.js | 28 + .../node_modules/lodash/iteratee.js | 53 + .../babel-types/node_modules/lodash/join.js | 26 + .../node_modules/lodash/kebabCase.js | 28 + .../babel-types/node_modules/lodash/keyBy.js | 36 + .../babel-types/node_modules/lodash/keys.js | 37 + .../babel-types/node_modules/lodash/keysIn.js | 32 + .../babel-types/node_modules/lodash/lang.js | 58 + .../babel-types/node_modules/lodash/last.js | 20 + .../node_modules/lodash/lastIndexOf.js | 46 + .../babel-types/node_modules/lodash/lodash.js | 17107 ++++++++++++++++ .../node_modules/lodash/lodash.min.js | 137 + .../node_modules/lodash/lowerCase.js | 27 + .../node_modules/lodash/lowerFirst.js | 22 + .../babel-types/node_modules/lodash/lt.js | 29 + .../babel-types/node_modules/lodash/lte.js | 30 + .../babel-types/node_modules/lodash/map.js | 53 + .../node_modules/lodash/mapKeys.js | 36 + .../node_modules/lodash/mapValues.js | 43 + .../node_modules/lodash/matches.js | 39 + .../node_modules/lodash/matchesProperty.js | 37 + .../babel-types/node_modules/lodash/math.js | 17 + .../babel-types/node_modules/lodash/max.js | 29 + .../babel-types/node_modules/lodash/maxBy.js | 34 + .../babel-types/node_modules/lodash/mean.js | 22 + .../babel-types/node_modules/lodash/meanBy.js | 31 + .../node_modules/lodash/memoize.js | 73 + .../babel-types/node_modules/lodash/merge.js | 39 + .../node_modules/lodash/mergeWith.js | 39 + .../babel-types/node_modules/lodash/method.js | 34 + .../node_modules/lodash/methodOf.js | 33 + .../babel-types/node_modules/lodash/min.js | 29 + .../babel-types/node_modules/lodash/minBy.js | 34 + .../babel-types/node_modules/lodash/mixin.js | 74 + .../node_modules/lodash/multiply.js | 22 + .../babel-types/node_modules/lodash/negate.js | 40 + .../babel-types/node_modules/lodash/next.js | 35 + .../babel-types/node_modules/lodash/noop.js | 17 + .../babel-types/node_modules/lodash/now.js | 23 + .../babel-types/node_modules/lodash/nth.js | 29 + .../babel-types/node_modules/lodash/nthArg.js | 32 + .../babel-types/node_modules/lodash/number.js | 5 + .../babel-types/node_modules/lodash/object.js | 49 + .../babel-types/node_modules/lodash/omit.js | 57 + .../babel-types/node_modules/lodash/omitBy.js | 29 + .../babel-types/node_modules/lodash/once.js | 25 + .../node_modules/lodash/orderBy.js | 47 + .../babel-types/node_modules/lodash/over.js | 24 + .../node_modules/lodash/overArgs.js | 61 + .../node_modules/lodash/overEvery.js | 30 + .../node_modules/lodash/overSome.js | 30 + .../node_modules/lodash/package.json | 66 + .../babel-types/node_modules/lodash/pad.js | 49 + .../babel-types/node_modules/lodash/padEnd.js | 39 + .../node_modules/lodash/padStart.js | 39 + .../node_modules/lodash/parseInt.js | 43 + .../node_modules/lodash/partial.js | 50 + .../node_modules/lodash/partialRight.js | 49 + .../node_modules/lodash/partition.js | 43 + .../babel-types/node_modules/lodash/pick.js | 25 + .../babel-types/node_modules/lodash/pickBy.js | 37 + .../babel-types/node_modules/lodash/plant.js | 48 + .../node_modules/lodash/property.js | 32 + .../node_modules/lodash/propertyOf.js | 30 + .../babel-types/node_modules/lodash/pull.js | 29 + .../node_modules/lodash/pullAll.js | 29 + .../node_modules/lodash/pullAllBy.js | 33 + .../node_modules/lodash/pullAllWith.js | 32 + .../babel-types/node_modules/lodash/pullAt.js | 43 + .../babel-types/node_modules/lodash/random.js | 82 + .../babel-types/node_modules/lodash/range.js | 46 + .../node_modules/lodash/rangeRight.js | 41 + .../babel-types/node_modules/lodash/rearg.js | 33 + .../babel-types/node_modules/lodash/reduce.js | 51 + .../node_modules/lodash/reduceRight.js | 36 + .../babel-types/node_modules/lodash/reject.js | 46 + .../babel-types/node_modules/lodash/remove.js | 53 + .../babel-types/node_modules/lodash/repeat.js | 37 + .../node_modules/lodash/replace.js | 29 + .../babel-types/node_modules/lodash/rest.js | 40 + .../babel-types/node_modules/lodash/result.js | 56 + .../node_modules/lodash/reverse.js | 34 + .../babel-types/node_modules/lodash/round.js | 26 + .../babel-types/node_modules/lodash/sample.js | 24 + .../node_modules/lodash/sampleSize.js | 37 + .../babel-types/node_modules/lodash/seq.js | 16 + .../babel-types/node_modules/lodash/set.js | 35 + .../node_modules/lodash/setWith.js | 32 + .../node_modules/lodash/shuffle.js | 25 + .../babel-types/node_modules/lodash/size.js | 46 + .../babel-types/node_modules/lodash/slice.js | 37 + .../node_modules/lodash/snakeCase.js | 28 + .../babel-types/node_modules/lodash/some.js | 51 + .../babel-types/node_modules/lodash/sortBy.js | 48 + .../node_modules/lodash/sortedIndex.js | 24 + .../node_modules/lodash/sortedIndexBy.js | 33 + .../node_modules/lodash/sortedIndexOf.js | 31 + .../node_modules/lodash/sortedLastIndex.js | 25 + .../node_modules/lodash/sortedLastIndexBy.js | 33 + .../node_modules/lodash/sortedLastIndexOf.js | 31 + .../node_modules/lodash/sortedUniq.js | 24 + .../node_modules/lodash/sortedUniqBy.js | 26 + .../babel-types/node_modules/lodash/split.js | 52 + .../babel-types/node_modules/lodash/spread.js | 63 + .../node_modules/lodash/startCase.js | 29 + .../node_modules/lodash/startsWith.js | 39 + .../babel-types/node_modules/lodash/string.js | 33 + .../node_modules/lodash/stubArray.js | 23 + .../node_modules/lodash/stubFalse.js | 18 + .../node_modules/lodash/stubObject.js | 23 + .../node_modules/lodash/stubString.js | 18 + .../node_modules/lodash/stubTrue.js | 18 + .../node_modules/lodash/subtract.js | 22 + .../babel-types/node_modules/lodash/sum.js | 24 + .../babel-types/node_modules/lodash/sumBy.js | 33 + .../babel-types/node_modules/lodash/tail.js | 22 + .../babel-types/node_modules/lodash/take.js | 37 + .../node_modules/lodash/takeRight.js | 39 + .../node_modules/lodash/takeRightWhile.js | 45 + .../node_modules/lodash/takeWhile.js | 45 + .../babel-types/node_modules/lodash/tap.js | 29 + .../node_modules/lodash/template.js | 238 + .../node_modules/lodash/templateSettings.js | 67 + .../node_modules/lodash/throttle.js | 69 + .../babel-types/node_modules/lodash/thru.js | 28 + .../babel-types/node_modules/lodash/times.js | 51 + .../node_modules/lodash/toArray.js | 58 + .../node_modules/lodash/toFinite.js | 42 + .../node_modules/lodash/toInteger.js | 36 + .../node_modules/lodash/toIterator.js | 23 + .../babel-types/node_modules/lodash/toJSON.js | 1 + .../node_modules/lodash/toLength.js | 38 + .../node_modules/lodash/toLower.js | 28 + .../node_modules/lodash/toNumber.js | 66 + .../node_modules/lodash/toPairs.js | 30 + .../node_modules/lodash/toPairsIn.js | 30 + .../babel-types/node_modules/lodash/toPath.js | 33 + .../node_modules/lodash/toPlainObject.js | 32 + .../node_modules/lodash/toSafeInteger.js | 37 + .../node_modules/lodash/toString.js | 28 + .../node_modules/lodash/toUpper.js | 28 + .../node_modules/lodash/transform.js | 65 + .../babel-types/node_modules/lodash/trim.js | 49 + .../node_modules/lodash/trimEnd.js | 43 + .../node_modules/lodash/trimStart.js | 43 + .../node_modules/lodash/truncate.js | 111 + .../babel-types/node_modules/lodash/unary.js | 22 + .../node_modules/lodash/unescape.js | 34 + .../babel-types/node_modules/lodash/union.js | 26 + .../node_modules/lodash/unionBy.js | 39 + .../node_modules/lodash/unionWith.js | 34 + .../babel-types/node_modules/lodash/uniq.js | 25 + .../babel-types/node_modules/lodash/uniqBy.js | 31 + .../node_modules/lodash/uniqWith.js | 28 + .../node_modules/lodash/uniqueId.js | 28 + .../babel-types/node_modules/lodash/unset.js | 34 + .../babel-types/node_modules/lodash/unzip.js | 45 + .../node_modules/lodash/unzipWith.js | 39 + .../babel-types/node_modules/lodash/update.js | 35 + .../node_modules/lodash/updateWith.js | 33 + .../node_modules/lodash/upperCase.js | 27 + .../node_modules/lodash/upperFirst.js | 22 + .../babel-types/node_modules/lodash/util.js | 34 + .../babel-types/node_modules/lodash/value.js | 1 + .../node_modules/lodash/valueOf.js | 1 + .../babel-types/node_modules/lodash/values.js | 34 + .../node_modules/lodash/valuesIn.js | 32 + .../node_modules/lodash/without.js | 31 + .../babel-types/node_modules/lodash/words.js | 35 + .../babel-types/node_modules/lodash/wrap.js | 30 + .../node_modules/lodash/wrapperAt.js | 48 + .../node_modules/lodash/wrapperChain.js | 34 + .../node_modules/lodash/wrapperLodash.js | 147 + .../node_modules/lodash/wrapperReverse.js | 44 + .../node_modules/lodash/wrapperValue.js | 21 + .../babel-types/node_modules/lodash/xor.js | 28 + .../babel-types/node_modules/lodash/xorBy.js | 39 + .../node_modules/lodash/xorWith.js | 34 + .../babel-types/node_modules/lodash/zip.js | 22 + .../node_modules/lodash/zipObject.js | 24 + .../node_modules/lodash/zipObjectDeep.js | 23 + .../node_modules/lodash/zipWith.js | 32 + node_modules/babel-types/package.json | 23 +- node_modules/babylon/package.json | 23 +- node_modules/balanced-match/package.json | 23 +- node_modules/bcrypt-pbkdf/CONTRIBUTING.md | 13 + node_modules/bcrypt-pbkdf/LICENSE | 66 + node_modules/bcrypt-pbkdf/README.md | 10 +- node_modules/bcrypt-pbkdf/package.json | 20 +- node_modules/boom/LICENSE | 29 - node_modules/boom/README.md | 760 - node_modules/boom/lib/index.js | 433 - node_modules/boom/package.json | 61 - node_modules/brace-expansion/package.json | 23 +- node_modules/braces/LICENSE | 21 - node_modules/braces/README.md | 248 - node_modules/braces/index.js | 399 - node_modules/braces/package.json | 114 - .../browser-process-hrtime/.npmignore | 35 - node_modules/browser-process-hrtime/LICENSE | 9 + .../browser-process-hrtime/package.json | 12 +- node_modules/camelcase/package.json | 23 +- node_modules/caseless/package.json | 23 +- node_modules/chalk/package.json | 23 +- node_modules/clean-css/package.json | 24 +- node_modules/co/History.md | 172 - node_modules/co/LICENSE | 22 - node_modules/co/Readme.md | 212 - node_modules/co/index.js | 237 - node_modules/co/package.json | 66 - node_modules/color-convert/package.json | 23 +- node_modules/color-name/package.json | 23 +- node_modules/combined-stream/package.json | 22 +- node_modules/concat-map/package.json | 13 +- node_modules/convert-source-map/package.json | 27 +- node_modules/core-js/package.json | 24 +- node_modules/core-util-is/package.json | 25 +- node_modules/cryptiles/.npmignore | 3 - node_modules/cryptiles/LICENSE | 28 - node_modules/cryptiles/README.md | 19 - node_modules/cryptiles/lib/index.js | 88 - .../cryptiles/node_modules/boom/LICENSE | 29 - .../cryptiles/node_modules/boom/README.md | 784 - .../cryptiles/node_modules/boom/lib/index.js | 457 - .../cryptiles/node_modules/boom/package.json | 61 - node_modules/cryptiles/package.json | 61 - node_modules/cssom/lib/CSSSupportsRule.js | 36 + node_modules/cssom/lib/clone.js | 8 +- node_modules/cssom/lib/index.js | 31 +- node_modules/cssom/lib/parse.js | 79 +- node_modules/cssom/package.json | 22 +- node_modules/cssstyle/.eslintignore | 3 + node_modules/cssstyle/.eslintrc.js | 50 + node_modules/cssstyle/.npmignore | 1 - node_modules/cssstyle/.travis.yml | 15 + node_modules/cssstyle/README.md | 40 +- .../cssstyle/lib/CSSStyleDeclaration.js | 436 +- .../cssstyle/lib/allExtraProperties.js | 248 + node_modules/cssstyle/lib/allProperties.js | 457 + node_modules/cssstyle/lib/constants.js | 6 + .../cssstyle/lib/implementedProperties.js | 90 + node_modules/cssstyle/lib/named_colors.json | 152 + node_modules/cssstyle/lib/parsers.js | 1071 +- node_modules/cssstyle/lib/properties.js | 4278 +--- .../lib/properties/alignmentBaseline.js | 12 - .../cssstyle/lib/properties/azimuth.js | 116 +- .../cssstyle/lib/properties/background.js | 23 +- .../lib/properties/backgroundAttachment.js | 32 +- .../cssstyle/lib/properties/backgroundClip.js | 12 - .../lib/properties/backgroundColor.js | 45 +- .../lib/properties/backgroundImage.js | 37 +- .../lib/properties/backgroundOrigin.js | 12 - .../lib/properties/backgroundPosition.js | 78 +- .../lib/properties/backgroundPositionX.js | 12 - .../lib/properties/backgroundPositionY.js | 12 - .../lib/properties/backgroundRepeat.js | 33 +- .../lib/properties/backgroundRepeatX.js | 12 - .../lib/properties/backgroundRepeatY.js | 12 - .../cssstyle/lib/properties/backgroundSize.js | 12 - .../cssstyle/lib/properties/baselineShift.js | 12 - .../cssstyle/lib/properties/border.js | 56 +- .../cssstyle/lib/properties/borderBottom.js | 20 +- .../lib/properties/borderBottomColor.js | 22 +- .../lib/properties/borderBottomLeftRadius.js | 12 - .../lib/properties/borderBottomRightRadius.js | 12 - .../lib/properties/borderBottomStyle.js | 28 +- .../lib/properties/borderBottomWidth.js | 22 +- .../cssstyle/lib/properties/borderCollapse.js | 33 +- .../cssstyle/lib/properties/borderColor.js | 32 +- .../cssstyle/lib/properties/borderImage.js | 12 - .../lib/properties/borderImageOutset.js | 12 - .../lib/properties/borderImageRepeat.js | 12 - .../lib/properties/borderImageSlice.js | 12 - .../lib/properties/borderImageSource.js | 12 - .../lib/properties/borderImageWidth.js | 12 - .../cssstyle/lib/properties/borderLeft.js | 20 +- .../lib/properties/borderLeftColor.js | 22 +- .../lib/properties/borderLeftStyle.js | 28 +- .../lib/properties/borderLeftWidth.js | 22 +- .../cssstyle/lib/properties/borderRadius.js | 12 - .../cssstyle/lib/properties/borderRight.js | 20 +- .../lib/properties/borderRightColor.js | 22 +- .../lib/properties/borderRightStyle.js | 28 +- .../lib/properties/borderRightWidth.js | 22 +- .../cssstyle/lib/properties/borderSpacing.js | 53 +- .../cssstyle/lib/properties/borderStyle.js | 37 +- .../cssstyle/lib/properties/borderTop.js | 19 +- .../cssstyle/lib/properties/borderTopColor.js | 22 +- .../lib/properties/borderTopLeftRadius.js | 12 - .../lib/properties/borderTopRightRadius.js | 12 - .../cssstyle/lib/properties/borderTopStyle.js | 28 +- .../cssstyle/lib/properties/borderTopWidth.js | 20 +- .../cssstyle/lib/properties/borderWidth.js | 59 +- .../cssstyle/lib/properties/bottom.js | 16 +- .../cssstyle/lib/properties/boxShadow.js | 12 - .../cssstyle/lib/properties/boxSizing.js | 12 - .../cssstyle/lib/properties/captionSide.js | 12 - node_modules/cssstyle/lib/properties/clear.js | 18 +- node_modules/cssstyle/lib/properties/clip.js | 76 +- node_modules/cssstyle/lib/properties/color.js | 16 +- .../lib/properties/colorInterpolation.js | 12 - .../properties/colorInterpolationFilters.js | 12 - .../cssstyle/lib/properties/colorProfile.js | 12 - .../cssstyle/lib/properties/colorRendering.js | 12 - .../cssstyle/lib/properties/content.js | 12 - .../lib/properties/counterIncrement.js | 12 - .../cssstyle/lib/properties/counterReset.js | 12 - .../cssstyle/lib/properties/cssFloat.js | 16 +- node_modules/cssstyle/lib/properties/cue.js | 12 - .../cssstyle/lib/properties/cueAfter.js | 12 - .../cssstyle/lib/properties/cueBefore.js | 12 - .../cssstyle/lib/properties/cursor.js | 12 - .../cssstyle/lib/properties/direction.js | 12 - .../cssstyle/lib/properties/display.js | 12 - .../lib/properties/dominantBaseline.js | 12 - .../cssstyle/lib/properties/elevation.js | 12 - .../cssstyle/lib/properties/emptyCells.js | 12 - .../lib/properties/enableBackground.js | 12 - node_modules/cssstyle/lib/properties/fill.js | 12 - .../cssstyle/lib/properties/fillOpacity.js | 12 - .../cssstyle/lib/properties/fillRule.js | 12 - .../cssstyle/lib/properties/filter.js | 12 - node_modules/cssstyle/lib/properties/flex.js | 45 + .../cssstyle/lib/properties/flexBasis.js | 28 + .../cssstyle/lib/properties/flexGrow.js | 19 + .../cssstyle/lib/properties/flexShrink.js | 19 + node_modules/cssstyle/lib/properties/float.js | 12 + .../cssstyle/lib/properties/floodColor.js | 16 +- .../cssstyle/lib/properties/floodOpacity.js | 12 - node_modules/cssstyle/lib/properties/font.js | 51 +- .../cssstyle/lib/properties/fontFamily.js | 42 +- .../cssstyle/lib/properties/fontSize.js | 29 +- .../cssstyle/lib/properties/fontSizeAdjust.js | 12 - .../cssstyle/lib/properties/fontStretch.js | 12 - .../cssstyle/lib/properties/fontStyle.js | 20 +- .../cssstyle/lib/properties/fontVariant.js | 18 +- .../cssstyle/lib/properties/fontWeight.js | 35 +- .../properties/glyphOrientationHorizontal.js | 12 - .../properties/glyphOrientationVertical.js | 12 - .../cssstyle/lib/properties/height.js | 30 +- .../cssstyle/lib/properties/imageRendering.js | 12 - .../cssstyle/lib/properties/kerning.js | 12 - node_modules/cssstyle/lib/properties/left.js | 16 +- .../cssstyle/lib/properties/letterSpacing.js | 12 - .../cssstyle/lib/properties/lightingColor.js | 16 +- .../cssstyle/lib/properties/lineHeight.js | 27 +- .../cssstyle/lib/properties/listStyle.js | 12 - .../cssstyle/lib/properties/listStyleImage.js | 12 - .../lib/properties/listStylePosition.js | 12 - .../cssstyle/lib/properties/listStyleType.js | 12 - .../cssstyle/lib/properties/margin.js | 89 +- .../cssstyle/lib/properties/marginBottom.js | 12 +- .../cssstyle/lib/properties/marginLeft.js | 12 +- .../cssstyle/lib/properties/marginRight.js | 12 +- .../cssstyle/lib/properties/marginTop.js | 12 +- .../cssstyle/lib/properties/marker.js | 12 - .../cssstyle/lib/properties/markerEnd.js | 12 - .../cssstyle/lib/properties/markerMid.js | 12 - .../cssstyle/lib/properties/markerOffset.js | 12 - .../cssstyle/lib/properties/markerStart.js | 12 - node_modules/cssstyle/lib/properties/marks.js | 12 - node_modules/cssstyle/lib/properties/mask.js | 12 - .../cssstyle/lib/properties/maxHeight.js | 12 - .../cssstyle/lib/properties/maxWidth.js | 12 - .../cssstyle/lib/properties/minHeight.js | 12 - .../cssstyle/lib/properties/minWidth.js | 12 - .../cssstyle/lib/properties/opacity.js | 16 +- .../cssstyle/lib/properties/orphans.js | 12 - .../cssstyle/lib/properties/outline.js | 12 - .../cssstyle/lib/properties/outlineColor.js | 16 +- .../cssstyle/lib/properties/outlineOffset.js | 12 - .../cssstyle/lib/properties/outlineStyle.js | 12 - .../cssstyle/lib/properties/outlineWidth.js | 12 - .../cssstyle/lib/properties/overflow.js | 12 - .../cssstyle/lib/properties/overflowX.js | 12 - .../cssstyle/lib/properties/overflowY.js | 12 - .../cssstyle/lib/properties/padding.js | 75 +- .../cssstyle/lib/properties/paddingBottom.js | 12 +- .../cssstyle/lib/properties/paddingLeft.js | 12 +- .../cssstyle/lib/properties/paddingRight.js | 12 +- .../cssstyle/lib/properties/paddingTop.js | 12 +- node_modules/cssstyle/lib/properties/page.js | 12 - .../cssstyle/lib/properties/pageBreakAfter.js | 12 - .../lib/properties/pageBreakBefore.js | 12 - .../lib/properties/pageBreakInside.js | 12 - node_modules/cssstyle/lib/properties/pause.js | 12 - .../cssstyle/lib/properties/pauseAfter.js | 12 - .../cssstyle/lib/properties/pauseBefore.js | 12 - node_modules/cssstyle/lib/properties/pitch.js | 12 - .../cssstyle/lib/properties/pitchRange.js | 12 - .../cssstyle/lib/properties/playDuring.js | 12 - .../cssstyle/lib/properties/pointerEvents.js | 12 - .../cssstyle/lib/properties/position.js | 12 - .../cssstyle/lib/properties/quotes.js | 12 - .../cssstyle/lib/properties/resize.js | 12 - .../cssstyle/lib/properties/richness.js | 12 - node_modules/cssstyle/lib/properties/right.js | 16 +- .../cssstyle/lib/properties/shapeRendering.js | 12 - node_modules/cssstyle/lib/properties/size.js | 12 - node_modules/cssstyle/lib/properties/speak.js | 12 - .../cssstyle/lib/properties/speakHeader.js | 12 - .../cssstyle/lib/properties/speakNumeral.js | 12 - .../lib/properties/speakPunctuation.js | 12 - .../cssstyle/lib/properties/speechRate.js | 12 - node_modules/cssstyle/lib/properties/src.js | 12 - .../cssstyle/lib/properties/stopColor.js | 16 +- .../cssstyle/lib/properties/stopOpacity.js | 12 - .../cssstyle/lib/properties/stress.js | 12 - .../cssstyle/lib/properties/stroke.js | 12 - .../lib/properties/strokeDasharray.js | 12 - .../lib/properties/strokeDashoffset.js | 12 - .../cssstyle/lib/properties/strokeLinecap.js | 12 - .../cssstyle/lib/properties/strokeLinejoin.js | 12 - .../lib/properties/strokeMiterlimit.js | 12 - .../cssstyle/lib/properties/strokeOpacity.js | 12 - .../cssstyle/lib/properties/strokeWidth.js | 12 - .../cssstyle/lib/properties/tableLayout.js | 12 - .../cssstyle/lib/properties/textAlign.js | 12 - .../cssstyle/lib/properties/textAnchor.js | 12 - .../cssstyle/lib/properties/textDecoration.js | 12 - .../cssstyle/lib/properties/textIndent.js | 12 - .../lib/properties/textLineThrough.js | 12 - .../lib/properties/textLineThroughColor.js | 16 +- .../lib/properties/textLineThroughMode.js | 12 - .../lib/properties/textLineThroughStyle.js | 12 - .../lib/properties/textLineThroughWidth.js | 12 - .../cssstyle/lib/properties/textOverflow.js | 12 - .../cssstyle/lib/properties/textOverline.js | 12 - .../lib/properties/textOverlineColor.js | 16 +- .../lib/properties/textOverlineMode.js | 12 - .../lib/properties/textOverlineStyle.js | 12 - .../lib/properties/textOverlineWidth.js | 12 - .../cssstyle/lib/properties/textRendering.js | 12 - .../cssstyle/lib/properties/textShadow.js | 12 - .../cssstyle/lib/properties/textTransform.js | 12 - .../cssstyle/lib/properties/textUnderline.js | 12 - .../lib/properties/textUnderlineColor.js | 16 +- .../lib/properties/textUnderlineMode.js | 12 - .../lib/properties/textUnderlineStyle.js | 12 - .../lib/properties/textUnderlineWidth.js | 12 - node_modules/cssstyle/lib/properties/top.js | 16 +- .../cssstyle/lib/properties/unicodeBidi.js | 12 - .../cssstyle/lib/properties/unicodeRange.js | 12 - .../cssstyle/lib/properties/vectorEffect.js | 12 - .../cssstyle/lib/properties/verticalAlign.js | 12 - .../cssstyle/lib/properties/visibility.js | 12 - .../cssstyle/lib/properties/voiceFamily.js | 12 - .../cssstyle/lib/properties/volume.js | 12 - .../lib/properties/webkitAnimation.js | 12 - .../lib/properties/webkitAnimationDelay.js | 12 - .../properties/webkitAnimationDirection.js | 12 - .../lib/properties/webkitAnimationDuration.js | 12 - .../lib/properties/webkitAnimationFillMode.js | 12 - .../webkitAnimationIterationCount.js | 12 - .../lib/properties/webkitAnimationName.js | 12 - .../properties/webkitAnimationPlayState.js | 12 - .../webkitAnimationTimingFunction.js | 12 - .../lib/properties/webkitAppearance.js | 12 - .../lib/properties/webkitAspectRatio.js | 12 - .../properties/webkitBackfaceVisibility.js | 12 - .../lib/properties/webkitBackgroundClip.js | 12 - .../properties/webkitBackgroundComposite.js | 12 - .../lib/properties/webkitBackgroundOrigin.js | 12 - .../lib/properties/webkitBackgroundSize.js | 12 - .../lib/properties/webkitBorderAfter.js | 12 - .../lib/properties/webkitBorderAfterColor.js | 16 +- .../lib/properties/webkitBorderAfterStyle.js | 12 - .../lib/properties/webkitBorderAfterWidth.js | 12 - .../lib/properties/webkitBorderBefore.js | 12 - .../lib/properties/webkitBorderBeforeColor.js | 16 +- .../lib/properties/webkitBorderBeforeStyle.js | 12 - .../lib/properties/webkitBorderBeforeWidth.js | 12 - .../lib/properties/webkitBorderEnd.js | 12 - .../lib/properties/webkitBorderEndColor.js | 16 +- .../lib/properties/webkitBorderEndStyle.js | 12 - .../lib/properties/webkitBorderEndWidth.js | 12 - .../lib/properties/webkitBorderFit.js | 12 - .../webkitBorderHorizontalSpacing.js | 12 - .../lib/properties/webkitBorderImage.js | 12 - .../lib/properties/webkitBorderRadius.js | 12 - .../lib/properties/webkitBorderStart.js | 12 - .../lib/properties/webkitBorderStartColor.js | 16 +- .../lib/properties/webkitBorderStartStyle.js | 12 - .../lib/properties/webkitBorderStartWidth.js | 12 - .../properties/webkitBorderVerticalSpacing.js | 12 - .../cssstyle/lib/properties/webkitBoxAlign.js | 12 - .../lib/properties/webkitBoxDirection.js | 12 - .../cssstyle/lib/properties/webkitBoxFlex.js | 12 - .../lib/properties/webkitBoxFlexGroup.js | 12 - .../cssstyle/lib/properties/webkitBoxLines.js | 12 - .../lib/properties/webkitBoxOrdinalGroup.js | 12 - .../lib/properties/webkitBoxOrient.js | 12 - .../cssstyle/lib/properties/webkitBoxPack.js | 12 - .../lib/properties/webkitBoxReflect.js | 12 - .../lib/properties/webkitBoxShadow.js | 12 - .../lib/properties/webkitColorCorrection.js | 12 - .../lib/properties/webkitColumnAxis.js | 12 - .../lib/properties/webkitColumnBreakAfter.js | 12 - .../lib/properties/webkitColumnBreakBefore.js | 12 - .../lib/properties/webkitColumnBreakInside.js | 12 - .../lib/properties/webkitColumnCount.js | 12 - .../lib/properties/webkitColumnGap.js | 12 - .../lib/properties/webkitColumnRule.js | 12 - .../lib/properties/webkitColumnRuleColor.js | 16 +- .../lib/properties/webkitColumnRuleStyle.js | 12 - .../lib/properties/webkitColumnRuleWidth.js | 12 - .../lib/properties/webkitColumnSpan.js | 12 - .../lib/properties/webkitColumnWidth.js | 12 - .../cssstyle/lib/properties/webkitColumns.js | 12 - .../cssstyle/lib/properties/webkitFilter.js | 12 - .../lib/properties/webkitFlexAlign.js | 12 - .../lib/properties/webkitFlexDirection.js | 12 - .../cssstyle/lib/properties/webkitFlexFlow.js | 12 - .../lib/properties/webkitFlexItemAlign.js | 12 - .../lib/properties/webkitFlexLinePack.js | 12 - .../lib/properties/webkitFlexOrder.js | 12 - .../cssstyle/lib/properties/webkitFlexPack.js | 12 - .../cssstyle/lib/properties/webkitFlexWrap.js | 12 - .../cssstyle/lib/properties/webkitFlowFrom.js | 12 - .../cssstyle/lib/properties/webkitFlowInto.js | 12 - .../properties/webkitFontFeatureSettings.js | 12 - .../lib/properties/webkitFontKerning.js | 12 - .../lib/properties/webkitFontSizeDelta.js | 12 - .../lib/properties/webkitFontSmoothing.js | 12 - .../properties/webkitFontVariantLigatures.js | 12 - .../lib/properties/webkitHighlight.js | 12 - .../properties/webkitHyphenateCharacter.js | 12 - .../properties/webkitHyphenateLimitAfter.js | 12 - .../properties/webkitHyphenateLimitBefore.js | 12 - .../properties/webkitHyphenateLimitLines.js | 12 - .../cssstyle/lib/properties/webkitHyphens.js | 12 - .../lib/properties/webkitLineAlign.js | 12 - .../lib/properties/webkitLineBoxContain.js | 12 - .../lib/properties/webkitLineBreak.js | 12 - .../lib/properties/webkitLineClamp.js | 12 - .../cssstyle/lib/properties/webkitLineGrid.js | 12 - .../cssstyle/lib/properties/webkitLineSnap.js | 12 - .../cssstyle/lib/properties/webkitLocale.js | 12 - .../lib/properties/webkitLogicalHeight.js | 12 - .../lib/properties/webkitLogicalWidth.js | 12 - .../lib/properties/webkitMarginAfter.js | 12 - .../properties/webkitMarginAfterCollapse.js | 12 - .../lib/properties/webkitMarginBefore.js | 12 - .../properties/webkitMarginBeforeCollapse.js | 12 - .../properties/webkitMarginBottomCollapse.js | 12 - .../lib/properties/webkitMarginCollapse.js | 12 - .../lib/properties/webkitMarginEnd.js | 12 - .../lib/properties/webkitMarginStart.js | 12 - .../lib/properties/webkitMarginTopCollapse.js | 12 - .../cssstyle/lib/properties/webkitMarquee.js | 12 - .../lib/properties/webkitMarqueeDirection.js | 12 - .../lib/properties/webkitMarqueeIncrement.js | 12 - .../lib/properties/webkitMarqueeRepetition.js | 12 - .../lib/properties/webkitMarqueeSpeed.js | 12 - .../lib/properties/webkitMarqueeStyle.js | 12 - .../cssstyle/lib/properties/webkitMask.js | 12 - .../lib/properties/webkitMaskAttachment.js | 12 - .../lib/properties/webkitMaskBoxImage.js | 12 - .../properties/webkitMaskBoxImageOutset.js | 12 - .../properties/webkitMaskBoxImageRepeat.js | 12 - .../lib/properties/webkitMaskBoxImageSlice.js | 12 - .../properties/webkitMaskBoxImageSource.js | 12 - .../lib/properties/webkitMaskBoxImageWidth.js | 12 - .../cssstyle/lib/properties/webkitMaskClip.js | 12 - .../lib/properties/webkitMaskComposite.js | 12 - .../lib/properties/webkitMaskImage.js | 12 - .../lib/properties/webkitMaskOrigin.js | 12 - .../lib/properties/webkitMaskPosition.js | 12 - .../lib/properties/webkitMaskPositionX.js | 12 - .../lib/properties/webkitMaskPositionY.js | 12 - .../lib/properties/webkitMaskRepeat.js | 12 - .../lib/properties/webkitMaskRepeatX.js | 12 - .../lib/properties/webkitMaskRepeatY.js | 12 - .../cssstyle/lib/properties/webkitMaskSize.js | 12 - .../webkitMatchNearestMailBlockquoteColor.js | 16 +- .../lib/properties/webkitMaxLogicalHeight.js | 12 - .../lib/properties/webkitMaxLogicalWidth.js | 12 - .../lib/properties/webkitMinLogicalHeight.js | 12 - .../lib/properties/webkitMinLogicalWidth.js | 12 - .../cssstyle/lib/properties/webkitNbspMode.js | 12 - .../lib/properties/webkitOverflowScrolling.js | 12 - .../lib/properties/webkitPaddingAfter.js | 12 - .../lib/properties/webkitPaddingBefore.js | 12 - .../lib/properties/webkitPaddingEnd.js | 12 - .../lib/properties/webkitPaddingStart.js | 12 - .../lib/properties/webkitPerspective.js | 12 - .../lib/properties/webkitPerspectiveOrigin.js | 12 - .../properties/webkitPerspectiveOriginX.js | 12 - .../properties/webkitPerspectiveOriginY.js | 12 - .../lib/properties/webkitPrintColorAdjust.js | 12 - .../lib/properties/webkitRegionBreakAfter.js | 12 - .../lib/properties/webkitRegionBreakBefore.js | 12 - .../lib/properties/webkitRegionBreakInside.js | 12 - .../lib/properties/webkitRegionOverflow.js | 12 - .../lib/properties/webkitRtlOrdering.js | 12 - .../lib/properties/webkitSvgShadow.js | 12 - .../lib/properties/webkitTapHighlightColor.js | 16 +- .../lib/properties/webkitTextCombine.js | 12 - .../webkitTextDecorationsInEffect.js | 12 - .../lib/properties/webkitTextEmphasis.js | 12 - .../lib/properties/webkitTextEmphasisColor.js | 16 +- .../properties/webkitTextEmphasisPosition.js | 12 - .../lib/properties/webkitTextEmphasisStyle.js | 12 - .../lib/properties/webkitTextFillColor.js | 16 +- .../lib/properties/webkitTextOrientation.js | 12 - .../lib/properties/webkitTextSecurity.js | 12 - .../lib/properties/webkitTextSizeAdjust.js | 12 - .../lib/properties/webkitTextStroke.js | 12 - .../lib/properties/webkitTextStrokeColor.js | 16 +- .../lib/properties/webkitTextStrokeWidth.js | 12 - .../lib/properties/webkitTransform.js | 12 - .../lib/properties/webkitTransformOrigin.js | 12 - .../lib/properties/webkitTransformOriginX.js | 12 - .../lib/properties/webkitTransformOriginY.js | 12 - .../lib/properties/webkitTransformOriginZ.js | 12 - .../lib/properties/webkitTransformStyle.js | 12 - .../lib/properties/webkitTransition.js | 12 - .../lib/properties/webkitTransitionDelay.js | 12 - .../properties/webkitTransitionDuration.js | 12 - .../properties/webkitTransitionProperty.js | 12 - .../webkitTransitionTimingFunction.js | 12 - .../cssstyle/lib/properties/webkitUserDrag.js | 12 - .../lib/properties/webkitUserModify.js | 12 - .../lib/properties/webkitUserSelect.js | 12 - .../cssstyle/lib/properties/webkitWrap.js | 12 - .../cssstyle/lib/properties/webkitWrapFlow.js | 12 - .../lib/properties/webkitWrapMargin.js | 12 - .../lib/properties/webkitWrapPadding.js | 12 - .../lib/properties/webkitWrapShapeInside.js | 12 - .../lib/properties/webkitWrapShapeOutside.js | 12 - .../lib/properties/webkitWrapThrough.js | 12 - .../lib/properties/webkitWritingMode.js | 12 - .../cssstyle/lib/properties/whiteSpace.js | 12 - .../cssstyle/lib/properties/widows.js | 12 - node_modules/cssstyle/lib/properties/width.js | 30 +- .../cssstyle/lib/properties/wordBreak.js | 12 - .../cssstyle/lib/properties/wordSpacing.js | 12 - .../cssstyle/lib/properties/wordWrap.js | 12 - .../cssstyle/lib/properties/writingMode.js | 12 - .../cssstyle/lib/properties/zIndex.js | 12 - node_modules/cssstyle/lib/properties/zoom.js | 12 - .../lib/utils/getBasicPropertyDescriptor.js | 14 + node_modules/cssstyle/package.json | 73 +- .../scripts/download_latest_properties.js | 88 + .../generate_implemented_properties.js | 61 + .../cssstyle/scripts/generate_properties.js | 224 +- node_modules/cssstyle/scripts/run_tests.sh | 4 - node_modules/cssstyle/tests/tests.js | 1060 +- node_modules/dashdash/package.json | 23 +- node_modules/data-urls/README.md | 2 +- node_modules/data-urls/package.json | 37 +- node_modules/debug/package.json | 23 +- node_modules/deep-is/package.json | 23 +- node_modules/define-properties/package.json | 23 +- node_modules/delayed-stream/package.json | 23 +- node_modules/detect-indent/package.json | 23 +- node_modules/domexception/package.json | 23 +- node_modules/ecc-jsbn/.npmignore | 15 - node_modules/ecc-jsbn/index.js | 9 +- node_modules/ecc-jsbn/package.json | 15 +- node_modules/es-abstract/package.json | 23 +- node_modules/es-to-primitive/package.json | 23 +- .../escape-string-regexp/package.json | 24 +- node_modules/escodegen/escodegen.js | 22 +- .../node_modules/source-map/package.json | 24 +- node_modules/escodegen/package.json | 22 +- node_modules/esprima/package.json | 23 +- node_modules/estraverse/package.json | 23 +- node_modules/esutils/package.json | 29 +- node_modules/expand-brackets/LICENSE | 21 - node_modules/expand-brackets/README.md | 107 - node_modules/expand-brackets/index.js | 163 - node_modules/expand-brackets/package.json | 93 - node_modules/expand-range/LICENSE | 24 - node_modules/expand-range/README.md | 145 - node_modules/expand-range/index.js | 43 - node_modules/expand-range/package.json | 104 - node_modules/extend/.editorconfig | 20 + node_modules/extend/.eslintrc | 2 +- node_modules/extend/.jscs.json | 8 +- node_modules/extend/.npmignore | 1 - node_modules/extend/.travis.yml | 115 +- node_modules/extend/CHANGELOG.md | 6 + node_modules/extend/index.js | 39 +- node_modules/extend/package.json | 28 +- node_modules/extglob/LICENSE | 21 - node_modules/extglob/README.md | 88 - node_modules/extglob/index.js | 178 - node_modules/extglob/package.json | 85 - node_modules/extsprintf/package.json | 13 +- node_modules/fast-deep-equal/README.md | 19 +- node_modules/fast-deep-equal/index.js | 50 +- node_modules/fast-deep-equal/package.json | 35 +- .../fast-json-stable-stringify/package.json | 23 +- node_modules/fast-levenshtein/package.json | 23 +- node_modules/filename-regex/LICENSE | 21 - node_modules/filename-regex/README.md | 63 - node_modules/filename-regex/index.js | 10 - node_modules/filename-regex/package.json | 81 - node_modules/fill-range/LICENSE | 21 - node_modules/fill-range/README.md | 290 - node_modules/fill-range/index.js | 408 - node_modules/fill-range/package.json | 92 - node_modules/for-in/LICENSE | 21 - node_modules/for-in/README.md | 85 - node_modules/for-in/index.js | 16 - node_modules/for-in/package.json | 106 - node_modules/for-own/LICENSE | 21 - node_modules/for-own/README.md | 85 - node_modules/for-own/index.js | 19 - node_modules/for-own/package.json | 109 - node_modules/foreach/package.json | 23 +- node_modules/forever-agent/package.json | 23 +- node_modules/form-data/README.md | 8 +- node_modules/form-data/package.json | 24 +- node_modules/form-data/yarn.lock | 2662 +++ .../fs-readdir-recursive/package.json | 25 +- node_modules/function-bind/package.json | 23 +- node_modules/getpass/package.json | 23 +- node_modules/glob-base/LICENSE | 21 - node_modules/glob-base/README.md | 158 - node_modules/glob-base/index.js | 51 - node_modules/glob-base/package.json | 77 - node_modules/glob-parent/.npmignore | 4 - node_modules/glob-parent/.travis.yml | 8 - node_modules/glob-parent/LICENSE | 15 - node_modules/glob-parent/README.md | 43 - node_modules/glob-parent/index.js | 10 - node_modules/glob-parent/package.json | 63 - node_modules/glob-parent/test.js | 28 - node_modules/globals/package.json | 23 +- node_modules/har-schema/package.json | 23 +- node_modules/har-validator/LICENSE | 18 +- node_modules/har-validator/README.md | 45 +- node_modules/har-validator/lib/async.js | 15 +- node_modules/har-validator/lib/promise.js | 15 +- node_modules/har-validator/package.json | 49 +- node_modules/has-ansi/package.json | 23 +- node_modules/has-flag/package.json | 23 +- node_modules/has/package.json | 23 +- node_modules/hawk/.npmignore | 5 - node_modules/hawk/LICENSE | 28 - node_modules/hawk/README.md | 637 - node_modules/hawk/client.js | 3 - node_modules/hawk/dist/browser.js | 793 - node_modules/hawk/lib/browser.js | 653 - node_modules/hawk/lib/client.js | 394 - node_modules/hawk/lib/crypto.js | 128 - node_modules/hawk/lib/index.js | 17 - node_modules/hawk/lib/server.js | 550 - node_modules/hawk/lib/utils.js | 186 - node_modules/hawk/package.json | 78 - node_modules/hoek/.npmignore | 3 - node_modules/hoek/LICENSE | 32 - node_modules/hoek/README.md | 30 - node_modules/hoek/lib/escape.js | 168 - node_modules/hoek/lib/index.js | 978 - node_modules/hoek/package.json | 58 - node_modules/home-or-tmp/package.json | 23 +- .../html-encoding-sniffer/package.json | 23 +- node_modules/http-signature/package.json | 23 +- node_modules/iconv-lite/.npmignore | 6 - node_modules/iconv-lite/.travis.yml | 23 - node_modules/iconv-lite/Changelog.md | 28 + node_modules/iconv-lite/README.md | 6 +- .../iconv-lite/encodings/dbcs-codec.js | 12 +- node_modules/iconv-lite/encodings/internal.js | 12 +- .../iconv-lite/encodings/sbcs-codec.js | 11 +- .../iconv-lite/encodings/sbcs-data.js | 5 + node_modules/iconv-lite/encodings/utf16.js | 6 +- node_modules/iconv-lite/encodings/utf7.js | 22 +- node_modules/iconv-lite/lib/extend-node.js | 4 +- node_modules/iconv-lite/lib/index.d.ts | 4 +- node_modules/iconv-lite/lib/index.js | 11 +- node_modules/iconv-lite/package.json | 83 +- node_modules/invariant/package.json | 24 +- node_modules/is-buffer/LICENSE | 21 - node_modules/is-buffer/README.md | 53 - node_modules/is-buffer/index.js | 21 - node_modules/is-buffer/package.json | 79 - node_modules/is-buffer/test/basic.js | 24 - node_modules/is-callable/package.json | 23 +- node_modules/is-date-object/package.json | 23 +- node_modules/is-dotfile/LICENSE | 21 - node_modules/is-dotfile/README.md | 95 - node_modules/is-dotfile/index.js | 14 - node_modules/is-dotfile/package.json | 106 - node_modules/is-equal-shallow/LICENSE | 21 - node_modules/is-equal-shallow/README.md | 90 - node_modules/is-equal-shallow/index.js | 27 - node_modules/is-equal-shallow/package.json | 85 - node_modules/is-extendable/LICENSE | 21 - node_modules/is-extendable/README.md | 72 - node_modules/is-extendable/index.js | 13 - node_modules/is-extendable/package.json | 82 - node_modules/is-extglob/LICENSE | 21 - node_modules/is-extglob/README.md | 75 - node_modules/is-extglob/index.js | 11 - node_modules/is-extglob/package.json | 79 - node_modules/is-finite/package.json | 23 +- node_modules/is-glob/LICENSE | 21 - node_modules/is-glob/README.md | 105 - node_modules/is-glob/index.js | 14 - node_modules/is-glob/package.json | 92 - node_modules/is-number/LICENSE | 21 - node_modules/is-number/README.md | 103 - node_modules/is-number/index.js | 19 - node_modules/is-number/package.json | 90 - node_modules/is-posix-bracket/LICENSE | 21 - node_modules/is-posix-bracket/README.md | 88 - node_modules/is-posix-bracket/index.js | 10 - node_modules/is-posix-bracket/package.json | 95 - node_modules/is-primitive/LICENSE | 21 - node_modules/is-primitive/README.md | 57 - node_modules/is-primitive/index.js | 13 - node_modules/is-primitive/package.json | 71 - node_modules/is-regex/package.json | 23 +- node_modules/is-symbol/package.json | 23 +- node_modules/is-typedarray/package.json | 23 +- node_modules/isarray/.npmignore | 1 - node_modules/isarray/.travis.yml | 4 - node_modules/isarray/Makefile | 6 - node_modules/isarray/README.md | 60 - node_modules/isarray/component.json | 19 - node_modules/isarray/index.js | 5 - node_modules/isarray/package.json | 74 - node_modules/isarray/test.js | 20 - node_modules/isobject/LICENSE | 21 - node_modules/isobject/README.md | 112 - node_modules/isobject/index.js | 14 - node_modules/isobject/package.json | 98 - node_modules/isstream/package.json | 23 +- node_modules/js-tokens/package.json | 24 +- node_modules/jsbn/package.json | 24 +- node_modules/jsdom/Changelog.md | 181 +- node_modules/jsdom/README.md | 102 +- node_modules/jsdom/lib/api.js | 152 +- .../jsdom/lib/jsdom/browser/Window.js | 173 +- .../lib/jsdom/browser/documentfeatures.js | 55 - .../jsdom/lib/jsdom/browser/domtohtml.js | 18 - .../jsdom/lib/jsdom/browser/htmltodom.js | 255 +- .../jsdom/browser/parse5-adapter-parsing.js | 82 +- .../lib/jsdom/browser/resource-loader.js | 275 - .../browser/resources/async-resource-queue.js | 114 + .../resources/no-op-resource-loader.js | 8 + .../resources/per-document-resource-loader.js | 95 + .../browser/resources/request-manager.js | 33 + .../browser/resources/resource-loader.js | 113 + .../jsdom/browser/resources/resource-queue.js | 142 + .../jsdom/living/aborting/AbortSignal-impl.js | 11 +- .../jsdom/lib/jsdom/living/attributes.js | 22 +- .../living/attributes/NamedNodeMap-impl.js | 3 +- .../DefaultConstraintValidation-impl.js | 4 +- .../jsdom/living/domparsing/DOMParser-impl.js | 11 +- .../parse5-adapter-serialization.js | 14 +- .../jsdom/living/domparsing/serialization.js | 39 + .../lib/jsdom/living/events/Event-impl.js | 97 +- .../jsdom/living/events/EventTarget-impl.js | 282 +- .../jsdom/living/events/InputEvent-impl.js | 23 + .../jsdom/living/events/StorageEvent-impl.js | 26 + .../jsdom/living/file-api/FileReader-impl.js | 4 +- .../lib/jsdom/living/form-data-symbols.js | 3 - .../jsdom/living/generated/AbortController.js | 52 +- .../lib/jsdom/living/generated/AbortSignal.js | 53 +- .../generated/AddEventListenerOptions.js | 12 + .../living/generated/AssignedNodesOptions.js | 30 + .../jsdom/lib/jsdom/living/generated/Attr.js | 138 +- .../lib/jsdom/living/generated/BarProp.js | 36 +- .../jsdom/lib/jsdom/living/generated/Blob.js | 165 +- .../jsdom/living/generated/CDATASection.js | 27 +- .../jsdom/living/generated/CharacterData.js | 495 +- .../lib/jsdom/living/generated/ChildNode.js | 171 +- .../lib/jsdom/living/generated/CloseEvent.js | 97 +- .../lib/jsdom/living/generated/Comment.js | 50 +- .../living/generated/CompositionEvent.js | 202 +- .../lib/jsdom/living/generated/CustomEvent.js | 184 +- .../living/generated/DOMImplementation.js | 222 +- .../lib/jsdom/living/generated/DOMParser.js | 88 +- .../jsdom/living/generated/DOMStringMap.js | 24 +- .../jsdom/living/generated/DOMTokenList.js | 364 +- .../lib/jsdom/living/generated/Document.js | 2677 ++- .../living/generated/DocumentFragment.js | 276 +- .../jsdom/living/generated/DocumentType.js | 178 +- .../lib/jsdom/living/generated/Element.js | 1783 +- .../living/generated/ElementCSSInlineStyle.js | 40 +- .../generated/ElementContentEditable.js | 24 +- .../lib/jsdom/living/generated/ErrorEvent.js | 117 +- .../jsdom/lib/jsdom/living/generated/Event.js | 384 +- .../lib/jsdom/living/generated/EventInit.js | 12 + .../lib/jsdom/living/generated/EventTarget.js | 292 +- .../lib/jsdom/living/generated/External.js | 58 +- .../jsdom/lib/jsdom/living/generated/File.js | 128 +- .../lib/jsdom/living/generated/FileList.js | 79 +- .../lib/jsdom/living/generated/FileReader.js | 378 +- .../lib/jsdom/living/generated/FocusEvent.js | 77 +- .../lib/jsdom/living/generated/FormData.js | 538 +- .../living/generated/GlobalEventHandlers.js | 894 +- .../living/generated/HTMLAnchorElement.js | 363 +- .../jsdom/living/generated/HTMLAreaElement.js | 293 +- .../living/generated/HTMLAudioElement.js | 27 +- .../jsdom/living/generated/HTMLBRElement.js | 43 +- .../jsdom/living/generated/HTMLBaseElement.js | 57 +- .../jsdom/living/generated/HTMLBodyElement.js | 337 +- .../living/generated/HTMLButtonElement.js | 239 +- .../living/generated/HTMLCanvasElement.js | 222 +- .../jsdom/living/generated/HTMLCollection.js | 124 +- .../living/generated/HTMLDListElement.js | 43 +- .../jsdom/living/generated/HTMLDataElement.js | 43 +- .../living/generated/HTMLDataListElement.js | 27 +- .../living/generated/HTMLDetailsElement.js | 43 +- .../living/generated/HTMLDialogElement.js | 43 +- .../living/generated/HTMLDirectoryElement.js | 43 +- .../jsdom/living/generated/HTMLDivElement.js | 43 +- .../lib/jsdom/living/generated/HTMLElement.js | 1109 +- .../living/generated/HTMLEmbedElement.js | 113 +- .../living/generated/HTMLFieldSetElement.js | 180 +- .../jsdom/living/generated/HTMLFontElement.js | 71 +- .../jsdom/living/generated/HTMLFormElement.js | 193 +- .../living/generated/HTMLFrameElement.js | 161 +- .../living/generated/HTMLFrameSetElement.js | 281 +- .../jsdom/living/generated/HTMLHRElement.js | 99 +- .../jsdom/living/generated/HTMLHeadElement.js | 27 +- .../living/generated/HTMLHeadingElement.js | 43 +- .../jsdom/living/generated/HTMLHtmlElement.js | 43 +- .../generated/HTMLHyperlinkElementUtils.js | 189 +- .../living/generated/HTMLIFrameElement.js | 230 +- .../living/generated/HTMLImageElement.js | 293 +- .../living/generated/HTMLInputElement.js | 900 +- .../jsdom/living/generated/HTMLLIElement.js | 57 +- .../living/generated/HTMLLabelElement.js | 60 +- .../living/generated/HTMLLegendElement.js | 53 +- .../jsdom/living/generated/HTMLLinkElement.js | 182 +- .../jsdom/living/generated/HTMLMapElement.js | 53 +- .../living/generated/HTMLMarqueeElement.js | 169 +- .../living/generated/HTMLMediaElement.js | 609 +- .../jsdom/living/generated/HTMLMenuElement.js | 43 +- .../jsdom/living/generated/HTMLMetaElement.js | 85 +- .../living/generated/HTMLMeterElement.js | 120 +- .../jsdom/living/generated/HTMLModElement.js | 57 +- .../living/generated/HTMLOListElement.js | 90 +- .../living/generated/HTMLObjectElement.js | 368 +- .../living/generated/HTMLOptGroupElement.js | 57 +- .../living/generated/HTMLOptionElement.js | 133 +- .../living/generated/HTMLOptionsCollection.js | 193 +- .../living/generated/HTMLOutputElement.js | 216 +- .../living/generated/HTMLParagraphElement.js | 43 +- .../living/generated/HTMLParamElement.js | 85 +- .../living/generated/HTMLPictureElement.js | 27 +- .../jsdom/living/generated/HTMLPreElement.js | 43 +- .../living/generated/HTMLProgressElement.js | 87 +- .../living/generated/HTMLQuoteElement.js | 43 +- .../living/generated/HTMLScriptElement.js | 155 +- .../living/generated/HTMLSelectElement.js | 513 +- .../jsdom/living/generated/HTMLSlotElement.js | 149 + .../living/generated/HTMLSourceElement.js | 99 +- .../jsdom/living/generated/HTMLSpanElement.js | 27 +- .../living/generated/HTMLStyleElement.js | 81 +- .../generated/HTMLTableCaptionElement.js | 43 +- .../living/generated/HTMLTableCellElement.js | 235 +- .../living/generated/HTMLTableColElement.js | 113 +- .../living/generated/HTMLTableElement.js | 410 +- .../living/generated/HTMLTableRowElement.js | 207 +- .../generated/HTMLTableSectionElement.js | 173 +- .../living/generated/HTMLTemplateElement.js | 39 +- .../living/generated/HTMLTextAreaElement.js | 710 +- .../jsdom/living/generated/HTMLTimeElement.js | 43 +- .../living/generated/HTMLTitleElement.js | 43 +- .../living/generated/HTMLTrackElement.js | 153 +- .../living/generated/HTMLUListElement.js | 57 +- .../living/generated/HTMLUnknownElement.js | 27 +- .../living/generated/HTMLVideoElement.js | 105 +- .../jsdom/living/generated/HashChangeEvent.js | 87 +- .../lib/jsdom/living/generated/History.js | 253 +- .../lib/jsdom/living/generated/InputEvent.js | 129 + .../jsdom/living/generated/InputEventInit.js | 49 + .../jsdom/living/generated/KeyboardEvent.js | 503 +- .../lib/jsdom/living/generated/LinkStyle.js | 36 +- .../lib/jsdom/living/generated/Location.js | 507 +- .../jsdom/living/generated/MessageEvent.js | 316 +- .../lib/jsdom/living/generated/MimeType.js | 127 + .../jsdom/living/generated/MimeTypeArray.js | 333 + .../lib/jsdom/living/generated/MouseEvent.js | 571 +- .../living/generated/MutationObserver.js | 151 + .../living/generated/MutationObserverInit.js | 105 + .../jsdom/living/generated/MutationRecord.js | 178 + .../jsdom/living/generated/NamedNodeMap.js | 393 +- .../lib/jsdom/living/generated/Navigator.js | 199 +- .../generated/NavigatorConcurrentHardware.js | 36 +- .../living/generated/NavigatorCookies.js | 36 +- .../lib/jsdom/living/generated/NavigatorID.js | 116 +- .../living/generated/NavigatorLanguage.js | 46 +- .../jsdom/living/generated/NavigatorOnLine.js | 36 +- .../living/generated/NavigatorPlugins.js | 59 +- .../jsdom/lib/jsdom/living/generated/Node.js | 924 +- .../jsdom/living/generated/NodeIterator.js | 111 +- .../lib/jsdom/living/generated/NodeList.js | 85 +- .../generated/NonDocumentTypeChildNode.js | 46 +- .../living/generated/NonElementParentNode.js | 71 +- .../lib/jsdom/living/generated/ParentNode.js | 235 +- .../lib/jsdom/living/generated/Performance.js | 63 +- .../lib/jsdom/living/generated/Plugin.js | 354 + .../lib/jsdom/living/generated/PluginArray.js | 353 + .../jsdom/living/generated/PopStateEvent.js | 77 +- .../living/generated/ProcessingInstruction.js | 39 +- .../jsdom/living/generated/ProgressEvent.js | 97 +- .../living/generated/SVGAnimatedString.js | 50 +- .../lib/jsdom/living/generated/SVGElement.js | 989 +- .../living/generated/SVGGraphicsElement.js | 49 +- .../lib/jsdom/living/generated/SVGNumber.js | 40 +- .../jsdom/living/generated/SVGSVGElement.js | 411 +- .../jsdom/living/generated/SVGStringList.js | 339 +- .../lib/jsdom/living/generated/SVGTests.js | 46 +- .../jsdom/living/generated/SVGTitleElement.js | 94 + .../lib/jsdom/living/generated/Screen.js | 86 +- .../lib/jsdom/living/generated/ShadowRoot.js | 134 + .../jsdom/living/generated/ShadowRootInit.js | 4 +- .../jsdom/living/generated/ShadowRootMode.js | 13 + .../lib/jsdom/living/generated/Slotable.js | 100 + .../lib/jsdom/living/generated/Storage.js | 360 + .../jsdom/living/generated/StorageEvent.js | 274 + .../living/generated/StorageEventInit.js | 95 + .../jsdom/lib/jsdom/living/generated/Text.js | 106 +- .../lib/jsdom/living/generated/TouchEvent.js | 137 +- .../lib/jsdom/living/generated/TreeWalker.js | 149 +- .../lib/jsdom/living/generated/UIEvent.js | 208 +- .../jsdom/living/generated/ValidityState.js | 136 +- .../lib/jsdom/living/generated/WebSocket.js | 413 +- .../lib/jsdom/living/generated/WheelEvent.js | 140 +- .../living/generated/WindowEventHandlers.js | 250 +- .../lib/jsdom/living/generated/XMLDocument.js | 27 +- .../generated/XMLHttpRequestEventTarget.js | 127 +- .../living/generated/XMLHttpRequestUpload.js | 27 +- .../jsdom/lib/jsdom/living/generated/utils.js | 26 + .../jsdom/living/helpers/custom-elements.js | 27 + .../jsdom/living/helpers/dates-and-times.js | 25 +- .../jsdom/lib/jsdom/living/helpers/events.js | 23 + .../lib/jsdom/living/helpers/focusing.js | 33 +- .../lib/jsdom/living/helpers/form-controls.js | 87 +- .../jsdom/lib/jsdom/living/helpers/html.js | 28 + .../living/helpers/mutation-observers.js | 195 + .../lib/jsdom/living/helpers/namespaces.js | 15 + .../living/helpers/runtime-script-errors.js | 24 +- .../lib/jsdom/living/helpers/selectors.js | 38 +- .../lib/jsdom/living/helpers/shadow-dom.js | 295 + .../lib/jsdom/living/helpers/stylesheets.js | 17 +- .../jsdom/lib/jsdom/living/helpers/text.js | 9 +- .../lib/jsdom/living/helpers/traversal.js | 45 +- .../jsdom/living/helpers/validate-names.js | 7 +- .../helpers/wrap-cookie-jar-for-request.js | 8 + node_modules/jsdom/lib/jsdom/living/index.js | 15 + .../MutationObserver-impl.js | 95 + .../mutation-observer/MutationRecord-impl.js | 35 + .../jsdom/living/navigator/MimeType-impl.js | 3 + .../living/navigator/MimeTypeArray-impl.js | 25 + .../living/navigator/NavigatorPlugins-impl.js | 11 + .../lib/jsdom/living/navigator/Plugin-impl.js | 3 + .../living/navigator/PluginArray-impl.js | 27 + node_modules/jsdom/lib/jsdom/living/node.js | 15 +- .../jsdom/living/nodes/CharacterData-impl.js | 15 +- .../lib/jsdom/living/nodes/ChildNode-impl.js | 11 +- .../living/nodes/DOMImplementation-impl.js | 72 +- .../lib/jsdom/living/nodes/Document-impl.js | 347 +- .../living/nodes/DocumentFragment-impl.js | 3 + .../lib/jsdom/living/nodes/Element-impl.js | 209 +- .../living/nodes/HTMLAnchorElement-impl.js | 19 + .../living/nodes/HTMLAreaElement-impl.js | 19 + .../living/nodes/HTMLButtonElement-impl.js | 20 +- .../living/nodes/HTMLCanvasElement-impl.js | 24 +- .../jsdom/living/nodes/HTMLCollection-impl.js | 5 +- .../living/nodes/HTMLDetailsElement-impl.js | 10 +- .../jsdom/living/nodes/HTMLElement-impl.js | 71 +- .../living/nodes/HTMLFieldSetElement-impl.js | 25 +- .../living/nodes/HTMLFormElement-impl.js | 35 +- .../living/nodes/HTMLFrameElement-impl.js | 148 +- .../living/nodes/HTMLImageElement-impl.js | 25 +- .../living/nodes/HTMLInputElement-impl.js | 56 +- .../living/nodes/HTMLLabelElement-impl.js | 104 +- .../living/nodes/HTMLLegendElement-impl.js | 4 +- .../living/nodes/HTMLLinkElement-impl.js | 45 +- .../living/nodes/HTMLMediaElement-impl.js | 11 +- .../living/nodes/HTMLMeterElement-impl.js | 10 + .../living/nodes/HTMLOListElement-impl.js | 15 +- .../living/nodes/HTMLObjectElement-impl.js | 4 +- .../living/nodes/HTMLOptionElement-impl.js | 4 +- .../nodes/HTMLOptionsCollection-impl.js | 10 +- .../living/nodes/HTMLOutputElement-impl.js | 72 + .../living/nodes/HTMLProgressElement-impl.js | 47 +- .../living/nodes/HTMLScriptElement-impl.js | 95 +- .../living/nodes/HTMLSelectElement-impl.js | 14 +- .../living/nodes/HTMLSlotElement-impl.js | 57 + .../living/nodes/HTMLSourceElement-impl.js | 2 +- .../living/nodes/HTMLTableElement-impl.js | 23 +- .../living/nodes/HTMLTableRowElement-impl.js | 15 +- .../nodes/HTMLTableSectionElement-impl.js | 12 +- .../living/nodes/HTMLTemplateElement-impl.js | 37 +- .../living/nodes/HTMLTextAreaElement-impl.js | 33 +- .../living/nodes/HTMLTitleElement-impl.js | 8 +- .../jsdom/lib/jsdom/living/nodes/Node-impl.js | 622 +- .../lib/jsdom/living/nodes/ParentNode-impl.js | 65 +- .../lib/jsdom/living/nodes/SVGElement-impl.js | 3 +- .../living/nodes/SVGTitleElement-impl.js | 9 + .../lib/jsdom/living/nodes/ShadowRoot-impl.js | 57 + .../lib/jsdom/living/nodes/Slotable-impl.js | 48 + .../jsdom/lib/jsdom/living/nodes/Text-impl.js | 8 +- .../jsdom/lib/jsdom/living/post-message.js | 12 +- .../lib/jsdom/living/register-elements.js | 8 + .../websockets/WebSocket-impl-browser.js | 30 +- .../jsdom/living/websockets/WebSocket-impl.js | 28 +- .../jsdom/living/webstorage/Storage-impl.js | 95 + .../lib/jsdom/living/window/SessionHistory.js | 25 +- .../jsdom/lib/jsdom/living/xhr-utils.js | 42 +- .../jsdom/lib/jsdom/living/xmlhttprequest.js | 57 +- node_modules/jsdom/lib/jsdom/utils.js | 44 +- node_modules/jsdom/lib/old-api.js | 494 - node_modules/jsdom/lib/old-api.md | 588 - node_modules/jsdom/package.json | 95 +- node_modules/jsesc/package.json | 23 +- node_modules/json-schema-traverse/.npmignore | 60 - node_modules/json-schema-traverse/README.md | 20 +- node_modules/json-schema-traverse/index.js | 20 +- .../json-schema-traverse/package.json | 22 +- .../json-schema-traverse/spec/index.spec.js | 79 +- node_modules/json-schema/package.json | 13 +- node_modules/json-stringify-safe/package.json | 23 +- node_modules/json5/package.json | 26 +- node_modules/jsprim/package.json | 23 +- node_modules/kind-of/LICENSE | 21 - node_modules/kind-of/README.md | 261 - node_modules/kind-of/index.js | 116 - node_modules/kind-of/package.json | 140 - node_modules/left-pad/.travis.yml | 6 - node_modules/left-pad/COPYING | 14 - node_modules/left-pad/README.md | 36 - node_modules/left-pad/index.d.ts | 9 - node_modules/left-pad/index.js | 52 - node_modules/left-pad/package.json | 67 - node_modules/left-pad/perf/O(n).js | 17 - node_modules/left-pad/perf/es6Repeat.js | 13 - node_modules/left-pad/perf/perf.js | 40 - node_modules/left-pad/test.js | 88 - node_modules/levn/package.json | 23 +- .../lodash.isplainobject/package.json | 23 +- node_modules/lodash.some/package.json | 23 +- node_modules/lodash.sortby/package.json | 23 +- node_modules/lodash/README.md | 6 +- node_modules/lodash/_baseMergeDeep.js | 2 +- node_modules/lodash/_hasUnicodeWord.js | 2 +- node_modules/lodash/_safeGet.js | 8 +- node_modules/lodash/core.js | 2 +- node_modules/lodash/core.min.js | 4 +- node_modules/lodash/fp/_baseConvert.js | 24 +- node_modules/lodash/fp/_mapping.js | 10 - node_modules/lodash/lodash.js | 36 +- node_modules/lodash/lodash.min.js | 256 +- node_modules/lodash/package.json | 32 +- node_modules/loose-envify/package.json | 23 +- node_modules/micromatch/LICENSE | 21 - node_modules/micromatch/README.md | 689 - node_modules/micromatch/index.js | 431 - node_modules/micromatch/lib/chars.js | 67 - node_modules/micromatch/lib/expand.js | 304 - node_modules/micromatch/lib/glob.js | 193 - node_modules/micromatch/lib/utils.js | 149 - node_modules/micromatch/package.json | 145 - node_modules/mime-db/HISTORY.md | 37 + node_modules/mime-db/README.md | 30 +- node_modules/mime-db/db.json | 1399 +- node_modules/mime-db/package.json | 49 +- node_modules/mime-types/HISTORY.md | 34 + node_modules/mime-types/README.md | 25 +- node_modules/mime-types/package.json | 44 +- node_modules/minimatch/package.json | 25 +- node_modules/minimist/package.json | 24 +- .../mkdirp/node_modules/minimist/package.json | 13 +- node_modules/mkdirp/package.json | 27 +- node_modules/ms/package.json | 15 +- node_modules/normalize-path/LICENSE | 21 - node_modules/normalize-path/README.md | 92 - node_modules/normalize-path/index.js | 19 - node_modules/normalize-path/package.json | 118 - node_modules/number-is-nan/package.json | 23 +- node_modules/nwmatcher/LICENSE | 22 - node_modules/nwmatcher/README.md | 113 - node_modules/nwmatcher/package.json | 59 - .../nwmatcher/src/modules/nwmatcher-cache.js | 187 - .../nwmatcher/src/modules/nwmatcher-jquery.js | 126 - .../src/modules/nwmatcher-pseudos.js | 308 - .../src/modules/nwmatcher-shortcuts.js | 35 - .../src/modules/nwmatcher-webforms.js | 104 - node_modules/nwmatcher/src/nwmatcher-base.js | 794 - node_modules/nwmatcher/src/nwmatcher-noqsa.js | 981 - node_modules/nwmatcher/src/nwmatcher.js | 1776 -- node_modules/nwsapi/LICENSE | 22 + node_modules/nwsapi/README.md | 132 + .../dist/.keep => nwsapi/dist/lint.log} | 0 node_modules/nwsapi/package.json | 74 + .../nwsapi/src/modules/nwsapi-jquery.js | 135 + .../src/modules/nwsapi-traversal.js} | 0 node_modules/nwsapi/src/nwsapi.js | 1817 ++ node_modules/oauth-sign/README.md | 7 + node_modules/oauth-sign/index.js | 34 +- node_modules/oauth-sign/package.json | 22 +- node_modules/object-keys/package.json | 23 +- .../package.json | 23 +- node_modules/object.omit/LICENSE | 21 - node_modules/object.omit/README.md | 118 - node_modules/object.omit/index.js | 40 - node_modules/object.omit/package.json | 98 - node_modules/optionator/package.json | 23 +- node_modules/os-homedir/package.json | 23 +- node_modules/os-tmpdir/package.json | 23 +- node_modules/parse-glob/LICENSE | 21 - node_modules/parse-glob/README.md | 115 - node_modules/parse-glob/index.js | 156 - node_modules/parse-glob/package.json | 93 - node_modules/parse5/LICENSE | 19 - node_modules/parse5/README.md | 42 +- node_modules/parse5/lib/common/doctype.js | 233 +- node_modules/parse5/lib/common/error-codes.js | 65 + .../parse5/lib/common/foreign-content.js | 265 + .../parse5/lib/common/foreign_content.js | 260 - node_modules/parse5/lib/common/html.js | 204 +- node_modules/parse5/lib/common/unicode.js | 100 +- .../extensions/error-reporting/mixin-base.js | 43 + .../error-reporting/parser-mixin.js | 52 + .../error-reporting/preprocessor-mixin.js | 24 + .../error-reporting/tokenizer-mixin.js | 17 + .../location-info/open-element-stack-mixin.js | 35 + .../extensions/location-info/parser-mixin.js | 222 + .../location-info/tokenizer-mixin.js | 146 + .../location_info/open_element_stack_mixin.js | 34 - .../extensions/location_info/parser_mixin.js | 213 - .../location_info/tokenizer_mixin.js | 117 - .../position-tracking/preprocessor-mixin.js | 64 + .../position_tracking/preprocessor_mixin.js | 72 - node_modules/parse5/lib/index.d.ts | 1085 - node_modules/parse5/lib/index.js | 49 +- .../lib/parser/formatting-element-list.js | 181 + .../lib/parser/formatting_element_list.js | 167 - node_modules/parse5/lib/parser/index.js | 2917 +-- .../parse5/lib/parser/open-element-stack.js | 482 + .../parse5/lib/parser/open_element_stack.js | 395 - .../parse5/lib/parser/parser_stream.js | 76 - .../parser/plain_text_conversion_stream.js | 20 - .../parse5/lib/sax/dev_null_stream.js | 14 - node_modules/parse5/lib/sax/index.js | 118 - .../lib/sax/parser_feedback_simulator.js | 153 - node_modules/parse5/lib/serializer/index.js | 296 +- .../lib/serializer/serializer_stream.js | 28 - node_modules/parse5/lib/tokenizer/index.js | 4124 ++-- .../parse5/lib/tokenizer/named-entity-data.js | 5 + .../parse5/lib/tokenizer/named_entity_data.js | 5 - .../parse5/lib/tokenizer/preprocessor.js | 234 +- .../parse5/lib/tree-adapters/default.js | 217 + .../parse5/lib/tree_adapters/default.js | 209 - .../parse5/lib/tree_adapters/htmlparser2.js | 338 - .../parse5/lib/utils/merge-options.js | 13 + .../parse5/lib/utils/merge_options.js | 13 - node_modules/parse5/lib/utils/mixin.js | 45 +- node_modules/parse5/package.json | 52 +- node_modules/path-is-absolute/package.json | 25 +- node_modules/path-parse/package.json | 23 +- node_modules/performance-now/package.json | 23 +- node_modules/pn/package.json | 23 +- node_modules/prelude-ls/package.json | 23 +- node_modules/preserve/.gitattributes | 14 - node_modules/preserve/.jshintrc | 24 - node_modules/preserve/.npmignore | 53 - node_modules/preserve/.travis.yml | 3 - node_modules/preserve/.verb.md | 59 - node_modules/preserve/LICENSE | 24 - node_modules/preserve/README.md | 90 - node_modules/preserve/index.js | 54 - node_modules/preserve/package.json | 73 - node_modules/preserve/test.js | 48 - node_modules/private/package.json | 23 +- node_modules/psl/.eslintignore | 1 + node_modules/psl/.eslintrc | 11 + node_modules/psl/.travis.yml | 6 + node_modules/psl/LICENSE | 9 + node_modules/psl/README.md | 213 + node_modules/psl/data/rules.json | 1 + node_modules/psl/dist/psl.js | 812 + node_modules/psl/dist/psl.min.js | 1 + node_modules/psl/index.js | 269 + node_modules/psl/karma.conf.js | 38 + node_modules/psl/package.json | 74 + node_modules/psl/yarn.lock | 3955 ++++ node_modules/punycode/package.json | 17 +- node_modules/punycode/punycode.es6.js | 1 + node_modules/qs/package.json | 23 +- node_modules/randomatic/LICENSE | 21 - node_modules/randomatic/README.md | 154 - node_modules/randomatic/index.js | 82 - .../randomatic/node_modules/is-number/LICENSE | 21 - .../node_modules/is-number/README.md | 115 - .../node_modules/is-number/index.js | 22 - .../is-number/node_modules/kind-of/LICENSE | 21 - .../is-number/node_modules/kind-of/README.md | 261 - .../is-number/node_modules/kind-of/index.js | 116 - .../node_modules/kind-of/package.json | 139 - .../node_modules/is-number/package.json | 123 - .../randomatic/node_modules/kind-of/LICENSE | 21 - .../randomatic/node_modules/kind-of/README.md | 267 - .../randomatic/node_modules/kind-of/index.js | 119 - .../node_modules/kind-of/package.json | 139 - node_modules/randomatic/package.json | 126 - node_modules/regenerator-runtime/package.json | 23 +- node_modules/regex-cache/LICENSE | 21 - node_modules/regex-cache/README.md | 166 - node_modules/regex-cache/index.js | 68 - node_modules/regex-cache/package.json | 101 - .../remove-trailing-separator/history.md | 17 - .../remove-trailing-separator/index.js | 17 - .../remove-trailing-separator/license | 3 - .../remove-trailing-separator/package.json | 64 - .../remove-trailing-separator/readme.md | 51 - node_modules/repeat-element/LICENSE | 21 - node_modules/repeat-element/README.md | 71 - node_modules/repeat-element/index.js | 18 - node_modules/repeat-element/package.json | 70 - node_modules/repeat-string/LICENSE | 21 - node_modules/repeat-string/README.md | 136 - node_modules/repeat-string/index.js | 70 - node_modules/repeat-string/package.json | 128 - node_modules/repeating/package.json | 23 +- node_modules/request-promise-core/.npmignore | 13 - node_modules/request-promise-core/README.md | 7 +- .../request-promise-core/package.json | 26 +- node_modules/request-promise-native/README.md | 8 + .../request-promise-native/package.json | 18 +- node_modules/request/CHANGELOG.md | 8 + node_modules/request/README.md | 6 +- node_modules/request/lib/auth.js | 2 +- node_modules/request/lib/hawk.js | 89 + node_modules/request/lib/multipart.js | 2 +- node_modules/request/lib/oauth.js | 2 +- .../node_modules/punycode/LICENSE-MIT.txt | 0 .../node_modules/punycode/README.md | 0 .../node_modules/punycode/package.json | 93 + .../node_modules/punycode/punycode.js | 0 .../request/node_modules/tough-cookie/LICENSE | 12 + .../node_modules/tough-cookie/README.md | 507 + .../node_modules/tough-cookie/lib/cookie.js | 1431 ++ .../node_modules/tough-cookie/lib/memstore.js | 176 + .../tough-cookie/lib/pathMatch.js | 61 + .../tough-cookie/lib/permuteDomain.js | 56 + .../tough-cookie/lib/pubsuffix-psl.js | 38 + .../node_modules/tough-cookie/lib/store.js | 71 + .../node_modules/tough-cookie/package.json | 94 + node_modules/request/package.json | 56 +- node_modules/request/request.js | 29 +- node_modules/resolve/package.json | 25 +- node_modules/safe-buffer/package.json | 28 +- node_modules/safer-buffer/LICENSE | 21 + node_modules/safer-buffer/Porting-Buffer.md | 268 + node_modules/safer-buffer/Readme.md | 156 + node_modules/safer-buffer/dangerous.js | 58 + node_modules/safer-buffer/package.json | 63 + node_modules/safer-buffer/safer.js | 77 + node_modules/safer-buffer/tests.js | 406 + node_modules/sax/LICENSE | 41 - node_modules/sax/README.md | 225 - node_modules/sax/lib/sax.js | 1565 -- node_modules/sax/package.json | 61 - node_modules/saxes/CHANGELOG.md | 337 + node_modules/saxes/LICENSE | 64 + node_modules/saxes/README.md | 246 + node_modules/saxes/lib/saxes.d.ts | 67 + node_modules/saxes/lib/saxes.js | 1879 ++ node_modules/saxes/package.json | 83 + node_modules/semver/package.json | 25 +- node_modules/slash/package.json | 23 +- node_modules/sntp/.npmignore | 3 - node_modules/sntp/LICENSE | 28 - node_modules/sntp/README.md | 68 - node_modules/sntp/lib/index.js | 412 - node_modules/sntp/package.json | 64 - node_modules/source-map-support/package.json | 23 +- node_modules/source-map/package.json | 30 +- node_modules/sshpk/README.md | 126 +- node_modules/sshpk/bin/sshpk-conv | 105 +- node_modules/sshpk/bin/sshpk-verify | 3 +- node_modules/sshpk/lib/algs.js | 38 +- node_modules/sshpk/lib/certificate.js | 39 +- node_modules/sshpk/lib/dhe.js | 54 +- node_modules/sshpk/lib/ed-compat.js | 17 +- node_modules/sshpk/lib/fingerprint.js | 85 +- node_modules/sshpk/lib/formats/auto.js | 22 +- node_modules/sshpk/lib/formats/dnssec.js | 15 +- .../sshpk/lib/formats/openssh-cert.js | 52 +- node_modules/sshpk/lib/formats/pem.js | 123 +- node_modules/sshpk/lib/formats/pkcs1.js | 17 +- node_modules/sshpk/lib/formats/pkcs8.js | 47 +- node_modules/sshpk/lib/formats/putty.js | 99 + node_modules/sshpk/lib/formats/rfc4253.js | 3 +- node_modules/sshpk/lib/formats/ssh-private.js | 13 +- node_modules/sshpk/lib/formats/ssh.js | 7 +- node_modules/sshpk/lib/formats/x509-pem.js | 23 +- node_modules/sshpk/lib/formats/x509.js | 41 +- node_modules/sshpk/lib/identity.js | 93 +- node_modules/sshpk/lib/index.js | 1 + node_modules/sshpk/lib/key.js | 41 +- node_modules/sshpk/lib/private-key.js | 34 +- node_modules/sshpk/lib/signature.js | 3 +- node_modules/sshpk/lib/ssh-buffer.js | 7 +- node_modules/sshpk/lib/utils.js | 102 +- node_modules/sshpk/package.json | 28 +- node_modules/stealthy-require/package.json | 23 +- node_modules/stringstream/.npmignore | 15 - node_modules/stringstream/.travis.yml | 4 - node_modules/stringstream/LICENSE.txt | 22 - node_modules/stringstream/README.md | 38 - node_modules/stringstream/example.js | 27 - node_modules/stringstream/package.json | 51 - node_modules/stringstream/stringstream.js | 102 - node_modules/strip-ansi/package.json | 23 +- node_modules/supports-color/package.json | 23 +- node_modules/symbol-tree/package.json | 23 +- node_modules/to-fast-properties/package.json | 23 +- node_modules/tough-cookie/LICENSE | 15 - node_modules/tough-cookie/README.md | 36 +- node_modules/tough-cookie/lib/cookie.js | 102 +- node_modules/tough-cookie/lib/memstore.js | 11 + .../tough-cookie/lib/permuteDomain.js | 2 +- .../tough-cookie/lib/pubsuffix-psl.js | 38 + node_modules/tough-cookie/lib/pubsuffix.js | 98 - node_modules/tough-cookie/lib/store.js | 4 + node_modules/tough-cookie/lib/version.js | 2 + .../node_modules/punycode/package.json | 87 - node_modules/tough-cookie/package.json | 37 +- node_modules/tr46/package.json | 23 +- node_modules/trim-right/package.json | 24 +- node_modules/tunnel-agent/package.json | 23 +- node_modules/tweetnacl/package.json | 24 +- node_modules/type-check/package.json | 23 +- node_modules/uri-js/README.md | 199 + node_modules/uri-js/bower.json | 47 + node_modules/uri-js/dist/es5/uri.all.d.ts | 59 + node_modules/uri-js/dist/es5/uri.all.js | 1389 ++ node_modules/uri-js/dist/es5/uri.all.js.map | 1 + node_modules/uri-js/dist/es5/uri.all.min.d.ts | 59 + node_modules/uri-js/dist/es5/uri.all.min.js | 3 + .../uri-js/dist/es5/uri.all.min.js.map | 1 + node_modules/uri-js/dist/esnext/index.d.ts | 1 + node_modules/uri-js/dist/esnext/index.js | 13 + node_modules/uri-js/dist/esnext/index.js.map | 1 + .../uri-js/dist/esnext/regexps-iri.d.ts | 3 + .../uri-js/dist/esnext/regexps-iri.js | 3 + .../uri-js/dist/esnext/regexps-iri.js.map | 1 + .../uri-js/dist/esnext/regexps-uri.d.ts | 4 + .../uri-js/dist/esnext/regexps-uri.js | 42 + .../uri-js/dist/esnext/regexps-uri.js.map | 1 + .../uri-js/dist/esnext/schemes/http.d.ts | 3 + .../uri-js/dist/esnext/schemes/http.js | 27 + .../uri-js/dist/esnext/schemes/http.js.map | 1 + .../uri-js/dist/esnext/schemes/https.d.ts | 3 + .../uri-js/dist/esnext/schemes/https.js | 9 + .../uri-js/dist/esnext/schemes/https.js.map | 1 + .../uri-js/dist/esnext/schemes/mailto.d.ts | 12 + .../uri-js/dist/esnext/schemes/mailto.js | 148 + .../uri-js/dist/esnext/schemes/mailto.js.map | 1 + .../uri-js/dist/esnext/schemes/urn-uuid.d.ts | 7 + .../uri-js/dist/esnext/schemes/urn-uuid.js | 23 + .../dist/esnext/schemes/urn-uuid.js.map | 1 + .../uri-js/dist/esnext/schemes/urn.d.ts | 10 + .../uri-js/dist/esnext/schemes/urn.js | 49 + .../uri-js/dist/esnext/schemes/urn.js.map | 1 + node_modules/uri-js/dist/esnext/uri.d.ts | 59 + node_modules/uri-js/dist/esnext/uri.js | 480 + node_modules/uri-js/dist/esnext/uri.js.map | 1 + node_modules/uri-js/dist/esnext/util.d.ts | 6 + node_modules/uri-js/dist/esnext/util.js | 36 + node_modules/uri-js/dist/esnext/util.js.map | 1 + node_modules/uri-js/package.json | 93 + node_modules/uri-js/rollup.config.js | 32 + node_modules/uri-js/src/index.ts | 18 + node_modules/uri-js/src/punycode.d.ts | 24 + node_modules/uri-js/src/regexps-iri.ts | 4 + node_modules/uri-js/src/regexps-uri.ts | 89 + node_modules/uri-js/src/schemes/http.ts | 36 + node_modules/uri-js/src/schemes/https.ts | 11 + node_modules/uri-js/src/schemes/mailto.ts | 182 + node_modules/uri-js/src/schemes/urn-uuid.ts | 36 + node_modules/uri-js/src/schemes/urn.ts | 69 + node_modules/uri-js/src/uri.ts | 556 + node_modules/uri-js/src/util.ts | 40 + node_modules/uri-js/tests/qunit.css | 118 + node_modules/uri-js/tests/qunit.js | 1042 + node_modules/uri-js/tests/test-es5-min.html | 17 + node_modules/uri-js/tests/test-es5.html | 17 + node_modules/uri-js/tests/tests.js | 774 + node_modules/uri-js/tsconfig.json | 20 + node_modules/uri-js/yarn.lock | 1902 ++ node_modules/util.promisify/package.json | 23 +- node_modules/uuid/CHANGELOG.md | 75 +- node_modules/uuid/README.md | 12 +- node_modules/uuid/lib/bytesToUuid.js | 17 +- node_modules/uuid/lib/rng-browser.js | 8 +- node_modules/uuid/lib/v35.js | 6 +- node_modules/uuid/package.json | 38 +- node_modules/verror/package.json | 13 +- node_modules/w3c-hr-time/package.json | 23 +- node_modules/w3c-xmlserializer/README.md | 20 + .../lib/XMLSerializer-impl.js | 9 + .../w3c-xmlserializer/lib/XMLSerializer.js | 113 + .../w3c-xmlserializer/lib/attributes.js | 128 + .../w3c-xmlserializer/lib/constants.js | 44 + node_modules/w3c-xmlserializer/lib/index.js | 9 + .../w3c-xmlserializer/lib/serialization.js | 379 + node_modules/w3c-xmlserializer/lib/utils.js | 127 + node_modules/w3c-xmlserializer/package.json | 66 + node_modules/webidl-conversions/package.json | 23 +- node_modules/whatwg-encoding/LICENSE.txt | 2 +- node_modules/whatwg-encoding/package.json | 30 +- node_modules/whatwg-mimetype/LICENSE.txt | 2 +- node_modules/whatwg-mimetype/README.md | 2 +- node_modules/whatwg-mimetype/lib/parser.js | 75 +- .../whatwg-mimetype/lib/serializer.js | 2 +- node_modules/whatwg-mimetype/lib/utils.js | 16 +- node_modules/whatwg-mimetype/package.json | 30 +- node_modules/whatwg-url/README.md | 27 +- node_modules/whatwg-url/lib/URL-impl.js | 6 +- node_modules/whatwg-url/lib/URL.js | 265 +- .../whatwg-url/lib/URLSearchParams.js | 591 +- .../whatwg-url/lib/url-state-machine.js | 30 +- node_modules/whatwg-url/lib/utils.js | 52 +- node_modules/whatwg-url/package.json | 37 +- node_modules/wordwrap/package.json | 23 +- node_modules/ws/README.md | 258 +- node_modules/ws/browser.js | 8 + node_modules/ws/lib/.DS_Store | Bin 6148 -> 0 bytes node_modules/ws/lib/buffer-util.js | 153 +- node_modules/ws/lib/constants.js | 16 +- node_modules/ws/lib/event-target.js | 22 +- node_modules/ws/lib/extension.js | 49 +- node_modules/ws/lib/permessage-deflate.js | 141 +- node_modules/ws/lib/receiver.js | 509 +- node_modules/ws/lib/sender.js | 220 +- node_modules/ws/lib/validation.js | 7 +- node_modules/ws/lib/websocket-server.js | 198 +- node_modules/ws/lib/websocket.js | 840 +- node_modules/ws/package.json | 56 +- node_modules/xml-name-validator/package.json | 23 +- node_modules/xmlchars/LICENSE | 18 + node_modules/xmlchars/README.md | 36 + node_modules/xmlchars/package.json | 82 + node_modules/xmlchars/xml/1.0/ed4.d.ts | 31 + node_modules/xmlchars/xml/1.0/ed4.js | 44 + node_modules/xmlchars/xml/1.0/ed4.js.map | 1 + node_modules/xmlchars/xml/1.0/ed5.d.ts | 51 + node_modules/xmlchars/xml/1.0/ed5.js | 109 + node_modules/xmlchars/xml/1.0/ed5.js.map | 1 + node_modules/xmlchars/xmlchars.d.ts | 170 + node_modules/xmlchars/xmlchars.js | 188 + node_modules/xmlchars/xmlchars.js.map | 1 + node_modules/xmlchars/xmlns/1.0/ed3.d.ts | 28 + node_modules/xmlchars/xmlns/1.0/ed3.js | 65 + node_modules/xmlchars/xmlns/1.0/ed3.js.map | 1 + node_modules/yargs-parser/package.json | 23 +- package-lock.json | 1567 +- package.json | 2 +- 8347 files changed, 390123 insertions(+), 159877 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 example/dist/dist.css delete mode 100644 example/dist/dist.js create mode 100644 node_modules/.bin/acorn.cmd create mode 100644 node_modules/.bin/babel-minify.cmd create mode 100644 node_modules/.bin/babylon.cmd create mode 100644 node_modules/.bin/escodegen.cmd create mode 100644 node_modules/.bin/esgenerate.cmd create mode 100644 node_modules/.bin/esparse.cmd create mode 100644 node_modules/.bin/esvalidate.cmd create mode 100644 node_modules/.bin/jsesc.cmd create mode 100644 node_modules/.bin/json5.cmd create mode 100644 node_modules/.bin/loose-envify.cmd create mode 100644 node_modules/.bin/minify.cmd create mode 100644 node_modules/.bin/mkdirp.cmd create mode 100644 node_modules/.bin/parser create mode 100644 node_modules/.bin/parser.cmd create mode 100644 node_modules/.bin/semver.cmd create mode 100644 node_modules/.bin/sshpk-conv.cmd create mode 100644 node_modules/.bin/sshpk-sign.cmd create mode 100644 node_modules/.bin/sshpk-verify.cmd create mode 100644 node_modules/.bin/uuid.cmd delete mode 100644 node_modules/@babel/code-frame/README.md delete mode 100644 node_modules/@babel/code-frame/lib/index.js delete mode 100644 node_modules/@babel/code-frame/package.json create mode 100644 node_modules/@babel/core/LICENSE create mode 100644 node_modules/@babel/core/lib/config/pattern-to-regex.js delete mode 100644 node_modules/@babel/core/lib/transform-ast-sync.js delete mode 100644 node_modules/@babel/core/lib/transform-file-sync-browser.js delete mode 100644 node_modules/@babel/core/lib/transform-file-sync.js delete mode 100644 node_modules/@babel/core/lib/transform-sync.js create mode 100644 node_modules/@babel/core/lib/transformation/file/merge-map.js delete mode 120000 node_modules/@babel/core/node_modules/.bin/babylon create mode 100644 node_modules/@babel/core/node_modules/.bin/jsesc create mode 100644 node_modules/@babel/core/node_modules/.bin/jsesc.cmd create mode 100644 node_modules/@babel/core/node_modules/.bin/json5 create mode 100644 node_modules/@babel/core/node_modules/.bin/json5.cmd create mode 100644 node_modules/@babel/core/node_modules/@babel/code-frame/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/code-frame/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/code-frame/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/buffer.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/generators/base.js rename node_modules/@babel/{ => core/node_modules/@babel}/generator/lib/generators/classes.js (89%) rename node_modules/@babel/{ => core/node_modules/@babel}/generator/lib/generators/expressions.js (91%) create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/generators/flow.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/generators/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/generators/jsx.js rename node_modules/@babel/{ => core/node_modules/@babel}/generator/lib/generators/methods.js (81%) rename node_modules/@babel/{ => core/node_modules/@babel}/generator/lib/generators/modules.js (90%) rename node_modules/@babel/{ => core/node_modules/@babel}/generator/lib/generators/statements.js (84%) create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/generators/template-literals.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/generators/types.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/generators/typescript.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/node/index.js rename node_modules/@babel/{ => core/node_modules/@babel}/generator/lib/node/parentheses.js (78%) rename node_modules/@babel/{ => core/node_modules/@babel}/generator/lib/node/whitespace.js (78%) create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/printer.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/lib/source-map.js create mode 100644 node_modules/@babel/core/node_modules/@babel/generator/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-function-name/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-function-name/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-function-name/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-function-name/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/helpers/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/helpers/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers.js create mode 100644 node_modules/@babel/core/node_modules/@babel/helpers/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/helpers/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/highlight/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/highlight/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/highlight/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/highlight/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/template/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/template/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/template/lib/builder.js create mode 100644 node_modules/@babel/core/node_modules/@babel/template/lib/formatters.js create mode 100644 node_modules/@babel/core/node_modules/@babel/template/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/template/lib/literal.js create mode 100644 node_modules/@babel/core/node_modules/@babel/template/lib/options.js create mode 100644 node_modules/@babel/core/node_modules/@babel/template/lib/parse.js create mode 100644 node_modules/@babel/core/node_modules/@babel/template/lib/populate.js create mode 100644 node_modules/@babel/core/node_modules/@babel/template/lib/string.js create mode 100644 node_modules/@babel/core/node_modules/@babel/template/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/README.md rename node_modules/@babel/{ => core/node_modules/@babel}/traverse/lib/cache.js (88%) create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/hub.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/ancestry.js rename node_modules/@babel/{ => core/node_modules/@babel}/traverse/lib/path/comments.js (77%) create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/conversion.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/evaluation.js rename node_modules/@babel/{ => core/node_modules/@babel}/traverse/lib/path/family.js (82%) create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js rename node_modules/@babel/{ => core/node_modules/@babel}/traverse/lib/path/inference/inferers.js (87%) create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/introspection.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/hoister.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/virtual-types.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/modification.js rename node_modules/@babel/{ => core/node_modules/@babel}/traverse/lib/path/removal.js (80%) create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/path/replacement.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/binding.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/lib/renamer.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js create mode 100644 node_modules/@babel/core/node_modules/@babel/traverse/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/types/LICENSE create mode 100644 node_modules/@babel/core/node_modules/@babel/types/README.md create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/asserts/assertNode.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/asserts/generated/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/builders/builder.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/builders/flow/createUnionTypeAnnotation.js (89%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/builders/generated/index.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/builders/react/buildChildren.js (87%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/clone/clone.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/clone/cloneDeep.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneNode.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/clone/cloneWithoutLoc.js (88%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/comments/addComment.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/comments/addComments.js (92%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/comments/inheritInnerComments.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/comments/inheritLeadingComments.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/comments/inheritTrailingComments.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/comments/inheritsComments.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/comments/removeComments.js (81%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/constants/generated/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/constants/index.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/converters/ensureBlock.js (80%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/converters/toBindingIdentifierName.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/converters/toBlock.js (96%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/converters/toComputedKey.js (76%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/converters/toExpression.js (88%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/converters/toIdentifier.js (96%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/converters/toKeyAlias.js (86%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/converters/toSequenceExpression.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/converters/toStatement.js (87%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/core.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/definitions/es2015.js (87%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/experimental.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/flow.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/jsx.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/misc.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/placeholders.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/typescript.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/definitions/utils.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/index.d.ts create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/index.js.flow create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/modifications/flow/removeTypeDuplicates.js (77%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/modifications/inherits.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/modifications/prependToMemberExpression.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removeProperties.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/modifications/removePropertiesDeep.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/retrievers/getBindingIdentifiers.js (85%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/retrievers/getOuterBindingIdentifiers.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverseFast.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/utils/inherit.js (82%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/utils/shallowEqual.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/generated/index.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/is.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBinding.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isBlockScoped.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isImmutable.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isLet.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isNode.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNodesEquivalent.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/isPlaceholderType.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isReferenced.js (75%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isScope.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isSpecifierDefault.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/isType.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidES3Identifier.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isValidIdentifier.js (85%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/isVar.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/matchesPattern.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/react/isCompatTag.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isReactComponent.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/lib/validators/validate.js (80%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/package.json create mode 100644 node_modules/@babel/core/node_modules/@babel/types/scripts/generateTypeHelpers.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/scripts/generators/docs.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/scripts/generators/flow.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/scripts/generators/generateAsserts.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/scripts/generators/generateBuilders.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/scripts/generators/generateConstants.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateValidators.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/scripts/generators/typescript.js rename node_modules/@babel/{ => core/node_modules/@babel}/types/scripts/utils/formatBuilderName.js (100%) rename node_modules/@babel/{ => core/node_modules/@babel}/types/scripts/utils/lowerFirst.js (100%) create mode 100644 node_modules/@babel/core/node_modules/@babel/types/scripts/utils/stringifyValidator.js create mode 100644 node_modules/@babel/core/node_modules/@babel/types/scripts/utils/toFunctionName.js rename node_modules/@babel/{highlight => core}/node_modules/ansi-styles/index.js (100%) rename node_modules/@babel/{highlight => core}/node_modules/ansi-styles/license (100%) create mode 100644 node_modules/@babel/core/node_modules/ansi-styles/package.json rename node_modules/@babel/{highlight => core}/node_modules/ansi-styles/readme.md (100%) delete mode 100644 node_modules/@babel/core/node_modules/babylon/CHANGELOG.md delete mode 100644 node_modules/@babel/core/node_modules/babylon/README.md delete mode 100755 node_modules/@babel/core/node_modules/babylon/bin/babylon.js delete mode 100644 node_modules/@babel/core/node_modules/babylon/lib/index.js delete mode 100644 node_modules/@babel/core/node_modules/babylon/package.json rename node_modules/@babel/{highlight => core}/node_modules/chalk/index.js (100%) create mode 100644 node_modules/@babel/core/node_modules/chalk/index.js.flow rename node_modules/@babel/{highlight => core}/node_modules/chalk/license (100%) create mode 100644 node_modules/@babel/core/node_modules/chalk/package.json rename node_modules/@babel/{highlight => core}/node_modules/chalk/readme.md (100%) rename node_modules/@babel/{highlight => core}/node_modules/chalk/templates.js (100%) rename node_modules/@babel/{highlight => core}/node_modules/chalk/types/index.d.ts (100%) delete mode 100644 node_modules/@babel/core/node_modules/debug/.coveralls.yml delete mode 100644 node_modules/@babel/core/node_modules/debug/.eslintrc delete mode 100644 node_modules/@babel/core/node_modules/debug/.npmignore delete mode 100644 node_modules/@babel/core/node_modules/debug/.travis.yml delete mode 100644 node_modules/@babel/core/node_modules/debug/Makefile create mode 100644 node_modules/@babel/core/node_modules/debug/dist/debug.js delete mode 100644 node_modules/@babel/core/node_modules/debug/karma.conf.js delete mode 100644 node_modules/@babel/core/node_modules/debug/node.js create mode 100644 node_modules/@babel/core/node_modules/debug/src/common.js delete mode 100644 node_modules/@babel/core/node_modules/debug/src/debug.js rename node_modules/@babel/{traverse => core}/node_modules/globals/globals.json (93%) rename node_modules/@babel/{traverse => core}/node_modules/globals/index.js (100%) rename node_modules/@babel/{highlight/node_modules/supports-color => core/node_modules/globals}/license (100%) create mode 100644 node_modules/@babel/core/node_modules/globals/package.json rename node_modules/@babel/{traverse => core}/node_modules/globals/readme.md (100%) create mode 100644 node_modules/@babel/core/node_modules/js-tokens/CHANGELOG.md create mode 100644 node_modules/@babel/core/node_modules/js-tokens/LICENSE create mode 100644 node_modules/@babel/core/node_modules/js-tokens/README.md create mode 100644 node_modules/@babel/core/node_modules/js-tokens/index.js create mode 100644 node_modules/@babel/core/node_modules/js-tokens/package.json rename node_modules/@babel/{generator => core}/node_modules/jsesc/LICENSE-MIT.txt (100%) rename node_modules/@babel/{generator => core}/node_modules/jsesc/README.md (100%) rename node_modules/@babel/{generator => core}/node_modules/jsesc/bin/jsesc (100%) mode change 100755 => 100644 rename node_modules/@babel/{generator => core}/node_modules/jsesc/jsesc.js (99%) rename node_modules/@babel/{generator => core}/node_modules/jsesc/man/jsesc.1 (100%) create mode 100644 node_modules/@babel/core/node_modules/jsesc/package.json create mode 100644 node_modules/@babel/core/node_modules/json5/CHANGELOG.md create mode 100644 node_modules/@babel/core/node_modules/json5/LICENSE.md create mode 100644 node_modules/@babel/core/node_modules/json5/README.md create mode 100644 node_modules/@babel/core/node_modules/json5/dist/index.js create mode 100644 node_modules/@babel/core/node_modules/json5/dist/index.min.js create mode 100644 node_modules/@babel/core/node_modules/json5/dist/index.min.mjs create mode 100644 node_modules/@babel/core/node_modules/json5/dist/index.mjs create mode 100644 node_modules/@babel/core/node_modules/json5/lib/cli.js create mode 100644 node_modules/@babel/core/node_modules/json5/lib/index.js create mode 100644 node_modules/@babel/core/node_modules/json5/lib/parse.js create mode 100644 node_modules/@babel/core/node_modules/json5/lib/register.js create mode 100644 node_modules/@babel/core/node_modules/json5/lib/require.js create mode 100644 node_modules/@babel/core/node_modules/json5/lib/stringify.js create mode 100644 node_modules/@babel/core/node_modules/json5/lib/unicode.js create mode 100644 node_modules/@babel/core/node_modules/json5/lib/util.js create mode 100644 node_modules/@babel/core/node_modules/json5/package.json create mode 100644 node_modules/@babel/core/node_modules/ms/index.js create mode 100644 node_modules/@babel/core/node_modules/ms/license.md create mode 100644 node_modules/@babel/core/node_modules/ms/package.json create mode 100644 node_modules/@babel/core/node_modules/ms/readme.md rename node_modules/@babel/{highlight => core}/node_modules/supports-color/browser.js (100%) create mode 100644 node_modules/@babel/core/node_modules/supports-color/index.js rename node_modules/@babel/{traverse/node_modules/globals => core/node_modules/supports-color}/license (100%) create mode 100644 node_modules/@babel/core/node_modules/supports-color/package.json rename node_modules/@babel/{highlight => core}/node_modules/supports-color/readme.md (100%) rename node_modules/@babel/{types => core}/node_modules/to-fast-properties/index.js (100%) rename node_modules/@babel/{types => core}/node_modules/to-fast-properties/license (100%) create mode 100644 node_modules/@babel/core/node_modules/to-fast-properties/package.json rename node_modules/@babel/{types => core}/node_modules/to-fast-properties/readme.md (100%) delete mode 100644 node_modules/@babel/core/yarn.lock delete mode 100644 node_modules/@babel/generator/README.md delete mode 100644 node_modules/@babel/generator/lib/buffer.js delete mode 100644 node_modules/@babel/generator/lib/generators/base.js delete mode 100644 node_modules/@babel/generator/lib/generators/flow.js delete mode 100644 node_modules/@babel/generator/lib/generators/index.js delete mode 100644 node_modules/@babel/generator/lib/generators/jsx.js delete mode 100644 node_modules/@babel/generator/lib/generators/template-literals.js delete mode 100644 node_modules/@babel/generator/lib/generators/types.js delete mode 100644 node_modules/@babel/generator/lib/generators/typescript.js delete mode 100644 node_modules/@babel/generator/lib/index.js delete mode 100644 node_modules/@babel/generator/lib/node/index.js delete mode 100644 node_modules/@babel/generator/lib/printer.js delete mode 100644 node_modules/@babel/generator/lib/source-map.js delete mode 120000 node_modules/@babel/generator/node_modules/.bin/jsesc delete mode 100644 node_modules/@babel/generator/node_modules/jsesc/package.json delete mode 100644 node_modules/@babel/generator/package.json delete mode 100644 node_modules/@babel/helper-function-name/README.md delete mode 100644 node_modules/@babel/helper-function-name/lib/index.js delete mode 100644 node_modules/@babel/helper-function-name/package.json delete mode 100644 node_modules/@babel/helper-get-function-arity/README.md delete mode 100644 node_modules/@babel/helper-get-function-arity/lib/index.js delete mode 100644 node_modules/@babel/helper-get-function-arity/package.json delete mode 100644 node_modules/@babel/helper-split-export-declaration/README.md delete mode 100644 node_modules/@babel/helper-split-export-declaration/lib/index.js delete mode 100644 node_modules/@babel/helper-split-export-declaration/package.json delete mode 100644 node_modules/@babel/helpers/README.md delete mode 100644 node_modules/@babel/helpers/lib/helpers.js delete mode 100644 node_modules/@babel/helpers/lib/index.js delete mode 100644 node_modules/@babel/helpers/package.json delete mode 100644 node_modules/@babel/highlight/README.md delete mode 100644 node_modules/@babel/highlight/lib/index.js delete mode 100644 node_modules/@babel/highlight/node_modules/ansi-styles/package.json delete mode 100644 node_modules/@babel/highlight/node_modules/chalk/index.js.flow delete mode 100644 node_modules/@babel/highlight/node_modules/chalk/package.json delete mode 100644 node_modules/@babel/highlight/node_modules/supports-color/index.js delete mode 100644 node_modules/@babel/highlight/node_modules/supports-color/package.json delete mode 100644 node_modules/@babel/highlight/package.json create mode 100644 node_modules/@babel/parser/CHANGELOG.md rename node_modules/@babel/{core/node_modules/babylon => parser}/LICENSE (100%) create mode 100644 node_modules/@babel/parser/README.md create mode 100644 node_modules/@babel/parser/bin/babel-parser.js create mode 100644 node_modules/@babel/parser/lib/index.js create mode 100644 node_modules/@babel/parser/package.json create mode 100644 node_modules/@babel/parser/typings/babel-parser.d.ts delete mode 100644 node_modules/@babel/template/README.md delete mode 100644 node_modules/@babel/template/lib/builder.js delete mode 100644 node_modules/@babel/template/lib/formatters.js delete mode 100644 node_modules/@babel/template/lib/index.js delete mode 100644 node_modules/@babel/template/lib/literal.js delete mode 100644 node_modules/@babel/template/lib/options.js delete mode 100644 node_modules/@babel/template/lib/parse.js delete mode 100644 node_modules/@babel/template/lib/populate.js delete mode 100644 node_modules/@babel/template/lib/string.js delete mode 120000 node_modules/@babel/template/node_modules/.bin/babylon delete mode 100644 node_modules/@babel/template/node_modules/babylon/CHANGELOG.md delete mode 100644 node_modules/@babel/template/node_modules/babylon/LICENSE delete mode 100644 node_modules/@babel/template/node_modules/babylon/README.md delete mode 100755 node_modules/@babel/template/node_modules/babylon/bin/babylon.js delete mode 100644 node_modules/@babel/template/node_modules/babylon/lib/index.js delete mode 100644 node_modules/@babel/template/node_modules/babylon/package.json delete mode 100644 node_modules/@babel/template/package.json delete mode 100644 node_modules/@babel/traverse/README.md delete mode 100644 node_modules/@babel/traverse/lib/context.js delete mode 100644 node_modules/@babel/traverse/lib/hub.js delete mode 100644 node_modules/@babel/traverse/lib/index.js delete mode 100644 node_modules/@babel/traverse/lib/path/ancestry.js delete mode 100644 node_modules/@babel/traverse/lib/path/context.js delete mode 100644 node_modules/@babel/traverse/lib/path/conversion.js delete mode 100644 node_modules/@babel/traverse/lib/path/evaluation.js delete mode 100644 node_modules/@babel/traverse/lib/path/index.js delete mode 100644 node_modules/@babel/traverse/lib/path/inference/index.js delete mode 100644 node_modules/@babel/traverse/lib/path/inference/inferer-reference.js delete mode 100644 node_modules/@babel/traverse/lib/path/introspection.js delete mode 100644 node_modules/@babel/traverse/lib/path/lib/hoister.js delete mode 100644 node_modules/@babel/traverse/lib/path/lib/removal-hooks.js delete mode 100644 node_modules/@babel/traverse/lib/path/lib/virtual-types.js delete mode 100644 node_modules/@babel/traverse/lib/path/modification.js delete mode 100644 node_modules/@babel/traverse/lib/path/replacement.js delete mode 100644 node_modules/@babel/traverse/lib/scope/binding.js delete mode 100644 node_modules/@babel/traverse/lib/scope/index.js delete mode 100644 node_modules/@babel/traverse/lib/scope/lib/renamer.js delete mode 100644 node_modules/@babel/traverse/lib/visitors.js delete mode 120000 node_modules/@babel/traverse/node_modules/.bin/babylon delete mode 100644 node_modules/@babel/traverse/node_modules/babylon/CHANGELOG.md delete mode 100644 node_modules/@babel/traverse/node_modules/babylon/LICENSE delete mode 100644 node_modules/@babel/traverse/node_modules/babylon/README.md delete mode 100755 node_modules/@babel/traverse/node_modules/babylon/bin/babylon.js delete mode 100644 node_modules/@babel/traverse/node_modules/babylon/lib/index.js delete mode 100644 node_modules/@babel/traverse/node_modules/babylon/package.json delete mode 100644 node_modules/@babel/traverse/node_modules/debug/.coveralls.yml delete mode 100644 node_modules/@babel/traverse/node_modules/debug/.eslintrc delete mode 100644 node_modules/@babel/traverse/node_modules/debug/.npmignore delete mode 100644 node_modules/@babel/traverse/node_modules/debug/.travis.yml delete mode 100644 node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/@babel/traverse/node_modules/debug/LICENSE delete mode 100644 node_modules/@babel/traverse/node_modules/debug/Makefile delete mode 100644 node_modules/@babel/traverse/node_modules/debug/README.md delete mode 100644 node_modules/@babel/traverse/node_modules/debug/karma.conf.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/node.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/package.json delete mode 100644 node_modules/@babel/traverse/node_modules/debug/src/browser.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/src/debug.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/src/index.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/src/node.js delete mode 100644 node_modules/@babel/traverse/node_modules/globals/package.json delete mode 100644 node_modules/@babel/traverse/package.json delete mode 100644 node_modules/@babel/types/README.md delete mode 100644 node_modules/@babel/types/lib/asserts/assertNode.js delete mode 100644 node_modules/@babel/types/lib/asserts/generated/index.js delete mode 100644 node_modules/@babel/types/lib/builders/builder.js delete mode 100644 node_modules/@babel/types/lib/builders/generated/index.js delete mode 100644 node_modules/@babel/types/lib/clone/cloneNode.js delete mode 100644 node_modules/@babel/types/lib/constants/generated/index.js delete mode 100644 node_modules/@babel/types/lib/constants/index.js delete mode 100644 node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js delete mode 100644 node_modules/@babel/types/lib/converters/toSequenceExpression.js delete mode 100644 node_modules/@babel/types/lib/converters/valueToNode.js delete mode 100644 node_modules/@babel/types/lib/definitions/core.js delete mode 100644 node_modules/@babel/types/lib/definitions/experimental.js delete mode 100644 node_modules/@babel/types/lib/definitions/flow.js delete mode 100644 node_modules/@babel/types/lib/definitions/index.js delete mode 100644 node_modules/@babel/types/lib/definitions/jsx.js delete mode 100644 node_modules/@babel/types/lib/definitions/misc.js delete mode 100644 node_modules/@babel/types/lib/definitions/typescript.js delete mode 100644 node_modules/@babel/types/lib/definitions/utils.js delete mode 100644 node_modules/@babel/types/lib/index.d.ts delete mode 100644 node_modules/@babel/types/lib/index.js delete mode 100644 node_modules/@babel/types/lib/index.js.flow delete mode 100644 node_modules/@babel/types/lib/modifications/appendToMemberExpression.js delete mode 100644 node_modules/@babel/types/lib/modifications/inherits.js delete mode 100644 node_modules/@babel/types/lib/modifications/removeProperties.js delete mode 100644 node_modules/@babel/types/lib/traverse/traverse.js delete mode 100644 node_modules/@babel/types/lib/traverse/traverseFast.js delete mode 100644 node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js delete mode 100644 node_modules/@babel/types/lib/utils/shallowEqual.js delete mode 100644 node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js delete mode 100644 node_modules/@babel/types/lib/validators/generated/index.js delete mode 100644 node_modules/@babel/types/lib/validators/is.js delete mode 100644 node_modules/@babel/types/lib/validators/isBinding.js delete mode 100644 node_modules/@babel/types/lib/validators/isNodesEquivalent.js delete mode 100644 node_modules/@babel/types/lib/validators/isType.js delete mode 100644 node_modules/@babel/types/lib/validators/isValidES3Identifier.js delete mode 100644 node_modules/@babel/types/lib/validators/matchesPattern.js delete mode 100644 node_modules/@babel/types/lib/validators/react/isReactComponent.js delete mode 100644 node_modules/@babel/types/node_modules/to-fast-properties/package.json delete mode 100644 node_modules/@babel/types/package.json delete mode 100644 node_modules/@babel/types/scripts/generateTypeHelpers.js delete mode 100644 node_modules/@babel/types/scripts/generators/generateValidators.js delete mode 100644 node_modules/@babel/types/scripts/utils/formatCode.js create mode 100644 node_modules/acorn-walk/CHANGELOG.md create mode 100644 node_modules/acorn-walk/LICENSE create mode 100644 node_modules/acorn-walk/README.md rename node_modules/{acorn => acorn-walk}/dist/walk.js (80%) create mode 100644 node_modules/acorn-walk/dist/walk.js.map create mode 100644 node_modules/acorn-walk/dist/walk.mjs create mode 100644 node_modules/acorn-walk/dist/walk.mjs.map create mode 100644 node_modules/acorn-walk/package.json delete mode 100644 node_modules/acorn/AUTHORS delete mode 100644 node_modules/acorn/bin/_acorn.js delete mode 100644 node_modules/acorn/bin/run_test262.js delete mode 100644 node_modules/acorn/bin/test262.whitelist create mode 100644 node_modules/acorn/dist/acorn.d.ts delete mode 100644 node_modules/acorn/dist/acorn.es.js create mode 100644 node_modules/acorn/dist/acorn.js.map create mode 100644 node_modules/acorn/dist/acorn.mjs create mode 100644 node_modules/acorn/dist/acorn.mjs.map delete mode 100644 node_modules/acorn/dist/acorn_loose.es.js delete mode 100644 node_modules/acorn/dist/acorn_loose.js create mode 100644 node_modules/acorn/dist/bin.js delete mode 100644 node_modules/acorn/dist/walk.es.js delete mode 100644 node_modules/acorn/yarn-error.log delete mode 100644 node_modules/ajv/dist/nodent.min.js delete mode 100644 node_modules/ajv/dist/regenerator.min.js delete mode 100644 node_modules/ajv/lib/$data.js create mode 100644 node_modules/ajv/lib/.DS_Store delete mode 100644 node_modules/ajv/lib/compile/_rules.js create mode 100644 node_modules/ajv/lib/data.js create mode 100644 node_modules/ajv/lib/dot/comment.jst create mode 100644 node_modules/ajv/lib/dot/if.jst create mode 100644 node_modules/ajv/lib/dotjs/comment.js create mode 100644 node_modules/ajv/lib/dotjs/if.js create mode 100644 node_modules/ajv/lib/dotjs/index.js delete mode 100644 node_modules/ajv/lib/patternGroups.js delete mode 100644 node_modules/ajv/lib/refs/$data.json create mode 100644 node_modules/ajv/lib/refs/data.json create mode 100644 node_modules/ajv/lib/refs/json-schema-draft-07.json create mode 100644 node_modules/ajv/lib/refs/json-schema-secure.json delete mode 100644 node_modules/ajv/lib/refs/json-schema-v5.json create mode 100644 node_modules/ajv/scripts/publish-built-version delete mode 100755 node_modules/arr-diff/LICENSE delete mode 100644 node_modules/arr-diff/README.md delete mode 100644 node_modules/arr-diff/index.js delete mode 100644 node_modules/arr-diff/package.json delete mode 100755 node_modules/arr-flatten/LICENSE delete mode 100755 node_modules/arr-flatten/README.md delete mode 100644 node_modules/arr-flatten/index.js delete mode 100644 node_modules/arr-flatten/package.json delete mode 100755 node_modules/array-unique/LICENSE delete mode 100755 node_modules/array-unique/README.md delete mode 100755 node_modules/array-unique/index.js delete mode 100755 node_modules/array-unique/package.json delete mode 100644 node_modules/asn1/.npmignore delete mode 100644 node_modules/asn1/.travis.yml delete mode 100644 node_modules/asn1/tst/ber/reader.test.js delete mode 100644 node_modules/asn1/tst/ber/writer.test.js create mode 100644 node_modules/babel-core/node_modules/lodash/LICENSE create mode 100644 node_modules/babel-core/node_modules/lodash/README.md create mode 100644 node_modules/babel-core/node_modules/lodash/_DataView.js create mode 100644 node_modules/babel-core/node_modules/lodash/_Hash.js create mode 100644 node_modules/babel-core/node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/babel-core/node_modules/lodash/_ListCache.js create mode 100644 node_modules/babel-core/node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/babel-core/node_modules/lodash/_Map.js create mode 100644 node_modules/babel-core/node_modules/lodash/_MapCache.js create mode 100644 node_modules/babel-core/node_modules/lodash/_Promise.js create mode 100644 node_modules/babel-core/node_modules/lodash/_Set.js create mode 100644 node_modules/babel-core/node_modules/lodash/_SetCache.js create mode 100644 node_modules/babel-core/node_modules/lodash/_Stack.js create mode 100644 node_modules/babel-core/node_modules/lodash/_Symbol.js create mode 100644 node_modules/babel-core/node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/babel-core/node_modules/lodash/_WeakMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/_apply.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayEach.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayPush.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arraySample.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/babel-core/node_modules/lodash/_arraySome.js create mode 100644 node_modules/babel-core/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/babel-core/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_asciiWords.js create mode 100644 node_modules/babel-core/node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/babel-core/node_modules/lodash/_assignValue.js create mode 100644 node_modules/babel-core/node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseAssign.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseAt.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseClamp.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseClone.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseCreate.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseDelay.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseDifference.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseEach.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseEvery.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseFill.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseFilter.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseFor.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseForRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseGet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseGt.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseHas.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseInRange.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseInverter.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseLodash.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseLt.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseMatches.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseMean.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseMerge.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseNth.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/_basePick.js create mode 100644 node_modules/babel-core/node_modules/lodash/_basePickBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseProperty.js create mode 100644 node_modules/babel-core/node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/_basePullAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/_basePullAt.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseRandom.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseRange.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseReduce.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseRest.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSample.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSetData.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSlice.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSome.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseSum.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseTimes.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseToString.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseUnary.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseUniq.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseUnset.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseValues.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseXor.js create mode 100644 node_modules/babel-core/node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/_cacheHas.js create mode 100644 node_modules/babel-core/node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/_castFunction.js create mode 100644 node_modules/babel-core/node_modules/lodash/_castPath.js create mode 100644 node_modules/babel-core/node_modules/lodash/_castRest.js create mode 100644 node_modules/babel-core/node_modules/lodash/_castSlice.js create mode 100644 node_modules/babel-core/node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/babel-core/node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/babel-core/node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/babel-core/node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/babel-core/node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/babel-core/node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_compareAscending.js create mode 100644 node_modules/babel-core/node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/babel-core/node_modules/lodash/_composeArgs.js create mode 100644 node_modules/babel-core/node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/_copyArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_copyObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/_copySymbols.js create mode 100644 node_modules/babel-core/node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_coreJsData.js create mode 100644 node_modules/babel-core/node_modules/lodash/_countHolders.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createAggregator.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createAssigner.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createBind.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createCompounder.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createCtor.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createCurry.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createFind.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createFlow.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createHybrid.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createInverter.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createOver.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createPadding.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createPartial.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createRange.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createRecurry.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createRound.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createToPairs.js create mode 100644 node_modules/babel-core/node_modules/lodash/_createWrap.js create mode 100644 node_modules/babel-core/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/babel-core/node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/babel-core/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/babel-core/node_modules/lodash/_defineProperty.js create mode 100644 node_modules/babel-core/node_modules/lodash/_equalArrays.js create mode 100644 node_modules/babel-core/node_modules/lodash/_equalByTag.js create mode 100644 node_modules/babel-core/node_modules/lodash/_equalObjects.js create mode 100644 node_modules/babel-core/node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/babel-core/node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/babel-core/node_modules/lodash/_flatRest.js create mode 100644 node_modules/babel-core/node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getData.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getFuncName.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getHolder.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getMapData.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getMatchData.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getNative.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getSymbols.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getTag.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getValue.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getView.js create mode 100644 node_modules/babel-core/node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/babel-core/node_modules/lodash/_hasPath.js create mode 100644 node_modules/babel-core/node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/babel-core/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/babel-core/node_modules/lodash/_hashClear.js create mode 100644 node_modules/babel-core/node_modules/lodash/_hashDelete.js create mode 100644 node_modules/babel-core/node_modules/lodash/_hashGet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_hashHas.js create mode 100644 node_modules/babel-core/node_modules/lodash/_hashSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/babel-core/node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isKeyable.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isLaziable.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isMasked.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isPrototype.js create mode 100644 node_modules/babel-core/node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/babel-core/node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_lazyClone.js create mode 100644 node_modules/babel-core/node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/babel-core/node_modules/lodash/_lazyValue.js create mode 100644 node_modules/babel-core/node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/babel-core/node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/babel-core/node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/babel-core/node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/babel-core/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/babel-core/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/babel-core/node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_mapToArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/babel-core/node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/babel-core/node_modules/lodash/_mergeData.js create mode 100644 node_modules/babel-core/node_modules/lodash/_metaMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/babel-core/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/babel-core/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/babel-core/node_modules/lodash/_objectToString.js create mode 100644 node_modules/babel-core/node_modules/lodash/_overArg.js create mode 100644 node_modules/babel-core/node_modules/lodash/_overRest.js create mode 100644 node_modules/babel-core/node_modules/lodash/_parent.js create mode 100644 node_modules/babel-core/node_modules/lodash/_reEscape.js create mode 100644 node_modules/babel-core/node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/babel-core/node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/babel-core/node_modules/lodash/_realNames.js create mode 100644 node_modules/babel-core/node_modules/lodash/_reorder.js create mode 100644 node_modules/babel-core/node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/babel-core/node_modules/lodash/_root.js create mode 100644 node_modules/babel-core/node_modules/lodash/_safeGet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/babel-core/node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/babel-core/node_modules/lodash/_setData.js create mode 100644 node_modules/babel-core/node_modules/lodash/_setToArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/babel-core/node_modules/lodash/_setToString.js create mode 100644 node_modules/babel-core/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/babel-core/node_modules/lodash/_shortOut.js create mode 100644 node_modules/babel-core/node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/babel-core/node_modules/lodash/_stackClear.js create mode 100644 node_modules/babel-core/node_modules/lodash/_stackDelete.js create mode 100644 node_modules/babel-core/node_modules/lodash/_stackGet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_stackHas.js create mode 100644 node_modules/babel-core/node_modules/lodash/_stackSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/_stringSize.js create mode 100644 node_modules/babel-core/node_modules/lodash/_stringToArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_stringToPath.js create mode 100644 node_modules/babel-core/node_modules/lodash/_toKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/_toSource.js create mode 100644 node_modules/babel-core/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/babel-core/node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/babel-core/node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/babel-core/node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/babel-core/node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/babel-core/node_modules/lodash/add.js create mode 100644 node_modules/babel-core/node_modules/lodash/after.js create mode 100644 node_modules/babel-core/node_modules/lodash/array.js create mode 100644 node_modules/babel-core/node_modules/lodash/ary.js create mode 100644 node_modules/babel-core/node_modules/lodash/assign.js create mode 100644 node_modules/babel-core/node_modules/lodash/assignIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/assignInWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/assignWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/at.js create mode 100644 node_modules/babel-core/node_modules/lodash/attempt.js create mode 100644 node_modules/babel-core/node_modules/lodash/before.js create mode 100644 node_modules/babel-core/node_modules/lodash/bind.js create mode 100644 node_modules/babel-core/node_modules/lodash/bindAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/bindKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/camelCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/capitalize.js create mode 100644 node_modules/babel-core/node_modules/lodash/castArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/ceil.js create mode 100644 node_modules/babel-core/node_modules/lodash/chain.js create mode 100644 node_modules/babel-core/node_modules/lodash/chunk.js create mode 100644 node_modules/babel-core/node_modules/lodash/clamp.js create mode 100644 node_modules/babel-core/node_modules/lodash/clone.js create mode 100644 node_modules/babel-core/node_modules/lodash/cloneDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/cloneWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/collection.js create mode 100644 node_modules/babel-core/node_modules/lodash/commit.js create mode 100644 node_modules/babel-core/node_modules/lodash/compact.js create mode 100644 node_modules/babel-core/node_modules/lodash/concat.js create mode 100644 node_modules/babel-core/node_modules/lodash/cond.js create mode 100644 node_modules/babel-core/node_modules/lodash/conforms.js create mode 100644 node_modules/babel-core/node_modules/lodash/conformsTo.js create mode 100644 node_modules/babel-core/node_modules/lodash/constant.js create mode 100644 node_modules/babel-core/node_modules/lodash/core.js create mode 100644 node_modules/babel-core/node_modules/lodash/core.min.js create mode 100644 node_modules/babel-core/node_modules/lodash/countBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/create.js create mode 100644 node_modules/babel-core/node_modules/lodash/curry.js create mode 100644 node_modules/babel-core/node_modules/lodash/curryRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/date.js create mode 100644 node_modules/babel-core/node_modules/lodash/debounce.js create mode 100644 node_modules/babel-core/node_modules/lodash/deburr.js create mode 100644 node_modules/babel-core/node_modules/lodash/defaultTo.js create mode 100644 node_modules/babel-core/node_modules/lodash/defaults.js create mode 100644 node_modules/babel-core/node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/defer.js create mode 100644 node_modules/babel-core/node_modules/lodash/delay.js create mode 100644 node_modules/babel-core/node_modules/lodash/difference.js create mode 100644 node_modules/babel-core/node_modules/lodash/differenceBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/differenceWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/divide.js create mode 100644 node_modules/babel-core/node_modules/lodash/drop.js create mode 100644 node_modules/babel-core/node_modules/lodash/dropRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/dropWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/each.js create mode 100644 node_modules/babel-core/node_modules/lodash/eachRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/endsWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/entries.js create mode 100644 node_modules/babel-core/node_modules/lodash/entriesIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/eq.js create mode 100644 node_modules/babel-core/node_modules/lodash/escape.js create mode 100644 node_modules/babel-core/node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/babel-core/node_modules/lodash/every.js create mode 100644 node_modules/babel-core/node_modules/lodash/extend.js create mode 100644 node_modules/babel-core/node_modules/lodash/extendWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fill.js create mode 100644 node_modules/babel-core/node_modules/lodash/filter.js create mode 100644 node_modules/babel-core/node_modules/lodash/find.js create mode 100644 node_modules/babel-core/node_modules/lodash/findIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/findKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/findLast.js create mode 100644 node_modules/babel-core/node_modules/lodash/findLastIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/findLastKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/first.js create mode 100644 node_modules/babel-core/node_modules/lodash/flatMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/babel-core/node_modules/lodash/flatten.js create mode 100644 node_modules/babel-core/node_modules/lodash/flattenDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/flattenDepth.js create mode 100644 node_modules/babel-core/node_modules/lodash/flip.js create mode 100644 node_modules/babel-core/node_modules/lodash/floor.js create mode 100644 node_modules/babel-core/node_modules/lodash/flow.js create mode 100644 node_modules/babel-core/node_modules/lodash/flowRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/forEach.js create mode 100644 node_modules/babel-core/node_modules/lodash/forEachRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/forIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/forInRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/forOwn.js create mode 100644 node_modules/babel-core/node_modules/lodash/forOwnRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/F.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/T.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/__.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/_util.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/add.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/after.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/all.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/allPass.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/always.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/any.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/apply.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/array.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/ary.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assign.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assoc.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/at.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/attempt.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/before.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/bind.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/castArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/ceil.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/chain.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/chunk.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/clamp.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/clone.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/collection.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/commit.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/compact.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/complement.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/compose.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/concat.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/cond.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/constant.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/contains.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/convert.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/countBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/create.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/curry.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/curryN.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/date.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/debounce.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/deburr.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/defaults.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/defer.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/delay.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/difference.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/divide.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/drop.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/each.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/entries.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/eq.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/equals.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/escape.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/every.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/extend.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/fill.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/filter.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/find.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findLast.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/first.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flatten.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flip.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/floor.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flow.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/forEach.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/forIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/function.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/functions.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/get.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/getOr.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/gt.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/gte.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/has.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/head.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/identical.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/identity.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/inRange.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/includes.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/init.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/initial.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/intersection.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/invert.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/invoke.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isDate.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isElement.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isError.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isLength.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isNative.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isNil.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isNull.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isString.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/join.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/juxt.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/keys.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/lang.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/last.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/lt.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/lte.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/map.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/matches.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/math.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/max.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/mean.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/memoize.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/merge.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/method.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/min.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/minBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/mixin.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/multiply.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/nAry.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/negate.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/next.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/noop.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/now.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/nth.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/number.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/object.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/omit.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/once.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/over.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/overSome.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pad.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/padChars.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/padStart.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/partial.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/partition.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/path.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/paths.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pick.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pipe.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/plant.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pluck.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/prop.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/propEq.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/propOr.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/property.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/props.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pull.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/random.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/range.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/rearg.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/reduce.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/reject.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/remove.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/repeat.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/replace.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/rest.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/result.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/reverse.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/round.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sample.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/seq.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/set.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/setWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/size.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/slice.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/some.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/split.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/spread.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/startCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/string.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/stubString.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/subtract.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sum.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/tail.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/take.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/tap.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/template.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/throttle.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/thru.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/times.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toLength.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toLower.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toPath.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toString.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/transform.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/trim.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/truncate.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unapply.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unary.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unescape.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/union.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/uniq.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unnest.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unset.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unzip.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/update.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/useWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/util.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/value.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/values.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/where.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/without.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/words.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/wrap.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/xor.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/zip.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/fromPairs.js create mode 100644 node_modules/babel-core/node_modules/lodash/function.js create mode 100644 node_modules/babel-core/node_modules/lodash/functions.js create mode 100644 node_modules/babel-core/node_modules/lodash/functionsIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/get.js create mode 100644 node_modules/babel-core/node_modules/lodash/groupBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/gt.js create mode 100644 node_modules/babel-core/node_modules/lodash/gte.js create mode 100644 node_modules/babel-core/node_modules/lodash/has.js create mode 100644 node_modules/babel-core/node_modules/lodash/hasIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/head.js create mode 100644 node_modules/babel-core/node_modules/lodash/identity.js create mode 100644 node_modules/babel-core/node_modules/lodash/inRange.js create mode 100644 node_modules/babel-core/node_modules/lodash/includes.js create mode 100644 node_modules/babel-core/node_modules/lodash/index.js create mode 100644 node_modules/babel-core/node_modules/lodash/indexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/initial.js create mode 100644 node_modules/babel-core/node_modules/lodash/intersection.js create mode 100644 node_modules/babel-core/node_modules/lodash/intersectionBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/intersectionWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/invert.js create mode 100644 node_modules/babel-core/node_modules/lodash/invertBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/invoke.js create mode 100644 node_modules/babel-core/node_modules/lodash/invokeMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/isArguments.js create mode 100644 node_modules/babel-core/node_modules/lodash/isArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/babel-core/node_modules/lodash/isArrayLike.js create mode 100644 node_modules/babel-core/node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/isBoolean.js create mode 100644 node_modules/babel-core/node_modules/lodash/isBuffer.js create mode 100644 node_modules/babel-core/node_modules/lodash/isDate.js create mode 100644 node_modules/babel-core/node_modules/lodash/isElement.js create mode 100644 node_modules/babel-core/node_modules/lodash/isEmpty.js create mode 100644 node_modules/babel-core/node_modules/lodash/isEqual.js create mode 100644 node_modules/babel-core/node_modules/lodash/isEqualWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/isError.js create mode 100644 node_modules/babel-core/node_modules/lodash/isFinite.js create mode 100644 node_modules/babel-core/node_modules/lodash/isFunction.js create mode 100644 node_modules/babel-core/node_modules/lodash/isInteger.js create mode 100644 node_modules/babel-core/node_modules/lodash/isLength.js create mode 100644 node_modules/babel-core/node_modules/lodash/isMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/isMatch.js create mode 100644 node_modules/babel-core/node_modules/lodash/isMatchWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/isNaN.js create mode 100644 node_modules/babel-core/node_modules/lodash/isNative.js create mode 100644 node_modules/babel-core/node_modules/lodash/isNil.js create mode 100644 node_modules/babel-core/node_modules/lodash/isNull.js create mode 100644 node_modules/babel-core/node_modules/lodash/isNumber.js create mode 100644 node_modules/babel-core/node_modules/lodash/isObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/isObjectLike.js create mode 100644 node_modules/babel-core/node_modules/lodash/isPlainObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/isRegExp.js create mode 100644 node_modules/babel-core/node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/babel-core/node_modules/lodash/isSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/isString.js create mode 100644 node_modules/babel-core/node_modules/lodash/isSymbol.js create mode 100644 node_modules/babel-core/node_modules/lodash/isTypedArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/isUndefined.js create mode 100644 node_modules/babel-core/node_modules/lodash/isWeakMap.js create mode 100644 node_modules/babel-core/node_modules/lodash/isWeakSet.js create mode 100644 node_modules/babel-core/node_modules/lodash/iteratee.js create mode 100644 node_modules/babel-core/node_modules/lodash/join.js create mode 100644 node_modules/babel-core/node_modules/lodash/kebabCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/keyBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/keys.js create mode 100644 node_modules/babel-core/node_modules/lodash/keysIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/lang.js create mode 100644 node_modules/babel-core/node_modules/lodash/last.js create mode 100644 node_modules/babel-core/node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/lodash.js create mode 100644 node_modules/babel-core/node_modules/lodash/lodash.min.js create mode 100644 node_modules/babel-core/node_modules/lodash/lowerCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/lowerFirst.js create mode 100644 node_modules/babel-core/node_modules/lodash/lt.js create mode 100644 node_modules/babel-core/node_modules/lodash/lte.js create mode 100644 node_modules/babel-core/node_modules/lodash/map.js create mode 100644 node_modules/babel-core/node_modules/lodash/mapKeys.js create mode 100644 node_modules/babel-core/node_modules/lodash/mapValues.js create mode 100644 node_modules/babel-core/node_modules/lodash/matches.js create mode 100644 node_modules/babel-core/node_modules/lodash/matchesProperty.js create mode 100644 node_modules/babel-core/node_modules/lodash/math.js create mode 100644 node_modules/babel-core/node_modules/lodash/max.js create mode 100644 node_modules/babel-core/node_modules/lodash/maxBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/mean.js create mode 100644 node_modules/babel-core/node_modules/lodash/meanBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/memoize.js create mode 100644 node_modules/babel-core/node_modules/lodash/merge.js create mode 100644 node_modules/babel-core/node_modules/lodash/mergeWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/method.js create mode 100644 node_modules/babel-core/node_modules/lodash/methodOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/min.js create mode 100644 node_modules/babel-core/node_modules/lodash/minBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/mixin.js create mode 100644 node_modules/babel-core/node_modules/lodash/multiply.js create mode 100644 node_modules/babel-core/node_modules/lodash/negate.js create mode 100644 node_modules/babel-core/node_modules/lodash/next.js create mode 100644 node_modules/babel-core/node_modules/lodash/noop.js create mode 100644 node_modules/babel-core/node_modules/lodash/now.js create mode 100644 node_modules/babel-core/node_modules/lodash/nth.js create mode 100644 node_modules/babel-core/node_modules/lodash/nthArg.js create mode 100644 node_modules/babel-core/node_modules/lodash/number.js create mode 100644 node_modules/babel-core/node_modules/lodash/object.js create mode 100644 node_modules/babel-core/node_modules/lodash/omit.js create mode 100644 node_modules/babel-core/node_modules/lodash/omitBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/once.js create mode 100644 node_modules/babel-core/node_modules/lodash/orderBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/over.js create mode 100644 node_modules/babel-core/node_modules/lodash/overArgs.js create mode 100644 node_modules/babel-core/node_modules/lodash/overEvery.js create mode 100644 node_modules/babel-core/node_modules/lodash/overSome.js create mode 100644 node_modules/babel-core/node_modules/lodash/package.json create mode 100644 node_modules/babel-core/node_modules/lodash/pad.js create mode 100644 node_modules/babel-core/node_modules/lodash/padEnd.js create mode 100644 node_modules/babel-core/node_modules/lodash/padStart.js create mode 100644 node_modules/babel-core/node_modules/lodash/parseInt.js create mode 100644 node_modules/babel-core/node_modules/lodash/partial.js create mode 100644 node_modules/babel-core/node_modules/lodash/partialRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/partition.js create mode 100644 node_modules/babel-core/node_modules/lodash/pick.js create mode 100644 node_modules/babel-core/node_modules/lodash/pickBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/plant.js create mode 100644 node_modules/babel-core/node_modules/lodash/property.js create mode 100644 node_modules/babel-core/node_modules/lodash/propertyOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/pull.js create mode 100644 node_modules/babel-core/node_modules/lodash/pullAll.js create mode 100644 node_modules/babel-core/node_modules/lodash/pullAllBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/pullAllWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/pullAt.js create mode 100644 node_modules/babel-core/node_modules/lodash/random.js create mode 100644 node_modules/babel-core/node_modules/lodash/range.js create mode 100644 node_modules/babel-core/node_modules/lodash/rangeRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/rearg.js create mode 100644 node_modules/babel-core/node_modules/lodash/reduce.js create mode 100644 node_modules/babel-core/node_modules/lodash/reduceRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/reject.js create mode 100644 node_modules/babel-core/node_modules/lodash/remove.js create mode 100644 node_modules/babel-core/node_modules/lodash/repeat.js create mode 100644 node_modules/babel-core/node_modules/lodash/replace.js create mode 100644 node_modules/babel-core/node_modules/lodash/rest.js create mode 100644 node_modules/babel-core/node_modules/lodash/result.js create mode 100644 node_modules/babel-core/node_modules/lodash/reverse.js create mode 100644 node_modules/babel-core/node_modules/lodash/round.js create mode 100644 node_modules/babel-core/node_modules/lodash/sample.js create mode 100644 node_modules/babel-core/node_modules/lodash/sampleSize.js create mode 100644 node_modules/babel-core/node_modules/lodash/seq.js create mode 100644 node_modules/babel-core/node_modules/lodash/set.js create mode 100644 node_modules/babel-core/node_modules/lodash/setWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/shuffle.js create mode 100644 node_modules/babel-core/node_modules/lodash/size.js create mode 100644 node_modules/babel-core/node_modules/lodash/slice.js create mode 100644 node_modules/babel-core/node_modules/lodash/snakeCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/some.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortedIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortedUniq.js create mode 100644 node_modules/babel-core/node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/split.js create mode 100644 node_modules/babel-core/node_modules/lodash/spread.js create mode 100644 node_modules/babel-core/node_modules/lodash/startCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/startsWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/string.js create mode 100644 node_modules/babel-core/node_modules/lodash/stubArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/stubFalse.js create mode 100644 node_modules/babel-core/node_modules/lodash/stubObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/stubString.js create mode 100644 node_modules/babel-core/node_modules/lodash/stubTrue.js create mode 100644 node_modules/babel-core/node_modules/lodash/subtract.js create mode 100644 node_modules/babel-core/node_modules/lodash/sum.js create mode 100644 node_modules/babel-core/node_modules/lodash/sumBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/tail.js create mode 100644 node_modules/babel-core/node_modules/lodash/take.js create mode 100644 node_modules/babel-core/node_modules/lodash/takeRight.js create mode 100644 node_modules/babel-core/node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/takeWhile.js create mode 100644 node_modules/babel-core/node_modules/lodash/tap.js create mode 100644 node_modules/babel-core/node_modules/lodash/template.js create mode 100644 node_modules/babel-core/node_modules/lodash/templateSettings.js create mode 100644 node_modules/babel-core/node_modules/lodash/throttle.js create mode 100644 node_modules/babel-core/node_modules/lodash/thru.js create mode 100644 node_modules/babel-core/node_modules/lodash/times.js create mode 100644 node_modules/babel-core/node_modules/lodash/toArray.js create mode 100644 node_modules/babel-core/node_modules/lodash/toFinite.js create mode 100644 node_modules/babel-core/node_modules/lodash/toInteger.js create mode 100644 node_modules/babel-core/node_modules/lodash/toIterator.js create mode 100644 node_modules/babel-core/node_modules/lodash/toJSON.js create mode 100644 node_modules/babel-core/node_modules/lodash/toLength.js create mode 100644 node_modules/babel-core/node_modules/lodash/toLower.js create mode 100644 node_modules/babel-core/node_modules/lodash/toNumber.js create mode 100644 node_modules/babel-core/node_modules/lodash/toPairs.js create mode 100644 node_modules/babel-core/node_modules/lodash/toPairsIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/toPath.js create mode 100644 node_modules/babel-core/node_modules/lodash/toPlainObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/babel-core/node_modules/lodash/toString.js create mode 100644 node_modules/babel-core/node_modules/lodash/toUpper.js create mode 100644 node_modules/babel-core/node_modules/lodash/transform.js create mode 100644 node_modules/babel-core/node_modules/lodash/trim.js create mode 100644 node_modules/babel-core/node_modules/lodash/trimEnd.js create mode 100644 node_modules/babel-core/node_modules/lodash/trimStart.js create mode 100644 node_modules/babel-core/node_modules/lodash/truncate.js create mode 100644 node_modules/babel-core/node_modules/lodash/unary.js create mode 100644 node_modules/babel-core/node_modules/lodash/unescape.js create mode 100644 node_modules/babel-core/node_modules/lodash/union.js create mode 100644 node_modules/babel-core/node_modules/lodash/unionBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/unionWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/uniq.js create mode 100644 node_modules/babel-core/node_modules/lodash/uniqBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/uniqWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/uniqueId.js create mode 100644 node_modules/babel-core/node_modules/lodash/unset.js create mode 100644 node_modules/babel-core/node_modules/lodash/unzip.js create mode 100644 node_modules/babel-core/node_modules/lodash/unzipWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/update.js create mode 100644 node_modules/babel-core/node_modules/lodash/updateWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/upperCase.js create mode 100644 node_modules/babel-core/node_modules/lodash/upperFirst.js create mode 100644 node_modules/babel-core/node_modules/lodash/util.js create mode 100644 node_modules/babel-core/node_modules/lodash/value.js create mode 100644 node_modules/babel-core/node_modules/lodash/valueOf.js create mode 100644 node_modules/babel-core/node_modules/lodash/values.js create mode 100644 node_modules/babel-core/node_modules/lodash/valuesIn.js create mode 100644 node_modules/babel-core/node_modules/lodash/without.js create mode 100644 node_modules/babel-core/node_modules/lodash/words.js create mode 100644 node_modules/babel-core/node_modules/lodash/wrap.js create mode 100644 node_modules/babel-core/node_modules/lodash/wrapperAt.js create mode 100644 node_modules/babel-core/node_modules/lodash/wrapperChain.js create mode 100644 node_modules/babel-core/node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/babel-core/node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/babel-core/node_modules/lodash/wrapperValue.js create mode 100644 node_modules/babel-core/node_modules/lodash/xor.js create mode 100644 node_modules/babel-core/node_modules/lodash/xorBy.js create mode 100644 node_modules/babel-core/node_modules/lodash/xorWith.js create mode 100644 node_modules/babel-core/node_modules/lodash/zip.js create mode 100644 node_modules/babel-core/node_modules/lodash/zipObject.js create mode 100644 node_modules/babel-core/node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/babel-core/node_modules/lodash/zipWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/LICENSE create mode 100644 node_modules/babel-generator/node_modules/lodash/README.md create mode 100644 node_modules/babel-generator/node_modules/lodash/_DataView.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_Hash.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_ListCache.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_Map.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_MapCache.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_Promise.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_Set.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_SetCache.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_Stack.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_Symbol.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_WeakMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_apply.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayEach.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayPush.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arraySample.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_arraySome.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_asciiWords.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_assignValue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseAssign.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseAt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseClamp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseClone.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseCreate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseDelay.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseDifference.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseEach.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseEvery.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseFill.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseFilter.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseFor.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseForRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseGet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseGt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseHas.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseInRange.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseInverter.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseLodash.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseLt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseMatches.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseMean.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseMerge.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseNth.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_basePick.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_basePickBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseProperty.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_basePullAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_basePullAt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseRandom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseRange.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseReduce.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseRest.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSample.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSetData.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSlice.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSome.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseSum.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseTimes.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseToString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseUnary.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseUniq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseUnset.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseValues.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseXor.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_cacheHas.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_castFunction.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_castPath.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_castRest.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_castSlice.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_compareAscending.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_composeArgs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_copyArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_copyObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_copySymbols.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_coreJsData.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_countHolders.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createAggregator.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createAssigner.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createBind.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createCompounder.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createCtor.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createCurry.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createFind.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createFlow.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createHybrid.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createInverter.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createOver.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createPadding.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createPartial.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createRange.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createRecurry.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createRound.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createToPairs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_createWrap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_defineProperty.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_equalArrays.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_equalByTag.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_equalObjects.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_flatRest.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getData.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getFuncName.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getHolder.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getMapData.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getMatchData.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getNative.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getSymbols.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getTag.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getValue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getView.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_hasPath.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_hashClear.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_hashDelete.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_hashGet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_hashHas.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_hashSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isKeyable.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isLaziable.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isMasked.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isPrototype.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_lazyClone.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_lazyValue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_mapToArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_mergeData.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_metaMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_objectToString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_overArg.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_overRest.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_parent.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_reEscape.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_realNames.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_reorder.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_root.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_safeGet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_setData.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_setToArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_setToString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_shortOut.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_stackClear.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_stackDelete.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_stackGet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_stackHas.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_stackSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_stringSize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_stringToArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_stringToPath.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_toKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_toSource.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/babel-generator/node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/babel-generator/node_modules/lodash/add.js create mode 100644 node_modules/babel-generator/node_modules/lodash/after.js create mode 100644 node_modules/babel-generator/node_modules/lodash/array.js create mode 100644 node_modules/babel-generator/node_modules/lodash/ary.js create mode 100644 node_modules/babel-generator/node_modules/lodash/assign.js create mode 100644 node_modules/babel-generator/node_modules/lodash/assignIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/assignInWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/assignWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/at.js create mode 100644 node_modules/babel-generator/node_modules/lodash/attempt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/before.js create mode 100644 node_modules/babel-generator/node_modules/lodash/bind.js create mode 100644 node_modules/babel-generator/node_modules/lodash/bindAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/bindKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/camelCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/capitalize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/castArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/ceil.js create mode 100644 node_modules/babel-generator/node_modules/lodash/chain.js create mode 100644 node_modules/babel-generator/node_modules/lodash/chunk.js create mode 100644 node_modules/babel-generator/node_modules/lodash/clamp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/clone.js create mode 100644 node_modules/babel-generator/node_modules/lodash/cloneDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/cloneWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/collection.js create mode 100644 node_modules/babel-generator/node_modules/lodash/commit.js create mode 100644 node_modules/babel-generator/node_modules/lodash/compact.js create mode 100644 node_modules/babel-generator/node_modules/lodash/concat.js create mode 100644 node_modules/babel-generator/node_modules/lodash/cond.js create mode 100644 node_modules/babel-generator/node_modules/lodash/conforms.js create mode 100644 node_modules/babel-generator/node_modules/lodash/conformsTo.js create mode 100644 node_modules/babel-generator/node_modules/lodash/constant.js create mode 100644 node_modules/babel-generator/node_modules/lodash/core.js create mode 100644 node_modules/babel-generator/node_modules/lodash/core.min.js create mode 100644 node_modules/babel-generator/node_modules/lodash/countBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/create.js create mode 100644 node_modules/babel-generator/node_modules/lodash/curry.js create mode 100644 node_modules/babel-generator/node_modules/lodash/curryRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/date.js create mode 100644 node_modules/babel-generator/node_modules/lodash/debounce.js create mode 100644 node_modules/babel-generator/node_modules/lodash/deburr.js create mode 100644 node_modules/babel-generator/node_modules/lodash/defaultTo.js create mode 100644 node_modules/babel-generator/node_modules/lodash/defaults.js create mode 100644 node_modules/babel-generator/node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/defer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/delay.js create mode 100644 node_modules/babel-generator/node_modules/lodash/difference.js create mode 100644 node_modules/babel-generator/node_modules/lodash/differenceBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/differenceWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/divide.js create mode 100644 node_modules/babel-generator/node_modules/lodash/drop.js create mode 100644 node_modules/babel-generator/node_modules/lodash/dropRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/dropWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/each.js create mode 100644 node_modules/babel-generator/node_modules/lodash/eachRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/endsWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/entries.js create mode 100644 node_modules/babel-generator/node_modules/lodash/entriesIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/eq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/escape.js create mode 100644 node_modules/babel-generator/node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/every.js create mode 100644 node_modules/babel-generator/node_modules/lodash/extend.js create mode 100644 node_modules/babel-generator/node_modules/lodash/extendWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fill.js create mode 100644 node_modules/babel-generator/node_modules/lodash/filter.js create mode 100644 node_modules/babel-generator/node_modules/lodash/find.js create mode 100644 node_modules/babel-generator/node_modules/lodash/findIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/findKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/findLast.js create mode 100644 node_modules/babel-generator/node_modules/lodash/findLastIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/findLastKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/first.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flatMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flatten.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flattenDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flattenDepth.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flip.js create mode 100644 node_modules/babel-generator/node_modules/lodash/floor.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flow.js create mode 100644 node_modules/babel-generator/node_modules/lodash/flowRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/forEach.js create mode 100644 node_modules/babel-generator/node_modules/lodash/forEachRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/forIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/forInRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/forOwn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/forOwnRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/F.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/T.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/__.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/_util.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/add.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/after.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/all.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/allPass.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/always.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/any.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/apply.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/array.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/ary.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assign.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assoc.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/at.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/attempt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/before.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/bind.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/castArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/ceil.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/chain.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/chunk.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/clamp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/clone.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/collection.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/commit.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/compact.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/complement.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/compose.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/concat.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/cond.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/constant.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/contains.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/convert.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/countBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/create.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/curry.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/curryN.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/date.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/debounce.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/deburr.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/defaults.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/defer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/delay.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/difference.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/divide.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/drop.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/each.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/entries.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/eq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/equals.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/escape.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/every.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/extend.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/fill.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/filter.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/find.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findLast.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/first.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flatten.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flip.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/floor.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flow.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/forEach.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/forIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/function.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/functions.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/get.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/getOr.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/gt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/gte.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/has.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/head.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/identical.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/identity.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/inRange.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/includes.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/init.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/initial.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/intersection.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/invert.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/invoke.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isDate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isElement.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isError.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isLength.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isNative.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isNil.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isNull.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/join.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/juxt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/keys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/lang.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/last.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/lt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/lte.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/map.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/matches.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/math.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/max.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/mean.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/memoize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/merge.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/method.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/min.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/minBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/mixin.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/multiply.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/nAry.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/negate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/next.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/noop.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/now.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/nth.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/number.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/object.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/omit.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/once.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/over.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/overSome.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pad.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/padChars.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/padStart.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/partial.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/partition.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/path.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/paths.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pick.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pipe.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/plant.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pluck.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/prop.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/propEq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/propOr.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/property.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/props.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pull.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/random.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/range.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/rearg.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/reduce.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/reject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/remove.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/repeat.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/replace.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/rest.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/result.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/reverse.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/round.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sample.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/seq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/set.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/setWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/size.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/slice.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/some.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/split.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/spread.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/startCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/string.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/stubString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/subtract.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sum.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/tail.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/take.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/tap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/template.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/throttle.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/thru.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/times.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toLength.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toLower.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toPath.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/transform.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/trim.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/truncate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unapply.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unary.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unescape.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/union.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/uniq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unnest.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unset.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unzip.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/update.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/useWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/util.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/value.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/values.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/where.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/without.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/words.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/wrap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/xor.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/zip.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/fromPairs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/function.js create mode 100644 node_modules/babel-generator/node_modules/lodash/functions.js create mode 100644 node_modules/babel-generator/node_modules/lodash/functionsIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/get.js create mode 100644 node_modules/babel-generator/node_modules/lodash/groupBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/gt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/gte.js create mode 100644 node_modules/babel-generator/node_modules/lodash/has.js create mode 100644 node_modules/babel-generator/node_modules/lodash/hasIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/head.js create mode 100644 node_modules/babel-generator/node_modules/lodash/identity.js create mode 100644 node_modules/babel-generator/node_modules/lodash/inRange.js create mode 100644 node_modules/babel-generator/node_modules/lodash/includes.js create mode 100644 node_modules/babel-generator/node_modules/lodash/index.js create mode 100644 node_modules/babel-generator/node_modules/lodash/indexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/initial.js create mode 100644 node_modules/babel-generator/node_modules/lodash/intersection.js create mode 100644 node_modules/babel-generator/node_modules/lodash/intersectionBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/intersectionWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/invert.js create mode 100644 node_modules/babel-generator/node_modules/lodash/invertBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/invoke.js create mode 100644 node_modules/babel-generator/node_modules/lodash/invokeMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isArguments.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isArrayLike.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isBoolean.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isBuffer.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isDate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isElement.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isEmpty.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isEqual.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isEqualWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isError.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isFinite.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isFunction.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isInteger.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isLength.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isMatch.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isMatchWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isNaN.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isNative.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isNil.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isNull.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isNumber.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isObjectLike.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isPlainObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isRegExp.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isSymbol.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isTypedArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isUndefined.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isWeakMap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/isWeakSet.js create mode 100644 node_modules/babel-generator/node_modules/lodash/iteratee.js create mode 100644 node_modules/babel-generator/node_modules/lodash/join.js create mode 100644 node_modules/babel-generator/node_modules/lodash/kebabCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/keyBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/keys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/keysIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/lang.js create mode 100644 node_modules/babel-generator/node_modules/lodash/last.js create mode 100644 node_modules/babel-generator/node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/lodash.js create mode 100644 node_modules/babel-generator/node_modules/lodash/lodash.min.js create mode 100644 node_modules/babel-generator/node_modules/lodash/lowerCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/lowerFirst.js create mode 100644 node_modules/babel-generator/node_modules/lodash/lt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/lte.js create mode 100644 node_modules/babel-generator/node_modules/lodash/map.js create mode 100644 node_modules/babel-generator/node_modules/lodash/mapKeys.js create mode 100644 node_modules/babel-generator/node_modules/lodash/mapValues.js create mode 100644 node_modules/babel-generator/node_modules/lodash/matches.js create mode 100644 node_modules/babel-generator/node_modules/lodash/matchesProperty.js create mode 100644 node_modules/babel-generator/node_modules/lodash/math.js create mode 100644 node_modules/babel-generator/node_modules/lodash/max.js create mode 100644 node_modules/babel-generator/node_modules/lodash/maxBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/mean.js create mode 100644 node_modules/babel-generator/node_modules/lodash/meanBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/memoize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/merge.js create mode 100644 node_modules/babel-generator/node_modules/lodash/mergeWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/method.js create mode 100644 node_modules/babel-generator/node_modules/lodash/methodOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/min.js create mode 100644 node_modules/babel-generator/node_modules/lodash/minBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/mixin.js create mode 100644 node_modules/babel-generator/node_modules/lodash/multiply.js create mode 100644 node_modules/babel-generator/node_modules/lodash/negate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/next.js create mode 100644 node_modules/babel-generator/node_modules/lodash/noop.js create mode 100644 node_modules/babel-generator/node_modules/lodash/now.js create mode 100644 node_modules/babel-generator/node_modules/lodash/nth.js create mode 100644 node_modules/babel-generator/node_modules/lodash/nthArg.js create mode 100644 node_modules/babel-generator/node_modules/lodash/number.js create mode 100644 node_modules/babel-generator/node_modules/lodash/object.js create mode 100644 node_modules/babel-generator/node_modules/lodash/omit.js create mode 100644 node_modules/babel-generator/node_modules/lodash/omitBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/once.js create mode 100644 node_modules/babel-generator/node_modules/lodash/orderBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/over.js create mode 100644 node_modules/babel-generator/node_modules/lodash/overArgs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/overEvery.js create mode 100644 node_modules/babel-generator/node_modules/lodash/overSome.js create mode 100644 node_modules/babel-generator/node_modules/lodash/package.json create mode 100644 node_modules/babel-generator/node_modules/lodash/pad.js create mode 100644 node_modules/babel-generator/node_modules/lodash/padEnd.js create mode 100644 node_modules/babel-generator/node_modules/lodash/padStart.js create mode 100644 node_modules/babel-generator/node_modules/lodash/parseInt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/partial.js create mode 100644 node_modules/babel-generator/node_modules/lodash/partialRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/partition.js create mode 100644 node_modules/babel-generator/node_modules/lodash/pick.js create mode 100644 node_modules/babel-generator/node_modules/lodash/pickBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/plant.js create mode 100644 node_modules/babel-generator/node_modules/lodash/property.js create mode 100644 node_modules/babel-generator/node_modules/lodash/propertyOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/pull.js create mode 100644 node_modules/babel-generator/node_modules/lodash/pullAll.js create mode 100644 node_modules/babel-generator/node_modules/lodash/pullAllBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/pullAllWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/pullAt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/random.js create mode 100644 node_modules/babel-generator/node_modules/lodash/range.js create mode 100644 node_modules/babel-generator/node_modules/lodash/rangeRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/rearg.js create mode 100644 node_modules/babel-generator/node_modules/lodash/reduce.js create mode 100644 node_modules/babel-generator/node_modules/lodash/reduceRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/reject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/remove.js create mode 100644 node_modules/babel-generator/node_modules/lodash/repeat.js create mode 100644 node_modules/babel-generator/node_modules/lodash/replace.js create mode 100644 node_modules/babel-generator/node_modules/lodash/rest.js create mode 100644 node_modules/babel-generator/node_modules/lodash/result.js create mode 100644 node_modules/babel-generator/node_modules/lodash/reverse.js create mode 100644 node_modules/babel-generator/node_modules/lodash/round.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sample.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sampleSize.js create mode 100644 node_modules/babel-generator/node_modules/lodash/seq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/set.js create mode 100644 node_modules/babel-generator/node_modules/lodash/setWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/shuffle.js create mode 100644 node_modules/babel-generator/node_modules/lodash/size.js create mode 100644 node_modules/babel-generator/node_modules/lodash/slice.js create mode 100644 node_modules/babel-generator/node_modules/lodash/snakeCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/some.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortedIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortedUniq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/split.js create mode 100644 node_modules/babel-generator/node_modules/lodash/spread.js create mode 100644 node_modules/babel-generator/node_modules/lodash/startCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/startsWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/string.js create mode 100644 node_modules/babel-generator/node_modules/lodash/stubArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/stubFalse.js create mode 100644 node_modules/babel-generator/node_modules/lodash/stubObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/stubString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/stubTrue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/subtract.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sum.js create mode 100644 node_modules/babel-generator/node_modules/lodash/sumBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/tail.js create mode 100644 node_modules/babel-generator/node_modules/lodash/take.js create mode 100644 node_modules/babel-generator/node_modules/lodash/takeRight.js create mode 100644 node_modules/babel-generator/node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/takeWhile.js create mode 100644 node_modules/babel-generator/node_modules/lodash/tap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/template.js create mode 100644 node_modules/babel-generator/node_modules/lodash/templateSettings.js create mode 100644 node_modules/babel-generator/node_modules/lodash/throttle.js create mode 100644 node_modules/babel-generator/node_modules/lodash/thru.js create mode 100644 node_modules/babel-generator/node_modules/lodash/times.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toArray.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toFinite.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toInteger.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toIterator.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toJSON.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toLength.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toLower.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toNumber.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toPairs.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toPairsIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toPath.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toPlainObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toString.js create mode 100644 node_modules/babel-generator/node_modules/lodash/toUpper.js create mode 100644 node_modules/babel-generator/node_modules/lodash/transform.js create mode 100644 node_modules/babel-generator/node_modules/lodash/trim.js create mode 100644 node_modules/babel-generator/node_modules/lodash/trimEnd.js create mode 100644 node_modules/babel-generator/node_modules/lodash/trimStart.js create mode 100644 node_modules/babel-generator/node_modules/lodash/truncate.js create mode 100644 node_modules/babel-generator/node_modules/lodash/unary.js create mode 100644 node_modules/babel-generator/node_modules/lodash/unescape.js create mode 100644 node_modules/babel-generator/node_modules/lodash/union.js create mode 100644 node_modules/babel-generator/node_modules/lodash/unionBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/unionWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/uniq.js create mode 100644 node_modules/babel-generator/node_modules/lodash/uniqBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/uniqWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/uniqueId.js create mode 100644 node_modules/babel-generator/node_modules/lodash/unset.js create mode 100644 node_modules/babel-generator/node_modules/lodash/unzip.js create mode 100644 node_modules/babel-generator/node_modules/lodash/unzipWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/update.js create mode 100644 node_modules/babel-generator/node_modules/lodash/updateWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/upperCase.js create mode 100644 node_modules/babel-generator/node_modules/lodash/upperFirst.js create mode 100644 node_modules/babel-generator/node_modules/lodash/util.js create mode 100644 node_modules/babel-generator/node_modules/lodash/value.js create mode 100644 node_modules/babel-generator/node_modules/lodash/valueOf.js create mode 100644 node_modules/babel-generator/node_modules/lodash/values.js create mode 100644 node_modules/babel-generator/node_modules/lodash/valuesIn.js create mode 100644 node_modules/babel-generator/node_modules/lodash/without.js create mode 100644 node_modules/babel-generator/node_modules/lodash/words.js create mode 100644 node_modules/babel-generator/node_modules/lodash/wrap.js create mode 100644 node_modules/babel-generator/node_modules/lodash/wrapperAt.js create mode 100644 node_modules/babel-generator/node_modules/lodash/wrapperChain.js create mode 100644 node_modules/babel-generator/node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/babel-generator/node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/babel-generator/node_modules/lodash/wrapperValue.js create mode 100644 node_modules/babel-generator/node_modules/lodash/xor.js create mode 100644 node_modules/babel-generator/node_modules/lodash/xorBy.js create mode 100644 node_modules/babel-generator/node_modules/lodash/xorWith.js create mode 100644 node_modules/babel-generator/node_modules/lodash/zip.js create mode 100644 node_modules/babel-generator/node_modules/lodash/zipObject.js create mode 100644 node_modules/babel-generator/node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/babel-generator/node_modules/lodash/zipWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/LICENSE create mode 100644 node_modules/babel-register/node_modules/lodash/README.md create mode 100644 node_modules/babel-register/node_modules/lodash/_DataView.js create mode 100644 node_modules/babel-register/node_modules/lodash/_Hash.js create mode 100644 node_modules/babel-register/node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/babel-register/node_modules/lodash/_ListCache.js create mode 100644 node_modules/babel-register/node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/babel-register/node_modules/lodash/_Map.js create mode 100644 node_modules/babel-register/node_modules/lodash/_MapCache.js create mode 100644 node_modules/babel-register/node_modules/lodash/_Promise.js create mode 100644 node_modules/babel-register/node_modules/lodash/_Set.js create mode 100644 node_modules/babel-register/node_modules/lodash/_SetCache.js create mode 100644 node_modules/babel-register/node_modules/lodash/_Stack.js create mode 100644 node_modules/babel-register/node_modules/lodash/_Symbol.js create mode 100644 node_modules/babel-register/node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/babel-register/node_modules/lodash/_WeakMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/_apply.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayEach.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayPush.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arraySample.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/babel-register/node_modules/lodash/_arraySome.js create mode 100644 node_modules/babel-register/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/babel-register/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_asciiWords.js create mode 100644 node_modules/babel-register/node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/babel-register/node_modules/lodash/_assignValue.js create mode 100644 node_modules/babel-register/node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseAssign.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseAt.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseClamp.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseClone.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseCreate.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseDelay.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseDifference.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseEach.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseEvery.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseFill.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseFilter.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseFor.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseForRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseGet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseGt.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseHas.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseInRange.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseInverter.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseLodash.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseLt.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseMatches.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseMean.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseMerge.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseNth.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/_basePick.js create mode 100644 node_modules/babel-register/node_modules/lodash/_basePickBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseProperty.js create mode 100644 node_modules/babel-register/node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/_basePullAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/_basePullAt.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseRandom.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseRange.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseReduce.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseRest.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSample.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSetData.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSlice.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSome.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseSum.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseTimes.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseToString.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseUnary.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseUniq.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseUnset.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseValues.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseXor.js create mode 100644 node_modules/babel-register/node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/_cacheHas.js create mode 100644 node_modules/babel-register/node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/_castFunction.js create mode 100644 node_modules/babel-register/node_modules/lodash/_castPath.js create mode 100644 node_modules/babel-register/node_modules/lodash/_castRest.js create mode 100644 node_modules/babel-register/node_modules/lodash/_castSlice.js create mode 100644 node_modules/babel-register/node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/babel-register/node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/babel-register/node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/babel-register/node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/babel-register/node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/babel-register/node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_compareAscending.js create mode 100644 node_modules/babel-register/node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/babel-register/node_modules/lodash/_composeArgs.js create mode 100644 node_modules/babel-register/node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/_copyArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_copyObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/_copySymbols.js create mode 100644 node_modules/babel-register/node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_coreJsData.js create mode 100644 node_modules/babel-register/node_modules/lodash/_countHolders.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createAggregator.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createAssigner.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createBind.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createCompounder.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createCtor.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createCurry.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createFind.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createFlow.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createHybrid.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createInverter.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createOver.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createPadding.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createPartial.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createRange.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createRecurry.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createRound.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createToPairs.js create mode 100644 node_modules/babel-register/node_modules/lodash/_createWrap.js create mode 100644 node_modules/babel-register/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/babel-register/node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/babel-register/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/babel-register/node_modules/lodash/_defineProperty.js create mode 100644 node_modules/babel-register/node_modules/lodash/_equalArrays.js create mode 100644 node_modules/babel-register/node_modules/lodash/_equalByTag.js create mode 100644 node_modules/babel-register/node_modules/lodash/_equalObjects.js create mode 100644 node_modules/babel-register/node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/babel-register/node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/babel-register/node_modules/lodash/_flatRest.js create mode 100644 node_modules/babel-register/node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getData.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getFuncName.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getHolder.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getMapData.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getMatchData.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getNative.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getSymbols.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getTag.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getValue.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getView.js create mode 100644 node_modules/babel-register/node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/babel-register/node_modules/lodash/_hasPath.js create mode 100644 node_modules/babel-register/node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/babel-register/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/babel-register/node_modules/lodash/_hashClear.js create mode 100644 node_modules/babel-register/node_modules/lodash/_hashDelete.js create mode 100644 node_modules/babel-register/node_modules/lodash/_hashGet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_hashHas.js create mode 100644 node_modules/babel-register/node_modules/lodash/_hashSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/babel-register/node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isKeyable.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isLaziable.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isMasked.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isPrototype.js create mode 100644 node_modules/babel-register/node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/babel-register/node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_lazyClone.js create mode 100644 node_modules/babel-register/node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/babel-register/node_modules/lodash/_lazyValue.js create mode 100644 node_modules/babel-register/node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/babel-register/node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/babel-register/node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/babel-register/node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/babel-register/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/babel-register/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/babel-register/node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_mapToArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/babel-register/node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/babel-register/node_modules/lodash/_mergeData.js create mode 100644 node_modules/babel-register/node_modules/lodash/_metaMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/babel-register/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/babel-register/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/babel-register/node_modules/lodash/_objectToString.js create mode 100644 node_modules/babel-register/node_modules/lodash/_overArg.js create mode 100644 node_modules/babel-register/node_modules/lodash/_overRest.js create mode 100644 node_modules/babel-register/node_modules/lodash/_parent.js create mode 100644 node_modules/babel-register/node_modules/lodash/_reEscape.js create mode 100644 node_modules/babel-register/node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/babel-register/node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/babel-register/node_modules/lodash/_realNames.js create mode 100644 node_modules/babel-register/node_modules/lodash/_reorder.js create mode 100644 node_modules/babel-register/node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/babel-register/node_modules/lodash/_root.js create mode 100644 node_modules/babel-register/node_modules/lodash/_safeGet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/babel-register/node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/babel-register/node_modules/lodash/_setData.js create mode 100644 node_modules/babel-register/node_modules/lodash/_setToArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/babel-register/node_modules/lodash/_setToString.js create mode 100644 node_modules/babel-register/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/babel-register/node_modules/lodash/_shortOut.js create mode 100644 node_modules/babel-register/node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/babel-register/node_modules/lodash/_stackClear.js create mode 100644 node_modules/babel-register/node_modules/lodash/_stackDelete.js create mode 100644 node_modules/babel-register/node_modules/lodash/_stackGet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_stackHas.js create mode 100644 node_modules/babel-register/node_modules/lodash/_stackSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/_stringSize.js create mode 100644 node_modules/babel-register/node_modules/lodash/_stringToArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_stringToPath.js create mode 100644 node_modules/babel-register/node_modules/lodash/_toKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/_toSource.js create mode 100644 node_modules/babel-register/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/babel-register/node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/babel-register/node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/babel-register/node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/babel-register/node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/babel-register/node_modules/lodash/add.js create mode 100644 node_modules/babel-register/node_modules/lodash/after.js create mode 100644 node_modules/babel-register/node_modules/lodash/array.js create mode 100644 node_modules/babel-register/node_modules/lodash/ary.js create mode 100644 node_modules/babel-register/node_modules/lodash/assign.js create mode 100644 node_modules/babel-register/node_modules/lodash/assignIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/assignInWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/assignWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/at.js create mode 100644 node_modules/babel-register/node_modules/lodash/attempt.js create mode 100644 node_modules/babel-register/node_modules/lodash/before.js create mode 100644 node_modules/babel-register/node_modules/lodash/bind.js create mode 100644 node_modules/babel-register/node_modules/lodash/bindAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/bindKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/camelCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/capitalize.js create mode 100644 node_modules/babel-register/node_modules/lodash/castArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/ceil.js create mode 100644 node_modules/babel-register/node_modules/lodash/chain.js create mode 100644 node_modules/babel-register/node_modules/lodash/chunk.js create mode 100644 node_modules/babel-register/node_modules/lodash/clamp.js create mode 100644 node_modules/babel-register/node_modules/lodash/clone.js create mode 100644 node_modules/babel-register/node_modules/lodash/cloneDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/cloneWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/collection.js create mode 100644 node_modules/babel-register/node_modules/lodash/commit.js create mode 100644 node_modules/babel-register/node_modules/lodash/compact.js create mode 100644 node_modules/babel-register/node_modules/lodash/concat.js create mode 100644 node_modules/babel-register/node_modules/lodash/cond.js create mode 100644 node_modules/babel-register/node_modules/lodash/conforms.js create mode 100644 node_modules/babel-register/node_modules/lodash/conformsTo.js create mode 100644 node_modules/babel-register/node_modules/lodash/constant.js create mode 100644 node_modules/babel-register/node_modules/lodash/core.js create mode 100644 node_modules/babel-register/node_modules/lodash/core.min.js create mode 100644 node_modules/babel-register/node_modules/lodash/countBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/create.js create mode 100644 node_modules/babel-register/node_modules/lodash/curry.js create mode 100644 node_modules/babel-register/node_modules/lodash/curryRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/date.js create mode 100644 node_modules/babel-register/node_modules/lodash/debounce.js create mode 100644 node_modules/babel-register/node_modules/lodash/deburr.js create mode 100644 node_modules/babel-register/node_modules/lodash/defaultTo.js create mode 100644 node_modules/babel-register/node_modules/lodash/defaults.js create mode 100644 node_modules/babel-register/node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/defer.js create mode 100644 node_modules/babel-register/node_modules/lodash/delay.js create mode 100644 node_modules/babel-register/node_modules/lodash/difference.js create mode 100644 node_modules/babel-register/node_modules/lodash/differenceBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/differenceWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/divide.js create mode 100644 node_modules/babel-register/node_modules/lodash/drop.js create mode 100644 node_modules/babel-register/node_modules/lodash/dropRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/dropWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/each.js create mode 100644 node_modules/babel-register/node_modules/lodash/eachRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/endsWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/entries.js create mode 100644 node_modules/babel-register/node_modules/lodash/entriesIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/eq.js create mode 100644 node_modules/babel-register/node_modules/lodash/escape.js create mode 100644 node_modules/babel-register/node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/babel-register/node_modules/lodash/every.js create mode 100644 node_modules/babel-register/node_modules/lodash/extend.js create mode 100644 node_modules/babel-register/node_modules/lodash/extendWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fill.js create mode 100644 node_modules/babel-register/node_modules/lodash/filter.js create mode 100644 node_modules/babel-register/node_modules/lodash/find.js create mode 100644 node_modules/babel-register/node_modules/lodash/findIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/findKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/findLast.js create mode 100644 node_modules/babel-register/node_modules/lodash/findLastIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/findLastKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/first.js create mode 100644 node_modules/babel-register/node_modules/lodash/flatMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/babel-register/node_modules/lodash/flatten.js create mode 100644 node_modules/babel-register/node_modules/lodash/flattenDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/flattenDepth.js create mode 100644 node_modules/babel-register/node_modules/lodash/flip.js create mode 100644 node_modules/babel-register/node_modules/lodash/floor.js create mode 100644 node_modules/babel-register/node_modules/lodash/flow.js create mode 100644 node_modules/babel-register/node_modules/lodash/flowRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/forEach.js create mode 100644 node_modules/babel-register/node_modules/lodash/forEachRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/forIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/forInRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/forOwn.js create mode 100644 node_modules/babel-register/node_modules/lodash/forOwnRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/F.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/T.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/__.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/_util.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/add.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/after.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/all.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/allPass.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/always.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/any.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/apply.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/array.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/ary.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assign.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assoc.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/at.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/attempt.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/before.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/bind.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/castArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/ceil.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/chain.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/chunk.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/clamp.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/clone.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/collection.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/commit.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/compact.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/complement.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/compose.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/concat.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/cond.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/constant.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/contains.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/convert.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/countBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/create.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/curry.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/curryN.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/date.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/debounce.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/deburr.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/defaults.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/defer.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/delay.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/difference.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/divide.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/drop.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/each.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/entries.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/eq.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/equals.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/escape.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/every.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/extend.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/fill.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/filter.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/find.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findLast.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/first.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flatten.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flip.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/floor.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flow.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/forEach.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/forIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/function.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/functions.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/get.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/getOr.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/gt.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/gte.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/has.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/head.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/identical.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/identity.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/inRange.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/includes.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/init.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/initial.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/intersection.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/invert.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/invoke.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isDate.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isElement.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isError.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isLength.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isNative.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isNil.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isNull.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isString.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/join.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/juxt.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/keys.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/lang.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/last.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/lt.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/lte.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/map.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/matches.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/math.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/max.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/mean.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/memoize.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/merge.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/method.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/min.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/minBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/mixin.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/multiply.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/nAry.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/negate.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/next.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/noop.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/now.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/nth.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/number.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/object.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/omit.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/once.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/over.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/overSome.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pad.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/padChars.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/padStart.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/partial.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/partition.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/path.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/paths.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pick.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pipe.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/plant.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pluck.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/prop.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/propEq.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/propOr.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/property.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/props.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pull.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/random.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/range.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/rearg.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/reduce.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/reject.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/remove.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/repeat.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/replace.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/rest.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/result.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/reverse.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/round.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sample.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/seq.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/set.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/setWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/size.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/slice.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/some.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/split.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/spread.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/startCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/string.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/stubString.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/subtract.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sum.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/tail.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/take.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/tap.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/template.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/throttle.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/thru.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/times.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toLength.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toLower.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toPath.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toString.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/transform.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/trim.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/truncate.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unapply.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unary.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unescape.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/union.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/uniq.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unnest.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unset.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unzip.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/update.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/useWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/util.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/value.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/values.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/where.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/without.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/words.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/wrap.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/xor.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/zip.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/fromPairs.js create mode 100644 node_modules/babel-register/node_modules/lodash/function.js create mode 100644 node_modules/babel-register/node_modules/lodash/functions.js create mode 100644 node_modules/babel-register/node_modules/lodash/functionsIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/get.js create mode 100644 node_modules/babel-register/node_modules/lodash/groupBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/gt.js create mode 100644 node_modules/babel-register/node_modules/lodash/gte.js create mode 100644 node_modules/babel-register/node_modules/lodash/has.js create mode 100644 node_modules/babel-register/node_modules/lodash/hasIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/head.js create mode 100644 node_modules/babel-register/node_modules/lodash/identity.js create mode 100644 node_modules/babel-register/node_modules/lodash/inRange.js create mode 100644 node_modules/babel-register/node_modules/lodash/includes.js create mode 100644 node_modules/babel-register/node_modules/lodash/index.js create mode 100644 node_modules/babel-register/node_modules/lodash/indexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/initial.js create mode 100644 node_modules/babel-register/node_modules/lodash/intersection.js create mode 100644 node_modules/babel-register/node_modules/lodash/intersectionBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/intersectionWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/invert.js create mode 100644 node_modules/babel-register/node_modules/lodash/invertBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/invoke.js create mode 100644 node_modules/babel-register/node_modules/lodash/invokeMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/isArguments.js create mode 100644 node_modules/babel-register/node_modules/lodash/isArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/babel-register/node_modules/lodash/isArrayLike.js create mode 100644 node_modules/babel-register/node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/isBoolean.js create mode 100644 node_modules/babel-register/node_modules/lodash/isBuffer.js create mode 100644 node_modules/babel-register/node_modules/lodash/isDate.js create mode 100644 node_modules/babel-register/node_modules/lodash/isElement.js create mode 100644 node_modules/babel-register/node_modules/lodash/isEmpty.js create mode 100644 node_modules/babel-register/node_modules/lodash/isEqual.js create mode 100644 node_modules/babel-register/node_modules/lodash/isEqualWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/isError.js create mode 100644 node_modules/babel-register/node_modules/lodash/isFinite.js create mode 100644 node_modules/babel-register/node_modules/lodash/isFunction.js create mode 100644 node_modules/babel-register/node_modules/lodash/isInteger.js create mode 100644 node_modules/babel-register/node_modules/lodash/isLength.js create mode 100644 node_modules/babel-register/node_modules/lodash/isMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/isMatch.js create mode 100644 node_modules/babel-register/node_modules/lodash/isMatchWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/isNaN.js create mode 100644 node_modules/babel-register/node_modules/lodash/isNative.js create mode 100644 node_modules/babel-register/node_modules/lodash/isNil.js create mode 100644 node_modules/babel-register/node_modules/lodash/isNull.js create mode 100644 node_modules/babel-register/node_modules/lodash/isNumber.js create mode 100644 node_modules/babel-register/node_modules/lodash/isObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/isObjectLike.js create mode 100644 node_modules/babel-register/node_modules/lodash/isPlainObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/isRegExp.js create mode 100644 node_modules/babel-register/node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/babel-register/node_modules/lodash/isSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/isString.js create mode 100644 node_modules/babel-register/node_modules/lodash/isSymbol.js create mode 100644 node_modules/babel-register/node_modules/lodash/isTypedArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/isUndefined.js create mode 100644 node_modules/babel-register/node_modules/lodash/isWeakMap.js create mode 100644 node_modules/babel-register/node_modules/lodash/isWeakSet.js create mode 100644 node_modules/babel-register/node_modules/lodash/iteratee.js create mode 100644 node_modules/babel-register/node_modules/lodash/join.js create mode 100644 node_modules/babel-register/node_modules/lodash/kebabCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/keyBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/keys.js create mode 100644 node_modules/babel-register/node_modules/lodash/keysIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/lang.js create mode 100644 node_modules/babel-register/node_modules/lodash/last.js create mode 100644 node_modules/babel-register/node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/lodash.js create mode 100644 node_modules/babel-register/node_modules/lodash/lodash.min.js create mode 100644 node_modules/babel-register/node_modules/lodash/lowerCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/lowerFirst.js create mode 100644 node_modules/babel-register/node_modules/lodash/lt.js create mode 100644 node_modules/babel-register/node_modules/lodash/lte.js create mode 100644 node_modules/babel-register/node_modules/lodash/map.js create mode 100644 node_modules/babel-register/node_modules/lodash/mapKeys.js create mode 100644 node_modules/babel-register/node_modules/lodash/mapValues.js create mode 100644 node_modules/babel-register/node_modules/lodash/matches.js create mode 100644 node_modules/babel-register/node_modules/lodash/matchesProperty.js create mode 100644 node_modules/babel-register/node_modules/lodash/math.js create mode 100644 node_modules/babel-register/node_modules/lodash/max.js create mode 100644 node_modules/babel-register/node_modules/lodash/maxBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/mean.js create mode 100644 node_modules/babel-register/node_modules/lodash/meanBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/memoize.js create mode 100644 node_modules/babel-register/node_modules/lodash/merge.js create mode 100644 node_modules/babel-register/node_modules/lodash/mergeWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/method.js create mode 100644 node_modules/babel-register/node_modules/lodash/methodOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/min.js create mode 100644 node_modules/babel-register/node_modules/lodash/minBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/mixin.js create mode 100644 node_modules/babel-register/node_modules/lodash/multiply.js create mode 100644 node_modules/babel-register/node_modules/lodash/negate.js create mode 100644 node_modules/babel-register/node_modules/lodash/next.js create mode 100644 node_modules/babel-register/node_modules/lodash/noop.js create mode 100644 node_modules/babel-register/node_modules/lodash/now.js create mode 100644 node_modules/babel-register/node_modules/lodash/nth.js create mode 100644 node_modules/babel-register/node_modules/lodash/nthArg.js create mode 100644 node_modules/babel-register/node_modules/lodash/number.js create mode 100644 node_modules/babel-register/node_modules/lodash/object.js create mode 100644 node_modules/babel-register/node_modules/lodash/omit.js create mode 100644 node_modules/babel-register/node_modules/lodash/omitBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/once.js create mode 100644 node_modules/babel-register/node_modules/lodash/orderBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/over.js create mode 100644 node_modules/babel-register/node_modules/lodash/overArgs.js create mode 100644 node_modules/babel-register/node_modules/lodash/overEvery.js create mode 100644 node_modules/babel-register/node_modules/lodash/overSome.js create mode 100644 node_modules/babel-register/node_modules/lodash/package.json create mode 100644 node_modules/babel-register/node_modules/lodash/pad.js create mode 100644 node_modules/babel-register/node_modules/lodash/padEnd.js create mode 100644 node_modules/babel-register/node_modules/lodash/padStart.js create mode 100644 node_modules/babel-register/node_modules/lodash/parseInt.js create mode 100644 node_modules/babel-register/node_modules/lodash/partial.js create mode 100644 node_modules/babel-register/node_modules/lodash/partialRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/partition.js create mode 100644 node_modules/babel-register/node_modules/lodash/pick.js create mode 100644 node_modules/babel-register/node_modules/lodash/pickBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/plant.js create mode 100644 node_modules/babel-register/node_modules/lodash/property.js create mode 100644 node_modules/babel-register/node_modules/lodash/propertyOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/pull.js create mode 100644 node_modules/babel-register/node_modules/lodash/pullAll.js create mode 100644 node_modules/babel-register/node_modules/lodash/pullAllBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/pullAllWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/pullAt.js create mode 100644 node_modules/babel-register/node_modules/lodash/random.js create mode 100644 node_modules/babel-register/node_modules/lodash/range.js create mode 100644 node_modules/babel-register/node_modules/lodash/rangeRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/rearg.js create mode 100644 node_modules/babel-register/node_modules/lodash/reduce.js create mode 100644 node_modules/babel-register/node_modules/lodash/reduceRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/reject.js create mode 100644 node_modules/babel-register/node_modules/lodash/remove.js create mode 100644 node_modules/babel-register/node_modules/lodash/repeat.js create mode 100644 node_modules/babel-register/node_modules/lodash/replace.js create mode 100644 node_modules/babel-register/node_modules/lodash/rest.js create mode 100644 node_modules/babel-register/node_modules/lodash/result.js create mode 100644 node_modules/babel-register/node_modules/lodash/reverse.js create mode 100644 node_modules/babel-register/node_modules/lodash/round.js create mode 100644 node_modules/babel-register/node_modules/lodash/sample.js create mode 100644 node_modules/babel-register/node_modules/lodash/sampleSize.js create mode 100644 node_modules/babel-register/node_modules/lodash/seq.js create mode 100644 node_modules/babel-register/node_modules/lodash/set.js create mode 100644 node_modules/babel-register/node_modules/lodash/setWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/shuffle.js create mode 100644 node_modules/babel-register/node_modules/lodash/size.js create mode 100644 node_modules/babel-register/node_modules/lodash/slice.js create mode 100644 node_modules/babel-register/node_modules/lodash/snakeCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/some.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortedIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortedUniq.js create mode 100644 node_modules/babel-register/node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/split.js create mode 100644 node_modules/babel-register/node_modules/lodash/spread.js create mode 100644 node_modules/babel-register/node_modules/lodash/startCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/startsWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/string.js create mode 100644 node_modules/babel-register/node_modules/lodash/stubArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/stubFalse.js create mode 100644 node_modules/babel-register/node_modules/lodash/stubObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/stubString.js create mode 100644 node_modules/babel-register/node_modules/lodash/stubTrue.js create mode 100644 node_modules/babel-register/node_modules/lodash/subtract.js create mode 100644 node_modules/babel-register/node_modules/lodash/sum.js create mode 100644 node_modules/babel-register/node_modules/lodash/sumBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/tail.js create mode 100644 node_modules/babel-register/node_modules/lodash/take.js create mode 100644 node_modules/babel-register/node_modules/lodash/takeRight.js create mode 100644 node_modules/babel-register/node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/takeWhile.js create mode 100644 node_modules/babel-register/node_modules/lodash/tap.js create mode 100644 node_modules/babel-register/node_modules/lodash/template.js create mode 100644 node_modules/babel-register/node_modules/lodash/templateSettings.js create mode 100644 node_modules/babel-register/node_modules/lodash/throttle.js create mode 100644 node_modules/babel-register/node_modules/lodash/thru.js create mode 100644 node_modules/babel-register/node_modules/lodash/times.js create mode 100644 node_modules/babel-register/node_modules/lodash/toArray.js create mode 100644 node_modules/babel-register/node_modules/lodash/toFinite.js create mode 100644 node_modules/babel-register/node_modules/lodash/toInteger.js create mode 100644 node_modules/babel-register/node_modules/lodash/toIterator.js create mode 100644 node_modules/babel-register/node_modules/lodash/toJSON.js create mode 100644 node_modules/babel-register/node_modules/lodash/toLength.js create mode 100644 node_modules/babel-register/node_modules/lodash/toLower.js create mode 100644 node_modules/babel-register/node_modules/lodash/toNumber.js create mode 100644 node_modules/babel-register/node_modules/lodash/toPairs.js create mode 100644 node_modules/babel-register/node_modules/lodash/toPairsIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/toPath.js create mode 100644 node_modules/babel-register/node_modules/lodash/toPlainObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/babel-register/node_modules/lodash/toString.js create mode 100644 node_modules/babel-register/node_modules/lodash/toUpper.js create mode 100644 node_modules/babel-register/node_modules/lodash/transform.js create mode 100644 node_modules/babel-register/node_modules/lodash/trim.js create mode 100644 node_modules/babel-register/node_modules/lodash/trimEnd.js create mode 100644 node_modules/babel-register/node_modules/lodash/trimStart.js create mode 100644 node_modules/babel-register/node_modules/lodash/truncate.js create mode 100644 node_modules/babel-register/node_modules/lodash/unary.js create mode 100644 node_modules/babel-register/node_modules/lodash/unescape.js create mode 100644 node_modules/babel-register/node_modules/lodash/union.js create mode 100644 node_modules/babel-register/node_modules/lodash/unionBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/unionWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/uniq.js create mode 100644 node_modules/babel-register/node_modules/lodash/uniqBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/uniqWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/uniqueId.js create mode 100644 node_modules/babel-register/node_modules/lodash/unset.js create mode 100644 node_modules/babel-register/node_modules/lodash/unzip.js create mode 100644 node_modules/babel-register/node_modules/lodash/unzipWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/update.js create mode 100644 node_modules/babel-register/node_modules/lodash/updateWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/upperCase.js create mode 100644 node_modules/babel-register/node_modules/lodash/upperFirst.js create mode 100644 node_modules/babel-register/node_modules/lodash/util.js create mode 100644 node_modules/babel-register/node_modules/lodash/value.js create mode 100644 node_modules/babel-register/node_modules/lodash/valueOf.js create mode 100644 node_modules/babel-register/node_modules/lodash/values.js create mode 100644 node_modules/babel-register/node_modules/lodash/valuesIn.js create mode 100644 node_modules/babel-register/node_modules/lodash/without.js create mode 100644 node_modules/babel-register/node_modules/lodash/words.js create mode 100644 node_modules/babel-register/node_modules/lodash/wrap.js create mode 100644 node_modules/babel-register/node_modules/lodash/wrapperAt.js create mode 100644 node_modules/babel-register/node_modules/lodash/wrapperChain.js create mode 100644 node_modules/babel-register/node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/babel-register/node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/babel-register/node_modules/lodash/wrapperValue.js create mode 100644 node_modules/babel-register/node_modules/lodash/xor.js create mode 100644 node_modules/babel-register/node_modules/lodash/xorBy.js create mode 100644 node_modules/babel-register/node_modules/lodash/xorWith.js create mode 100644 node_modules/babel-register/node_modules/lodash/zip.js create mode 100644 node_modules/babel-register/node_modules/lodash/zipObject.js create mode 100644 node_modules/babel-register/node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/babel-register/node_modules/lodash/zipWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/LICENSE create mode 100644 node_modules/babel-template/node_modules/lodash/README.md create mode 100644 node_modules/babel-template/node_modules/lodash/_DataView.js create mode 100644 node_modules/babel-template/node_modules/lodash/_Hash.js create mode 100644 node_modules/babel-template/node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/babel-template/node_modules/lodash/_ListCache.js create mode 100644 node_modules/babel-template/node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/babel-template/node_modules/lodash/_Map.js create mode 100644 node_modules/babel-template/node_modules/lodash/_MapCache.js create mode 100644 node_modules/babel-template/node_modules/lodash/_Promise.js create mode 100644 node_modules/babel-template/node_modules/lodash/_Set.js create mode 100644 node_modules/babel-template/node_modules/lodash/_SetCache.js create mode 100644 node_modules/babel-template/node_modules/lodash/_Stack.js create mode 100644 node_modules/babel-template/node_modules/lodash/_Symbol.js create mode 100644 node_modules/babel-template/node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/babel-template/node_modules/lodash/_WeakMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/_apply.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayEach.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayPush.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arraySample.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/babel-template/node_modules/lodash/_arraySome.js create mode 100644 node_modules/babel-template/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/babel-template/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_asciiWords.js create mode 100644 node_modules/babel-template/node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/babel-template/node_modules/lodash/_assignValue.js create mode 100644 node_modules/babel-template/node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseAssign.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseAt.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseClamp.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseClone.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseCreate.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseDelay.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseDifference.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseEach.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseEvery.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseFill.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseFilter.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseFor.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseForRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseGet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseGt.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseHas.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseInRange.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseInverter.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseLodash.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseLt.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseMatches.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseMean.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseMerge.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseNth.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/_basePick.js create mode 100644 node_modules/babel-template/node_modules/lodash/_basePickBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseProperty.js create mode 100644 node_modules/babel-template/node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/_basePullAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/_basePullAt.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseRandom.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseRange.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseReduce.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseRest.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSample.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSetData.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSlice.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSome.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseSum.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseTimes.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseToString.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseUnary.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseUniq.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseUnset.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseValues.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseXor.js create mode 100644 node_modules/babel-template/node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/_cacheHas.js create mode 100644 node_modules/babel-template/node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/_castFunction.js create mode 100644 node_modules/babel-template/node_modules/lodash/_castPath.js create mode 100644 node_modules/babel-template/node_modules/lodash/_castRest.js create mode 100644 node_modules/babel-template/node_modules/lodash/_castSlice.js create mode 100644 node_modules/babel-template/node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/babel-template/node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/babel-template/node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/babel-template/node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/babel-template/node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/babel-template/node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_compareAscending.js create mode 100644 node_modules/babel-template/node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/babel-template/node_modules/lodash/_composeArgs.js create mode 100644 node_modules/babel-template/node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/_copyArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_copyObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/_copySymbols.js create mode 100644 node_modules/babel-template/node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_coreJsData.js create mode 100644 node_modules/babel-template/node_modules/lodash/_countHolders.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createAggregator.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createAssigner.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createBind.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createCompounder.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createCtor.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createCurry.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createFind.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createFlow.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createHybrid.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createInverter.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createOver.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createPadding.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createPartial.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createRange.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createRecurry.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createRound.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createToPairs.js create mode 100644 node_modules/babel-template/node_modules/lodash/_createWrap.js create mode 100644 node_modules/babel-template/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/babel-template/node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/babel-template/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/babel-template/node_modules/lodash/_defineProperty.js create mode 100644 node_modules/babel-template/node_modules/lodash/_equalArrays.js create mode 100644 node_modules/babel-template/node_modules/lodash/_equalByTag.js create mode 100644 node_modules/babel-template/node_modules/lodash/_equalObjects.js create mode 100644 node_modules/babel-template/node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/babel-template/node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/babel-template/node_modules/lodash/_flatRest.js create mode 100644 node_modules/babel-template/node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getData.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getFuncName.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getHolder.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getMapData.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getMatchData.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getNative.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getSymbols.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getTag.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getValue.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getView.js create mode 100644 node_modules/babel-template/node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/babel-template/node_modules/lodash/_hasPath.js create mode 100644 node_modules/babel-template/node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/babel-template/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/babel-template/node_modules/lodash/_hashClear.js create mode 100644 node_modules/babel-template/node_modules/lodash/_hashDelete.js create mode 100644 node_modules/babel-template/node_modules/lodash/_hashGet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_hashHas.js create mode 100644 node_modules/babel-template/node_modules/lodash/_hashSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/babel-template/node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isKeyable.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isLaziable.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isMasked.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isPrototype.js create mode 100644 node_modules/babel-template/node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/babel-template/node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_lazyClone.js create mode 100644 node_modules/babel-template/node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/babel-template/node_modules/lodash/_lazyValue.js create mode 100644 node_modules/babel-template/node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/babel-template/node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/babel-template/node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/babel-template/node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/babel-template/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/babel-template/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/babel-template/node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_mapToArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/babel-template/node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/babel-template/node_modules/lodash/_mergeData.js create mode 100644 node_modules/babel-template/node_modules/lodash/_metaMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/babel-template/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/babel-template/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/babel-template/node_modules/lodash/_objectToString.js create mode 100644 node_modules/babel-template/node_modules/lodash/_overArg.js create mode 100644 node_modules/babel-template/node_modules/lodash/_overRest.js create mode 100644 node_modules/babel-template/node_modules/lodash/_parent.js create mode 100644 node_modules/babel-template/node_modules/lodash/_reEscape.js create mode 100644 node_modules/babel-template/node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/babel-template/node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/babel-template/node_modules/lodash/_realNames.js create mode 100644 node_modules/babel-template/node_modules/lodash/_reorder.js create mode 100644 node_modules/babel-template/node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/babel-template/node_modules/lodash/_root.js create mode 100644 node_modules/babel-template/node_modules/lodash/_safeGet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/babel-template/node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/babel-template/node_modules/lodash/_setData.js create mode 100644 node_modules/babel-template/node_modules/lodash/_setToArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/babel-template/node_modules/lodash/_setToString.js create mode 100644 node_modules/babel-template/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/babel-template/node_modules/lodash/_shortOut.js create mode 100644 node_modules/babel-template/node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/babel-template/node_modules/lodash/_stackClear.js create mode 100644 node_modules/babel-template/node_modules/lodash/_stackDelete.js create mode 100644 node_modules/babel-template/node_modules/lodash/_stackGet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_stackHas.js create mode 100644 node_modules/babel-template/node_modules/lodash/_stackSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/_stringSize.js create mode 100644 node_modules/babel-template/node_modules/lodash/_stringToArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_stringToPath.js create mode 100644 node_modules/babel-template/node_modules/lodash/_toKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/_toSource.js create mode 100644 node_modules/babel-template/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/babel-template/node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/babel-template/node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/babel-template/node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/babel-template/node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/babel-template/node_modules/lodash/add.js create mode 100644 node_modules/babel-template/node_modules/lodash/after.js create mode 100644 node_modules/babel-template/node_modules/lodash/array.js create mode 100644 node_modules/babel-template/node_modules/lodash/ary.js create mode 100644 node_modules/babel-template/node_modules/lodash/assign.js create mode 100644 node_modules/babel-template/node_modules/lodash/assignIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/assignInWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/assignWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/at.js create mode 100644 node_modules/babel-template/node_modules/lodash/attempt.js create mode 100644 node_modules/babel-template/node_modules/lodash/before.js create mode 100644 node_modules/babel-template/node_modules/lodash/bind.js create mode 100644 node_modules/babel-template/node_modules/lodash/bindAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/bindKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/camelCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/capitalize.js create mode 100644 node_modules/babel-template/node_modules/lodash/castArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/ceil.js create mode 100644 node_modules/babel-template/node_modules/lodash/chain.js create mode 100644 node_modules/babel-template/node_modules/lodash/chunk.js create mode 100644 node_modules/babel-template/node_modules/lodash/clamp.js create mode 100644 node_modules/babel-template/node_modules/lodash/clone.js create mode 100644 node_modules/babel-template/node_modules/lodash/cloneDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/cloneWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/collection.js create mode 100644 node_modules/babel-template/node_modules/lodash/commit.js create mode 100644 node_modules/babel-template/node_modules/lodash/compact.js create mode 100644 node_modules/babel-template/node_modules/lodash/concat.js create mode 100644 node_modules/babel-template/node_modules/lodash/cond.js create mode 100644 node_modules/babel-template/node_modules/lodash/conforms.js create mode 100644 node_modules/babel-template/node_modules/lodash/conformsTo.js create mode 100644 node_modules/babel-template/node_modules/lodash/constant.js create mode 100644 node_modules/babel-template/node_modules/lodash/core.js create mode 100644 node_modules/babel-template/node_modules/lodash/core.min.js create mode 100644 node_modules/babel-template/node_modules/lodash/countBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/create.js create mode 100644 node_modules/babel-template/node_modules/lodash/curry.js create mode 100644 node_modules/babel-template/node_modules/lodash/curryRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/date.js create mode 100644 node_modules/babel-template/node_modules/lodash/debounce.js create mode 100644 node_modules/babel-template/node_modules/lodash/deburr.js create mode 100644 node_modules/babel-template/node_modules/lodash/defaultTo.js create mode 100644 node_modules/babel-template/node_modules/lodash/defaults.js create mode 100644 node_modules/babel-template/node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/defer.js create mode 100644 node_modules/babel-template/node_modules/lodash/delay.js create mode 100644 node_modules/babel-template/node_modules/lodash/difference.js create mode 100644 node_modules/babel-template/node_modules/lodash/differenceBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/differenceWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/divide.js create mode 100644 node_modules/babel-template/node_modules/lodash/drop.js create mode 100644 node_modules/babel-template/node_modules/lodash/dropRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/dropWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/each.js create mode 100644 node_modules/babel-template/node_modules/lodash/eachRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/endsWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/entries.js create mode 100644 node_modules/babel-template/node_modules/lodash/entriesIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/eq.js create mode 100644 node_modules/babel-template/node_modules/lodash/escape.js create mode 100644 node_modules/babel-template/node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/babel-template/node_modules/lodash/every.js create mode 100644 node_modules/babel-template/node_modules/lodash/extend.js create mode 100644 node_modules/babel-template/node_modules/lodash/extendWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fill.js create mode 100644 node_modules/babel-template/node_modules/lodash/filter.js create mode 100644 node_modules/babel-template/node_modules/lodash/find.js create mode 100644 node_modules/babel-template/node_modules/lodash/findIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/findKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/findLast.js create mode 100644 node_modules/babel-template/node_modules/lodash/findLastIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/findLastKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/first.js create mode 100644 node_modules/babel-template/node_modules/lodash/flatMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/babel-template/node_modules/lodash/flatten.js create mode 100644 node_modules/babel-template/node_modules/lodash/flattenDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/flattenDepth.js create mode 100644 node_modules/babel-template/node_modules/lodash/flip.js create mode 100644 node_modules/babel-template/node_modules/lodash/floor.js create mode 100644 node_modules/babel-template/node_modules/lodash/flow.js create mode 100644 node_modules/babel-template/node_modules/lodash/flowRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/forEach.js create mode 100644 node_modules/babel-template/node_modules/lodash/forEachRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/forIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/forInRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/forOwn.js create mode 100644 node_modules/babel-template/node_modules/lodash/forOwnRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/F.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/T.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/__.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/_util.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/add.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/after.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/all.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/allPass.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/always.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/any.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/apply.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/array.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/ary.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assign.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assoc.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/at.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/attempt.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/before.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/bind.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/castArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/ceil.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/chain.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/chunk.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/clamp.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/clone.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/collection.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/commit.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/compact.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/complement.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/compose.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/concat.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/cond.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/constant.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/contains.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/convert.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/countBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/create.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/curry.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/curryN.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/date.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/debounce.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/deburr.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/defaults.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/defer.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/delay.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/difference.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/divide.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/drop.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/each.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/entries.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/eq.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/equals.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/escape.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/every.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/extend.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/fill.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/filter.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/find.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findLast.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/first.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flatten.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flip.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/floor.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flow.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/forEach.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/forIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/function.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/functions.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/get.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/getOr.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/gt.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/gte.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/has.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/head.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/identical.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/identity.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/inRange.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/includes.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/init.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/initial.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/intersection.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/invert.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/invoke.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isDate.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isElement.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isError.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isLength.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isNative.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isNil.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isNull.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isString.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/join.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/juxt.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/keys.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/lang.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/last.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/lt.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/lte.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/map.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/matches.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/math.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/max.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/mean.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/memoize.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/merge.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/method.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/min.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/minBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/mixin.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/multiply.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/nAry.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/negate.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/next.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/noop.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/now.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/nth.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/number.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/object.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/omit.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/once.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/over.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/overSome.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pad.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/padChars.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/padStart.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/partial.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/partition.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/path.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/paths.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pick.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pipe.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/plant.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pluck.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/prop.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/propEq.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/propOr.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/property.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/props.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pull.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/random.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/range.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/rearg.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/reduce.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/reject.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/remove.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/repeat.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/replace.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/rest.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/result.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/reverse.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/round.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sample.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/seq.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/set.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/setWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/size.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/slice.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/some.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/split.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/spread.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/startCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/string.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/stubString.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/subtract.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sum.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/tail.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/take.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/tap.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/template.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/throttle.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/thru.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/times.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toLength.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toLower.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toPath.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toString.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/transform.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/trim.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/truncate.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unapply.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unary.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unescape.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/union.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/uniq.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unnest.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unset.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unzip.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/update.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/useWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/util.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/value.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/values.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/where.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/without.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/words.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/wrap.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/xor.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/zip.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/fromPairs.js create mode 100644 node_modules/babel-template/node_modules/lodash/function.js create mode 100644 node_modules/babel-template/node_modules/lodash/functions.js create mode 100644 node_modules/babel-template/node_modules/lodash/functionsIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/get.js create mode 100644 node_modules/babel-template/node_modules/lodash/groupBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/gt.js create mode 100644 node_modules/babel-template/node_modules/lodash/gte.js create mode 100644 node_modules/babel-template/node_modules/lodash/has.js create mode 100644 node_modules/babel-template/node_modules/lodash/hasIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/head.js create mode 100644 node_modules/babel-template/node_modules/lodash/identity.js create mode 100644 node_modules/babel-template/node_modules/lodash/inRange.js create mode 100644 node_modules/babel-template/node_modules/lodash/includes.js create mode 100644 node_modules/babel-template/node_modules/lodash/index.js create mode 100644 node_modules/babel-template/node_modules/lodash/indexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/initial.js create mode 100644 node_modules/babel-template/node_modules/lodash/intersection.js create mode 100644 node_modules/babel-template/node_modules/lodash/intersectionBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/intersectionWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/invert.js create mode 100644 node_modules/babel-template/node_modules/lodash/invertBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/invoke.js create mode 100644 node_modules/babel-template/node_modules/lodash/invokeMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/isArguments.js create mode 100644 node_modules/babel-template/node_modules/lodash/isArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/babel-template/node_modules/lodash/isArrayLike.js create mode 100644 node_modules/babel-template/node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/isBoolean.js create mode 100644 node_modules/babel-template/node_modules/lodash/isBuffer.js create mode 100644 node_modules/babel-template/node_modules/lodash/isDate.js create mode 100644 node_modules/babel-template/node_modules/lodash/isElement.js create mode 100644 node_modules/babel-template/node_modules/lodash/isEmpty.js create mode 100644 node_modules/babel-template/node_modules/lodash/isEqual.js create mode 100644 node_modules/babel-template/node_modules/lodash/isEqualWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/isError.js create mode 100644 node_modules/babel-template/node_modules/lodash/isFinite.js create mode 100644 node_modules/babel-template/node_modules/lodash/isFunction.js create mode 100644 node_modules/babel-template/node_modules/lodash/isInteger.js create mode 100644 node_modules/babel-template/node_modules/lodash/isLength.js create mode 100644 node_modules/babel-template/node_modules/lodash/isMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/isMatch.js create mode 100644 node_modules/babel-template/node_modules/lodash/isMatchWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/isNaN.js create mode 100644 node_modules/babel-template/node_modules/lodash/isNative.js create mode 100644 node_modules/babel-template/node_modules/lodash/isNil.js create mode 100644 node_modules/babel-template/node_modules/lodash/isNull.js create mode 100644 node_modules/babel-template/node_modules/lodash/isNumber.js create mode 100644 node_modules/babel-template/node_modules/lodash/isObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/isObjectLike.js create mode 100644 node_modules/babel-template/node_modules/lodash/isPlainObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/isRegExp.js create mode 100644 node_modules/babel-template/node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/babel-template/node_modules/lodash/isSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/isString.js create mode 100644 node_modules/babel-template/node_modules/lodash/isSymbol.js create mode 100644 node_modules/babel-template/node_modules/lodash/isTypedArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/isUndefined.js create mode 100644 node_modules/babel-template/node_modules/lodash/isWeakMap.js create mode 100644 node_modules/babel-template/node_modules/lodash/isWeakSet.js create mode 100644 node_modules/babel-template/node_modules/lodash/iteratee.js create mode 100644 node_modules/babel-template/node_modules/lodash/join.js create mode 100644 node_modules/babel-template/node_modules/lodash/kebabCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/keyBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/keys.js create mode 100644 node_modules/babel-template/node_modules/lodash/keysIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/lang.js create mode 100644 node_modules/babel-template/node_modules/lodash/last.js create mode 100644 node_modules/babel-template/node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/lodash.js create mode 100644 node_modules/babel-template/node_modules/lodash/lodash.min.js create mode 100644 node_modules/babel-template/node_modules/lodash/lowerCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/lowerFirst.js create mode 100644 node_modules/babel-template/node_modules/lodash/lt.js create mode 100644 node_modules/babel-template/node_modules/lodash/lte.js create mode 100644 node_modules/babel-template/node_modules/lodash/map.js create mode 100644 node_modules/babel-template/node_modules/lodash/mapKeys.js create mode 100644 node_modules/babel-template/node_modules/lodash/mapValues.js create mode 100644 node_modules/babel-template/node_modules/lodash/matches.js create mode 100644 node_modules/babel-template/node_modules/lodash/matchesProperty.js create mode 100644 node_modules/babel-template/node_modules/lodash/math.js create mode 100644 node_modules/babel-template/node_modules/lodash/max.js create mode 100644 node_modules/babel-template/node_modules/lodash/maxBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/mean.js create mode 100644 node_modules/babel-template/node_modules/lodash/meanBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/memoize.js create mode 100644 node_modules/babel-template/node_modules/lodash/merge.js create mode 100644 node_modules/babel-template/node_modules/lodash/mergeWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/method.js create mode 100644 node_modules/babel-template/node_modules/lodash/methodOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/min.js create mode 100644 node_modules/babel-template/node_modules/lodash/minBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/mixin.js create mode 100644 node_modules/babel-template/node_modules/lodash/multiply.js create mode 100644 node_modules/babel-template/node_modules/lodash/negate.js create mode 100644 node_modules/babel-template/node_modules/lodash/next.js create mode 100644 node_modules/babel-template/node_modules/lodash/noop.js create mode 100644 node_modules/babel-template/node_modules/lodash/now.js create mode 100644 node_modules/babel-template/node_modules/lodash/nth.js create mode 100644 node_modules/babel-template/node_modules/lodash/nthArg.js create mode 100644 node_modules/babel-template/node_modules/lodash/number.js create mode 100644 node_modules/babel-template/node_modules/lodash/object.js create mode 100644 node_modules/babel-template/node_modules/lodash/omit.js create mode 100644 node_modules/babel-template/node_modules/lodash/omitBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/once.js create mode 100644 node_modules/babel-template/node_modules/lodash/orderBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/over.js create mode 100644 node_modules/babel-template/node_modules/lodash/overArgs.js create mode 100644 node_modules/babel-template/node_modules/lodash/overEvery.js create mode 100644 node_modules/babel-template/node_modules/lodash/overSome.js create mode 100644 node_modules/babel-template/node_modules/lodash/package.json create mode 100644 node_modules/babel-template/node_modules/lodash/pad.js create mode 100644 node_modules/babel-template/node_modules/lodash/padEnd.js create mode 100644 node_modules/babel-template/node_modules/lodash/padStart.js create mode 100644 node_modules/babel-template/node_modules/lodash/parseInt.js create mode 100644 node_modules/babel-template/node_modules/lodash/partial.js create mode 100644 node_modules/babel-template/node_modules/lodash/partialRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/partition.js create mode 100644 node_modules/babel-template/node_modules/lodash/pick.js create mode 100644 node_modules/babel-template/node_modules/lodash/pickBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/plant.js create mode 100644 node_modules/babel-template/node_modules/lodash/property.js create mode 100644 node_modules/babel-template/node_modules/lodash/propertyOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/pull.js create mode 100644 node_modules/babel-template/node_modules/lodash/pullAll.js create mode 100644 node_modules/babel-template/node_modules/lodash/pullAllBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/pullAllWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/pullAt.js create mode 100644 node_modules/babel-template/node_modules/lodash/random.js create mode 100644 node_modules/babel-template/node_modules/lodash/range.js create mode 100644 node_modules/babel-template/node_modules/lodash/rangeRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/rearg.js create mode 100644 node_modules/babel-template/node_modules/lodash/reduce.js create mode 100644 node_modules/babel-template/node_modules/lodash/reduceRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/reject.js create mode 100644 node_modules/babel-template/node_modules/lodash/remove.js create mode 100644 node_modules/babel-template/node_modules/lodash/repeat.js create mode 100644 node_modules/babel-template/node_modules/lodash/replace.js create mode 100644 node_modules/babel-template/node_modules/lodash/rest.js create mode 100644 node_modules/babel-template/node_modules/lodash/result.js create mode 100644 node_modules/babel-template/node_modules/lodash/reverse.js create mode 100644 node_modules/babel-template/node_modules/lodash/round.js create mode 100644 node_modules/babel-template/node_modules/lodash/sample.js create mode 100644 node_modules/babel-template/node_modules/lodash/sampleSize.js create mode 100644 node_modules/babel-template/node_modules/lodash/seq.js create mode 100644 node_modules/babel-template/node_modules/lodash/set.js create mode 100644 node_modules/babel-template/node_modules/lodash/setWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/shuffle.js create mode 100644 node_modules/babel-template/node_modules/lodash/size.js create mode 100644 node_modules/babel-template/node_modules/lodash/slice.js create mode 100644 node_modules/babel-template/node_modules/lodash/snakeCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/some.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortedIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortedUniq.js create mode 100644 node_modules/babel-template/node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/split.js create mode 100644 node_modules/babel-template/node_modules/lodash/spread.js create mode 100644 node_modules/babel-template/node_modules/lodash/startCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/startsWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/string.js create mode 100644 node_modules/babel-template/node_modules/lodash/stubArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/stubFalse.js create mode 100644 node_modules/babel-template/node_modules/lodash/stubObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/stubString.js create mode 100644 node_modules/babel-template/node_modules/lodash/stubTrue.js create mode 100644 node_modules/babel-template/node_modules/lodash/subtract.js create mode 100644 node_modules/babel-template/node_modules/lodash/sum.js create mode 100644 node_modules/babel-template/node_modules/lodash/sumBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/tail.js create mode 100644 node_modules/babel-template/node_modules/lodash/take.js create mode 100644 node_modules/babel-template/node_modules/lodash/takeRight.js create mode 100644 node_modules/babel-template/node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/takeWhile.js create mode 100644 node_modules/babel-template/node_modules/lodash/tap.js create mode 100644 node_modules/babel-template/node_modules/lodash/template.js create mode 100644 node_modules/babel-template/node_modules/lodash/templateSettings.js create mode 100644 node_modules/babel-template/node_modules/lodash/throttle.js create mode 100644 node_modules/babel-template/node_modules/lodash/thru.js create mode 100644 node_modules/babel-template/node_modules/lodash/times.js create mode 100644 node_modules/babel-template/node_modules/lodash/toArray.js create mode 100644 node_modules/babel-template/node_modules/lodash/toFinite.js create mode 100644 node_modules/babel-template/node_modules/lodash/toInteger.js create mode 100644 node_modules/babel-template/node_modules/lodash/toIterator.js create mode 100644 node_modules/babel-template/node_modules/lodash/toJSON.js create mode 100644 node_modules/babel-template/node_modules/lodash/toLength.js create mode 100644 node_modules/babel-template/node_modules/lodash/toLower.js create mode 100644 node_modules/babel-template/node_modules/lodash/toNumber.js create mode 100644 node_modules/babel-template/node_modules/lodash/toPairs.js create mode 100644 node_modules/babel-template/node_modules/lodash/toPairsIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/toPath.js create mode 100644 node_modules/babel-template/node_modules/lodash/toPlainObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/babel-template/node_modules/lodash/toString.js create mode 100644 node_modules/babel-template/node_modules/lodash/toUpper.js create mode 100644 node_modules/babel-template/node_modules/lodash/transform.js create mode 100644 node_modules/babel-template/node_modules/lodash/trim.js create mode 100644 node_modules/babel-template/node_modules/lodash/trimEnd.js create mode 100644 node_modules/babel-template/node_modules/lodash/trimStart.js create mode 100644 node_modules/babel-template/node_modules/lodash/truncate.js create mode 100644 node_modules/babel-template/node_modules/lodash/unary.js create mode 100644 node_modules/babel-template/node_modules/lodash/unescape.js create mode 100644 node_modules/babel-template/node_modules/lodash/union.js create mode 100644 node_modules/babel-template/node_modules/lodash/unionBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/unionWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/uniq.js create mode 100644 node_modules/babel-template/node_modules/lodash/uniqBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/uniqWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/uniqueId.js create mode 100644 node_modules/babel-template/node_modules/lodash/unset.js create mode 100644 node_modules/babel-template/node_modules/lodash/unzip.js create mode 100644 node_modules/babel-template/node_modules/lodash/unzipWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/update.js create mode 100644 node_modules/babel-template/node_modules/lodash/updateWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/upperCase.js create mode 100644 node_modules/babel-template/node_modules/lodash/upperFirst.js create mode 100644 node_modules/babel-template/node_modules/lodash/util.js create mode 100644 node_modules/babel-template/node_modules/lodash/value.js create mode 100644 node_modules/babel-template/node_modules/lodash/valueOf.js create mode 100644 node_modules/babel-template/node_modules/lodash/values.js create mode 100644 node_modules/babel-template/node_modules/lodash/valuesIn.js create mode 100644 node_modules/babel-template/node_modules/lodash/without.js create mode 100644 node_modules/babel-template/node_modules/lodash/words.js create mode 100644 node_modules/babel-template/node_modules/lodash/wrap.js create mode 100644 node_modules/babel-template/node_modules/lodash/wrapperAt.js create mode 100644 node_modules/babel-template/node_modules/lodash/wrapperChain.js create mode 100644 node_modules/babel-template/node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/babel-template/node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/babel-template/node_modules/lodash/wrapperValue.js create mode 100644 node_modules/babel-template/node_modules/lodash/xor.js create mode 100644 node_modules/babel-template/node_modules/lodash/xorBy.js create mode 100644 node_modules/babel-template/node_modules/lodash/xorWith.js create mode 100644 node_modules/babel-template/node_modules/lodash/zip.js create mode 100644 node_modules/babel-template/node_modules/lodash/zipObject.js create mode 100644 node_modules/babel-template/node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/babel-template/node_modules/lodash/zipWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/LICENSE create mode 100644 node_modules/babel-traverse/node_modules/lodash/README.md create mode 100644 node_modules/babel-traverse/node_modules/lodash/_DataView.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_Hash.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_ListCache.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_Map.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_MapCache.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_Promise.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_Set.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_SetCache.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_Stack.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_Symbol.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_WeakMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_apply.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayEach.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayPush.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arraySample.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_arraySome.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_asciiWords.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_assignValue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseAssign.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseAt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseClamp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseClone.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseCreate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseDelay.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseDifference.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseEach.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseEvery.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseFill.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseFilter.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseFor.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseForRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseGet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseGt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseHas.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseInRange.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseInverter.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseLodash.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseLt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseMatches.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseMean.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseMerge.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseNth.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_basePick.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_basePickBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseProperty.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_basePullAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_basePullAt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseRandom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseRange.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseReduce.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseRest.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSample.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSetData.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSlice.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSome.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseSum.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseTimes.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseToString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseUnary.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseUniq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseUnset.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseValues.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseXor.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_cacheHas.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_castFunction.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_castPath.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_castRest.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_castSlice.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_compareAscending.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_composeArgs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_copyArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_copyObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_copySymbols.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_coreJsData.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_countHolders.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createAggregator.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createAssigner.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createBind.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createCompounder.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createCtor.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createCurry.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createFind.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createFlow.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createHybrid.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createInverter.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createOver.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createPadding.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createPartial.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createRange.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createRecurry.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createRound.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createToPairs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_createWrap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_defineProperty.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_equalArrays.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_equalByTag.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_equalObjects.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_flatRest.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getData.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getFuncName.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getHolder.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getMapData.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getMatchData.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getNative.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getSymbols.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getTag.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getValue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getView.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_hasPath.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_hashClear.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_hashDelete.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_hashGet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_hashHas.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_hashSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isKeyable.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isLaziable.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isMasked.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isPrototype.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_lazyClone.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_lazyValue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_mapToArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_mergeData.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_metaMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_objectToString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_overArg.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_overRest.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_parent.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_reEscape.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_realNames.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_reorder.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_root.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_safeGet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_setData.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_setToArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_setToString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_shortOut.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_stackClear.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_stackDelete.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_stackGet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_stackHas.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_stackSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_stringSize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_stringToArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_stringToPath.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_toKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_toSource.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/add.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/after.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/array.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/ary.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/assign.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/assignIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/assignInWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/assignWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/at.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/attempt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/before.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/bind.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/bindAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/bindKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/camelCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/capitalize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/castArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/ceil.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/chain.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/chunk.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/clamp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/clone.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/cloneDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/cloneWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/collection.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/commit.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/compact.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/concat.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/cond.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/conforms.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/conformsTo.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/constant.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/core.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/core.min.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/countBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/create.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/curry.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/curryRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/date.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/debounce.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/deburr.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/defaultTo.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/defaults.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/defer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/delay.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/difference.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/differenceBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/differenceWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/divide.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/drop.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/dropRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/dropWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/each.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/eachRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/endsWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/entries.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/entriesIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/eq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/escape.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/every.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/extend.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/extendWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fill.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/filter.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/find.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/findIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/findKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/findLast.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/findLastIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/findLastKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/first.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flatMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flatten.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flattenDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flattenDepth.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flip.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/floor.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flow.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/flowRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/forEach.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/forEachRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/forIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/forInRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/forOwn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/forOwnRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/F.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/T.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/__.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/_util.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/add.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/after.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/all.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/allPass.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/always.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/any.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/apply.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/array.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/ary.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assign.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assoc.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/at.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/attempt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/before.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/bind.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/castArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/ceil.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/chain.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/chunk.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/clamp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/clone.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/collection.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/commit.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/compact.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/complement.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/compose.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/concat.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/cond.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/constant.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/contains.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/convert.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/countBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/create.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/curry.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/curryN.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/date.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/debounce.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/deburr.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/defaults.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/defer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/delay.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/difference.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/divide.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/drop.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/each.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/entries.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/eq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/equals.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/escape.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/every.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/extend.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/fill.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/filter.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/find.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findLast.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/first.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flatten.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flip.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/floor.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flow.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/forEach.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/forIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/function.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/functions.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/get.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/getOr.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/gt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/gte.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/has.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/head.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/identical.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/identity.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/inRange.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/includes.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/init.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/initial.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/intersection.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/invert.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/invoke.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isDate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isElement.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isError.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isLength.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isNative.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isNil.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isNull.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/join.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/juxt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/keys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/lang.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/last.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/lt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/lte.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/map.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/matches.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/math.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/max.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/mean.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/memoize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/merge.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/method.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/min.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/minBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/mixin.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/multiply.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/nAry.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/negate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/next.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/noop.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/now.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/nth.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/number.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/object.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/omit.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/once.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/over.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/overSome.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pad.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/padChars.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/padStart.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/partial.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/partition.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/path.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/paths.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pick.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pipe.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/plant.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pluck.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/prop.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/propEq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/propOr.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/property.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/props.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pull.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/random.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/range.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/rearg.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/reduce.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/reject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/remove.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/repeat.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/replace.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/rest.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/result.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/reverse.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/round.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sample.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/seq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/set.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/setWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/size.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/slice.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/some.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/split.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/spread.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/startCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/string.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/stubString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/subtract.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sum.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/tail.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/take.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/tap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/template.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/throttle.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/thru.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/times.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toLength.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toLower.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toPath.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/transform.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/trim.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/truncate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unapply.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unary.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unescape.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/union.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/uniq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unnest.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unset.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unzip.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/update.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/useWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/util.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/value.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/values.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/where.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/without.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/words.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/wrap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/xor.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/zip.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/fromPairs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/function.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/functions.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/functionsIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/get.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/groupBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/gt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/gte.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/has.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/hasIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/head.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/identity.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/inRange.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/includes.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/index.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/indexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/initial.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/intersection.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/intersectionBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/intersectionWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/invert.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/invertBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/invoke.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/invokeMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isArguments.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isArrayLike.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isBoolean.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isBuffer.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isDate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isElement.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isEmpty.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isEqual.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isEqualWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isError.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isFinite.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isFunction.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isInteger.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isLength.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isMatch.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isMatchWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isNaN.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isNative.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isNil.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isNull.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isNumber.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isObjectLike.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isPlainObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isRegExp.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isSymbol.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isTypedArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isUndefined.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isWeakMap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/isWeakSet.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/iteratee.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/join.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/kebabCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/keyBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/keys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/keysIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/lang.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/last.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/lodash.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/lodash.min.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/lowerCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/lowerFirst.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/lt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/lte.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/map.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/mapKeys.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/mapValues.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/matches.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/matchesProperty.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/math.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/max.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/maxBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/mean.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/meanBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/memoize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/merge.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/mergeWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/method.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/methodOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/min.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/minBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/mixin.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/multiply.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/negate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/next.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/noop.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/now.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/nth.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/nthArg.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/number.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/object.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/omit.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/omitBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/once.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/orderBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/over.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/overArgs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/overEvery.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/overSome.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/package.json create mode 100644 node_modules/babel-traverse/node_modules/lodash/pad.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/padEnd.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/padStart.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/parseInt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/partial.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/partialRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/partition.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/pick.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/pickBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/plant.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/property.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/propertyOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/pull.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/pullAll.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/pullAllBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/pullAllWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/pullAt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/random.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/range.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/rangeRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/rearg.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/reduce.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/reduceRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/reject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/remove.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/repeat.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/replace.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/rest.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/result.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/reverse.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/round.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sample.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sampleSize.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/seq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/set.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/setWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/shuffle.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/size.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/slice.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/snakeCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/some.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortedIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortedUniq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/split.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/spread.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/startCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/startsWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/string.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/stubArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/stubFalse.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/stubObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/stubString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/stubTrue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/subtract.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sum.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/sumBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/tail.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/take.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/takeRight.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/takeWhile.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/tap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/template.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/templateSettings.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/throttle.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/thru.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/times.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toArray.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toFinite.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toInteger.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toIterator.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toJSON.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toLength.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toLower.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toNumber.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toPairs.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toPairsIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toPath.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toPlainObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toString.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/toUpper.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/transform.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/trim.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/trimEnd.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/trimStart.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/truncate.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/unary.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/unescape.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/union.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/unionBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/unionWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/uniq.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/uniqBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/uniqWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/uniqueId.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/unset.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/unzip.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/unzipWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/update.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/updateWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/upperCase.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/upperFirst.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/util.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/value.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/valueOf.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/values.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/valuesIn.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/without.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/words.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/wrap.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/wrapperAt.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/wrapperChain.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/wrapperValue.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/xor.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/xorBy.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/xorWith.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/zip.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/zipObject.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/babel-traverse/node_modules/lodash/zipWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/LICENSE create mode 100644 node_modules/babel-types/node_modules/lodash/README.md create mode 100644 node_modules/babel-types/node_modules/lodash/_DataView.js create mode 100644 node_modules/babel-types/node_modules/lodash/_Hash.js create mode 100644 node_modules/babel-types/node_modules/lodash/_LazyWrapper.js create mode 100644 node_modules/babel-types/node_modules/lodash/_ListCache.js create mode 100644 node_modules/babel-types/node_modules/lodash/_LodashWrapper.js create mode 100644 node_modules/babel-types/node_modules/lodash/_Map.js create mode 100644 node_modules/babel-types/node_modules/lodash/_MapCache.js create mode 100644 node_modules/babel-types/node_modules/lodash/_Promise.js create mode 100644 node_modules/babel-types/node_modules/lodash/_Set.js create mode 100644 node_modules/babel-types/node_modules/lodash/_SetCache.js create mode 100644 node_modules/babel-types/node_modules/lodash/_Stack.js create mode 100644 node_modules/babel-types/node_modules/lodash/_Symbol.js create mode 100644 node_modules/babel-types/node_modules/lodash/_Uint8Array.js create mode 100644 node_modules/babel-types/node_modules/lodash/_WeakMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/_apply.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayAggregator.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayEach.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayEachRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayEvery.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayFilter.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayIncludes.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayIncludesWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayLikeKeys.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayPush.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayReduce.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayReduceRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arraySample.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arraySampleSize.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arrayShuffle.js create mode 100644 node_modules/babel-types/node_modules/lodash/_arraySome.js create mode 100644 node_modules/babel-types/node_modules/lodash/_asciiSize.js create mode 100644 node_modules/babel-types/node_modules/lodash/_asciiToArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_asciiWords.js create mode 100644 node_modules/babel-types/node_modules/lodash/_assignMergeValue.js create mode 100644 node_modules/babel-types/node_modules/lodash/_assignValue.js create mode 100644 node_modules/babel-types/node_modules/lodash/_assocIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseAggregator.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseAssign.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseAssignIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseAssignValue.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseAt.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseClamp.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseClone.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseConforms.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseConformsTo.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseCreate.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseDelay.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseDifference.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseEach.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseEachRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseEvery.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseExtremum.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseFill.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseFilter.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseFindIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseFindKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseFlatten.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseFor.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseForOwn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseForOwnRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseForRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseFunctions.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseGet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseGetAllKeys.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseGetTag.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseGt.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseHas.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseHasIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseInRange.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIndexOfWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIntersection.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseInverter.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseInvoke.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsArguments.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsArrayBuffer.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsDate.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsEqual.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsEqualDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsMatch.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsNaN.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsNative.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsRegExp.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIsTypedArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseIteratee.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseKeys.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseKeysIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseLodash.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseLt.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseMatches.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseMatchesProperty.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseMean.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseMerge.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseMergeDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseNth.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseOrderBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/_basePick.js create mode 100644 node_modules/babel-types/node_modules/lodash/_basePickBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseProperty.js create mode 100644 node_modules/babel-types/node_modules/lodash/_basePropertyDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/_basePropertyOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/_basePullAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/_basePullAt.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseRandom.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseRange.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseReduce.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseRepeat.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseRest.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSample.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSampleSize.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSetData.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSetToString.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseShuffle.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSlice.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSome.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSortBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSortedIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSortedIndexBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSortedUniq.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseSum.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseTimes.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseToNumber.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseToPairs.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseToString.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseUnary.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseUniq.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseUnset.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseUpdate.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseValues.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseWrapperValue.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseXor.js create mode 100644 node_modules/babel-types/node_modules/lodash/_baseZipObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/_cacheHas.js create mode 100644 node_modules/babel-types/node_modules/lodash/_castArrayLikeObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/_castFunction.js create mode 100644 node_modules/babel-types/node_modules/lodash/_castPath.js create mode 100644 node_modules/babel-types/node_modules/lodash/_castRest.js create mode 100644 node_modules/babel-types/node_modules/lodash/_castSlice.js create mode 100644 node_modules/babel-types/node_modules/lodash/_charsEndIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/_charsStartIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/_cloneArrayBuffer.js create mode 100644 node_modules/babel-types/node_modules/lodash/_cloneBuffer.js create mode 100644 node_modules/babel-types/node_modules/lodash/_cloneDataView.js create mode 100644 node_modules/babel-types/node_modules/lodash/_cloneRegExp.js create mode 100644 node_modules/babel-types/node_modules/lodash/_cloneSymbol.js create mode 100644 node_modules/babel-types/node_modules/lodash/_cloneTypedArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_compareAscending.js create mode 100644 node_modules/babel-types/node_modules/lodash/_compareMultiple.js create mode 100644 node_modules/babel-types/node_modules/lodash/_composeArgs.js create mode 100644 node_modules/babel-types/node_modules/lodash/_composeArgsRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/_copyArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_copyObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/_copySymbols.js create mode 100644 node_modules/babel-types/node_modules/lodash/_copySymbolsIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_coreJsData.js create mode 100644 node_modules/babel-types/node_modules/lodash/_countHolders.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createAggregator.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createAssigner.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createBaseEach.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createBaseFor.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createBind.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createCaseFirst.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createCompounder.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createCtor.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createCurry.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createFind.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createFlow.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createHybrid.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createInverter.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createMathOperation.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createOver.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createPadding.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createPartial.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createRange.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createRecurry.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createRelationalOperation.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createRound.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createToPairs.js create mode 100644 node_modules/babel-types/node_modules/lodash/_createWrap.js create mode 100644 node_modules/babel-types/node_modules/lodash/_customDefaultsAssignIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_customDefaultsMerge.js create mode 100644 node_modules/babel-types/node_modules/lodash/_customOmitClone.js create mode 100644 node_modules/babel-types/node_modules/lodash/_deburrLetter.js create mode 100644 node_modules/babel-types/node_modules/lodash/_defineProperty.js create mode 100644 node_modules/babel-types/node_modules/lodash/_equalArrays.js create mode 100644 node_modules/babel-types/node_modules/lodash/_equalByTag.js create mode 100644 node_modules/babel-types/node_modules/lodash/_equalObjects.js create mode 100644 node_modules/babel-types/node_modules/lodash/_escapeHtmlChar.js create mode 100644 node_modules/babel-types/node_modules/lodash/_escapeStringChar.js create mode 100644 node_modules/babel-types/node_modules/lodash/_flatRest.js create mode 100644 node_modules/babel-types/node_modules/lodash/_freeGlobal.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getAllKeys.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getAllKeysIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getData.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getFuncName.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getHolder.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getMapData.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getMatchData.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getNative.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getPrototype.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getRawTag.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getSymbols.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getSymbolsIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getTag.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getValue.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getView.js create mode 100644 node_modules/babel-types/node_modules/lodash/_getWrapDetails.js create mode 100644 node_modules/babel-types/node_modules/lodash/_hasPath.js create mode 100644 node_modules/babel-types/node_modules/lodash/_hasUnicode.js create mode 100644 node_modules/babel-types/node_modules/lodash/_hasUnicodeWord.js create mode 100644 node_modules/babel-types/node_modules/lodash/_hashClear.js create mode 100644 node_modules/babel-types/node_modules/lodash/_hashDelete.js create mode 100644 node_modules/babel-types/node_modules/lodash/_hashGet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_hashHas.js create mode 100644 node_modules/babel-types/node_modules/lodash/_hashSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_initCloneArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_initCloneByTag.js create mode 100644 node_modules/babel-types/node_modules/lodash/_initCloneObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/_insertWrapDetails.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isFlattenable.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isIterateeCall.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isKeyable.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isLaziable.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isMaskable.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isMasked.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isPrototype.js create mode 100644 node_modules/babel-types/node_modules/lodash/_isStrictComparable.js create mode 100644 node_modules/babel-types/node_modules/lodash/_iteratorToArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_lazyClone.js create mode 100644 node_modules/babel-types/node_modules/lodash/_lazyReverse.js create mode 100644 node_modules/babel-types/node_modules/lodash/_lazyValue.js create mode 100644 node_modules/babel-types/node_modules/lodash/_listCacheClear.js create mode 100644 node_modules/babel-types/node_modules/lodash/_listCacheDelete.js create mode 100644 node_modules/babel-types/node_modules/lodash/_listCacheGet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_listCacheHas.js create mode 100644 node_modules/babel-types/node_modules/lodash/_listCacheSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_mapCacheClear.js create mode 100644 node_modules/babel-types/node_modules/lodash/_mapCacheDelete.js create mode 100644 node_modules/babel-types/node_modules/lodash/_mapCacheGet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_mapCacheHas.js create mode 100644 node_modules/babel-types/node_modules/lodash/_mapCacheSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_mapToArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_matchesStrictComparable.js create mode 100644 node_modules/babel-types/node_modules/lodash/_memoizeCapped.js create mode 100644 node_modules/babel-types/node_modules/lodash/_mergeData.js create mode 100644 node_modules/babel-types/node_modules/lodash/_metaMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/_nativeCreate.js create mode 100644 node_modules/babel-types/node_modules/lodash/_nativeKeys.js create mode 100644 node_modules/babel-types/node_modules/lodash/_nativeKeysIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/_nodeUtil.js create mode 100644 node_modules/babel-types/node_modules/lodash/_objectToString.js create mode 100644 node_modules/babel-types/node_modules/lodash/_overArg.js create mode 100644 node_modules/babel-types/node_modules/lodash/_overRest.js create mode 100644 node_modules/babel-types/node_modules/lodash/_parent.js create mode 100644 node_modules/babel-types/node_modules/lodash/_reEscape.js create mode 100644 node_modules/babel-types/node_modules/lodash/_reEvaluate.js create mode 100644 node_modules/babel-types/node_modules/lodash/_reInterpolate.js create mode 100644 node_modules/babel-types/node_modules/lodash/_realNames.js create mode 100644 node_modules/babel-types/node_modules/lodash/_reorder.js create mode 100644 node_modules/babel-types/node_modules/lodash/_replaceHolders.js create mode 100644 node_modules/babel-types/node_modules/lodash/_root.js create mode 100644 node_modules/babel-types/node_modules/lodash/_safeGet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_setCacheAdd.js create mode 100644 node_modules/babel-types/node_modules/lodash/_setCacheHas.js create mode 100644 node_modules/babel-types/node_modules/lodash/_setData.js create mode 100644 node_modules/babel-types/node_modules/lodash/_setToArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_setToPairs.js create mode 100644 node_modules/babel-types/node_modules/lodash/_setToString.js create mode 100644 node_modules/babel-types/node_modules/lodash/_setWrapToString.js create mode 100644 node_modules/babel-types/node_modules/lodash/_shortOut.js create mode 100644 node_modules/babel-types/node_modules/lodash/_shuffleSelf.js create mode 100644 node_modules/babel-types/node_modules/lodash/_stackClear.js create mode 100644 node_modules/babel-types/node_modules/lodash/_stackDelete.js create mode 100644 node_modules/babel-types/node_modules/lodash/_stackGet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_stackHas.js create mode 100644 node_modules/babel-types/node_modules/lodash/_stackSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/_strictIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/_strictLastIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/_stringSize.js create mode 100644 node_modules/babel-types/node_modules/lodash/_stringToArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_stringToPath.js create mode 100644 node_modules/babel-types/node_modules/lodash/_toKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/_toSource.js create mode 100644 node_modules/babel-types/node_modules/lodash/_unescapeHtmlChar.js create mode 100644 node_modules/babel-types/node_modules/lodash/_unicodeSize.js create mode 100644 node_modules/babel-types/node_modules/lodash/_unicodeToArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/_unicodeWords.js create mode 100644 node_modules/babel-types/node_modules/lodash/_updateWrapDetails.js create mode 100644 node_modules/babel-types/node_modules/lodash/_wrapperClone.js create mode 100644 node_modules/babel-types/node_modules/lodash/add.js create mode 100644 node_modules/babel-types/node_modules/lodash/after.js create mode 100644 node_modules/babel-types/node_modules/lodash/array.js create mode 100644 node_modules/babel-types/node_modules/lodash/ary.js create mode 100644 node_modules/babel-types/node_modules/lodash/assign.js create mode 100644 node_modules/babel-types/node_modules/lodash/assignIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/assignInWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/assignWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/at.js create mode 100644 node_modules/babel-types/node_modules/lodash/attempt.js create mode 100644 node_modules/babel-types/node_modules/lodash/before.js create mode 100644 node_modules/babel-types/node_modules/lodash/bind.js create mode 100644 node_modules/babel-types/node_modules/lodash/bindAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/bindKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/camelCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/capitalize.js create mode 100644 node_modules/babel-types/node_modules/lodash/castArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/ceil.js create mode 100644 node_modules/babel-types/node_modules/lodash/chain.js create mode 100644 node_modules/babel-types/node_modules/lodash/chunk.js create mode 100644 node_modules/babel-types/node_modules/lodash/clamp.js create mode 100644 node_modules/babel-types/node_modules/lodash/clone.js create mode 100644 node_modules/babel-types/node_modules/lodash/cloneDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/cloneDeepWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/cloneWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/collection.js create mode 100644 node_modules/babel-types/node_modules/lodash/commit.js create mode 100644 node_modules/babel-types/node_modules/lodash/compact.js create mode 100644 node_modules/babel-types/node_modules/lodash/concat.js create mode 100644 node_modules/babel-types/node_modules/lodash/cond.js create mode 100644 node_modules/babel-types/node_modules/lodash/conforms.js create mode 100644 node_modules/babel-types/node_modules/lodash/conformsTo.js create mode 100644 node_modules/babel-types/node_modules/lodash/constant.js create mode 100644 node_modules/babel-types/node_modules/lodash/core.js create mode 100644 node_modules/babel-types/node_modules/lodash/core.min.js create mode 100644 node_modules/babel-types/node_modules/lodash/countBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/create.js create mode 100644 node_modules/babel-types/node_modules/lodash/curry.js create mode 100644 node_modules/babel-types/node_modules/lodash/curryRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/date.js create mode 100644 node_modules/babel-types/node_modules/lodash/debounce.js create mode 100644 node_modules/babel-types/node_modules/lodash/deburr.js create mode 100644 node_modules/babel-types/node_modules/lodash/defaultTo.js create mode 100644 node_modules/babel-types/node_modules/lodash/defaults.js create mode 100644 node_modules/babel-types/node_modules/lodash/defaultsDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/defer.js create mode 100644 node_modules/babel-types/node_modules/lodash/delay.js create mode 100644 node_modules/babel-types/node_modules/lodash/difference.js create mode 100644 node_modules/babel-types/node_modules/lodash/differenceBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/differenceWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/divide.js create mode 100644 node_modules/babel-types/node_modules/lodash/drop.js create mode 100644 node_modules/babel-types/node_modules/lodash/dropRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/dropRightWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/dropWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/each.js create mode 100644 node_modules/babel-types/node_modules/lodash/eachRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/endsWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/entries.js create mode 100644 node_modules/babel-types/node_modules/lodash/entriesIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/eq.js create mode 100644 node_modules/babel-types/node_modules/lodash/escape.js create mode 100644 node_modules/babel-types/node_modules/lodash/escapeRegExp.js create mode 100644 node_modules/babel-types/node_modules/lodash/every.js create mode 100644 node_modules/babel-types/node_modules/lodash/extend.js create mode 100644 node_modules/babel-types/node_modules/lodash/extendWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fill.js create mode 100644 node_modules/babel-types/node_modules/lodash/filter.js create mode 100644 node_modules/babel-types/node_modules/lodash/find.js create mode 100644 node_modules/babel-types/node_modules/lodash/findIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/findKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/findLast.js create mode 100644 node_modules/babel-types/node_modules/lodash/findLastIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/findLastKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/first.js create mode 100644 node_modules/babel-types/node_modules/lodash/flatMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/flatMapDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/flatMapDepth.js create mode 100644 node_modules/babel-types/node_modules/lodash/flatten.js create mode 100644 node_modules/babel-types/node_modules/lodash/flattenDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/flattenDepth.js create mode 100644 node_modules/babel-types/node_modules/lodash/flip.js create mode 100644 node_modules/babel-types/node_modules/lodash/floor.js create mode 100644 node_modules/babel-types/node_modules/lodash/flow.js create mode 100644 node_modules/babel-types/node_modules/lodash/flowRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/forEach.js create mode 100644 node_modules/babel-types/node_modules/lodash/forEachRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/forIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/forInRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/forOwn.js create mode 100644 node_modules/babel-types/node_modules/lodash/forOwnRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/F.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/T.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/__.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/_baseConvert.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/_convertBrowser.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/_falseOptions.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/_mapping.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/_util.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/add.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/after.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/all.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/allPass.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/always.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/any.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/anyPass.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/apply.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/array.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/ary.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assign.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assignAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assignAllWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assignIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assignInAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assignInAllWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assignInWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assignWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assoc.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/assocPath.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/at.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/attempt.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/before.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/bind.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/bindAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/bindKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/camelCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/capitalize.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/castArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/ceil.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/chain.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/chunk.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/clamp.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/clone.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/cloneDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/cloneDeepWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/cloneWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/collection.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/commit.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/compact.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/complement.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/compose.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/concat.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/cond.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/conforms.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/conformsTo.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/constant.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/contains.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/convert.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/countBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/create.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/curry.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/curryN.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/curryRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/curryRightN.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/date.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/debounce.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/deburr.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/defaultTo.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/defaults.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/defaultsAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/defaultsDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/defaultsDeepAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/defer.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/delay.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/difference.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/differenceBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/differenceWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/dissoc.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/dissocPath.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/divide.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/drop.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/dropLast.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/dropLastWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/dropRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/dropRightWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/dropWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/each.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/eachRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/endsWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/entries.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/entriesIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/eq.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/equals.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/escape.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/escapeRegExp.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/every.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/extend.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/extendAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/extendAllWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/extendWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/fill.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/filter.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/find.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findIndexFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findLast.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findLastFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findLastIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findLastIndexFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/findLastKey.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/first.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flatMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flatMapDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flatMapDepth.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flatten.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flattenDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flattenDepth.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flip.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/floor.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flow.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/flowRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/forEach.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/forEachRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/forIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/forInRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/forOwn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/forOwnRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/fromPairs.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/function.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/functions.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/functionsIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/get.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/getOr.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/groupBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/gt.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/gte.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/has.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/hasIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/head.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/identical.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/identity.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/inRange.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/includes.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/includesFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/indexBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/indexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/indexOfFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/init.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/initial.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/intersection.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/intersectionBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/intersectionWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/invert.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/invertBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/invertObj.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/invoke.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/invokeArgs.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/invokeArgsMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/invokeMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isArguments.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isArrayBuffer.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isArrayLike.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isArrayLikeObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isBoolean.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isBuffer.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isDate.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isElement.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isEmpty.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isEqual.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isEqualWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isError.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isFinite.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isFunction.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isInteger.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isLength.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isMatch.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isMatchWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isNaN.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isNative.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isNil.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isNull.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isNumber.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isObjectLike.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isPlainObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isRegExp.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isSafeInteger.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isString.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isSymbol.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isTypedArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isUndefined.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isWeakMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/isWeakSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/iteratee.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/join.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/juxt.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/kebabCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/keyBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/keys.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/keysIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/lang.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/last.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/lastIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/lastIndexOfFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/lowerCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/lowerFirst.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/lt.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/lte.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/map.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/mapKeys.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/mapValues.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/matches.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/matchesProperty.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/math.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/max.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/maxBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/mean.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/meanBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/memoize.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/merge.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/mergeAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/mergeAllWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/mergeWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/method.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/methodOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/min.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/minBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/mixin.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/multiply.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/nAry.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/negate.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/next.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/noop.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/now.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/nth.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/nthArg.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/number.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/object.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/omit.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/omitAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/omitBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/once.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/orderBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/over.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/overArgs.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/overEvery.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/overSome.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pad.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/padChars.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/padCharsEnd.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/padCharsStart.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/padEnd.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/padStart.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/parseInt.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/partial.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/partialRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/partition.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/path.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pathEq.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pathOr.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/paths.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pick.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pickAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pickBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pipe.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/placeholder.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/plant.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pluck.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/prop.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/propEq.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/propOr.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/property.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/propertyOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/props.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pull.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pullAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pullAllBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pullAllWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/pullAt.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/random.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/range.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/rangeRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/rangeStep.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/rangeStepRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/rearg.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/reduce.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/reduceRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/reject.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/remove.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/repeat.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/replace.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/rest.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/restFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/result.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/reverse.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/round.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sample.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sampleSize.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/seq.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/set.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/setWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/shuffle.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/size.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/slice.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/snakeCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/some.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortedIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortedIndexBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortedIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortedLastIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortedLastIndexBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortedLastIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortedUniq.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sortedUniqBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/split.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/spread.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/spreadFrom.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/startCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/startsWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/string.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/stubArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/stubFalse.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/stubObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/stubString.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/stubTrue.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/subtract.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sum.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/sumBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/symmetricDifference.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/symmetricDifferenceBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/symmetricDifferenceWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/tail.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/take.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/takeLast.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/takeLastWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/takeRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/takeRightWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/takeWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/tap.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/template.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/templateSettings.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/throttle.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/thru.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/times.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toFinite.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toInteger.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toIterator.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toJSON.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toLength.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toLower.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toNumber.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toPairs.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toPairsIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toPath.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toPlainObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toSafeInteger.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toString.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/toUpper.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/transform.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/trim.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/trimChars.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/trimCharsEnd.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/trimCharsStart.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/trimEnd.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/trimStart.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/truncate.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unapply.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unary.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unescape.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/union.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unionBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unionWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/uniq.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/uniqBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/uniqWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/uniqueId.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unnest.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unset.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unzip.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/unzipWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/update.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/updateWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/upperCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/upperFirst.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/useWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/util.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/value.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/valueOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/values.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/valuesIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/where.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/whereEq.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/without.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/words.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/wrap.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/wrapperAt.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/wrapperChain.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/wrapperLodash.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/wrapperReverse.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/wrapperValue.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/xor.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/xorBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/xorWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/zip.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/zipAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/zipObj.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/zipObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/zipObjectDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/fp/zipWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/fromPairs.js create mode 100644 node_modules/babel-types/node_modules/lodash/function.js create mode 100644 node_modules/babel-types/node_modules/lodash/functions.js create mode 100644 node_modules/babel-types/node_modules/lodash/functionsIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/get.js create mode 100644 node_modules/babel-types/node_modules/lodash/groupBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/gt.js create mode 100644 node_modules/babel-types/node_modules/lodash/gte.js create mode 100644 node_modules/babel-types/node_modules/lodash/has.js create mode 100644 node_modules/babel-types/node_modules/lodash/hasIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/head.js create mode 100644 node_modules/babel-types/node_modules/lodash/identity.js create mode 100644 node_modules/babel-types/node_modules/lodash/inRange.js create mode 100644 node_modules/babel-types/node_modules/lodash/includes.js create mode 100644 node_modules/babel-types/node_modules/lodash/index.js create mode 100644 node_modules/babel-types/node_modules/lodash/indexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/initial.js create mode 100644 node_modules/babel-types/node_modules/lodash/intersection.js create mode 100644 node_modules/babel-types/node_modules/lodash/intersectionBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/intersectionWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/invert.js create mode 100644 node_modules/babel-types/node_modules/lodash/invertBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/invoke.js create mode 100644 node_modules/babel-types/node_modules/lodash/invokeMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/isArguments.js create mode 100644 node_modules/babel-types/node_modules/lodash/isArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/isArrayBuffer.js create mode 100644 node_modules/babel-types/node_modules/lodash/isArrayLike.js create mode 100644 node_modules/babel-types/node_modules/lodash/isArrayLikeObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/isBoolean.js create mode 100644 node_modules/babel-types/node_modules/lodash/isBuffer.js create mode 100644 node_modules/babel-types/node_modules/lodash/isDate.js create mode 100644 node_modules/babel-types/node_modules/lodash/isElement.js create mode 100644 node_modules/babel-types/node_modules/lodash/isEmpty.js create mode 100644 node_modules/babel-types/node_modules/lodash/isEqual.js create mode 100644 node_modules/babel-types/node_modules/lodash/isEqualWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/isError.js create mode 100644 node_modules/babel-types/node_modules/lodash/isFinite.js create mode 100644 node_modules/babel-types/node_modules/lodash/isFunction.js create mode 100644 node_modules/babel-types/node_modules/lodash/isInteger.js create mode 100644 node_modules/babel-types/node_modules/lodash/isLength.js create mode 100644 node_modules/babel-types/node_modules/lodash/isMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/isMatch.js create mode 100644 node_modules/babel-types/node_modules/lodash/isMatchWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/isNaN.js create mode 100644 node_modules/babel-types/node_modules/lodash/isNative.js create mode 100644 node_modules/babel-types/node_modules/lodash/isNil.js create mode 100644 node_modules/babel-types/node_modules/lodash/isNull.js create mode 100644 node_modules/babel-types/node_modules/lodash/isNumber.js create mode 100644 node_modules/babel-types/node_modules/lodash/isObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/isObjectLike.js create mode 100644 node_modules/babel-types/node_modules/lodash/isPlainObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/isRegExp.js create mode 100644 node_modules/babel-types/node_modules/lodash/isSafeInteger.js create mode 100644 node_modules/babel-types/node_modules/lodash/isSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/isString.js create mode 100644 node_modules/babel-types/node_modules/lodash/isSymbol.js create mode 100644 node_modules/babel-types/node_modules/lodash/isTypedArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/isUndefined.js create mode 100644 node_modules/babel-types/node_modules/lodash/isWeakMap.js create mode 100644 node_modules/babel-types/node_modules/lodash/isWeakSet.js create mode 100644 node_modules/babel-types/node_modules/lodash/iteratee.js create mode 100644 node_modules/babel-types/node_modules/lodash/join.js create mode 100644 node_modules/babel-types/node_modules/lodash/kebabCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/keyBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/keys.js create mode 100644 node_modules/babel-types/node_modules/lodash/keysIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/lang.js create mode 100644 node_modules/babel-types/node_modules/lodash/last.js create mode 100644 node_modules/babel-types/node_modules/lodash/lastIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/lodash.js create mode 100644 node_modules/babel-types/node_modules/lodash/lodash.min.js create mode 100644 node_modules/babel-types/node_modules/lodash/lowerCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/lowerFirst.js create mode 100644 node_modules/babel-types/node_modules/lodash/lt.js create mode 100644 node_modules/babel-types/node_modules/lodash/lte.js create mode 100644 node_modules/babel-types/node_modules/lodash/map.js create mode 100644 node_modules/babel-types/node_modules/lodash/mapKeys.js create mode 100644 node_modules/babel-types/node_modules/lodash/mapValues.js create mode 100644 node_modules/babel-types/node_modules/lodash/matches.js create mode 100644 node_modules/babel-types/node_modules/lodash/matchesProperty.js create mode 100644 node_modules/babel-types/node_modules/lodash/math.js create mode 100644 node_modules/babel-types/node_modules/lodash/max.js create mode 100644 node_modules/babel-types/node_modules/lodash/maxBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/mean.js create mode 100644 node_modules/babel-types/node_modules/lodash/meanBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/memoize.js create mode 100644 node_modules/babel-types/node_modules/lodash/merge.js create mode 100644 node_modules/babel-types/node_modules/lodash/mergeWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/method.js create mode 100644 node_modules/babel-types/node_modules/lodash/methodOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/min.js create mode 100644 node_modules/babel-types/node_modules/lodash/minBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/mixin.js create mode 100644 node_modules/babel-types/node_modules/lodash/multiply.js create mode 100644 node_modules/babel-types/node_modules/lodash/negate.js create mode 100644 node_modules/babel-types/node_modules/lodash/next.js create mode 100644 node_modules/babel-types/node_modules/lodash/noop.js create mode 100644 node_modules/babel-types/node_modules/lodash/now.js create mode 100644 node_modules/babel-types/node_modules/lodash/nth.js create mode 100644 node_modules/babel-types/node_modules/lodash/nthArg.js create mode 100644 node_modules/babel-types/node_modules/lodash/number.js create mode 100644 node_modules/babel-types/node_modules/lodash/object.js create mode 100644 node_modules/babel-types/node_modules/lodash/omit.js create mode 100644 node_modules/babel-types/node_modules/lodash/omitBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/once.js create mode 100644 node_modules/babel-types/node_modules/lodash/orderBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/over.js create mode 100644 node_modules/babel-types/node_modules/lodash/overArgs.js create mode 100644 node_modules/babel-types/node_modules/lodash/overEvery.js create mode 100644 node_modules/babel-types/node_modules/lodash/overSome.js create mode 100644 node_modules/babel-types/node_modules/lodash/package.json create mode 100644 node_modules/babel-types/node_modules/lodash/pad.js create mode 100644 node_modules/babel-types/node_modules/lodash/padEnd.js create mode 100644 node_modules/babel-types/node_modules/lodash/padStart.js create mode 100644 node_modules/babel-types/node_modules/lodash/parseInt.js create mode 100644 node_modules/babel-types/node_modules/lodash/partial.js create mode 100644 node_modules/babel-types/node_modules/lodash/partialRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/partition.js create mode 100644 node_modules/babel-types/node_modules/lodash/pick.js create mode 100644 node_modules/babel-types/node_modules/lodash/pickBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/plant.js create mode 100644 node_modules/babel-types/node_modules/lodash/property.js create mode 100644 node_modules/babel-types/node_modules/lodash/propertyOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/pull.js create mode 100644 node_modules/babel-types/node_modules/lodash/pullAll.js create mode 100644 node_modules/babel-types/node_modules/lodash/pullAllBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/pullAllWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/pullAt.js create mode 100644 node_modules/babel-types/node_modules/lodash/random.js create mode 100644 node_modules/babel-types/node_modules/lodash/range.js create mode 100644 node_modules/babel-types/node_modules/lodash/rangeRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/rearg.js create mode 100644 node_modules/babel-types/node_modules/lodash/reduce.js create mode 100644 node_modules/babel-types/node_modules/lodash/reduceRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/reject.js create mode 100644 node_modules/babel-types/node_modules/lodash/remove.js create mode 100644 node_modules/babel-types/node_modules/lodash/repeat.js create mode 100644 node_modules/babel-types/node_modules/lodash/replace.js create mode 100644 node_modules/babel-types/node_modules/lodash/rest.js create mode 100644 node_modules/babel-types/node_modules/lodash/result.js create mode 100644 node_modules/babel-types/node_modules/lodash/reverse.js create mode 100644 node_modules/babel-types/node_modules/lodash/round.js create mode 100644 node_modules/babel-types/node_modules/lodash/sample.js create mode 100644 node_modules/babel-types/node_modules/lodash/sampleSize.js create mode 100644 node_modules/babel-types/node_modules/lodash/seq.js create mode 100644 node_modules/babel-types/node_modules/lodash/set.js create mode 100644 node_modules/babel-types/node_modules/lodash/setWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/shuffle.js create mode 100644 node_modules/babel-types/node_modules/lodash/size.js create mode 100644 node_modules/babel-types/node_modules/lodash/slice.js create mode 100644 node_modules/babel-types/node_modules/lodash/snakeCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/some.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortedIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortedIndexBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortedIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortedLastIndex.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortedLastIndexBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortedLastIndexOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortedUniq.js create mode 100644 node_modules/babel-types/node_modules/lodash/sortedUniqBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/split.js create mode 100644 node_modules/babel-types/node_modules/lodash/spread.js create mode 100644 node_modules/babel-types/node_modules/lodash/startCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/startsWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/string.js create mode 100644 node_modules/babel-types/node_modules/lodash/stubArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/stubFalse.js create mode 100644 node_modules/babel-types/node_modules/lodash/stubObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/stubString.js create mode 100644 node_modules/babel-types/node_modules/lodash/stubTrue.js create mode 100644 node_modules/babel-types/node_modules/lodash/subtract.js create mode 100644 node_modules/babel-types/node_modules/lodash/sum.js create mode 100644 node_modules/babel-types/node_modules/lodash/sumBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/tail.js create mode 100644 node_modules/babel-types/node_modules/lodash/take.js create mode 100644 node_modules/babel-types/node_modules/lodash/takeRight.js create mode 100644 node_modules/babel-types/node_modules/lodash/takeRightWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/takeWhile.js create mode 100644 node_modules/babel-types/node_modules/lodash/tap.js create mode 100644 node_modules/babel-types/node_modules/lodash/template.js create mode 100644 node_modules/babel-types/node_modules/lodash/templateSettings.js create mode 100644 node_modules/babel-types/node_modules/lodash/throttle.js create mode 100644 node_modules/babel-types/node_modules/lodash/thru.js create mode 100644 node_modules/babel-types/node_modules/lodash/times.js create mode 100644 node_modules/babel-types/node_modules/lodash/toArray.js create mode 100644 node_modules/babel-types/node_modules/lodash/toFinite.js create mode 100644 node_modules/babel-types/node_modules/lodash/toInteger.js create mode 100644 node_modules/babel-types/node_modules/lodash/toIterator.js create mode 100644 node_modules/babel-types/node_modules/lodash/toJSON.js create mode 100644 node_modules/babel-types/node_modules/lodash/toLength.js create mode 100644 node_modules/babel-types/node_modules/lodash/toLower.js create mode 100644 node_modules/babel-types/node_modules/lodash/toNumber.js create mode 100644 node_modules/babel-types/node_modules/lodash/toPairs.js create mode 100644 node_modules/babel-types/node_modules/lodash/toPairsIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/toPath.js create mode 100644 node_modules/babel-types/node_modules/lodash/toPlainObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/toSafeInteger.js create mode 100644 node_modules/babel-types/node_modules/lodash/toString.js create mode 100644 node_modules/babel-types/node_modules/lodash/toUpper.js create mode 100644 node_modules/babel-types/node_modules/lodash/transform.js create mode 100644 node_modules/babel-types/node_modules/lodash/trim.js create mode 100644 node_modules/babel-types/node_modules/lodash/trimEnd.js create mode 100644 node_modules/babel-types/node_modules/lodash/trimStart.js create mode 100644 node_modules/babel-types/node_modules/lodash/truncate.js create mode 100644 node_modules/babel-types/node_modules/lodash/unary.js create mode 100644 node_modules/babel-types/node_modules/lodash/unescape.js create mode 100644 node_modules/babel-types/node_modules/lodash/union.js create mode 100644 node_modules/babel-types/node_modules/lodash/unionBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/unionWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/uniq.js create mode 100644 node_modules/babel-types/node_modules/lodash/uniqBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/uniqWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/uniqueId.js create mode 100644 node_modules/babel-types/node_modules/lodash/unset.js create mode 100644 node_modules/babel-types/node_modules/lodash/unzip.js create mode 100644 node_modules/babel-types/node_modules/lodash/unzipWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/update.js create mode 100644 node_modules/babel-types/node_modules/lodash/updateWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/upperCase.js create mode 100644 node_modules/babel-types/node_modules/lodash/upperFirst.js create mode 100644 node_modules/babel-types/node_modules/lodash/util.js create mode 100644 node_modules/babel-types/node_modules/lodash/value.js create mode 100644 node_modules/babel-types/node_modules/lodash/valueOf.js create mode 100644 node_modules/babel-types/node_modules/lodash/values.js create mode 100644 node_modules/babel-types/node_modules/lodash/valuesIn.js create mode 100644 node_modules/babel-types/node_modules/lodash/without.js create mode 100644 node_modules/babel-types/node_modules/lodash/words.js create mode 100644 node_modules/babel-types/node_modules/lodash/wrap.js create mode 100644 node_modules/babel-types/node_modules/lodash/wrapperAt.js create mode 100644 node_modules/babel-types/node_modules/lodash/wrapperChain.js create mode 100644 node_modules/babel-types/node_modules/lodash/wrapperLodash.js create mode 100644 node_modules/babel-types/node_modules/lodash/wrapperReverse.js create mode 100644 node_modules/babel-types/node_modules/lodash/wrapperValue.js create mode 100644 node_modules/babel-types/node_modules/lodash/xor.js create mode 100644 node_modules/babel-types/node_modules/lodash/xorBy.js create mode 100644 node_modules/babel-types/node_modules/lodash/xorWith.js create mode 100644 node_modules/babel-types/node_modules/lodash/zip.js create mode 100644 node_modules/babel-types/node_modules/lodash/zipObject.js create mode 100644 node_modules/babel-types/node_modules/lodash/zipObjectDeep.js create mode 100644 node_modules/babel-types/node_modules/lodash/zipWith.js create mode 100644 node_modules/bcrypt-pbkdf/CONTRIBUTING.md create mode 100644 node_modules/bcrypt-pbkdf/LICENSE delete mode 100755 node_modules/boom/LICENSE delete mode 100755 node_modules/boom/README.md delete mode 100755 node_modules/boom/lib/index.js delete mode 100644 node_modules/boom/package.json delete mode 100644 node_modules/braces/LICENSE delete mode 100644 node_modules/braces/README.md delete mode 100644 node_modules/braces/index.js delete mode 100644 node_modules/braces/package.json delete mode 100644 node_modules/browser-process-hrtime/.npmignore create mode 100644 node_modules/browser-process-hrtime/LICENSE delete mode 100644 node_modules/co/History.md delete mode 100644 node_modules/co/LICENSE delete mode 100644 node_modules/co/Readme.md delete mode 100644 node_modules/co/index.js delete mode 100644 node_modules/co/package.json delete mode 100644 node_modules/cryptiles/.npmignore delete mode 100755 node_modules/cryptiles/LICENSE delete mode 100755 node_modules/cryptiles/README.md delete mode 100755 node_modules/cryptiles/lib/index.js delete mode 100755 node_modules/cryptiles/node_modules/boom/LICENSE delete mode 100755 node_modules/cryptiles/node_modules/boom/README.md delete mode 100755 node_modules/cryptiles/node_modules/boom/lib/index.js delete mode 100644 node_modules/cryptiles/node_modules/boom/package.json delete mode 100755 node_modules/cryptiles/package.json create mode 100644 node_modules/cssom/lib/CSSSupportsRule.js create mode 100644 node_modules/cssstyle/.eslintignore create mode 100644 node_modules/cssstyle/.eslintrc.js delete mode 100644 node_modules/cssstyle/.npmignore create mode 100644 node_modules/cssstyle/.travis.yml create mode 100644 node_modules/cssstyle/lib/allExtraProperties.js create mode 100644 node_modules/cssstyle/lib/allProperties.js create mode 100644 node_modules/cssstyle/lib/constants.js create mode 100644 node_modules/cssstyle/lib/implementedProperties.js create mode 100644 node_modules/cssstyle/lib/named_colors.json delete mode 100644 node_modules/cssstyle/lib/properties/alignmentBaseline.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundClip.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundOrigin.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundPositionX.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundPositionY.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundRepeatX.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundRepeatY.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundSize.js delete mode 100644 node_modules/cssstyle/lib/properties/baselineShift.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottomLeftRadius.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottomRightRadius.js delete mode 100644 node_modules/cssstyle/lib/properties/borderImage.js delete mode 100644 node_modules/cssstyle/lib/properties/borderImageOutset.js delete mode 100644 node_modules/cssstyle/lib/properties/borderImageRepeat.js delete mode 100644 node_modules/cssstyle/lib/properties/borderImageSlice.js delete mode 100644 node_modules/cssstyle/lib/properties/borderImageSource.js delete mode 100644 node_modules/cssstyle/lib/properties/borderImageWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRadius.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTopLeftRadius.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTopRightRadius.js delete mode 100644 node_modules/cssstyle/lib/properties/boxShadow.js delete mode 100644 node_modules/cssstyle/lib/properties/boxSizing.js delete mode 100644 node_modules/cssstyle/lib/properties/captionSide.js delete mode 100644 node_modules/cssstyle/lib/properties/colorInterpolation.js delete mode 100644 node_modules/cssstyle/lib/properties/colorInterpolationFilters.js delete mode 100644 node_modules/cssstyle/lib/properties/colorProfile.js delete mode 100644 node_modules/cssstyle/lib/properties/colorRendering.js delete mode 100644 node_modules/cssstyle/lib/properties/content.js delete mode 100644 node_modules/cssstyle/lib/properties/counterIncrement.js delete mode 100644 node_modules/cssstyle/lib/properties/counterReset.js delete mode 100644 node_modules/cssstyle/lib/properties/cue.js delete mode 100644 node_modules/cssstyle/lib/properties/cueAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/cueBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/cursor.js delete mode 100644 node_modules/cssstyle/lib/properties/direction.js delete mode 100644 node_modules/cssstyle/lib/properties/display.js delete mode 100644 node_modules/cssstyle/lib/properties/dominantBaseline.js delete mode 100644 node_modules/cssstyle/lib/properties/elevation.js delete mode 100644 node_modules/cssstyle/lib/properties/emptyCells.js delete mode 100644 node_modules/cssstyle/lib/properties/enableBackground.js delete mode 100644 node_modules/cssstyle/lib/properties/fill.js delete mode 100644 node_modules/cssstyle/lib/properties/fillOpacity.js delete mode 100644 node_modules/cssstyle/lib/properties/fillRule.js delete mode 100644 node_modules/cssstyle/lib/properties/filter.js create mode 100644 node_modules/cssstyle/lib/properties/flex.js create mode 100644 node_modules/cssstyle/lib/properties/flexBasis.js create mode 100644 node_modules/cssstyle/lib/properties/flexGrow.js create mode 100644 node_modules/cssstyle/lib/properties/flexShrink.js create mode 100644 node_modules/cssstyle/lib/properties/float.js delete mode 100644 node_modules/cssstyle/lib/properties/floodOpacity.js delete mode 100644 node_modules/cssstyle/lib/properties/fontSizeAdjust.js delete mode 100644 node_modules/cssstyle/lib/properties/fontStretch.js delete mode 100644 node_modules/cssstyle/lib/properties/glyphOrientationHorizontal.js delete mode 100644 node_modules/cssstyle/lib/properties/glyphOrientationVertical.js delete mode 100644 node_modules/cssstyle/lib/properties/imageRendering.js delete mode 100644 node_modules/cssstyle/lib/properties/kerning.js delete mode 100644 node_modules/cssstyle/lib/properties/letterSpacing.js delete mode 100644 node_modules/cssstyle/lib/properties/listStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/listStyleImage.js delete mode 100644 node_modules/cssstyle/lib/properties/listStylePosition.js delete mode 100644 node_modules/cssstyle/lib/properties/listStyleType.js delete mode 100644 node_modules/cssstyle/lib/properties/marker.js delete mode 100644 node_modules/cssstyle/lib/properties/markerEnd.js delete mode 100644 node_modules/cssstyle/lib/properties/markerMid.js delete mode 100644 node_modules/cssstyle/lib/properties/markerOffset.js delete mode 100644 node_modules/cssstyle/lib/properties/markerStart.js delete mode 100644 node_modules/cssstyle/lib/properties/marks.js delete mode 100644 node_modules/cssstyle/lib/properties/mask.js delete mode 100644 node_modules/cssstyle/lib/properties/maxHeight.js delete mode 100644 node_modules/cssstyle/lib/properties/maxWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/minHeight.js delete mode 100644 node_modules/cssstyle/lib/properties/minWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/orphans.js delete mode 100644 node_modules/cssstyle/lib/properties/outline.js delete mode 100644 node_modules/cssstyle/lib/properties/outlineOffset.js delete mode 100644 node_modules/cssstyle/lib/properties/outlineStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/outlineWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/overflow.js delete mode 100644 node_modules/cssstyle/lib/properties/overflowX.js delete mode 100644 node_modules/cssstyle/lib/properties/overflowY.js delete mode 100644 node_modules/cssstyle/lib/properties/page.js delete mode 100644 node_modules/cssstyle/lib/properties/pageBreakAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/pageBreakBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/pageBreakInside.js delete mode 100644 node_modules/cssstyle/lib/properties/pause.js delete mode 100644 node_modules/cssstyle/lib/properties/pauseAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/pauseBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/pitch.js delete mode 100644 node_modules/cssstyle/lib/properties/pitchRange.js delete mode 100644 node_modules/cssstyle/lib/properties/playDuring.js delete mode 100644 node_modules/cssstyle/lib/properties/pointerEvents.js delete mode 100644 node_modules/cssstyle/lib/properties/position.js delete mode 100644 node_modules/cssstyle/lib/properties/quotes.js delete mode 100644 node_modules/cssstyle/lib/properties/resize.js delete mode 100644 node_modules/cssstyle/lib/properties/richness.js delete mode 100644 node_modules/cssstyle/lib/properties/shapeRendering.js delete mode 100644 node_modules/cssstyle/lib/properties/size.js delete mode 100644 node_modules/cssstyle/lib/properties/speak.js delete mode 100644 node_modules/cssstyle/lib/properties/speakHeader.js delete mode 100644 node_modules/cssstyle/lib/properties/speakNumeral.js delete mode 100644 node_modules/cssstyle/lib/properties/speakPunctuation.js delete mode 100644 node_modules/cssstyle/lib/properties/speechRate.js delete mode 100644 node_modules/cssstyle/lib/properties/src.js delete mode 100644 node_modules/cssstyle/lib/properties/stopOpacity.js delete mode 100644 node_modules/cssstyle/lib/properties/stress.js delete mode 100644 node_modules/cssstyle/lib/properties/stroke.js delete mode 100644 node_modules/cssstyle/lib/properties/strokeDasharray.js delete mode 100644 node_modules/cssstyle/lib/properties/strokeDashoffset.js delete mode 100644 node_modules/cssstyle/lib/properties/strokeLinecap.js delete mode 100644 node_modules/cssstyle/lib/properties/strokeLinejoin.js delete mode 100644 node_modules/cssstyle/lib/properties/strokeMiterlimit.js delete mode 100644 node_modules/cssstyle/lib/properties/strokeOpacity.js delete mode 100644 node_modules/cssstyle/lib/properties/strokeWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/tableLayout.js delete mode 100644 node_modules/cssstyle/lib/properties/textAlign.js delete mode 100644 node_modules/cssstyle/lib/properties/textAnchor.js delete mode 100644 node_modules/cssstyle/lib/properties/textDecoration.js delete mode 100644 node_modules/cssstyle/lib/properties/textIndent.js delete mode 100644 node_modules/cssstyle/lib/properties/textLineThrough.js delete mode 100644 node_modules/cssstyle/lib/properties/textLineThroughMode.js delete mode 100644 node_modules/cssstyle/lib/properties/textLineThroughStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/textLineThroughWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/textOverflow.js delete mode 100644 node_modules/cssstyle/lib/properties/textOverline.js delete mode 100644 node_modules/cssstyle/lib/properties/textOverlineMode.js delete mode 100644 node_modules/cssstyle/lib/properties/textOverlineStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/textOverlineWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/textRendering.js delete mode 100644 node_modules/cssstyle/lib/properties/textShadow.js delete mode 100644 node_modules/cssstyle/lib/properties/textTransform.js delete mode 100644 node_modules/cssstyle/lib/properties/textUnderline.js delete mode 100644 node_modules/cssstyle/lib/properties/textUnderlineMode.js delete mode 100644 node_modules/cssstyle/lib/properties/textUnderlineStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/textUnderlineWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/unicodeBidi.js delete mode 100644 node_modules/cssstyle/lib/properties/unicodeRange.js delete mode 100644 node_modules/cssstyle/lib/properties/vectorEffect.js delete mode 100644 node_modules/cssstyle/lib/properties/verticalAlign.js delete mode 100644 node_modules/cssstyle/lib/properties/visibility.js delete mode 100644 node_modules/cssstyle/lib/properties/voiceFamily.js delete mode 100644 node_modules/cssstyle/lib/properties/volume.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimation.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimationDelay.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimationDirection.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimationDuration.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimationFillMode.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimationIterationCount.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimationName.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimationPlayState.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAnimationTimingFunction.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAppearance.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitAspectRatio.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBackfaceVisibility.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBackgroundClip.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBackgroundComposite.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBackgroundOrigin.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBackgroundSize.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderAfterStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderAfterWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderBeforeStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderBeforeWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderEnd.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderEndStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderEndWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderFit.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderHorizontalSpacing.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderImage.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderRadius.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderStart.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderStartStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderStartWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderVerticalSpacing.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxAlign.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxDirection.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxFlex.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxFlexGroup.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxLines.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxOrdinalGroup.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxOrient.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxPack.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxReflect.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBoxShadow.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColorCorrection.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnAxis.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnBreakAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnBreakBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnBreakInside.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnCount.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnGap.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnRule.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnRuleStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnRuleWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnSpan.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumns.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFilter.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlexAlign.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlexDirection.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlexFlow.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlexItemAlign.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlexLinePack.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlexOrder.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlexPack.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlexWrap.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlowFrom.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFlowInto.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFontFeatureSettings.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFontKerning.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFontSizeDelta.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFontSmoothing.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitFontVariantLigatures.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitHighlight.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitHyphenateCharacter.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitHyphenateLimitAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitHyphenateLimitBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitHyphenateLimitLines.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitHyphens.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLineAlign.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLineBoxContain.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLineBreak.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLineClamp.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLineGrid.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLineSnap.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLocale.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLogicalHeight.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitLogicalWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginAfterCollapse.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginBeforeCollapse.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginBottomCollapse.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginCollapse.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginEnd.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginStart.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarginTopCollapse.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarquee.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarqueeDirection.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarqueeIncrement.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarqueeRepetition.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarqueeSpeed.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMarqueeStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMask.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskAttachment.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskBoxImage.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskBoxImageOutset.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskBoxImageRepeat.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskBoxImageSlice.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskBoxImageSource.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskBoxImageWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskClip.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskComposite.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskImage.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskOrigin.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskPosition.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskPositionX.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskPositionY.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskRepeat.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskRepeatX.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskRepeatY.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaskSize.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaxLogicalHeight.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMaxLogicalWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMinLogicalHeight.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMinLogicalWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitNbspMode.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitOverflowScrolling.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPaddingAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPaddingBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPaddingEnd.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPaddingStart.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPerspective.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPerspectiveOrigin.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPerspectiveOriginX.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPerspectiveOriginY.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitPrintColorAdjust.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitRegionBreakAfter.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitRegionBreakBefore.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitRegionBreakInside.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitRegionOverflow.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitRtlOrdering.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitSvgShadow.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextCombine.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextDecorationsInEffect.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextEmphasis.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextEmphasisPosition.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextEmphasisStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextOrientation.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextSecurity.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextSizeAdjust.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextStroke.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextStrokeWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransform.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransformOrigin.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransformOriginX.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransformOriginY.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransformOriginZ.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransformStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransition.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransitionDelay.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransitionDuration.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransitionProperty.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTransitionTimingFunction.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitUserDrag.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitUserModify.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitUserSelect.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitWrap.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitWrapFlow.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitWrapMargin.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitWrapPadding.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitWrapShapeInside.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitWrapShapeOutside.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitWrapThrough.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitWritingMode.js delete mode 100644 node_modules/cssstyle/lib/properties/whiteSpace.js delete mode 100644 node_modules/cssstyle/lib/properties/widows.js delete mode 100644 node_modules/cssstyle/lib/properties/wordBreak.js delete mode 100644 node_modules/cssstyle/lib/properties/wordSpacing.js delete mode 100644 node_modules/cssstyle/lib/properties/wordWrap.js delete mode 100644 node_modules/cssstyle/lib/properties/writingMode.js delete mode 100644 node_modules/cssstyle/lib/properties/zIndex.js delete mode 100644 node_modules/cssstyle/lib/properties/zoom.js create mode 100644 node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js create mode 100644 node_modules/cssstyle/scripts/download_latest_properties.js create mode 100644 node_modules/cssstyle/scripts/generate_implemented_properties.js delete mode 100755 node_modules/cssstyle/scripts/run_tests.sh delete mode 100644 node_modules/ecc-jsbn/.npmignore delete mode 100644 node_modules/expand-brackets/LICENSE delete mode 100644 node_modules/expand-brackets/README.md delete mode 100644 node_modules/expand-brackets/index.js delete mode 100644 node_modules/expand-brackets/package.json delete mode 100644 node_modules/expand-range/LICENSE delete mode 100644 node_modules/expand-range/README.md delete mode 100644 node_modules/expand-range/index.js delete mode 100644 node_modules/expand-range/package.json create mode 100644 node_modules/extend/.editorconfig delete mode 100644 node_modules/extend/.npmignore delete mode 100644 node_modules/extglob/LICENSE delete mode 100644 node_modules/extglob/README.md delete mode 100644 node_modules/extglob/index.js delete mode 100644 node_modules/extglob/package.json delete mode 100644 node_modules/filename-regex/LICENSE delete mode 100644 node_modules/filename-regex/README.md delete mode 100644 node_modules/filename-regex/index.js delete mode 100644 node_modules/filename-regex/package.json delete mode 100755 node_modules/fill-range/LICENSE delete mode 100755 node_modules/fill-range/README.md delete mode 100644 node_modules/fill-range/index.js delete mode 100644 node_modules/fill-range/package.json delete mode 100644 node_modules/for-in/LICENSE delete mode 100644 node_modules/for-in/README.md delete mode 100644 node_modules/for-in/index.js delete mode 100644 node_modules/for-in/package.json delete mode 100644 node_modules/for-own/LICENSE delete mode 100644 node_modules/for-own/README.md delete mode 100644 node_modules/for-own/index.js delete mode 100644 node_modules/for-own/package.json create mode 100644 node_modules/form-data/yarn.lock delete mode 100644 node_modules/glob-base/LICENSE delete mode 100644 node_modules/glob-base/README.md delete mode 100644 node_modules/glob-base/index.js delete mode 100644 node_modules/glob-base/package.json delete mode 100644 node_modules/glob-parent/.npmignore delete mode 100644 node_modules/glob-parent/.travis.yml delete mode 100644 node_modules/glob-parent/LICENSE delete mode 100644 node_modules/glob-parent/README.md delete mode 100644 node_modules/glob-parent/index.js delete mode 100644 node_modules/glob-parent/package.json delete mode 100644 node_modules/glob-parent/test.js delete mode 100755 node_modules/hawk/.npmignore delete mode 100755 node_modules/hawk/LICENSE delete mode 100755 node_modules/hawk/README.md delete mode 100755 node_modules/hawk/client.js delete mode 100644 node_modules/hawk/dist/browser.js delete mode 100755 node_modules/hawk/lib/browser.js delete mode 100755 node_modules/hawk/lib/client.js delete mode 100755 node_modules/hawk/lib/crypto.js delete mode 100755 node_modules/hawk/lib/index.js delete mode 100755 node_modules/hawk/lib/server.js delete mode 100755 node_modules/hawk/lib/utils.js delete mode 100755 node_modules/hawk/package.json delete mode 100644 node_modules/hoek/.npmignore delete mode 100644 node_modules/hoek/LICENSE delete mode 100644 node_modules/hoek/README.md delete mode 100755 node_modules/hoek/lib/escape.js delete mode 100755 node_modules/hoek/lib/index.js delete mode 100644 node_modules/hoek/package.json delete mode 100644 node_modules/iconv-lite/.npmignore delete mode 100644 node_modules/iconv-lite/.travis.yml delete mode 100644 node_modules/is-buffer/LICENSE delete mode 100644 node_modules/is-buffer/README.md delete mode 100644 node_modules/is-buffer/index.js delete mode 100644 node_modules/is-buffer/package.json delete mode 100644 node_modules/is-buffer/test/basic.js delete mode 100644 node_modules/is-dotfile/LICENSE delete mode 100644 node_modules/is-dotfile/README.md delete mode 100644 node_modules/is-dotfile/index.js delete mode 100644 node_modules/is-dotfile/package.json delete mode 100644 node_modules/is-equal-shallow/LICENSE delete mode 100644 node_modules/is-equal-shallow/README.md delete mode 100644 node_modules/is-equal-shallow/index.js delete mode 100644 node_modules/is-equal-shallow/package.json delete mode 100644 node_modules/is-extendable/LICENSE delete mode 100644 node_modules/is-extendable/README.md delete mode 100644 node_modules/is-extendable/index.js delete mode 100644 node_modules/is-extendable/package.json delete mode 100644 node_modules/is-extglob/LICENSE delete mode 100644 node_modules/is-extglob/README.md delete mode 100644 node_modules/is-extglob/index.js delete mode 100644 node_modules/is-extglob/package.json delete mode 100644 node_modules/is-glob/LICENSE delete mode 100644 node_modules/is-glob/README.md delete mode 100644 node_modules/is-glob/index.js delete mode 100644 node_modules/is-glob/package.json delete mode 100644 node_modules/is-number/LICENSE delete mode 100644 node_modules/is-number/README.md delete mode 100644 node_modules/is-number/index.js delete mode 100644 node_modules/is-number/package.json delete mode 100644 node_modules/is-posix-bracket/LICENSE delete mode 100644 node_modules/is-posix-bracket/README.md delete mode 100644 node_modules/is-posix-bracket/index.js delete mode 100644 node_modules/is-posix-bracket/package.json delete mode 100644 node_modules/is-primitive/LICENSE delete mode 100644 node_modules/is-primitive/README.md delete mode 100644 node_modules/is-primitive/index.js delete mode 100644 node_modules/is-primitive/package.json delete mode 100644 node_modules/isarray/.npmignore delete mode 100644 node_modules/isarray/.travis.yml delete mode 100644 node_modules/isarray/Makefile delete mode 100644 node_modules/isarray/README.md delete mode 100644 node_modules/isarray/component.json delete mode 100644 node_modules/isarray/index.js delete mode 100644 node_modules/isarray/package.json delete mode 100644 node_modules/isarray/test.js delete mode 100644 node_modules/isobject/LICENSE delete mode 100644 node_modules/isobject/README.md delete mode 100644 node_modules/isobject/index.js delete mode 100644 node_modules/isobject/package.json delete mode 100644 node_modules/jsdom/lib/jsdom/browser/documentfeatures.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/domtohtml.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/resource-loader.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/async-resource-queue.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/no-op-resource-loader.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/request-manager.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js create mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/resource-queue.js rename node_modules/jsdom/lib/jsdom/{browser => living/domparsing}/parse5-adapter-serialization.js (78%) create mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/serialization.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/events/StorageEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/form-data-symbols.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AssignedNodesOptions.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSlotElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/InputEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/InputEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MimeType.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MimeTypeArray.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationObserver.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationObserverInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationRecord.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Plugin.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PluginArray.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGTitleElement.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRoot.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Slotable.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Storage.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StorageEvent.js create mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StorageEventInit.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/custom-elements.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/events.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/html.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/namespaces.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/shadow-dom.js create mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/wrap-cookie-jar-for-request.js create mode 100644 node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationObserver-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationRecord-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/MimeType-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/MimeTypeArray-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/Plugin-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/PluginArray-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSlotElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGTitleElement-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ShadowRoot-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Slotable-impl.js create mode 100644 node_modules/jsdom/lib/jsdom/living/webstorage/Storage-impl.js delete mode 100644 node_modules/jsdom/lib/old-api.js delete mode 100644 node_modules/jsdom/lib/old-api.md delete mode 100644 node_modules/json-schema-traverse/.npmignore delete mode 100644 node_modules/kind-of/LICENSE delete mode 100644 node_modules/kind-of/README.md delete mode 100644 node_modules/kind-of/index.js delete mode 100644 node_modules/kind-of/package.json delete mode 100644 node_modules/left-pad/.travis.yml delete mode 100644 node_modules/left-pad/COPYING delete mode 100644 node_modules/left-pad/README.md delete mode 100644 node_modules/left-pad/index.d.ts delete mode 100644 node_modules/left-pad/index.js delete mode 100644 node_modules/left-pad/package.json delete mode 100644 node_modules/left-pad/perf/O(n).js delete mode 100644 node_modules/left-pad/perf/es6Repeat.js delete mode 100644 node_modules/left-pad/perf/perf.js delete mode 100644 node_modules/left-pad/test.js delete mode 100755 node_modules/micromatch/LICENSE delete mode 100644 node_modules/micromatch/README.md delete mode 100755 node_modules/micromatch/index.js delete mode 100644 node_modules/micromatch/lib/chars.js delete mode 100644 node_modules/micromatch/lib/expand.js delete mode 100644 node_modules/micromatch/lib/glob.js delete mode 100644 node_modules/micromatch/lib/utils.js delete mode 100644 node_modules/micromatch/package.json delete mode 100644 node_modules/normalize-path/LICENSE delete mode 100644 node_modules/normalize-path/README.md delete mode 100644 node_modules/normalize-path/index.js delete mode 100644 node_modules/normalize-path/package.json delete mode 100644 node_modules/nwmatcher/LICENSE delete mode 100644 node_modules/nwmatcher/README.md delete mode 100644 node_modules/nwmatcher/package.json delete mode 100644 node_modules/nwmatcher/src/modules/nwmatcher-cache.js delete mode 100644 node_modules/nwmatcher/src/modules/nwmatcher-jquery.js delete mode 100644 node_modules/nwmatcher/src/modules/nwmatcher-pseudos.js delete mode 100644 node_modules/nwmatcher/src/modules/nwmatcher-shortcuts.js delete mode 100644 node_modules/nwmatcher/src/modules/nwmatcher-webforms.js delete mode 100644 node_modules/nwmatcher/src/nwmatcher-base.js delete mode 100644 node_modules/nwmatcher/src/nwmatcher-noqsa.js delete mode 100644 node_modules/nwmatcher/src/nwmatcher.js create mode 100644 node_modules/nwsapi/LICENSE create mode 100644 node_modules/nwsapi/README.md rename node_modules/{acorn/dist/.keep => nwsapi/dist/lint.log} (100%) create mode 100644 node_modules/nwsapi/package.json create mode 100644 node_modules/nwsapi/src/modules/nwsapi-jquery.js rename node_modules/{nwmatcher/src/modules/nwmatcher-traversal.js => nwsapi/src/modules/nwsapi-traversal.js} (100%) create mode 100644 node_modules/nwsapi/src/nwsapi.js delete mode 100644 node_modules/object.omit/LICENSE delete mode 100644 node_modules/object.omit/README.md delete mode 100644 node_modules/object.omit/index.js delete mode 100644 node_modules/object.omit/package.json delete mode 100644 node_modules/parse-glob/LICENSE delete mode 100644 node_modules/parse-glob/README.md delete mode 100644 node_modules/parse-glob/index.js delete mode 100644 node_modules/parse-glob/package.json delete mode 100644 node_modules/parse5/LICENSE create mode 100644 node_modules/parse5/lib/common/error-codes.js create mode 100644 node_modules/parse5/lib/common/foreign-content.js delete mode 100644 node_modules/parse5/lib/common/foreign_content.js create mode 100644 node_modules/parse5/lib/extensions/error-reporting/mixin-base.js create mode 100644 node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js create mode 100644 node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js create mode 100644 node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js create mode 100644 node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js create mode 100644 node_modules/parse5/lib/extensions/location-info/parser-mixin.js create mode 100644 node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js delete mode 100644 node_modules/parse5/lib/extensions/location_info/open_element_stack_mixin.js delete mode 100644 node_modules/parse5/lib/extensions/location_info/parser_mixin.js delete mode 100644 node_modules/parse5/lib/extensions/location_info/tokenizer_mixin.js create mode 100644 node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js delete mode 100644 node_modules/parse5/lib/extensions/position_tracking/preprocessor_mixin.js delete mode 100644 node_modules/parse5/lib/index.d.ts create mode 100644 node_modules/parse5/lib/parser/formatting-element-list.js delete mode 100644 node_modules/parse5/lib/parser/formatting_element_list.js create mode 100644 node_modules/parse5/lib/parser/open-element-stack.js delete mode 100644 node_modules/parse5/lib/parser/open_element_stack.js delete mode 100644 node_modules/parse5/lib/parser/parser_stream.js delete mode 100644 node_modules/parse5/lib/parser/plain_text_conversion_stream.js delete mode 100644 node_modules/parse5/lib/sax/dev_null_stream.js delete mode 100644 node_modules/parse5/lib/sax/index.js delete mode 100644 node_modules/parse5/lib/sax/parser_feedback_simulator.js delete mode 100644 node_modules/parse5/lib/serializer/serializer_stream.js create mode 100644 node_modules/parse5/lib/tokenizer/named-entity-data.js delete mode 100644 node_modules/parse5/lib/tokenizer/named_entity_data.js create mode 100644 node_modules/parse5/lib/tree-adapters/default.js delete mode 100644 node_modules/parse5/lib/tree_adapters/default.js delete mode 100644 node_modules/parse5/lib/tree_adapters/htmlparser2.js create mode 100644 node_modules/parse5/lib/utils/merge-options.js delete mode 100644 node_modules/parse5/lib/utils/merge_options.js delete mode 100644 node_modules/preserve/.gitattributes delete mode 100644 node_modules/preserve/.jshintrc delete mode 100644 node_modules/preserve/.npmignore delete mode 100644 node_modules/preserve/.travis.yml delete mode 100644 node_modules/preserve/.verb.md delete mode 100644 node_modules/preserve/LICENSE delete mode 100644 node_modules/preserve/README.md delete mode 100644 node_modules/preserve/index.js delete mode 100644 node_modules/preserve/package.json delete mode 100644 node_modules/preserve/test.js create mode 100644 node_modules/psl/.eslintignore create mode 100644 node_modules/psl/.eslintrc create mode 100644 node_modules/psl/.travis.yml create mode 100644 node_modules/psl/LICENSE create mode 100644 node_modules/psl/README.md create mode 100644 node_modules/psl/data/rules.json create mode 100644 node_modules/psl/dist/psl.js create mode 100644 node_modules/psl/dist/psl.min.js create mode 100644 node_modules/psl/index.js create mode 100644 node_modules/psl/karma.conf.js create mode 100644 node_modules/psl/package.json create mode 100644 node_modules/psl/yarn.lock delete mode 100755 node_modules/randomatic/LICENSE delete mode 100644 node_modules/randomatic/README.md delete mode 100644 node_modules/randomatic/index.js delete mode 100644 node_modules/randomatic/node_modules/is-number/LICENSE delete mode 100644 node_modules/randomatic/node_modules/is-number/README.md delete mode 100644 node_modules/randomatic/node_modules/is-number/index.js delete mode 100644 node_modules/randomatic/node_modules/is-number/node_modules/kind-of/LICENSE delete mode 100644 node_modules/randomatic/node_modules/is-number/node_modules/kind-of/README.md delete mode 100644 node_modules/randomatic/node_modules/is-number/node_modules/kind-of/index.js delete mode 100644 node_modules/randomatic/node_modules/is-number/node_modules/kind-of/package.json delete mode 100644 node_modules/randomatic/node_modules/is-number/package.json delete mode 100644 node_modules/randomatic/node_modules/kind-of/LICENSE delete mode 100644 node_modules/randomatic/node_modules/kind-of/README.md delete mode 100644 node_modules/randomatic/node_modules/kind-of/index.js delete mode 100644 node_modules/randomatic/node_modules/kind-of/package.json delete mode 100644 node_modules/randomatic/package.json delete mode 100644 node_modules/regex-cache/LICENSE delete mode 100644 node_modules/regex-cache/README.md delete mode 100644 node_modules/regex-cache/index.js delete mode 100644 node_modules/regex-cache/package.json delete mode 100644 node_modules/remove-trailing-separator/history.md delete mode 100644 node_modules/remove-trailing-separator/index.js delete mode 100644 node_modules/remove-trailing-separator/license delete mode 100644 node_modules/remove-trailing-separator/package.json delete mode 100644 node_modules/remove-trailing-separator/readme.md delete mode 100644 node_modules/repeat-element/LICENSE delete mode 100644 node_modules/repeat-element/README.md delete mode 100644 node_modules/repeat-element/index.js delete mode 100644 node_modules/repeat-element/package.json delete mode 100644 node_modules/repeat-string/LICENSE delete mode 100644 node_modules/repeat-string/README.md delete mode 100644 node_modules/repeat-string/index.js delete mode 100644 node_modules/repeat-string/package.json delete mode 100644 node_modules/request-promise-core/.npmignore create mode 100644 node_modules/request/lib/hawk.js rename node_modules/{tough-cookie => request}/node_modules/punycode/LICENSE-MIT.txt (100%) rename node_modules/{tough-cookie => request}/node_modules/punycode/README.md (100%) create mode 100644 node_modules/request/node_modules/punycode/package.json rename node_modules/{tough-cookie => request}/node_modules/punycode/punycode.js (100%) create mode 100644 node_modules/request/node_modules/tough-cookie/LICENSE create mode 100644 node_modules/request/node_modules/tough-cookie/README.md create mode 100644 node_modules/request/node_modules/tough-cookie/lib/cookie.js create mode 100644 node_modules/request/node_modules/tough-cookie/lib/memstore.js create mode 100644 node_modules/request/node_modules/tough-cookie/lib/pathMatch.js create mode 100644 node_modules/request/node_modules/tough-cookie/lib/permuteDomain.js create mode 100644 node_modules/request/node_modules/tough-cookie/lib/pubsuffix-psl.js create mode 100644 node_modules/request/node_modules/tough-cookie/lib/store.js create mode 100644 node_modules/request/node_modules/tough-cookie/package.json create mode 100644 node_modules/safer-buffer/LICENSE create mode 100644 node_modules/safer-buffer/Porting-Buffer.md create mode 100644 node_modules/safer-buffer/Readme.md create mode 100644 node_modules/safer-buffer/dangerous.js create mode 100644 node_modules/safer-buffer/package.json create mode 100644 node_modules/safer-buffer/safer.js create mode 100644 node_modules/safer-buffer/tests.js delete mode 100644 node_modules/sax/LICENSE delete mode 100644 node_modules/sax/README.md delete mode 100644 node_modules/sax/lib/sax.js delete mode 100644 node_modules/sax/package.json create mode 100644 node_modules/saxes/CHANGELOG.md create mode 100644 node_modules/saxes/LICENSE create mode 100644 node_modules/saxes/README.md create mode 100644 node_modules/saxes/lib/saxes.d.ts create mode 100644 node_modules/saxes/lib/saxes.js create mode 100644 node_modules/saxes/package.json delete mode 100755 node_modules/sntp/.npmignore delete mode 100755 node_modules/sntp/LICENSE delete mode 100755 node_modules/sntp/README.md delete mode 100755 node_modules/sntp/lib/index.js delete mode 100755 node_modules/sntp/package.json create mode 100644 node_modules/sshpk/lib/formats/putty.js delete mode 100644 node_modules/stringstream/.npmignore delete mode 100644 node_modules/stringstream/.travis.yml delete mode 100644 node_modules/stringstream/LICENSE.txt delete mode 100644 node_modules/stringstream/README.md delete mode 100644 node_modules/stringstream/example.js delete mode 100644 node_modules/stringstream/package.json delete mode 100644 node_modules/stringstream/stringstream.js create mode 100644 node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 node_modules/tough-cookie/lib/pubsuffix.js create mode 100644 node_modules/tough-cookie/lib/version.js delete mode 100644 node_modules/tough-cookie/node_modules/punycode/package.json create mode 100644 node_modules/uri-js/README.md create mode 100644 node_modules/uri-js/bower.json create mode 100644 node_modules/uri-js/dist/es5/uri.all.d.ts create mode 100644 node_modules/uri-js/dist/es5/uri.all.js create mode 100644 node_modules/uri-js/dist/es5/uri.all.js.map create mode 100644 node_modules/uri-js/dist/es5/uri.all.min.d.ts create mode 100644 node_modules/uri-js/dist/es5/uri.all.min.js create mode 100644 node_modules/uri-js/dist/es5/uri.all.min.js.map create mode 100644 node_modules/uri-js/dist/esnext/index.d.ts create mode 100644 node_modules/uri-js/dist/esnext/index.js create mode 100644 node_modules/uri-js/dist/esnext/index.js.map create mode 100644 node_modules/uri-js/dist/esnext/regexps-iri.d.ts create mode 100644 node_modules/uri-js/dist/esnext/regexps-iri.js create mode 100644 node_modules/uri-js/dist/esnext/regexps-iri.js.map create mode 100644 node_modules/uri-js/dist/esnext/regexps-uri.d.ts create mode 100644 node_modules/uri-js/dist/esnext/regexps-uri.js create mode 100644 node_modules/uri-js/dist/esnext/regexps-uri.js.map create mode 100644 node_modules/uri-js/dist/esnext/schemes/http.d.ts create mode 100644 node_modules/uri-js/dist/esnext/schemes/http.js create mode 100644 node_modules/uri-js/dist/esnext/schemes/http.js.map create mode 100644 node_modules/uri-js/dist/esnext/schemes/https.d.ts create mode 100644 node_modules/uri-js/dist/esnext/schemes/https.js create mode 100644 node_modules/uri-js/dist/esnext/schemes/https.js.map create mode 100644 node_modules/uri-js/dist/esnext/schemes/mailto.d.ts create mode 100644 node_modules/uri-js/dist/esnext/schemes/mailto.js create mode 100644 node_modules/uri-js/dist/esnext/schemes/mailto.js.map create mode 100644 node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts create mode 100644 node_modules/uri-js/dist/esnext/schemes/urn-uuid.js create mode 100644 node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map create mode 100644 node_modules/uri-js/dist/esnext/schemes/urn.d.ts create mode 100644 node_modules/uri-js/dist/esnext/schemes/urn.js create mode 100644 node_modules/uri-js/dist/esnext/schemes/urn.js.map create mode 100644 node_modules/uri-js/dist/esnext/uri.d.ts create mode 100644 node_modules/uri-js/dist/esnext/uri.js create mode 100644 node_modules/uri-js/dist/esnext/uri.js.map create mode 100644 node_modules/uri-js/dist/esnext/util.d.ts create mode 100644 node_modules/uri-js/dist/esnext/util.js create mode 100644 node_modules/uri-js/dist/esnext/util.js.map create mode 100644 node_modules/uri-js/package.json create mode 100644 node_modules/uri-js/rollup.config.js create mode 100644 node_modules/uri-js/src/index.ts create mode 100644 node_modules/uri-js/src/punycode.d.ts create mode 100644 node_modules/uri-js/src/regexps-iri.ts create mode 100644 node_modules/uri-js/src/regexps-uri.ts create mode 100644 node_modules/uri-js/src/schemes/http.ts create mode 100644 node_modules/uri-js/src/schemes/https.ts create mode 100644 node_modules/uri-js/src/schemes/mailto.ts create mode 100644 node_modules/uri-js/src/schemes/urn-uuid.ts create mode 100644 node_modules/uri-js/src/schemes/urn.ts create mode 100644 node_modules/uri-js/src/uri.ts create mode 100644 node_modules/uri-js/src/util.ts create mode 100644 node_modules/uri-js/tests/qunit.css create mode 100644 node_modules/uri-js/tests/qunit.js create mode 100644 node_modules/uri-js/tests/test-es5-min.html create mode 100644 node_modules/uri-js/tests/test-es5.html create mode 100644 node_modules/uri-js/tests/tests.js create mode 100644 node_modules/uri-js/tsconfig.json create mode 100644 node_modules/uri-js/yarn.lock create mode 100644 node_modules/w3c-xmlserializer/README.md create mode 100644 node_modules/w3c-xmlserializer/lib/XMLSerializer-impl.js create mode 100644 node_modules/w3c-xmlserializer/lib/XMLSerializer.js create mode 100644 node_modules/w3c-xmlserializer/lib/attributes.js create mode 100644 node_modules/w3c-xmlserializer/lib/constants.js create mode 100644 node_modules/w3c-xmlserializer/lib/index.js create mode 100644 node_modules/w3c-xmlserializer/lib/serialization.js create mode 100644 node_modules/w3c-xmlserializer/lib/utils.js create mode 100644 node_modules/w3c-xmlserializer/package.json create mode 100644 node_modules/ws/browser.js delete mode 100644 node_modules/ws/lib/.DS_Store create mode 100644 node_modules/xmlchars/LICENSE create mode 100644 node_modules/xmlchars/README.md create mode 100644 node_modules/xmlchars/package.json create mode 100644 node_modules/xmlchars/xml/1.0/ed4.d.ts create mode 100644 node_modules/xmlchars/xml/1.0/ed4.js create mode 100644 node_modules/xmlchars/xml/1.0/ed4.js.map create mode 100644 node_modules/xmlchars/xml/1.0/ed5.d.ts create mode 100644 node_modules/xmlchars/xml/1.0/ed5.js create mode 100644 node_modules/xmlchars/xml/1.0/ed5.js.map create mode 100644 node_modules/xmlchars/xmlchars.d.ts create mode 100644 node_modules/xmlchars/xmlchars.js create mode 100644 node_modules/xmlchars/xmlchars.js.map create mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.d.ts create mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.js create mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.js.map diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..32fbb9a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/example/dist/dist.css b/example/dist/dist.css deleted file mode 100644 index 10b2389..0000000 --- a/example/dist/dist.css +++ /dev/null @@ -1 +0,0 @@ -#mywidget{border:2px solid red} diff --git a/example/dist/dist.js b/example/dist/dist.js deleted file mode 100644 index 2d06412..0000000 --- a/example/dist/dist.js +++ /dev/null @@ -1 +0,0 @@ -var spectacularwidget=function(a){a.innerHTML='this is so spectacular!'};window.spectacularwidget=spectacularwidget; diff --git a/minifyfromhtml.js b/minifyfromhtml.js index f06b804..8432b04 100644 --- a/minifyfromhtml.js +++ b/minifyfromhtml.js @@ -4,6 +4,7 @@ let path = require('path'); let jsdom = require('jsdom'); let JSDOM = jsdom.JSDOM; let babel = require("babel-core"); +let babelMinify = require('babel-minify'); let CleanCSS = require('clean-css'); let usage = `usage: @@ -80,6 +81,9 @@ readStdin(function(html) { for (let i = 0; i < scripts.length; i++) { let script = scripts[i]; + console.log(babel); + + babel.transformFile(script, {}, function(err, result) { if (err) { console.error(err); diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn index cf76760..558ebb9 120000 --- a/node_modules/.bin/acorn +++ b/node_modules/.bin/acorn @@ -1 +1,15 @@ -../acorn/bin/acorn \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" + ret=$? +else + node "$basedir/../acorn/bin/acorn" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/acorn.cmd b/node_modules/.bin/acorn.cmd new file mode 100644 index 0000000..45c0c3d --- /dev/null +++ b/node_modules/.bin/acorn.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\acorn\bin\acorn" %* +) \ No newline at end of file diff --git a/node_modules/.bin/babel-minify b/node_modules/.bin/babel-minify index a3926a6..614743a 120000 --- a/node_modules/.bin/babel-minify +++ b/node_modules/.bin/babel-minify @@ -1 +1,15 @@ -../babel-minify/bin/minify.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../babel-minify/bin/minify.js" "$@" + ret=$? +else + node "$basedir/../babel-minify/bin/minify.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/babel-minify.cmd b/node_modules/.bin/babel-minify.cmd new file mode 100644 index 0000000..1f3dacc --- /dev/null +++ b/node_modules/.bin/babel-minify.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\babel-minify\bin\minify.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\babel-minify\bin\minify.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/babylon b/node_modules/.bin/babylon index c2adc01..4177aa9 120000 --- a/node_modules/.bin/babylon +++ b/node_modules/.bin/babylon @@ -1 +1,15 @@ -../babylon/bin/babylon.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../babylon/bin/babylon.js" "$@" + ret=$? +else + node "$basedir/../babylon/bin/babylon.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/babylon.cmd b/node_modules/.bin/babylon.cmd new file mode 100644 index 0000000..2aeb639 --- /dev/null +++ b/node_modules/.bin/babylon.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\babylon\bin\babylon.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\babylon\bin\babylon.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/escodegen b/node_modules/.bin/escodegen index 01a7c32..4e46a48 120000 --- a/node_modules/.bin/escodegen +++ b/node_modules/.bin/escodegen @@ -1 +1,15 @@ -../escodegen/bin/escodegen.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@" + ret=$? +else + node "$basedir/../escodegen/bin/escodegen.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/escodegen.cmd b/node_modules/.bin/escodegen.cmd new file mode 100644 index 0000000..8ffe393 --- /dev/null +++ b/node_modules/.bin/escodegen.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\escodegen\bin\escodegen.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\escodegen\bin\escodegen.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/esgenerate b/node_modules/.bin/esgenerate index 7d0293e..5d097c3 120000 --- a/node_modules/.bin/esgenerate +++ b/node_modules/.bin/esgenerate @@ -1 +1,15 @@ -../escodegen/bin/esgenerate.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@" + ret=$? +else + node "$basedir/../escodegen/bin/esgenerate.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/esgenerate.cmd b/node_modules/.bin/esgenerate.cmd new file mode 100644 index 0000000..39593ad --- /dev/null +++ b/node_modules/.bin/esgenerate.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\escodegen\bin\esgenerate.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\escodegen\bin\esgenerate.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse index 7423b18..2525527 120000 --- a/node_modules/.bin/esparse +++ b/node_modules/.bin/esparse @@ -1 +1,15 @@ -../esprima/bin/esparse.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" + ret=$? +else + node "$basedir/../esprima/bin/esparse.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/esparse.cmd b/node_modules/.bin/esparse.cmd new file mode 100644 index 0000000..064f58e --- /dev/null +++ b/node_modules/.bin/esparse.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\esprima\bin\esparse.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate index 16069ef..2137cd5 120000 --- a/node_modules/.bin/esvalidate +++ b/node_modules/.bin/esvalidate @@ -1 +1,15 @@ -../esprima/bin/esvalidate.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" + ret=$? +else + node "$basedir/../esprima/bin/esvalidate.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/esvalidate.cmd b/node_modules/.bin/esvalidate.cmd new file mode 100644 index 0000000..8dfaec0 --- /dev/null +++ b/node_modules/.bin/esvalidate.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\esprima\bin\esvalidate.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/jsesc b/node_modules/.bin/jsesc index 7237604..e59ea43 120000 --- a/node_modules/.bin/jsesc +++ b/node_modules/.bin/jsesc @@ -1 +1,15 @@ -../jsesc/bin/jsesc \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@" + ret=$? +else + node "$basedir/../jsesc/bin/jsesc" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/jsesc.cmd b/node_modules/.bin/jsesc.cmd new file mode 100644 index 0000000..66206ea --- /dev/null +++ b/node_modules/.bin/jsesc.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\jsesc\bin\jsesc" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\jsesc\bin\jsesc" %* +) \ No newline at end of file diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 index 217f379..71e29db 120000 --- a/node_modules/.bin/json5 +++ b/node_modules/.bin/json5 @@ -1 +1,15 @@ -../json5/lib/cli.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" + ret=$? +else + node "$basedir/../json5/lib/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/json5.cmd b/node_modules/.bin/json5.cmd new file mode 100644 index 0000000..4ef655f --- /dev/null +++ b/node_modules/.bin/json5.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\json5\lib\cli.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\json5\lib\cli.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/loose-envify b/node_modules/.bin/loose-envify index ed9009c..0939216 120000 --- a/node_modules/.bin/loose-envify +++ b/node_modules/.bin/loose-envify @@ -1 +1,15 @@ -../loose-envify/cli.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../loose-envify/cli.js" "$@" + ret=$? +else + node "$basedir/../loose-envify/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/loose-envify.cmd b/node_modules/.bin/loose-envify.cmd new file mode 100644 index 0000000..6238bbb --- /dev/null +++ b/node_modules/.bin/loose-envify.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\loose-envify\cli.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\loose-envify\cli.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/minify b/node_modules/.bin/minify index a3926a6..614743a 120000 --- a/node_modules/.bin/minify +++ b/node_modules/.bin/minify @@ -1 +1,15 @@ -../babel-minify/bin/minify.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../babel-minify/bin/minify.js" "$@" + ret=$? +else + node "$basedir/../babel-minify/bin/minify.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/minify.cmd b/node_modules/.bin/minify.cmd new file mode 100644 index 0000000..1f3dacc --- /dev/null +++ b/node_modules/.bin/minify.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\babel-minify\bin\minify.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\babel-minify\bin\minify.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp index 017896c..4b00467 120000 --- a/node_modules/.bin/mkdirp +++ b/node_modules/.bin/mkdirp @@ -1 +1,15 @@ -../mkdirp/bin/cmd.js \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" + ret=$? +else + node "$basedir/../mkdirp/bin/cmd.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/mkdirp.cmd b/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000..0d2cdd7 --- /dev/null +++ b/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\mkdirp\bin\cmd.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/parser b/node_modules/.bin/parser new file mode 100644 index 0000000..5925785 --- /dev/null +++ b/node_modules/.bin/parser @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@" + ret=$? +else + node "$basedir/../@babel/parser/bin/babel-parser.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/parser.cmd b/node_modules/.bin/parser.cmd new file mode 100644 index 0000000..bbadb81 --- /dev/null +++ b/node_modules/.bin/parser.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\@babel\parser\bin\babel-parser.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\@babel\parser\bin\babel-parser.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver index 317eb29..d592e69 120000 --- a/node_modules/.bin/semver +++ b/node_modules/.bin/semver @@ -1 +1,15 @@ -../semver/bin/semver \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../semver/bin/semver" "$@" + ret=$? +else + node "$basedir/../semver/bin/semver" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd new file mode 100644 index 0000000..37c00a4 --- /dev/null +++ b/node_modules/.bin/semver.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\semver\bin\semver" %* +) \ No newline at end of file diff --git a/node_modules/.bin/sshpk-conv b/node_modules/.bin/sshpk-conv index a2a295c..c9c2987 120000 --- a/node_modules/.bin/sshpk-conv +++ b/node_modules/.bin/sshpk-conv @@ -1 +1,15 @@ -../sshpk/bin/sshpk-conv \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@" + ret=$? +else + node "$basedir/../sshpk/bin/sshpk-conv" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/sshpk-conv.cmd b/node_modules/.bin/sshpk-conv.cmd new file mode 100644 index 0000000..dde70b0 --- /dev/null +++ b/node_modules/.bin/sshpk-conv.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-conv" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\sshpk\bin\sshpk-conv" %* +) \ No newline at end of file diff --git a/node_modules/.bin/sshpk-sign b/node_modules/.bin/sshpk-sign index 766b9b3..1a92124 120000 --- a/node_modules/.bin/sshpk-sign +++ b/node_modules/.bin/sshpk-sign @@ -1 +1,15 @@ -../sshpk/bin/sshpk-sign \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@" + ret=$? +else + node "$basedir/../sshpk/bin/sshpk-sign" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/sshpk-sign.cmd b/node_modules/.bin/sshpk-sign.cmd new file mode 100644 index 0000000..45025ec --- /dev/null +++ b/node_modules/.bin/sshpk-sign.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-sign" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\sshpk\bin\sshpk-sign" %* +) \ No newline at end of file diff --git a/node_modules/.bin/sshpk-verify b/node_modules/.bin/sshpk-verify index bfd7e3a..597a66b 120000 --- a/node_modules/.bin/sshpk-verify +++ b/node_modules/.bin/sshpk-verify @@ -1 +1,15 @@ -../sshpk/bin/sshpk-verify \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@" + ret=$? +else + node "$basedir/../sshpk/bin/sshpk-verify" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/sshpk-verify.cmd b/node_modules/.bin/sshpk-verify.cmd new file mode 100644 index 0000000..1b5fc0c --- /dev/null +++ b/node_modules/.bin/sshpk-verify.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-verify" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\sshpk\bin\sshpk-verify" %* +) \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid index b3e45bc..f3bfcf4 120000 --- a/node_modules/.bin/uuid +++ b/node_modules/.bin/uuid @@ -1 +1,15 @@ -../uuid/bin/uuid \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" + ret=$? +else + node "$basedir/../uuid/bin/uuid" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd new file mode 100644 index 0000000..da52d68 --- /dev/null +++ b/node_modules/.bin/uuid.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\uuid\bin\uuid" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\uuid\bin\uuid" %* +) \ No newline at end of file diff --git a/node_modules/@babel/code-frame/README.md b/node_modules/@babel/code-frame/README.md deleted file mode 100644 index 818b78a..0000000 --- a/node_modules/@babel/code-frame/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# @babel/code-frame - -> Generate errors that contain a code frame that point to source locations. - -## Install - -```sh -npm install --save-dev @babel/code-frame -``` - -## Usage - -```js -import { codeFrameColumns } from '@babel/code-frame'; - -const rawLines = `class Foo { - constructor() -}`; -const location = { start: { line: 2, column: 16 } }; - -const result = codeFrameColumns(rawLines, location, { /* options */ }); - -console.log(result); -``` - -``` - 1 | class Foo { -> 2 | constructor() - | ^ - 3 | } -``` - -If the column number is not known, you may omit it. - -You can also pass an `end` hash in `location`. - -```js -import { codeFrameColumns } from '@babel/code-frame'; - -const rawLines = `class Foo { - constructor() { - console.log("hello"); - } -}`; -const location = { start: { line: 2, column: 17 }, end: { line: 4, column: 3 } }; - -const result = codeFrameColumns(rawLines, location, { /* options */ }); - -console.log(result); -``` - -``` - 1 | class Foo { -> 2 | constructor() { - | ^ -> 3 | console.log("hello"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ -> 4 | } - | ^^^ - 5 | }; -``` - -## Options - -### `highlightCode` - -`boolean`, defaults to `false`. - -Toggles syntax highlighting the code as JavaScript for terminals. - - -### `linesAbove` - -`number`, defaults to `2`. - -Adjust the number of lines to show above the error. - -### `linesBelow` - -`number`, defaults to `3`. - -Adjust the number of lines to show below the error. - -### `forceColor` - -`boolean`, defaults to `false`. - -Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`. - -### `message` - -`string`, otherwise nothing - -Pass in a string to be displayed inline (if possible) next to the highlighted -location in the code. If it can't be positioned inline, it will be placed above -the code frame. - -``` -1 | class Foo { -> 2 | constructor() - | ^ Missing { -3 | }; -``` - -## Upgrading from prior versions - -Prior to version 7, the only API exposed by this module was for a single line and optional column pointer. The old API will now log a deprecation warning. - -The new API takes a `location` object, similar to what is available in an AST. - -This is an example of the deprecated (but still available) API: - -```js -import codeFrame from '@babel/code-frame'; - -const rawLines = `class Foo { - constructor() -}`; -const lineNumber = 2; -const colNumber = 16; - -const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ }); - -console.log(result); -``` - -To get the same highlighting using the new API: - -```js -import { codeFrameColumns } from '@babel/code-frame'; - -const rawLines = `class Foo { - constructor() { - console.log("hello"); - } -}`; -const location = { start: { line: 2, column: 16 } }; - -const result = codeFrameColumns(rawLines, location, { /* options */ }); - -console.log(result); -``` diff --git a/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/code-frame/lib/index.js deleted file mode 100644 index 5b4efd5..0000000 --- a/node_modules/@babel/code-frame/lib/index.js +++ /dev/null @@ -1,185 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.codeFrameColumns = codeFrameColumns; -exports.default = _default; - -function _highlight() { - var data = _interopRequireWildcard(require("@babel/highlight")); - - _highlight = function _highlight() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -var deprecationWarningShown = false; - -function getDefs(chalk) { - return { - gutter: chalk.grey, - marker: chalk.red.bold, - message: chalk.red.bold - }; -} - -var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - -function getMarkerLines(loc, source, opts) { - var startLoc = Object.assign({}, { - column: 0, - line: -1 - }, loc.start); - var endLoc = Object.assign({}, startLoc, loc.end); - - var _ref = opts || {}, - _ref$linesAbove = _ref.linesAbove, - linesAbove = _ref$linesAbove === void 0 ? 2 : _ref$linesAbove, - _ref$linesBelow = _ref.linesBelow, - linesBelow = _ref$linesBelow === void 0 ? 3 : _ref$linesBelow; - - var startLine = startLoc.line; - var startColumn = startLoc.column; - var endLine = endLoc.line; - var endColumn = endLoc.column; - var start = Math.max(startLine - (linesAbove + 1), 0); - var end = Math.min(source.length, endLine + linesBelow); - - if (startLine === -1) { - start = 0; - } - - if (endLine === -1) { - end = source.length; - } - - var lineDiff = endLine - startLine; - var markerLines = {}; - - if (lineDiff) { - for (var i = 0; i <= lineDiff; i++) { - var lineNumber = i + startLine; - - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i === 0) { - var sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn]; - } else if (i === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - var _sourceLength = source[lineNumber - i].length; - markerLines[lineNumber] = [0, _sourceLength]; - } - } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; - } else { - markerLines[startLine] = true; - } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; - } - } - - return { - start: start, - end: end, - markerLines: markerLines - }; -} - -function codeFrameColumns(rawLines, loc, opts) { - if (opts === void 0) { - opts = {}; - } - - var highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts); - var chalk = (0, _highlight().getChalk)(opts); - var defs = getDefs(chalk); - - var maybeHighlight = function maybeHighlight(chalkFn, string) { - return highlighted ? chalkFn(string) : string; - }; - - if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts); - var lines = rawLines.split(NEWLINE); - - var _getMarkerLines = getMarkerLines(loc, lines, opts), - start = _getMarkerLines.start, - end = _getMarkerLines.end, - markerLines = _getMarkerLines.markerLines; - - var hasColumns = loc.start && typeof loc.start.column === "number"; - 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]; - var lastMarkerLine = !markerLines[number + 1]; - - 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(""); - - if (lastMarkerLine && opts.message) { - markerLine += " " + maybeHighlight(defs.message, opts.message); - } - } - - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); - } else { - return " " + maybeHighlight(defs.gutter, gutter) + line; - } - }).join("\n"); - - if (opts.message && !hasColumns) { - frame = "" + " ".repeat(numberMaxWidth + 1) + opts.message + "\n" + frame; - } - - if (highlighted) { - return chalk.reset(frame); - } else { - return frame; - } -} - -function _default(rawLines, lineNumber, colNumber, opts) { - if (opts === void 0) { - opts = {}; - } - - if (!deprecationWarningShown) { - deprecationWarningShown = true; - var message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - var deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); - } - } - - colNumber = Math.max(colNumber, 0); - var location = { - start: { - column: colNumber, - line: lineNumber - } - }; - return codeFrameColumns(rawLines, location, opts); -} \ No newline at end of file diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json deleted file mode 100644 index 573fef1..0000000 --- a/node_modules/@babel/code-frame/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "_from": "@babel/code-frame@7.0.0-beta.46", - "_id": "@babel/code-frame@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-7BKRkmYaPZm3Yff5HGZJKCz7RqZ5jUjknsXT6Gz5YKG23J3uq9hAj0epncCB0rlqmnZ8Q+UUpQB2tCR5mT37vw==", - "_location": "/@babel/code-frame", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/code-frame@7.0.0-beta.46", - "name": "@babel/code-frame", - "escapedName": "@babel%2fcode-frame", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/template", - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.46.tgz", - "_shasum": "e0d002100805daab1461c0fcb32a07e304f3a4f4", - "_spec": "@babel/code-frame@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/highlight": "7.0.0-beta.46" - }, - "deprecated": false, - "description": "Generate errors that contain a code frame that point to source locations.", - "devDependencies": { - "chalk": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/code-frame", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/core/LICENSE b/node_modules/@babel/core/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/core/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/README.md b/node_modules/@babel/core/README.md index aeb600c..9b4b63d 100644 --- a/node_modules/@babel/core/README.md +++ b/node_modules/@babel/core/README.md @@ -2,249 +2,18 @@ > Babel compiler core. +See our website [@babel/core](https://babeljs.io/docs/en/next/babel-core.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package. -```javascript -var babel = require("@babel/core"); -import { transform } from "@babel/core"; -import * as babel from "@babel/core"; +## Install + +Using npm: + +```sh +npm install --save-dev @babel/core ``` -All transformations will use your local configuration files (`.babelrc` or in `package.json`). See [options](#options) to disable it. +or using yarn: - -## babel.transform(code: string, [options?](#options): Object, callback: Function) - -Transforms the passed in `code`. Calling a callback with an object with the generated code, -source map, and AST. - -```js -babel.transform(code, options, function(err, result) { - result; // => { code, map, ast } -}); +```sh +yarn add @babel/core --dev ``` - -**Example** - -```js -babel.transform("code();", options, function(err, result) { - result.code; - result.map; - result.ast; -}); -``` - -### Compat Note: - -In Babel 6, this method was synchronous and `transformSync` did not exist. For backward-compatibility, -this function will behave synchronously if no callback is given. If you're starting with Babel 7 -and need synchronous behavior, please use `transformSync` since this backward-compat may be dropped in -future major versions of Babel. - - -## babel.transformSync(code: string, [options?](#options): Object) - -Transforms the passed in `code`. Returning an object with the generated code, -source map, and AST. - -```js -babel.transformSync(code, options) // => { code, map, ast } -``` - -**Example** - -```js -var result = babel.transformSync("code();", options); -result.code; -result.map; -result.ast; -``` - - -## babel.transformFile(filename: string, [options?](#options): Object, callback: Function) - -Asynchronously transforms the entire contents of a file. - -```js -babel.transformFile(filename, options, callback) -``` - -**Example** - -```js -babel.transformFile("filename.js", options, function (err, result) { - result; // => { code, map, ast } -}); -``` - - -## babel.transformFileSync(filename: string, [options?](#options): Object) - -Synchronous version of `babel.transformFile`. Returns the transformed contents of -the `filename`. - -```js -babel.transformFileSync(filename, options) // => { code, map, ast } -``` - -**Example** - -```js -babel.transformFileSync("filename.js", options).code; -``` - - -## babel.transformFromAst(ast: Object, code?: string, [options?](#options): Object, callback: Function): FileNode | null - -Given an [AST](https://astexplorer.net/), transform it. - -```js -const sourceCode = "if (true) return;"; -const parsedAst = babylon.parse(sourceCode, { allowReturnOutsideFunction: true }); -babel.transformFromAst(parsedAst, sourceCode, options, function(err, result) { - const { code, map, ast } = result; -}); -``` - -### Compat Note: - -In Babel 6, this method was synchronous and `transformFromAstSync` did not exist. For backward-compatibility, -this function will behave synchronously if no callback is given. If you're starting with Babel 7 -and need synchronous behavior, please use `transformFromAstSync` since this backward-compat may be dropped in -future major versions of Babel. - - -## babel.transformFromAstSync(ast: Object, code?: string, [options?](#options): Object) - -Given an [AST](https://astexplorer.net/), transform it. - -```js -const sourceCode = "if (true) return;"; -const parsedAst = babylon.parse(sourceCode, { allowReturnOutsideFunction: true }); -const { code, map, ast } = babel.transformFromAstSync(parsedAst, sourceCode, options); -``` - -## babel.parse(code: string, [options?](#options): Object) - -Given some code, parse it using Babel's standard behavior. Referenced presets and -plugins will be loaded such that optional syntax plugins are automatically -enabled. - - -## Advanced APIs - -Many systems that wrap Babel like to automatically inject plugins and presets, -or override options. To accomplish this goal, Babel exposes several functions -that aid in loading the configuration part-way without transforming. - -### babel.loadOptions([options?](#options): Object) - -Resolve Babel's options fully, resulting in an options object where: - -* `opts.plugins` is a full list of `Plugin` instances. -* `opts.presets` is empty and all presets are flattened into `opts`. -* It can be safely passed back to Babel. Fields like `babelrc` have been set to - false so that later calls to Babel will not make a second attempt to load - config files. - -`Plugin` instances aren't meant to be manipulated directly, but often -callers will serialize this `opts` to JSON to use it as a cache key representing -the options Babel has received. Caching on this isn't 100% guaranteed to -invalidate properly, but it is the best we have at the moment. - - -### babel.loadPartialConfig([options?](#options): Object): PartialConfig - -To allow systems to easily manipulate and validate a user's config, this function -resolves the plugins and presets and proceeds no further. The expectation is -that callers will take the config's `.options`, manipulate it as then see fit -and pass it back to Babel again. - -* `babelrc: string | void` - The path of the `.babelrc` file, if there was one. -* `babelignore: string | void` - The path of the `.babelignore` file, if there was one. -* `options: ValidatedOptions` - The partially resolved options, which can be manipulated and passed back to Babel again. - * `plugins: Array` - See below. - * `presets: Array` - See below. - * It can be safely passed back to Babel. Fields like `babelrc` have been set - to false so that later calls to Babel will not make a second attempt to - load config files. -* `hasFilesystemConfig(): boolean` - Check if the resolved config loaded any settings from the filesystem. - -[`ConfigItem`](#configitem-type) instances expose properties to introspect the values, but each -item should be treated as immutable. If changes are desired, the item should be -removed from the list and replaced with either a normal Babel config value, or -with a replacement item created by `babel.createConfigItem`. See that -function for information about `ConfigItem` fields. - - -### babel.createConfigItem(value: string | {} | Function | [string | {} | Function, {} | void], { dirname?: string, type?: "preset" | "plugin" }): ConfigItem - -Allows build tooling to create and cache config items up front. If this function -is called multiple times for a given plugin, Babel will call the plugin's function itself -multiple times. If you have a clear set of expected plugins and presets to -inject, pre-constructing the config items would be recommended. - - -### `ConfigItem` type - -Each `ConfigItem` exposes all of the information Babel knows. The fields are: - -* `value: {} | Function` - The resolved value of the plugin. -* `options: {} | void` - The options object passed to the plugin. -* `dirname: string` - The path that the options are relative to. -* `name: string | void` - The name that the user gave the plugin instance, e.g. `plugins: [ ['env', {}, 'my-env'] ]` -* `file: Object | void` - Information about the plugin's file, if Babel knows it. - * `request: string` - The file that the user requested, e.g. `"@babel/env"` - * `resolved: string` - The full path of the resolved file, e.g. `"/tmp/node_modules/@babel/preset-env/lib/index.js"` - - -## Options - -
-

Babel CLI

-

- You can pass these options from the Babel CLI like so: -

-

- babel --name=value -

-
- -Following is a table of the options you can use: - -| Option | Default | Description | -| ------------------------ | -------------------- | ------------------------------- | -| `ast` | `false` | Include the AST in the returned object | -| `auxiliaryCommentAfter` | `null` | Attach a comment after all non-user injected code | -| `auxiliaryCommentBefore` | `null` | Attach a comment before all non-user injected code | -| `root` | `"."` | Specify the "root" folder that defines the location to search for "babel.config.js", and the default folder to allow `.babelrc` files inside of.| -| `configFile` | `undefined` | The config file to load Babel's config from. Defaults to searching for "babel.config.js" inside the "root" folder. `false` will disable searching for config files.| -| `babelrc` | `true` | Specify whether or not to use .babelrc and .babelignore files. Not available when using the CLI, [use `--no-babelrc` instead](https://babeljs.io/docs/usage/cli/#babel-ignoring-babelrc) | -| `babelrcRoots` | `(root)` | Specify which packages should be search for .babelrc files when they are being compiled. `true` to _always_ search, or a path string or an array of paths to packages to search inside of. Defaults to only searching the "root" package. | -| `envName` | env vars | Defaults to environment variable `BABEL_ENV` if set, or else `NODE_ENV` if set, or else it defaults to `"development"` | -| `code` | `true` | Enable code generation | -| `comments` | `true` | Output comments in generated output | -| `compact` | `"auto"` | Do not include superfluous whitespace characters and line terminators. When set to `"auto"` compact is set to `true` on input sizes of >500KB | -| `env` | `{}` | This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { /* specific options */ } } }` which will use those options when the `envName` is `production` | -| `extends` | `null` | A path to a `.babelrc` file to extend | -| `filename` | `"unknown"` | Filename for use in errors etc | -| `filenameRelative` | `(filename)` | Filename relative to `sourceRoot` | -| `generatorOpts` | `{}` | An object containing the options to be passed down to the babel code generator, @babel/generator | -| `getModuleId` | `null` | Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used | -| `highlightCode` | `true` | ANSI highlight syntax error code frames | -| `ignore` | `null` | Opposite to the `only` option. `ignore` is disregarded if `only` is specified | -| `inputSourceMap` | `null` | A source map object that the output source map will be based on | -| `minified` | `false` | Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe) | -| `moduleId` | `null` | Specify a custom name for module ids | -| `moduleIds` | `false` | If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules) | -| `moduleRoot` | `(sourceRoot)` | Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions | -| `only` | `null` | A [glob](https://github.com/isaacs/minimatch), regex, or mixed array of both, matching paths to **only** compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim | -| `parserOpts` | `{}` | An object containing the options to be passed down to the babel parser, babylon | -| `plugins` | `[]` | List of [plugins](https://babeljs.io/docs/plugins/) to load and use | -| `presets` | `[]` | List of [presets](https://babeljs.io/docs/plugins/#presets) (a set of plugins) to load and use | -| `retainLines` | `false` | Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE:** This will not retain the columns) | -| `shouldPrintComment` | `null` | An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE:** This overrides the `comment` option when used | -| `sourceFileName` | `(filenameRelative)` | Set `sources[0]` on returned source map | -| `sourceMaps` | `false` | If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to `"both"` then a `map` property is returned as well as a source map comment appended. **This does not emit sourcemap files by itself!** To have sourcemaps emitted using the CLI, you must pass it the `--source-maps` option | -| `sourceRoot` | `(moduleRoot)` | The root from which all sources are relative | -| `sourceType` | `"module"` | Indicate the mode the code should be parsed in. Can be one of "script", "module", or "unambiguous". `"unambiguous"` will make Babel attempt to _guess_, based on the presence of ES6 `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`. | -| `wrapPluginVisitorMethod`| `null` | An optional callback that can be used to wrap visitor methods. **NOTE:** This is useful for things like introspection, and not really needed for implementing anything. Called as `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`. diff --git a/node_modules/@babel/core/lib/config/caching.js b/node_modules/@babel/core/lib/config/caching.js index 792ecd9..35f127a 100644 --- a/node_modules/@babel/core/lib/config/caching.js +++ b/node_modules/@babel/core/lib/config/caching.js @@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.makeStrongCache = makeStrongCache; exports.makeWeakCache = makeWeakCache; +exports.assertSimpleType = assertSimpleType; function makeStrongCache(handler) { return makeCachedFunction(new Map(), handler); @@ -16,47 +17,35 @@ function makeWeakCache(handler) { function makeCachedFunction(callCache, handler) { return function cachedFunction(arg, data) { - var cachedValue = callCache.get(arg); + let cachedValue = callCache.get(arg); if (cachedValue) { - for (var _iterator = cachedValue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var _ref3 = _ref2; - var _value = _ref3.value, - _valid = _ref3.valid; - if (_valid(data)) return _value; + for (const _ref of cachedValue) { + const { + value, + valid + } = _ref; + if (valid(data)) return value; } } - var cache = new CacheConfigurator(data); - var value = handler(arg, cache); + const cache = new CacheConfigurator(data); + const value = handler(arg, cache); if (!cache.configured()) cache.forever(); cache.deactivate(); switch (cache.mode()) { case "forever": cachedValue = [{ - value: value, - valid: function valid() { - return true; - } + value, + valid: () => true }]; callCache.set(arg, cachedValue); break; case "invalidate": cachedValue = [{ - value: value, + value, valid: cache.validator() }]; callCache.set(arg, cachedValue); @@ -65,12 +54,12 @@ function makeCachedFunction(callCache, handler) { case "valid": if (cachedValue) { cachedValue.push({ - value: value, + value, valid: cache.validator() }); } else { cachedValue = [{ - value: value, + value, valid: cache.validator() }]; callCache.set(arg, cachedValue); @@ -82,8 +71,8 @@ function makeCachedFunction(callCache, handler) { }; } -var CacheConfigurator = function () { - function CacheConfigurator(data) { +class CacheConfigurator { + constructor(data) { this._active = true; this._never = false; this._forever = false; @@ -93,20 +82,18 @@ var CacheConfigurator = function () { this._data = data; } - var _proto = CacheConfigurator.prototype; - - _proto.simple = function simple() { + simple() { return makeSimpleConfigurator(this); - }; + } - _proto.mode = function mode() { + mode() { if (this._never) return "never"; if (this._forever) return "forever"; if (this._invalidate) return "invalidate"; return "valid"; - }; + } - _proto.forever = function forever() { + forever() { if (!this._active) { throw new Error("Cannot change caching after evaluation has completed."); } @@ -117,9 +104,9 @@ var CacheConfigurator = function () { this._forever = true; this._configured = true; - }; + } - _proto.never = function never() { + never() { if (!this._active) { throw new Error("Cannot change caching after evaluation has completed."); } @@ -130,9 +117,9 @@ var CacheConfigurator = function () { this._never = true; this._configured = true; - }; + } - _proto.using = function using(handler) { + using(handler) { if (!this._active) { throw new Error("Cannot change caching after evaluation has completed."); } @@ -142,14 +129,14 @@ var CacheConfigurator = function () { } this._configured = true; - var key = handler(this._data); + const key = handler(this._data); this._pairs.push([key, handler]); return key; - }; + } - _proto.invalidate = function invalidate(handler) { + invalidate(handler) { if (!this._active) { throw new Error("Cannot change caching after evaluation has completed."); } @@ -160,34 +147,27 @@ var CacheConfigurator = function () { this._invalidate = true; this._configured = true; - var key = handler(this._data); + const key = handler(this._data); this._pairs.push([key, handler]); return key; - }; + } - _proto.validator = function validator() { - var pairs = this._pairs; - return function (data) { - return pairs.every(function (_ref4) { - var key = _ref4[0], - fn = _ref4[1]; - return key === fn(data); - }); - }; - }; + validator() { + const pairs = this._pairs; + return data => pairs.every(([key, fn]) => key === fn(data)); + } - _proto.deactivate = function deactivate() { + deactivate() { this._active = false; - }; + } - _proto.configured = function configured() { + configured() { return this._configured; - }; + } - return CacheConfigurator; -}(); +} function makeSimpleConfigurator(cache) { function cacheFn(val) { @@ -196,28 +176,24 @@ function makeSimpleConfigurator(cache) { return; } - return cache.using(val); + return cache.using(() => assertSimpleType(val())); } - cacheFn.forever = function () { - return cache.forever(); - }; + cacheFn.forever = () => cache.forever(); - cacheFn.never = function () { - return cache.never(); - }; + cacheFn.never = () => cache.never(); - cacheFn.using = function (cb) { - return cache.using(function () { - return cb(); - }); - }; + cacheFn.using = cb => cache.using(() => assertSimpleType(cb())); - cacheFn.invalidate = function (cb) { - return cache.invalidate(function () { - return cb(); - }); - }; + cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb())); return cacheFn; +} + +function assertSimpleType(value) { + if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") { + throw new Error("Cache keys must be either string, boolean, number, null, or undefined."); + } + + return value; } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-chain.js b/node_modules/@babel/core/lib/config/config-chain.js index 712bb3e..8531aae 100644 --- a/node_modules/@babel/core/lib/config/config-chain.js +++ b/node_modules/@babel/core/lib/config/config-chain.js @@ -3,23 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); +exports.buildPresetChain = buildPresetChain; exports.buildRootChain = buildRootChain; -exports.buildPresetChain = void 0; +exports.buildPresetChainWalker = void 0; function _path() { - var data = _interopRequireDefault(require("path")); + const data = _interopRequireDefault(require("path")); - _path = function _path() { - return data; - }; - - return data; -} - -function _micromatch() { - var data = _interopRequireDefault(require("micromatch")); - - _micromatch = function _micromatch() { + _path = function () { return data; }; @@ -27,9 +18,9 @@ function _micromatch() { } function _debug() { - var data = _interopRequireDefault(require("debug")); + const data = _interopRequireDefault(require("debug")); - _debug = function _debug() { + _debug = function () { return data; }; @@ -38,6 +29,8 @@ function _debug() { var _options = require("./validation/options"); +var _patternToRegex = _interopRequireDefault(require("./pattern-to-regex")); + var _files = require("./files"); var _caching = require("./caching"); @@ -46,255 +39,223 @@ var _configDescriptors = require("./config-descriptors"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var debug = (0, _debug().default)("babel:config:config-chain"); -var buildPresetChain = makeChainWalker({ - init: function init(arg) { - return arg; - }, - root: function root(preset) { - return loadPresetDescriptors(preset); - }, - env: function env(preset, envName) { - return loadPresetEnvDescriptors(preset)(envName); - }, - overrides: function overrides(preset, index) { - return loadPresetOverridesDescriptors(preset)(index); - }, - overridesEnv: function overridesEnv(preset, index, envName) { - return loadPresetOverridesEnvDescriptors(preset)(index)(envName); - } -}); -exports.buildPresetChain = buildPresetChain; -var loadPresetDescriptors = (0, _caching.makeWeakCache)(function (preset) { - return buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors); -}); -var loadPresetEnvDescriptors = (0, _caching.makeWeakCache)(function (preset) { - return (0, _caching.makeStrongCache)(function (envName) { - return buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName); - }); -}); -var loadPresetOverridesDescriptors = (0, _caching.makeWeakCache)(function (preset) { - return (0, _caching.makeStrongCache)(function (index) { - return buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index); - }); -}); -var loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCache)(function (preset) { - return (0, _caching.makeStrongCache)(function (index) { - return (0, _caching.makeStrongCache)(function (envName) { - return buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName); - }); - }); +const debug = (0, _debug().default)("babel:config:config-chain"); + +function buildPresetChain(arg, context) { + const chain = buildPresetChainWalker(arg, context); + if (!chain) return null; + return { + plugins: dedupDescriptors(chain.plugins), + presets: dedupDescriptors(chain.presets), + options: chain.options.map(o => normalizeOptions(o)) + }; +} + +const buildPresetChainWalker = makeChainWalker({ + init: arg => arg, + root: preset => loadPresetDescriptors(preset), + env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName), + overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index), + overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName) }); +exports.buildPresetChainWalker = buildPresetChainWalker; +const loadPresetDescriptors = (0, _caching.makeWeakCache)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors)); +const loadPresetEnvDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName))); +const loadPresetOverridesDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index))); +const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(index => (0, _caching.makeStrongCache)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName)))); function buildRootChain(opts, context) { - var programmaticChain = loadProgrammaticChain({ + const programmaticChain = loadProgrammaticChain({ options: opts, dirname: context.cwd }, context); if (!programmaticChain) return null; - var _opts$root = opts.root, - rootDir = _opts$root === void 0 ? "." : _opts$root, - _opts$babelrc = opts.babelrc, - babelrc = _opts$babelrc === void 0 ? true : _opts$babelrc, - babelrcRoots = opts.babelrcRoots, - _opts$configFile = opts.configFile, - configFileName = _opts$configFile === void 0 ? true : _opts$configFile; + let configFile; - var absoluteRoot = _path().default.resolve(context.cwd, rootDir); - - var configFile; - - if (typeof configFileName === "string") { - configFile = (0, _files.loadConfig)(configFileName, context.cwd, context.envName); - } else if (configFileName === true) { - configFile = (0, _files.findRootConfig)(absoluteRoot, context.envName); + if (typeof opts.configFile === "string") { + configFile = (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller); + } else if (opts.configFile !== false) { + configFile = (0, _files.findRootConfig)(context.root, context.envName, context.caller); } - var configFileChain = emptyChain(); + let { + babelrc, + babelrcRoots + } = opts; + let babelrcRootsDirectory = context.cwd; + const configFileChain = emptyChain(); if (configFile) { - var result = loadFileChain(configFile, context); + const validatedFile = validateConfigFile(configFile); + const result = loadFileChain(validatedFile, context); if (!result) return null; + + if (babelrc === undefined) { + babelrc = validatedFile.options.babelrc; + } + + if (babelrcRoots === undefined) { + babelrcRootsDirectory = validatedFile.dirname; + babelrcRoots = validatedFile.options.babelrcRoots; + } + mergeChain(configFileChain, result); } - var pkgData = typeof context.filename === "string" ? (0, _files.findPackageData)(context.filename) : null; - var ignoreFile, babelrcFile; - var fileChain = emptyChain(); + const pkgData = typeof context.filename === "string" ? (0, _files.findPackageData)(context.filename) : null; + let ignoreFile, babelrcFile; + const fileChain = emptyChain(); - if (babelrc && pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, absoluteRoot)) { - var _findRelativeConfig = (0, _files.findRelativeConfig)(pkgData, context.envName); - - ignoreFile = _findRelativeConfig.ignore; - babelrcFile = _findRelativeConfig.config; + if ((babelrc === true || babelrc === undefined) && pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) { + ({ + ignore: ignoreFile, + config: babelrcFile + } = (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller)); if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) { return null; } if (babelrcFile) { - var _result = loadFileChain(babelrcFile, context); - - if (!_result) return null; - mergeChain(fileChain, _result); + const result = loadFileChain(validateBabelrcFile(babelrcFile), context); + if (!result) return null; + mergeChain(fileChain, result); } } - var chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain); + const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain); return { plugins: dedupDescriptors(chain.plugins), presets: dedupDescriptors(chain.presets), - options: chain.options.map(function (o) { - return normalizeOptions(o); - }), + options: chain.options.map(o => normalizeOptions(o)), ignore: ignoreFile || undefined, babelrc: babelrcFile || undefined, config: configFile || undefined }; } -function babelrcLoadEnabled(context, pkgData, babelrcRoots, absoluteRoot) { +function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) { if (typeof babelrcRoots === "boolean") return babelrcRoots; + const absoluteRoot = context.root; if (babelrcRoots === undefined) { return pkgData.directories.indexOf(absoluteRoot) !== -1; } - var babelrcPatterns = babelrcRoots; + let babelrcPatterns = babelrcRoots; if (!Array.isArray(babelrcPatterns)) babelrcPatterns = [babelrcPatterns]; - babelrcPatterns = babelrcPatterns.map(function (pat) { - return _path().default.resolve(context.cwd, pat); + babelrcPatterns = babelrcPatterns.map(pat => { + return typeof pat === "string" ? _path().default.resolve(babelrcRootsDirectory, pat) : pat; }); if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) { return pkgData.directories.indexOf(absoluteRoot) !== -1; } - return (0, _micromatch().default)(pkgData.directories, babelrcPatterns).length > 0; -} + return babelrcPatterns.some(pat => { + if (typeof pat === "string") { + pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory); + } -var loadProgrammaticChain = makeChainWalker({ - init: function init(arg) { - return arg; - }, - root: function root(input) { - return buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors); - }, - env: function env(input, envName) { - return buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName); - }, - overrides: function overrides(input, index) { - return buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index); - }, - overridesEnv: function overridesEnv(input, index, envName) { - return buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName); - } -}); -var loadFileChain = makeChainWalker({ - init: function init(input) { - return validateFile(input); - }, - root: function root(file) { - return loadFileDescriptors(file); - }, - env: function env(file, envName) { - return loadFileEnvDescriptors(file)(envName); - }, - overrides: function overrides(file, index) { - return loadFileOverridesDescriptors(file)(index); - }, - overridesEnv: function overridesEnv(file, index, envName) { - return loadFileOverridesEnvDescriptors(file)(index)(envName); - } -}); -var validateFile = (0, _caching.makeWeakCache)(function (file) { - return { - filepath: file.filepath, - dirname: file.dirname, - options: (0, _options.validate)("file", file.options) - }; -}); -var loadFileDescriptors = (0, _caching.makeWeakCache)(function (file) { - return buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors); -}); -var loadFileEnvDescriptors = (0, _caching.makeWeakCache)(function (file) { - return (0, _caching.makeStrongCache)(function (envName) { - return buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName); - }); -}); -var loadFileOverridesDescriptors = (0, _caching.makeWeakCache)(function (file) { - return (0, _caching.makeStrongCache)(function (index) { - return buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index); - }); -}); -var loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCache)(function (file) { - return (0, _caching.makeStrongCache)(function (index) { - return (0, _caching.makeStrongCache)(function (envName) { - return buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName); + return pkgData.directories.some(directory => { + return matchPattern(pat, babelrcRootsDirectory, directory, context); }); }); -}); +} -function buildRootDescriptors(_ref, alias, descriptors) { - var dirname = _ref.dirname, - options = _ref.options; +const validateConfigFile = (0, _caching.makeWeakCache)(file => ({ + filepath: file.filepath, + dirname: file.dirname, + options: (0, _options.validate)("configfile", file.options) +})); +const validateBabelrcFile = (0, _caching.makeWeakCache)(file => ({ + filepath: file.filepath, + dirname: file.dirname, + options: (0, _options.validate)("babelrcfile", file.options) +})); +const validateExtendFile = (0, _caching.makeWeakCache)(file => ({ + filepath: file.filepath, + dirname: file.dirname, + options: (0, _options.validate)("extendsfile", file.options) +})); +const loadProgrammaticChain = makeChainWalker({ + root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors), + env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName), + overrides: (input, index) => buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index), + overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName) +}); +const loadFileChain = makeChainWalker({ + root: file => loadFileDescriptors(file), + env: (file, envName) => loadFileEnvDescriptors(file)(envName), + overrides: (file, index) => loadFileOverridesDescriptors(file)(index), + overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName) +}); +const loadFileDescriptors = (0, _caching.makeWeakCache)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors)); +const loadFileEnvDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName))); +const loadFileOverridesDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index))); +const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(index => (0, _caching.makeStrongCache)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName)))); + +function buildRootDescriptors({ + dirname, + options +}, alias, descriptors) { return descriptors(dirname, options, alias); } -function buildEnvDescriptors(_ref2, alias, descriptors, envName) { - var dirname = _ref2.dirname, - options = _ref2.options; - var opts = options.env && options.env[envName]; - return opts ? descriptors(dirname, opts, alias + ".env[\"" + envName + "\"]") : null; +function buildEnvDescriptors({ + dirname, + options +}, alias, descriptors, envName) { + const opts = options.env && options.env[envName]; + return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null; } -function buildOverrideDescriptors(_ref3, alias, descriptors, index) { - var dirname = _ref3.dirname, - options = _ref3.options; - var opts = options.overrides && options.overrides[index]; +function buildOverrideDescriptors({ + dirname, + options +}, alias, descriptors, index) { + const opts = options.overrides && options.overrides[index]; if (!opts) throw new Error("Assertion failure - missing override"); - return descriptors(dirname, opts, alias + ".overrides[" + index + "]"); + return descriptors(dirname, opts, `${alias}.overrides[${index}]`); } -function buildOverrideEnvDescriptors(_ref4, alias, descriptors, index, envName) { - var dirname = _ref4.dirname, - options = _ref4.options; - var override = options.overrides && options.overrides[index]; +function buildOverrideEnvDescriptors({ + dirname, + options +}, alias, descriptors, index, envName) { + const override = options.overrides && options.overrides[index]; if (!override) throw new Error("Assertion failure - missing override"); - var opts = override.env && override.env[envName]; - return opts ? descriptors(dirname, opts, alias + ".overrides[" + index + "].env[\"" + envName + "\"]") : null; + const opts = override.env && override.env[envName]; + return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null; } -function makeChainWalker(_ref5) { - var init = _ref5.init, - root = _ref5.root, - env = _ref5.env, - overrides = _ref5.overrides, - overridesEnv = _ref5.overridesEnv; - return function (arg, context, files) { - if (files === void 0) { - files = new Set(); - } - - var input = init(arg); - var dirname = input.dirname; - var flattenedConfigs = []; - var rootOpts = root(input); +function makeChainWalker({ + root, + env, + overrides, + overridesEnv +}) { + return (input, context, files = new Set()) => { + const { + dirname + } = input; + const flattenedConfigs = []; + const rootOpts = root(input); if (configIsApplicable(rootOpts, dirname, context)) { flattenedConfigs.push(rootOpts); - var envOpts = env(input, context.envName); + const envOpts = env(input, context.envName); if (envOpts && configIsApplicable(envOpts, dirname, context)) { flattenedConfigs.push(envOpts); } - (rootOpts.options.overrides || []).forEach(function (_, index) { - var overrideOps = overrides(input, index); + (rootOpts.options.overrides || []).forEach((_, index) => { + const overrideOps = overrides(input, index); if (configIsApplicable(overrideOps, dirname, context)) { flattenedConfigs.push(overrideOps); - var overrideEnvOpts = overridesEnv(input, index, context.envName); + const overrideEnvOpts = overridesEnv(input, index, context.envName); if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) { flattenedConfigs.push(overrideEnvOpts); @@ -303,20 +264,18 @@ function makeChainWalker(_ref5) { }); } - if (flattenedConfigs.some(function (_ref6) { - var _ref6$options = _ref6.options, - ignore = _ref6$options.ignore, - only = _ref6$options.only; - return shouldIgnore(context, ignore, only, dirname); - })) { + if (flattenedConfigs.some(({ + options: { + ignore, + only + } + }) => shouldIgnore(context, ignore, only, dirname))) { return null; } - var chain = emptyChain(); - - for (var _i = 0; _i < flattenedConfigs.length; _i++) { - var op = flattenedConfigs[_i]; + const chain = emptyChain(); + for (const op of flattenedConfigs) { if (!mergeExtendsChain(chain, op.options, dirname, context, files)) { return null; } @@ -330,16 +289,14 @@ function makeChainWalker(_ref5) { function mergeExtendsChain(chain, opts, dirname, context, files) { if (opts.extends === undefined) return true; - var file = (0, _files.loadConfig)(opts.extends, dirname, context.envName); + const file = (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller); if (files.has(file)) { - throw new Error("Configuration cycle detected loading " + file.filepath + ".\n" + "File already loaded following the config chain:\n" + Array.from(files, function (file) { - return " - " + file.filepath; - }).join("\n")); + throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n")); } files.add(file); - var fileChain = loadFileChain(file, context, files); + const fileChain = loadFileChain(validateExtendFile(file), context, files); files.delete(file); if (!fileChain) return false; mergeChain(chain, fileChain); @@ -347,29 +304,20 @@ function mergeExtendsChain(chain, opts, dirname, context, files) { } function mergeChain(target, source) { - var _target$options, _target$plugins, _target$presets; - - (_target$options = target.options).push.apply(_target$options, source.options); - - (_target$plugins = target.plugins).push.apply(_target$plugins, source.plugins); - - (_target$presets = target.presets).push.apply(_target$presets, source.presets); - + target.options.push(...source.options); + target.plugins.push(...source.plugins); + target.presets.push(...source.presets); return target; } -function mergeChainOpts(target, _ref7) { - var _target$plugins2, _target$presets2; - - var options = _ref7.options, - plugins = _ref7.plugins, - presets = _ref7.presets; +function mergeChainOpts(target, { + options, + plugins, + presets +}) { target.options.push(options); - - (_target$plugins2 = target.plugins).push.apply(_target$plugins2, plugins()); - - (_target$presets2 = target.presets).push.apply(_target$presets2, presets()); - + target.plugins.push(...plugins()); + target.presets.push(...presets()); return target; } @@ -382,16 +330,20 @@ function emptyChain() { } function normalizeOptions(opts) { - var options = Object.assign({}, opts); + const options = Object.assign({}, opts); delete options.extends; delete options.env; + delete options.overrides; delete options.plugins; delete options.presets; delete options.passPerPreset; delete options.ignore; delete options.only; + delete options.test; + delete options.include; + delete options.exclude; - if (options.sourceMap) { + if (options.hasOwnProperty("sourceMap")) { options.sourceMaps = options.sourceMap; delete options.sourceMap; } @@ -400,44 +352,27 @@ function normalizeOptions(opts) { } function dedupDescriptors(items) { - var map = new Map(); - var descriptors = []; - - for (var _iterator = items, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref8; - - if (_isArray) { - if (_i2 >= _iterator.length) break; - _ref8 = _iterator[_i2++]; - } else { - _i2 = _iterator.next(); - if (_i2.done) break; - _ref8 = _i2.value; - } - - var item = _ref8; + const map = new Map(); + const descriptors = []; + for (const item of items) { if (typeof item.value === "function") { - var fnKey = item.value; - var nameMap = map.get(fnKey); + const fnKey = item.value; + let nameMap = map.get(fnKey); if (!nameMap) { nameMap = new Map(); map.set(fnKey, nameMap); } - var desc = nameMap.get(item.name); + let desc = nameMap.get(item.name); if (!desc) { desc = { - value: null + value: item }; descriptors.push(desc); if (!item.ownPass) nameMap.set(item.name, desc); - } - - if (item.options === false) { - desc.value = null; } else { desc.value = item; } @@ -448,111 +383,57 @@ function dedupDescriptors(items) { } } - return descriptors.reduce(function (acc, desc) { - if (desc.value) acc.push(desc.value); + return descriptors.reduce((acc, desc) => { + acc.push(desc.value); return acc; }, []); } -function configIsApplicable(_ref9, dirname, context) { - var options = _ref9.options; +function configIsApplicable({ + options +}, dirname, context) { return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname)); } function configFieldIsApplicable(context, test, dirname) { - if (context.filename === null) { - throw new Error("Configuration contains explicit test/include/exclude checks, but no filename was passed to Babel"); - } - - var ctx = context; - var patterns = Array.isArray(test) ? test : [test]; - return matchesPatterns(ctx, patterns, dirname, false); + const patterns = Array.isArray(test) ? test : [test]; + return matchesPatterns(context, patterns, dirname); } function shouldIgnore(context, ignore, only, dirname) { - if (ignore) { - if (context.filename === null) { - throw new Error("Configuration contains ignore checks, but no filename was passed to Babel"); - } - - var ctx = context; - - if (matchesPatterns(ctx, ignore, dirname)) { - debug("Ignored %o because it matched one of %O from %o", context.filename, ignore, dirname); - return true; - } + if (ignore && matchesPatterns(context, ignore, dirname)) { + debug("Ignored %o because it matched one of %O from %o", context.filename, ignore, dirname); + return true; } - if (only) { - if (context.filename === null) { - throw new Error("Configuration contains ignore checks, but no filename was passed to Babel"); - } - - var _ctx = context; - - if (!matchesPatterns(_ctx, only, dirname)) { - debug("Ignored %o because it failed to match one of %O from %o", context.filename, only, dirname); - return true; - } + if (only && !matchesPatterns(context, only, dirname)) { + debug("Ignored %o because it failed to match one of %O from %o", context.filename, only, dirname); + return true; } return false; } -function matchesPatterns(context, patterns, dirname, allowNegation) { - if (allowNegation === void 0) { - allowNegation = true; - } +function matchesPatterns(context, patterns, dirname) { + return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context)); +} - var res = []; - var strings = []; - var fns = []; - patterns.forEach(function (pattern) { - if (typeof pattern === "string") strings.push(pattern);else if (typeof pattern === "function") fns.push(pattern);else res.push(pattern); - }); - var filename = context.filename; - if (res.some(function (re) { - return re.test(context.filename); - })) return true; - if (fns.some(function (fn) { - return fn(filename); - })) return true; - - if (strings.length > 0) { - var possibleDirs = getPossibleDirs(context); - var absolutePatterns = strings.map(function (pattern) { - var negate = pattern[0] === "!"; - - if (negate && !allowNegation) { - throw new Error("Negation of file paths is not supported."); - } - - if (negate) pattern = pattern.slice(1); - return (negate ? "!" : "") + _path().default.resolve(dirname, pattern); +function matchPattern(pattern, dirname, pathToTest, context) { + if (typeof pattern === "function") { + return !!pattern(pathToTest, { + dirname, + envName: context.envName, + caller: context.caller }); - - if ((0, _micromatch().default)(possibleDirs, absolutePatterns, { - nocase: true, - nonegate: !allowNegation - }).length > 0) { - return true; - } } - return false; -} - -var getPossibleDirs = (0, _caching.makeWeakCache)(function (context) { - var current = context.filename; - if (current === null) return []; - var possibleDirs = [current]; - - while (true) { - var previous = current; - current = _path().default.dirname(current); - if (previous === current) break; - possibleDirs.push(current); + if (typeof pathToTest !== "string") { + throw new Error(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`); } - return possibleDirs; -}); \ No newline at end of file + if (typeof pattern === "string") { + pattern = (0, _patternToRegex.default)(pattern, dirname); + } + + return pattern.test(pathToTest); +} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-descriptors.js b/node_modules/@babel/core/lib/config/config-descriptors.js index 303e0ec..4996474 100644 --- a/node_modules/@babel/core/lib/config/config-descriptors.js +++ b/node_modules/@babel/core/lib/config/config-descriptors.js @@ -13,85 +13,89 @@ var _item = require("./item"); var _caching = require("./caching"); +function isEqualDescriptor(a, b) { + return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved); +} + function createCachedDescriptors(dirname, options, alias) { - var plugins = options.plugins, - presets = options.presets, - passPerPreset = options.passPerPreset; + const { + plugins, + presets, + passPerPreset + } = options; return { - options: options, - plugins: plugins ? function () { - return createCachedPluginDescriptors(plugins, dirname)(alias); - } : function () { - return []; - }, - presets: presets ? function () { - return createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset); - } : function () { - return []; - } + options, + plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => [], + presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => [] }; } function createUncachedDescriptors(dirname, options, alias) { - var plugins; - var presets; + let plugins; + let presets; return { - options: options, - plugins: function (_plugins) { - function plugins() { - return _plugins.apply(this, arguments); - } - - plugins.toString = function () { - return _plugins.toString(); - }; - - return plugins; - }(function () { + options, + plugins: () => { if (!plugins) { plugins = createPluginDescriptors(options.plugins || [], dirname, alias); } return plugins; - }), - presets: function (_presets) { - function presets() { - return _presets.apply(this, arguments); - } - - presets.toString = function () { - return _presets.toString(); - }; - - return presets; - }(function () { + }, + presets: () => { if (!presets) { presets = createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset); } return presets; - }) + } }; } -var createCachedPresetDescriptors = (0, _caching.makeWeakCache)(function (items, cache) { - var dirname = cache.using(function (dir) { - return dir; - }); - return (0, _caching.makeStrongCache)(function (alias) { - return (0, _caching.makeStrongCache)(function (passPerPreset) { - return createPresetDescriptors(items, dirname, alias, passPerPreset); - }); - }); +const PRESET_DESCRIPTOR_CACHE = new WeakMap(); +const createCachedPresetDescriptors = (0, _caching.makeWeakCache)((items, cache) => { + const dirname = cache.using(dir => dir); + return (0, _caching.makeStrongCache)(alias => (0, _caching.makeStrongCache)(passPerPreset => createPresetDescriptors(items, dirname, alias, passPerPreset).map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc)))); }); -var createCachedPluginDescriptors = (0, _caching.makeWeakCache)(function (items, cache) { - var dirname = cache.using(function (dir) { - return dir; - }); - return (0, _caching.makeStrongCache)(function (alias) { - return createPluginDescriptors(items, dirname, alias); - }); +const PLUGIN_DESCRIPTOR_CACHE = new WeakMap(); +const createCachedPluginDescriptors = (0, _caching.makeWeakCache)((items, cache) => { + const dirname = cache.using(dir => dir); + return (0, _caching.makeStrongCache)(alias => createPluginDescriptors(items, dirname, alias).map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc))); }); +const DEFAULT_OPTIONS = {}; + +function loadCachedDescriptor(cache, desc) { + const { + value, + options = DEFAULT_OPTIONS + } = desc; + if (options === false) return desc; + let cacheByOptions = cache.get(value); + + if (!cacheByOptions) { + cacheByOptions = new WeakMap(); + cache.set(value, cacheByOptions); + } + + let possibilities = cacheByOptions.get(options); + + if (!possibilities) { + possibilities = []; + cacheByOptions.set(options, possibilities); + } + + if (possibilities.indexOf(desc) === -1) { + const matches = possibilities.filter(possibility => isEqualDescriptor(possibility, desc)); + + if (matches.length > 0) { + return matches[0]; + } + + possibilities.push(desc); + } + + return desc; +} function createPresetDescriptors(items, dirname, alias, passPerPreset) { return createDescriptors("preset", items, dirname, alias, passPerPreset); @@ -102,67 +106,60 @@ function createPluginDescriptors(items, dirname, alias) { } function createDescriptors(type, items, dirname, alias, ownPass) { - var descriptors = items.map(function (item, index) { - return createDescriptor(item, dirname, { - type: type, - alias: alias + "$" + index, - ownPass: !!ownPass - }); - }); + const descriptors = items.map((item, index) => createDescriptor(item, dirname, { + type, + alias: `${alias}$${index}`, + ownPass: !!ownPass + })); assertNoDuplicates(descriptors); return descriptors; } -function createDescriptor(pair, dirname, _ref) { - var type = _ref.type, - alias = _ref.alias, - ownPass = _ref.ownPass; - var desc = (0, _item.getItemDescriptor)(pair); +function createDescriptor(pair, dirname, { + type, + alias, + ownPass +}) { + const desc = (0, _item.getItemDescriptor)(pair); if (desc) { return desc; } - var name; - var options; - var value = pair; + let name; + let options; + let value = pair; if (Array.isArray(value)) { if (value.length === 3) { - var _value = value; - value = _value[0]; - options = _value[1]; - name = _value[2]; + [value, options, name] = value; } else { - var _value2 = value; - value = _value2[0]; - options = _value2[1]; + [value, options] = value; } } - var file = undefined; - var filepath = null; + let file = undefined; + let filepath = null; if (typeof value === "string") { if (typeof type !== "string") { throw new Error("To resolve a string-based item, the type of item must be given"); } - var resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset; - var _request = value; - - var _resolver = resolver(value, dirname); - - filepath = _resolver.filepath; - value = _resolver.value; + const resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset; + const request = value; + ({ + filepath, + value + } = resolver(value, dirname)); file = { - request: _request, + request, resolved: filepath }; } if (!value) { - throw new Error("Unexpected falsy value: " + String(value)); + throw new Error(`Unexpected falsy value: ${String(value)}`); } if (typeof value === "object" && value.__esModule) { @@ -174,42 +171,30 @@ function createDescriptor(pair, dirname, _ref) { } if (typeof value !== "object" && typeof value !== "function") { - throw new Error("Unsupported format: " + typeof value + ". Expected an object or a function."); + throw new Error(`Unsupported format: ${typeof value}. Expected an object or a function.`); } if (filepath !== null && typeof value === "object" && value) { - throw new Error("Plugin/Preset files are not allowed to export objects, only functions. In " + filepath); + throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`); } return { - name: name, + name, alias: filepath || alias, - value: value, - options: options, - dirname: dirname, - ownPass: ownPass, - file: file + value, + options, + dirname, + ownPass, + file }; } function assertNoDuplicates(items) { - var map = new Map(); + const map = new Map(); - for (var _iterator = items, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var item = _ref2; + for (const item of items) { if (typeof item.value !== "function") continue; - var nameMap = map.get(item.value); + let nameMap = map.get(item.value); if (!nameMap) { nameMap = new Set(); @@ -217,7 +202,7 @@ function assertNoDuplicates(items) { } if (nameMap.has(item.name)) { - throw new Error(["Duplicate plugin/preset detected.", "If you'd like to use two separate instances of a plugin,", "they neen separate names, e.g.", "", " plugins: [", " ['some-plugin', {}],", " ['some-plugin', {}, 'some unique name'],", " ]"].join("\n")); + throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`].join("\n")); } nameMap.add(item.name); diff --git a/node_modules/@babel/core/lib/config/files/configuration.js b/node_modules/@babel/core/lib/config/files/configuration.js index 657068c..7a8bdfc 100644 --- a/node_modules/@babel/core/lib/config/files/configuration.js +++ b/node_modules/@babel/core/lib/config/files/configuration.js @@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); +exports.findConfigUpwards = findConfigUpwards; exports.findRelativeConfig = findRelativeConfig; exports.findRootConfig = findRootConfig; exports.loadConfig = loadConfig; function _debug() { - var data = _interopRequireDefault(require("debug")); + const data = _interopRequireDefault(require("debug")); - _debug = function _debug() { + _debug = function () { return data; }; @@ -18,9 +19,9 @@ function _debug() { } function _path() { - var data = _interopRequireDefault(require("path")); + const data = _interopRequireDefault(require("path")); - _path = function _path() { + _path = function () { return data; }; @@ -28,9 +29,9 @@ function _path() { } function _fs() { - var data = _interopRequireDefault(require("fs")); + const data = _interopRequireDefault(require("fs")); - _fs = function _fs() { + _fs = function () { return data; }; @@ -38,9 +39,9 @@ function _fs() { } function _json() { - var data = _interopRequireDefault(require("json5")); + const data = _interopRequireDefault(require("json5")); - _json = function _json() { + _json = function () { return data; }; @@ -48,9 +49,9 @@ function _json() { } function _resolve() { - var data = _interopRequireDefault(require("resolve")); + const data = _interopRequireDefault(require("resolve")); - _resolve = function _resolve() { + _resolve = function () { return data; }; @@ -63,49 +64,57 @@ var _configApi = _interopRequireDefault(require("../helpers/config-api")); var _utils = require("./utils"); +var _patternToRegex = _interopRequireDefault(require("../pattern-to-regex")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var debug = (0, _debug().default)("babel:config:loading:files:configuration"); -var BABEL_CONFIG_JS_FILENAME = "babel.config.js"; -var BABELRC_FILENAME = ".babelrc"; -var BABELRC_JS_FILENAME = ".babelrc.js"; -var BABELIGNORE_FILENAME = ".babelignore"; +const debug = (0, _debug().default)("babel:config:loading:files:configuration"); +const BABEL_CONFIG_JS_FILENAME = "babel.config.js"; +const BABELRC_FILENAME = ".babelrc"; +const BABELRC_JS_FILENAME = ".babelrc.js"; +const BABELIGNORE_FILENAME = ".babelignore"; -function findRelativeConfig(packageData, envName) { - var config = null; - var ignore = null; +function findConfigUpwards(rootDir) { + let dirname = rootDir; - var dirname = _path().default.dirname(packageData.filepath); - - var _loop = function _loop() { - if (_isArray) { - if (_i >= _iterator.length) return "break"; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) return "break"; - _ref = _i.value; + while (true) { + if (_fs().default.existsSync(_path().default.join(dirname, BABEL_CONFIG_JS_FILENAME))) { + return dirname; } - var loc = _ref; + const nextDir = _path().default.dirname(dirname); + if (dirname === nextDir) break; + dirname = nextDir; + } + + return null; +} + +function findRelativeConfig(packageData, envName, caller) { + let config = null; + let ignore = null; + + const dirname = _path().default.dirname(packageData.filepath); + + for (const loc of packageData.directories) { if (!config) { - config = [BABELRC_FILENAME, BABELRC_JS_FILENAME].reduce(function (previousConfig, name) { - var filepath = _path().default.join(loc, name); + config = [BABELRC_FILENAME, BABELRC_JS_FILENAME].reduce((previousConfig, name) => { + const filepath = _path().default.join(loc, name); - var config = readConfig(filepath, envName); + const config = readConfig(filepath, envName, caller); if (config && previousConfig) { - throw new Error("Multiple configuration files found. Please remove one:\n" + (" - " + _path().default.basename(previousConfig.filepath) + "\n") + (" - " + name + "\n") + ("from " + loc)); + throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(previousConfig.filepath)}\n` + ` - ${name}\n` + `from ${loc}`); } return config || previousConfig; }, null); - var pkgConfig = packageData.pkg && packageData.pkg.dirname === loc ? packageToBabelConfig(packageData.pkg) : null; + const pkgConfig = packageData.pkg && packageData.pkg.dirname === loc ? packageToBabelConfig(packageData.pkg) : null; if (pkgConfig) { if (config) { - throw new Error("Multiple configuration files found. Please remove one:\n" + (" - " + _path().default.basename(pkgConfig.filepath) + "#babel\n") + (" - " + _path().default.basename(config.filepath) + "\n") + ("from " + loc)); + throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(pkgConfig.filepath)}#babel\n` + ` - ${_path().default.basename(config.filepath)}\n` + `from ${loc}`); } config = pkgConfig; @@ -117,7 +126,7 @@ function findRelativeConfig(packageData, envName) { } if (!ignore) { - var ignoreLoc = _path().default.join(loc, BABELIGNORE_FILENAME); + const ignoreLoc = _path().default.join(loc, BABELIGNORE_FILENAME); ignore = readIgnoreConfig(ignoreLoc); @@ -125,26 +134,18 @@ function findRelativeConfig(packageData, envName) { debug("Found ignore %o from %o.", ignore.filepath, dirname); } } - }; - - for (var _iterator = packageData.directories, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - var _ret = _loop(); - - if (_ret === "break") break; } return { - config: config, - ignore: ignore + config, + ignore }; } -function findRootConfig(dirname, envName) { - var filepath = _path().default.resolve(dirname, BABEL_CONFIG_JS_FILENAME); +function findRootConfig(dirname, envName, caller) { + const filepath = _path().default.resolve(dirname, BABEL_CONFIG_JS_FILENAME); - var conf = readConfig(filepath, envName); + const conf = readConfig(filepath, envName, caller); if (conf) { debug("Found root config %o in $o.", BABEL_CONFIG_JS_FILENAME, dirname); @@ -153,29 +154,30 @@ function findRootConfig(dirname, envName) { return conf; } -function loadConfig(name, dirname, envName) { - var filepath = _resolve().default.sync(name, { +function loadConfig(name, dirname, envName, caller) { + const filepath = _resolve().default.sync(name, { basedir: dirname }); - var conf = readConfig(filepath, envName); + const conf = readConfig(filepath, envName, caller); if (!conf) { - throw new Error("Config file " + filepath + " contains no configuration data"); + throw new Error(`Config file ${filepath} contains no configuration data`); } debug("Loaded config %o from $o.", name, dirname); return conf; } -function readConfig(filepath, envName) { +function readConfig(filepath, envName, caller) { return _path().default.extname(filepath) === ".js" ? readConfigJS(filepath, { - envName: envName + envName, + caller }) : readConfigJSON5(filepath); } -var LOADING_CONFIGS = new Set(); -var readConfigJS = (0, _caching.makeStrongCache)(function (filepath, cache) { +const LOADING_CONFIGS = new Set(); +const readConfigJS = (0, _caching.makeStrongCache)((filepath, cache) => { if (!_fs().default.existsSync(filepath)) { cache.forever(); return null; @@ -185,22 +187,22 @@ var readConfigJS = (0, _caching.makeStrongCache)(function (filepath, cache) { cache.never(); debug("Auto-ignoring usage of config %o.", filepath); return { - filepath: filepath, + filepath, dirname: _path().default.dirname(filepath), options: {} }; } - var options; + let options; try { LOADING_CONFIGS.add(filepath); - var configModule = require(filepath); + const configModule = require(filepath); options = configModule && configModule.__esModule ? configModule.default || undefined : configModule; } catch (err) { - err.message = filepath + ": Error while loading config - " + err.message; + err.message = `${filepath}: Error while loading config - ${err.message}`; throw err; } finally { LOADING_CONFIGS.delete(filepath); @@ -212,25 +214,25 @@ var readConfigJS = (0, _caching.makeStrongCache)(function (filepath, cache) { } if (!options || typeof options !== "object" || Array.isArray(options)) { - throw new Error(filepath + ": Configuration should be an exported JavaScript object."); + throw new Error(`${filepath}: Configuration should be an exported JavaScript object.`); } if (typeof options.then === "function") { - throw new Error("You appear to be using an async configuration, " + "which your current version of Babel does not support. " + "We may add support for this in the future, " + "but if you're on the most recent version of @babel/core and still " + "seeing this error, then you'll need to synchronously return your config."); + throw new Error(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`); } return { - filepath: filepath, + filepath, dirname: _path().default.dirname(filepath), - options: options + options }; }); -var packageToBabelConfig = (0, _caching.makeWeakCache)(function (file) { - if (typeof file.options.babel === "undefined") return null; - var babel = file.options.babel; +const packageToBabelConfig = (0, _caching.makeWeakCache)(file => { + const babel = file.options["babel"]; + if (typeof babel === "undefined") return null; if (typeof babel !== "object" || Array.isArray(babel) || babel === null) { - throw new Error(file.filepath + ": .babel property must be an object"); + throw new Error(`${file.filepath}: .babel property must be an object`); } return { @@ -239,45 +241,83 @@ var packageToBabelConfig = (0, _caching.makeWeakCache)(function (file) { options: babel }; }); -var readConfigJSON5 = (0, _utils.makeStaticFileCache)(function (filepath, content) { - var options; +const readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content) => { + let options; try { options = _json().default.parse(content); } catch (err) { - err.message = filepath + ": Error while parsing config - " + err.message; + err.message = `${filepath}: Error while parsing config - ${err.message}`; throw err; } - if (!options) throw new Error(filepath + ": No config detected"); + if (!options) throw new Error(`${filepath}: No config detected`); if (typeof options !== "object") { - throw new Error(filepath + ": Config returned typeof " + typeof options); + throw new Error(`${filepath}: Config returned typeof ${typeof options}`); } if (Array.isArray(options)) { - throw new Error(filepath + ": Expected config object but found array"); + throw new Error(`${filepath}: Expected config object but found array`); } return { - filepath: filepath, + filepath, dirname: _path().default.dirname(filepath), - options: options + options }; }); -var readIgnoreConfig = (0, _utils.makeStaticFileCache)(function (filepath, content) { - var ignore = content.split("\n").map(function (line) { - return line.replace(/#(.*?)$/, "").trim(); - }).filter(function (line) { - return !!line; - }); +const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => { + const ignoreDir = _path().default.dirname(filepath); + + const ignorePatterns = content.split("\n").map(line => line.replace(/#(.*?)$/, "").trim()).filter(line => !!line); + + for (const pattern of ignorePatterns) { + if (pattern[0] === "!") { + throw new Error(`Negation of file paths is not supported.`); + } + } + return { - filepath: filepath, + filepath, dirname: _path().default.dirname(filepath), - ignore: ignore + ignore: ignorePatterns.map(pattern => (0, _patternToRegex.default)(pattern, ignoreDir)) }; }); function throwConfigError() { - throw new Error("Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured\nfor various types of caching, using the first param of their handler functions:\n\nmodule.exports = function(api) {\n // The API exposes the following:\n\n // Cache the returned value forever and don't call this function again.\n api.cache(true);\n\n // Don't cache at all. Not recommended because it will be very slow.\n api.cache(false);\n\n // Cached based on the value of some function. If this function returns a value different from\n // a previously-encountered value, the plugins will re-evaluate.\n var env = api.cache(() => process.env.NODE_ENV);\n\n // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for\n // any possible NODE_ENV value that might come up during plugin execution.\n var isProd = api.cache(() => process.env.NODE_ENV === \"production\");\n\n // .cache(fn) will perform a linear search though instances to find the matching plugin based\n // based on previous instantiated plugins. If you want to recreate the plugin and discard the\n // previous instance whenever something changes, you may use:\n var isProd = api.cache.invalidate(() => process.env.NODE_ENV === \"production\");\n\n // Note, we also expose the following more-verbose versions of the above examples:\n api.cache.forever(); // api.cache(true)\n api.cache.never(); // api.cache(false)\n api.cache.using(fn); // api.cache(fn)\n\n // Return the value that will be cached.\n return { };\n};"); + throw new Error(`\ +Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured +for various types of caching, using the first param of their handler functions: + +module.exports = function(api) { + // The API exposes the following: + + // Cache the returned value forever and don't call this function again. + api.cache(true); + + // Don't cache at all. Not recommended because it will be very slow. + api.cache(false); + + // Cached based on the value of some function. If this function returns a value different from + // a previously-encountered value, the plugins will re-evaluate. + var env = api.cache(() => process.env.NODE_ENV); + + // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for + // any possible NODE_ENV value that might come up during plugin execution. + var isProd = api.cache(() => process.env.NODE_ENV === "production"); + + // .cache(fn) will perform a linear search though instances to find the matching plugin based + // based on previous instantiated plugins. If you want to recreate the plugin and discard the + // previous instance whenever something changes, you may use: + var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production"); + + // Note, we also expose the following more-verbose versions of the above examples: + api.cache.forever(); // api.cache(true) + api.cache.never(); // api.cache(false) + api.cache.using(fn); // api.cache(fn) + + // Return the value that will be cached. + return { }; +};`); } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/index-browser.js b/node_modules/@babel/core/lib/config/files/index-browser.js index fc5e333..b8e9141 100644 --- a/node_modules/@babel/core/lib/config/files/index-browser.js +++ b/node_modules/@babel/core/lib/config/files/index-browser.js @@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); +exports.findConfigUpwards = findConfigUpwards; exports.findPackageData = findPackageData; exports.findRelativeConfig = findRelativeConfig; exports.findRootConfig = findRootConfig; @@ -12,16 +13,20 @@ exports.resolvePreset = resolvePreset; exports.loadPlugin = loadPlugin; exports.loadPreset = loadPreset; +function findConfigUpwards(rootDir) { + return null; +} + function findPackageData(filepath) { return { - filepath: filepath, + filepath, directories: [], pkg: null, isPackage: false }; } -function findRelativeConfig(pkgData, envName) { +function findRelativeConfig(pkgData, envName, caller) { return { pkg: null, config: null, @@ -29,12 +34,12 @@ function findRelativeConfig(pkgData, envName) { }; } -function findRootConfig(dirname, envName) { +function findRootConfig(dirname, envName, caller) { return null; } -function loadConfig(name, dirname, envName) { - throw new Error("Cannot load " + name + " relative to " + dirname + " in a browser"); +function loadConfig(name, dirname, envName, caller) { + throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); } function resolvePlugin(name, dirname) { @@ -46,9 +51,9 @@ function resolvePreset(name, dirname) { } function loadPlugin(name, dirname) { - throw new Error("Cannot load plugin " + name + " relative to " + dirname + " in a browser"); + throw new Error(`Cannot load plugin ${name} relative to ${dirname} in a browser`); } function loadPreset(name, dirname) { - throw new Error("Cannot load preset " + name + " relative to " + dirname + " in a browser"); + throw new Error(`Cannot load preset ${name} relative to ${dirname} in a browser`); } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/index.js b/node_modules/@babel/core/lib/config/files/index.js index 25c3008..3d5453b 100644 --- a/node_modules/@babel/core/lib/config/files/index.js +++ b/node_modules/@babel/core/lib/config/files/index.js @@ -5,49 +5,55 @@ Object.defineProperty(exports, "__esModule", { }); Object.defineProperty(exports, "findPackageData", { enumerable: true, - get: function get() { + get: function () { return _package.findPackageData; } }); +Object.defineProperty(exports, "findConfigUpwards", { + enumerable: true, + get: function () { + return _configuration.findConfigUpwards; + } +}); Object.defineProperty(exports, "findRelativeConfig", { enumerable: true, - get: function get() { + get: function () { return _configuration.findRelativeConfig; } }); Object.defineProperty(exports, "findRootConfig", { enumerable: true, - get: function get() { + get: function () { return _configuration.findRootConfig; } }); Object.defineProperty(exports, "loadConfig", { enumerable: true, - get: function get() { + get: function () { return _configuration.loadConfig; } }); Object.defineProperty(exports, "resolvePlugin", { enumerable: true, - get: function get() { + get: function () { return _plugins.resolvePlugin; } }); Object.defineProperty(exports, "resolvePreset", { enumerable: true, - get: function get() { + get: function () { return _plugins.resolvePreset; } }); Object.defineProperty(exports, "loadPlugin", { enumerable: true, - get: function get() { + get: function () { return _plugins.loadPlugin; } }); Object.defineProperty(exports, "loadPreset", { enumerable: true, - get: function get() { + get: function () { return _plugins.loadPreset; } }); diff --git a/node_modules/@babel/core/lib/config/files/package.js b/node_modules/@babel/core/lib/config/files/package.js index 8ebf43a..c0f8988 100644 --- a/node_modules/@babel/core/lib/config/files/package.js +++ b/node_modules/@babel/core/lib/config/files/package.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.findPackageData = findPackageData; function _path() { - var data = _interopRequireDefault(require("path")); + const data = _interopRequireDefault(require("path")); - _path = function _path() { + _path = function () { return data; }; @@ -19,20 +19,20 @@ var _utils = require("./utils"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var PACKAGE_FILENAME = "package.json"; +const PACKAGE_FILENAME = "package.json"; function findPackageData(filepath) { - var pkg = null; - var directories = []; - var isPackage = true; + let pkg = null; + const directories = []; + let isPackage = true; - var dirname = _path().default.dirname(filepath); + let dirname = _path().default.dirname(filepath); while (!pkg && _path().default.basename(dirname) !== "node_modules") { directories.push(dirname); pkg = readConfigPackage(_path().default.join(dirname, PACKAGE_FILENAME)); - var nextLoc = _path().default.dirname(dirname); + const nextLoc = _path().default.dirname(dirname); if (dirname === nextLoc) { isPackage = false; @@ -43,34 +43,34 @@ function findPackageData(filepath) { } return { - filepath: filepath, - directories: directories, - pkg: pkg, - isPackage: isPackage + filepath, + directories, + pkg, + isPackage }; } -var readConfigPackage = (0, _utils.makeStaticFileCache)(function (filepath, content) { - var options; +const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => { + let options; try { options = JSON.parse(content); } catch (err) { - err.message = filepath + ": Error while parsing JSON - " + err.message; + err.message = `${filepath}: Error while parsing JSON - ${err.message}`; throw err; } if (typeof options !== "object") { - throw new Error(filepath + ": Config returned typeof " + typeof options); + throw new Error(`${filepath}: Config returned typeof ${typeof options}`); } if (Array.isArray(options)) { - throw new Error(filepath + ": Expected config object but found array"); + throw new Error(`${filepath}: Expected config object but found array`); } return { - filepath: filepath, + filepath, dirname: _path().default.dirname(filepath), - options: options + options }; }); \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/plugins.js b/node_modules/@babel/core/lib/config/files/plugins.js index b567cbc..264682c 100644 --- a/node_modules/@babel/core/lib/config/files/plugins.js +++ b/node_modules/@babel/core/lib/config/files/plugins.js @@ -9,9 +9,9 @@ exports.loadPlugin = loadPlugin; exports.loadPreset = loadPreset; function _debug() { - var data = _interopRequireDefault(require("debug")); + const data = _interopRequireDefault(require("debug")); - _debug = function _debug() { + _debug = function () { return data; }; @@ -19,9 +19,9 @@ function _debug() { } function _resolve() { - var data = _interopRequireDefault(require("resolve")); + const data = _interopRequireDefault(require("resolve")); - _resolve = function _resolve() { + _resolve = function () { return data; }; @@ -29,9 +29,9 @@ function _resolve() { } function _path() { - var data = _interopRequireDefault(require("path")); + const data = _interopRequireDefault(require("path")); - _path = function _path() { + _path = function () { return data; }; @@ -40,14 +40,15 @@ function _path() { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var debug = (0, _debug().default)("babel:config:loading:files:plugins"); -var EXACT_RE = /^module:/; -var BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/; -var BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/; -var BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/; -var BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/; -var OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?!babel-plugin-|[^/]+\/)/; -var OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?!babel-preset-|[^/]+\/)/; +const debug = (0, _debug().default)("babel:config:loading:files:plugins"); +const EXACT_RE = /^module:/; +const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/; +const BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/; +const BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/; +const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/; +const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/; +const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/; +const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/; function resolvePlugin(name, dirname) { return resolveStandardizedName("plugin", name, dirname); @@ -58,47 +59,43 @@ function resolvePreset(name, dirname) { } function loadPlugin(name, dirname) { - var filepath = resolvePlugin(name, dirname); + const filepath = resolvePlugin(name, dirname); if (!filepath) { - throw new Error("Plugin " + name + " not found relative to " + dirname); + throw new Error(`Plugin ${name} not found relative to ${dirname}`); } - var value = requireModule("plugin", filepath); + const value = requireModule("plugin", filepath); debug("Loaded plugin %o from %o.", name, dirname); return { - filepath: filepath, - value: value + filepath, + value }; } function loadPreset(name, dirname) { - var filepath = resolvePreset(name, dirname); + const filepath = resolvePreset(name, dirname); if (!filepath) { - throw new Error("Preset " + name + " not found relative to " + dirname); + throw new Error(`Preset ${name} not found relative to ${dirname}`); } - var value = requireModule("preset", filepath); + const value = requireModule("preset", filepath); debug("Loaded preset %o from %o.", name, dirname); return { - filepath: filepath, - value: value + filepath, + value }; } function standardizeName(type, name) { if (_path().default.isAbsolute(name)) return name; - var isPreset = type === "preset"; - return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, "babel-" + type + "-").replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, "$1" + type + "-").replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, "$1babel-" + type + "-").replace(EXACT_RE, ""); + const isPreset = type === "preset"; + return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, ""); } -function resolveStandardizedName(type, name, dirname) { - if (dirname === void 0) { - dirname = process.cwd(); - } - - var standardizedName = standardizeName(type, name); +function resolveStandardizedName(type, name, dirname = process.cwd()) { + const standardizedName = standardizeName(type, name); try { return _resolve().default.sync(standardizedName, { @@ -108,7 +105,7 @@ function resolveStandardizedName(type, name, dirname) { if (e.code !== "MODULE_NOT_FOUND") throw e; if (standardizedName !== name) { - var resolvedOriginal = false; + let resolvedOriginal = false; try { _resolve().default.sync(name, { @@ -119,11 +116,11 @@ function resolveStandardizedName(type, name, dirname) { } catch (e2) {} if (resolvedOriginal) { - e.message += "\n- If you want to resolve \"" + name + "\", use \"module:" + name + "\""; + e.message += `\n- If you want to resolve "${name}", use "module:${name}"`; } } - var resolvedBabel = false; + let resolvedBabel = false; try { _resolve().default.sync(standardizeName(type, "@babel/" + name), { @@ -134,11 +131,11 @@ function resolveStandardizedName(type, name, dirname) { } catch (e2) {} if (resolvedBabel) { - e.message += "\n- Did you mean \"@babel/" + name + "\"?"; + e.message += `\n- Did you mean "@babel/${name}"?`; } - var resolvedOppositeType = false; - var oppositeType = type === "preset" ? "plugin" : "preset"; + let resolvedOppositeType = false; + const oppositeType = type === "preset" ? "plugin" : "preset"; try { _resolve().default.sync(standardizeName(oppositeType, name), { @@ -149,18 +146,18 @@ function resolveStandardizedName(type, name, dirname) { } catch (e2) {} if (resolvedOppositeType) { - e.message += "\n- Did you accidentally pass a " + type + " as a " + oppositeType + "?"; + e.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`; } throw e; } } -var LOADING_MODULES = new Set(); +const LOADING_MODULES = new Set(); function requireModule(type, name) { if (LOADING_MODULES.has(name)) { - throw new Error("Reentrant " + type + " detected trying to load \"" + name + "\". This module is not ignored " + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.'); + throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored ` + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.'); } try { diff --git a/node_modules/@babel/core/lib/config/files/types.js b/node_modules/@babel/core/lib/config/files/types.js index 9a390c3..e69de29 100644 --- a/node_modules/@babel/core/lib/config/files/types.js +++ b/node_modules/@babel/core/lib/config/files/types.js @@ -1 +0,0 @@ -"use strict"; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/utils.js b/node_modules/@babel/core/lib/config/files/utils.js index 7fc8903..56749ef 100644 --- a/node_modules/@babel/core/lib/config/files/utils.js +++ b/node_modules/@babel/core/lib/config/files/utils.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.makeStaticFileCache = makeStaticFileCache; function _fs() { - var data = _interopRequireDefault(require("fs")); + const data = _interopRequireDefault(require("fs")); - _fs = function _fs() { + _fs = function () { return data; }; @@ -20,10 +20,8 @@ var _caching = require("../caching"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function makeStaticFileCache(fn) { - return (0, _caching.makeStrongCache)(function (filepath, cache) { - if (cache.invalidate(function () { - return fileMtime(filepath); - }) === null) { + return (0, _caching.makeStrongCache)((filepath, cache) => { + if (cache.invalidate(() => fileMtime(filepath)) === null) { cache.forever(); return null; } diff --git a/node_modules/@babel/core/lib/config/full.js b/node_modules/@babel/core/lib/config/full.js index 00749f2..1b16f8c 100644 --- a/node_modules/@babel/core/lib/config/full.js +++ b/node_modules/@babel/core/lib/config/full.js @@ -16,9 +16,9 @@ var _item = require("./item"); var _configChain = require("./config-chain"); function _traverse() { - var data = _interopRequireDefault(require("@babel/traverse")); + const data = _interopRequireDefault(require("@babel/traverse")); - _traverse = function _traverse() { + _traverse = function () { return data; }; @@ -40,78 +40,74 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function loadFullConfig(inputOpts) { - var result = (0, _partial.default)(inputOpts); + const result = (0, _partial.default)(inputOpts); if (!result) { return null; } - var options = result.options, - context = result.context; - var optionDefaults = {}; - var passes = [[]]; + const { + options, + context + } = result; + const optionDefaults = {}; + const passes = [[]]; try { - var plugins = options.plugins, - presets = options.presets; + const { + plugins, + presets + } = options; if (!plugins || !presets) { throw new Error("Assertion failure - plugins and presets exist"); } - var ignored = function recurseDescriptors(config, pass) { - var plugins = config.plugins.map(function (descriptor) { - return loadPluginDescriptor(descriptor, context); - }); - var presets = config.presets.map(function (descriptor) { - return { - preset: loadPresetDescriptor(descriptor, context), - pass: descriptor.ownPass ? [] : pass - }; - }); + const ignored = function recurseDescriptors(config, pass) { + const plugins = config.plugins.reduce((acc, descriptor) => { + if (descriptor.options !== false) { + acc.push(loadPluginDescriptor(descriptor, context)); + } + + return acc; + }, []); + const presets = config.presets.reduce((acc, descriptor) => { + if (descriptor.options !== false) { + acc.push({ + preset: loadPresetDescriptor(descriptor, context), + pass: descriptor.ownPass ? [] : pass + }); + } + + return acc; + }, []); if (presets.length > 0) { - passes.splice.apply(passes, [1, 0].concat(presets.map(function (o) { - return o.pass; - }).filter(function (p) { - return p !== pass; - }))); + passes.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pass)); - for (var _iterator = presets, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var _ref3 = _ref2; - var preset = _ref3.preset, - _pass = _ref3.pass; + for (const _ref of presets) { + const { + preset, + pass + } = _ref; if (!preset) return true; - - var _ignored = recurseDescriptors({ + const ignored = recurseDescriptors({ plugins: preset.plugins, presets: preset.presets - }, _pass); - - if (_ignored) return true; - preset.options.forEach(function (opts) { + }, pass); + if (ignored) return true; + preset.options.forEach(opts => { (0, _util.mergeOptions)(optionDefaults, opts); }); } } if (plugins.length > 0) { - pass.unshift.apply(pass, plugins); + pass.unshift(...plugins); } }({ - plugins: plugins.map(function (item) { - var desc = (0, _item.getItemDescriptor)(item); + plugins: plugins.map(item => { + const desc = (0, _item.getItemDescriptor)(item); if (!desc) { throw new Error("Assertion failure - must be config item"); @@ -119,8 +115,8 @@ function loadFullConfig(inputOpts) { return desc; }), - presets: presets.map(function (item) { - var desc = (0, _item.getItemDescriptor)(item); + presets: presets.map(item => { + const desc = (0, _item.getItemDescriptor)(item); if (!desc) { throw new Error("Assertion failure - must be config item"); @@ -133,22 +129,18 @@ function loadFullConfig(inputOpts) { if (ignored) return null; } catch (e) { if (!/^\[BABEL\]/.test(e.message)) { - e.message = "[BABEL] " + (context.filename || "unknown") + ": " + e.message; + e.message = `[BABEL] ${context.filename || "unknown"}: ${e.message}`; } throw e; } - var opts = optionDefaults; + const opts = optionDefaults; (0, _util.mergeOptions)(opts, options); opts.plugins = passes[0]; - opts.presets = passes.slice(1).filter(function (plugins) { - return plugins.length > 0; - }).map(function (plugins) { - return { - plugins: plugins - }; - }); + opts.presets = passes.slice(1).filter(plugins => plugins.length > 0).map(plugins => ({ + plugins + })); opts.passPerPreset = opts.presets.length > 0; return { options: opts, @@ -156,23 +148,24 @@ function loadFullConfig(inputOpts) { }; } -var loadDescriptor = (0, _caching.makeWeakCache)(function (_ref4, cache) { - var value = _ref4.value, - options = _ref4.options, - dirname = _ref4.dirname, - alias = _ref4.alias; +const loadDescriptor = (0, _caching.makeWeakCache)(({ + value, + options, + dirname, + alias +}, cache) => { if (options === false) throw new Error("Assertion failure"); options = options || {}; - var item = value; + let item = value; if (typeof value === "function") { - var api = Object.assign({}, context, (0, _configApi.default)(cache)); + const api = Object.assign({}, context, (0, _configApi.default)(cache)); try { item = value(api, options, dirname); } catch (e) { if (alias) { - e.message += " (While processing: " + JSON.stringify(alias) + ")"; + e.message += ` (While processing: ${JSON.stringify(alias)})`; } throw e; @@ -184,14 +177,14 @@ var loadDescriptor = (0, _caching.makeWeakCache)(function (_ref4, cache) { } if (typeof item.then === "function") { - throw new Error("You appear to be using an async plugin, " + "which your current version of Babel does not support." + "If you're using a published plugin, " + "you may need to upgrade your @babel/core version."); + throw new Error(`You appear to be using an async plugin, ` + `which your current version of Babel does not support.` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`); } return { value: item, - options: options, - dirname: dirname, - alias: alias + options, + dirname, + alias }; }); @@ -207,29 +200,28 @@ function loadPluginDescriptor(descriptor, context) { return instantiatePlugin(loadDescriptor(descriptor, context), context); } -var instantiatePlugin = (0, _caching.makeWeakCache)(function (_ref5, cache) { - var value = _ref5.value, - options = _ref5.options, - dirname = _ref5.dirname, - alias = _ref5.alias; - var pluginObj = (0, _plugins.validatePluginObject)(value); - var plugin = Object.assign({}, pluginObj); +const instantiatePlugin = (0, _caching.makeWeakCache)(({ + value, + options, + dirname, + alias +}, cache) => { + const pluginObj = (0, _plugins.validatePluginObject)(value); + const plugin = Object.assign({}, pluginObj); if (plugin.visitor) { plugin.visitor = _traverse().default.explode(Object.assign({}, plugin.visitor)); } if (plugin.inherits) { - var inheritsDescriptor = { + const inheritsDescriptor = { name: undefined, - alias: alias + "$inherits", + alias: `${alias}$inherits`, value: plugin.inherits, - options: options, - dirname: dirname + options, + dirname }; - var inherits = cache.invalidate(function (data) { - return loadPluginDescriptor(inheritsDescriptor, data); - }); + const inherits = cache.invalidate(data => loadPluginDescriptor(inheritsDescriptor, data)); plugin.pre = chain(inherits.pre, plugin.pre); plugin.post = chain(inherits.post, plugin.post); plugin.manipulateOptions = chain(inherits.manipulateOptions, plugin.manipulateOptions); @@ -239,42 +231,27 @@ var instantiatePlugin = (0, _caching.makeWeakCache)(function (_ref5, cache) { return new _plugin.default(plugin, options, alias); }); -var loadPresetDescriptor = function loadPresetDescriptor(descriptor, context) { +const loadPresetDescriptor = (descriptor, context) => { return (0, _configChain.buildPresetChain)(instantiatePreset(loadDescriptor(descriptor, context)), context); }; -var instantiatePreset = (0, _caching.makeWeakCache)(function (_ref6) { - var value = _ref6.value, - dirname = _ref6.dirname, - alias = _ref6.alias; +const instantiatePreset = (0, _caching.makeWeakCache)(({ + value, + dirname, + alias +}) => { return { options: (0, _options.validate)("preset", value), - alias: alias, - dirname: dirname + alias, + dirname }; }); function chain(a, b) { - var fns = [a, b].filter(Boolean); + const fns = [a, b].filter(Boolean); if (fns.length <= 1) return fns[0]; - return function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - for (var _iterator2 = fns, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref7; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref7 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref7 = _i2.value; - } - - var fn = _ref7; + return function (...args) { + for (const fn of fns) { fn.apply(this, args); } }; diff --git a/node_modules/@babel/core/lib/config/helpers/config-api.js b/node_modules/@babel/core/lib/config/helpers/config-api.js index 22a4b00..b988c05 100644 --- a/node_modules/@babel/core/lib/config/helpers/config-api.js +++ b/node_modules/@babel/core/lib/config/helpers/config-api.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.default = makeAPI; function _semver() { - var data = _interopRequireDefault(require("semver")); + const data = _interopRequireDefault(require("semver")); - _semver = function _semver() { + _semver = function () { return data; }; @@ -17,32 +17,38 @@ function _semver() { var _ = require("../../"); +var _caching = require("../caching"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function makeAPI(cache) { - var env = function env(value) { - return cache.using(function (data) { - if (typeof value === "undefined") return data.envName; - if (typeof value === "function") return value(data.envName); - if (!Array.isArray(value)) value = [value]; - return value.some(function (entry) { - if (typeof entry !== "string") { - throw new Error("Unexpected non-string value"); - } + const env = value => cache.using(data => { + if (typeof value === "undefined") return data.envName; - return entry === data.envName; - }); + if (typeof value === "function") { + return (0, _caching.assertSimpleType)(value(data.envName)); + } + + if (!Array.isArray(value)) value = [value]; + return value.some(entry => { + if (typeof entry !== "string") { + throw new Error("Unexpected non-string value"); + } + + return entry === data.envName; }); - }; + }); + + const caller = cb => cache.using(data => (0, _caching.assertSimpleType)(cb(data.caller))); return { version: _.version, cache: cache.simple(), - env: env, - async: function async() { - return false; - }, - assertVersion: assertVersion + env, + async: () => false, + caller, + assertVersion, + tokTypes: undefined }; } @@ -52,7 +58,7 @@ function assertVersion(range) { throw new Error("Expected string or integer value."); } - range = "^" + range + ".0.0-0"; + range = `^${range}.0.0-0`; } if (typeof range !== "string") { @@ -60,13 +66,13 @@ function assertVersion(range) { } if (_semver().default.satisfies(_.version, range)) return; - var limit = Error.stackTraceLimit; + const limit = Error.stackTraceLimit; if (typeof limit === "number" && limit < 25) { Error.stackTraceLimit = 25; } - var err = new Error("Requires Babel \"" + range + "\", but was loaded with \"" + _.version + "\". " + "If you are sure you have a compatible version of @babel/core, " + "it is likely that something in your build process is loading the " + "wrong version. Inspect the stack trace of this error to look for " + "the first entry that doesn't mention \"@babel/core\" or \"babel-core\" " + "to see what is calling Babel."); + const err = new Error(`Requires Babel "${range}", but was loaded with "${_.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`); if (typeof limit === "number") { Error.stackTraceLimit = limit; @@ -75,6 +81,6 @@ function assertVersion(range) { throw Object.assign(err, { code: "BABEL_VERSION_UNSUPPORTED", version: _.version, - range: range + range }); } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/environment.js b/node_modules/@babel/core/lib/config/helpers/environment.js index fa186d3..e4bfdbc 100644 --- a/node_modules/@babel/core/lib/config/helpers/environment.js +++ b/node_modules/@babel/core/lib/config/helpers/environment.js @@ -5,10 +5,6 @@ Object.defineProperty(exports, "__esModule", { }); exports.getEnv = getEnv; -function getEnv(defaultValue) { - if (defaultValue === void 0) { - defaultValue = "development"; - } - +function getEnv(defaultValue = "development") { return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue; } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/index.js b/node_modules/@babel/core/lib/config/index.js index 0f42c9c..65127b2 100644 --- a/node_modules/@babel/core/lib/config/index.js +++ b/node_modules/@babel/core/lib/config/index.js @@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", { exports.loadOptions = loadOptions; Object.defineProperty(exports, "default", { enumerable: true, - get: function get() { + get: function () { return _full.default; } }); Object.defineProperty(exports, "loadPartialConfig", { enumerable: true, - get: function get() { + get: function () { return _partial.loadPartialConfig; } }); -exports.OptionManager = void 0; var _full = _interopRequireDefault(require("./full")); @@ -25,20 +24,6 @@ var _partial = require("./partial"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function loadOptions(opts) { - var config = (0, _full.default)(opts); + const config = (0, _full.default)(opts); return config ? config.options : null; -} - -var OptionManager = function () { - function OptionManager() {} - - var _proto = OptionManager.prototype; - - _proto.init = function init(opts) { - return loadOptions(opts); - }; - - return OptionManager; -}(); - -exports.OptionManager = OptionManager; \ No newline at end of file +} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/item.js b/node_modules/@babel/core/lib/config/item.js index 59f1e5c..11f25ac 100644 --- a/node_modules/@babel/core/lib/config/item.js +++ b/node_modules/@babel/core/lib/config/item.js @@ -8,9 +8,9 @@ exports.createConfigItem = createConfigItem; exports.getItemDescriptor = getItemDescriptor; function _path() { - var data = _interopRequireDefault(require("path")); + const data = _interopRequireDefault(require("path")); - _path = function _path() { + _path = function () { return data; }; @@ -25,14 +25,12 @@ function createItemFromDescriptor(desc) { return new ConfigItem(desc); } -function createConfigItem(value, _temp) { - var _ref = _temp === void 0 ? {} : _temp, - _ref$dirname = _ref.dirname, - dirname = _ref$dirname === void 0 ? "." : _ref$dirname, - type = _ref.type; - - var descriptor = (0, _configDescriptors.createDescriptor)(value, _path().default.resolve(dirname), { - type: type, +function createConfigItem(value, { + dirname = ".", + type +} = {}) { + const descriptor = (0, _configDescriptors.createDescriptor)(value, _path().default.resolve(dirname), { + type, alias: "programmatic item" }); return createItemFromDescriptor(descriptor); @@ -46,25 +44,23 @@ function getItemDescriptor(item) { return undefined; } -var ConfigItem = function ConfigItem(descriptor) { - this._descriptor = descriptor; - Object.defineProperty(this, "_descriptor", { - enumerable: false - }); - - if (this._descriptor.options === false) { - throw new Error("Assertion failure - unexpected false options"); +class ConfigItem { + constructor(descriptor) { + this._descriptor = descriptor; + Object.defineProperty(this, "_descriptor", { + enumerable: false + }); + this.value = this._descriptor.value; + this.options = this._descriptor.options; + this.dirname = this._descriptor.dirname; + this.name = this._descriptor.name; + this.file = this._descriptor.file ? { + request: this._descriptor.file.request, + resolved: this._descriptor.file.resolved + } : undefined; + Object.freeze(this); } - this.value = this._descriptor.value; - this.options = this._descriptor.options; - this.dirname = this._descriptor.dirname; - this.name = this._descriptor.name; - this.file = this._descriptor.file ? { - request: this._descriptor.file.request, - resolved: this._descriptor.file.resolved - } : undefined; - Object.freeze(this); -}; +} Object.freeze(ConfigItem.prototype); \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/partial.js b/node_modules/@babel/core/lib/config/partial.js index 5133ca6..050ad98 100644 --- a/node_modules/@babel/core/lib/config/partial.js +++ b/node_modules/@babel/core/lib/config/partial.js @@ -7,9 +7,9 @@ exports.default = loadPrivatePartialConfig; exports.loadPartialConfig = loadPartialConfig; function _path() { - var data = _interopRequireDefault(require("path")); + const data = _interopRequireDefault(require("path")); - _path = function _path() { + _path = function () { return data; }; @@ -28,45 +28,78 @@ var _environment = require("./helpers/environment"); var _options = require("./validation/options"); +var _files = require("./files"); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function resolveRootMode(rootDir, rootMode) { + switch (rootMode) { + case "root": + return rootDir; + + case "upward-optional": + { + const upwardRootDir = (0, _files.findConfigUpwards)(rootDir); + return upwardRootDir === null ? rootDir : upwardRootDir; + } + + case "upward": + { + const upwardRootDir = (0, _files.findConfigUpwards)(rootDir); + if (upwardRootDir !== null) return upwardRootDir; + throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}"`), { + code: "BABEL_ROOT_NOT_FOUND", + dirname: rootDir + }); + } + + default: + throw new Error(`Assertion failure - unknown rootMode value`); + } +} + function loadPrivatePartialConfig(inputOpts) { if (inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts))) { throw new Error("Babel options must be an object, null, or undefined"); } - var args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {}; - var _args$envName = args.envName, - envName = _args$envName === void 0 ? (0, _environment.getEnv)() : _args$envName, - _args$cwd = args.cwd, - cwd = _args$cwd === void 0 ? "." : _args$cwd; + const args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {}; + const { + envName = (0, _environment.getEnv)(), + cwd = ".", + root: rootDir = ".", + rootMode = "root", + caller + } = args; - var absoluteCwd = _path().default.resolve(cwd); + const absoluteCwd = _path().default.resolve(cwd); - var context = { - filename: args.filename ? _path().default.resolve(cwd, args.filename) : null, + const absoluteRootDir = resolveRootMode(_path().default.resolve(absoluteCwd, rootDir), rootMode); + const context = { + filename: typeof args.filename === "string" ? _path().default.resolve(cwd, args.filename) : undefined, cwd: absoluteCwd, - envName: envName + root: absoluteRootDir, + envName, + caller }; - var configChain = (0, _configChain.buildRootChain)(args, context); + const configChain = (0, _configChain.buildRootChain)(args, context); if (!configChain) return null; - var options = {}; - configChain.options.forEach(function (opts) { + const options = {}; + configChain.options.forEach(opts => { (0, _util.mergeOptions)(options, opts); }); options.babelrc = false; - options.envName = envName; - options.cwd = absoluteCwd; + options.configFile = false; options.passPerPreset = false; - options.plugins = configChain.plugins.map(function (descriptor) { - return (0, _item.createItemFromDescriptor)(descriptor); - }); - options.presets = configChain.presets.map(function (descriptor) { - return (0, _item.createItemFromDescriptor)(descriptor); - }); + options.envName = context.envName; + options.cwd = context.cwd; + options.root = context.root; + options.filename = typeof context.filename === "string" ? context.filename : undefined; + options.plugins = configChain.plugins.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor)); + options.presets = configChain.presets.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor)); return { - options: options, - context: context, + options, + context, ignore: configChain.ignore, babelrc: configChain.babelrc, config: configChain.config @@ -74,13 +107,15 @@ function loadPrivatePartialConfig(inputOpts) { } function loadPartialConfig(inputOpts) { - var result = loadPrivatePartialConfig(inputOpts); + const result = loadPrivatePartialConfig(inputOpts); if (!result) return null; - var options = result.options, - babelrc = result.babelrc, - ignore = result.ignore, - config = result.config; - (options.plugins || []).forEach(function (item) { + const { + options, + babelrc, + ignore, + config + } = result; + (options.plugins || []).forEach(item => { if (item.value instanceof _plugin.default) { throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()"); } @@ -88,8 +123,8 @@ function loadPartialConfig(inputOpts) { return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined); } -var PartialConfig = function () { - function PartialConfig(options, babelrc, ignore, config) { +class PartialConfig { + constructor(options, babelrc, ignore, config) { this.options = options; this.babelignore = ignore; this.babelrc = babelrc; @@ -97,13 +132,10 @@ var PartialConfig = function () { Object.freeze(this); } - var _proto = PartialConfig.prototype; - - _proto.hasFilesystemConfig = function hasFilesystemConfig() { + hasFilesystemConfig() { return this.babelrc !== undefined || this.config !== undefined; - }; + } - return PartialConfig; -}(); +} Object.freeze(PartialConfig.prototype); \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/pattern-to-regex.js b/node_modules/@babel/core/lib/config/pattern-to-regex.js new file mode 100644 index 0000000..b80f4b6 --- /dev/null +++ b/node_modules/@babel/core/lib/config/pattern-to-regex.js @@ -0,0 +1,52 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = pathToPattern; + +function _path() { + const data = _interopRequireDefault(require("path")); + + _path = function () { + return data; + }; + + return data; +} + +function _escapeRegExp() { + const data = _interopRequireDefault(require("lodash/escapeRegExp")); + + _escapeRegExp = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const sep = `\\${_path().default.sep}`; +const endSep = `(?:${sep}|$)`; +const substitution = `[^${sep}]+`; +const starPat = `(?:${substitution}${sep})`; +const starPatLast = `(?:${substitution}${endSep})`; +const starStarPat = `${starPat}*?`; +const starStarPatLast = `${starPat}*?${starPatLast}?`; + +function pathToPattern(pattern, dirname) { + const parts = _path().default.resolve(dirname, pattern).split(_path().default.sep); + + return new RegExp(["^", ...parts.map((part, i) => { + const last = i === parts.length - 1; + if (part === "**") return last ? starStarPatLast : starStarPat; + if (part === "*") return last ? starPatLast : starPat; + + if (part.indexOf("*.") === 0) { + return substitution + (0, _escapeRegExp().default)(part.slice(1)) + (last ? endSep : sep); + } + + return (0, _escapeRegExp().default)(part) + (last ? endSep : sep); + })].join("")); +} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/plugin.js b/node_modules/@babel/core/lib/config/plugin.js index 6f0d0ad..3c78070 100644 --- a/node_modules/@babel/core/lib/config/plugin.js +++ b/node_modules/@babel/core/lib/config/plugin.js @@ -5,15 +5,18 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -var Plugin = function Plugin(plugin, options, key) { - this.key = plugin.name || key; - this.manipulateOptions = plugin.manipulateOptions; - this.post = plugin.post; - this.pre = plugin.pre; - this.visitor = plugin.visitor || {}; - this.parserOverride = plugin.parserOverride; - this.generatorOverride = plugin.generatorOverride; - this.options = options; -}; +class Plugin { + constructor(plugin, options, key) { + this.key = plugin.name || key; + this.manipulateOptions = plugin.manipulateOptions; + this.post = plugin.post; + this.pre = plugin.pre; + this.visitor = plugin.visitor || {}; + this.parserOverride = plugin.parserOverride; + this.generatorOverride = plugin.generatorOverride; + this.options = options; + } + +} exports.default = Plugin; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/util.js b/node_modules/@babel/core/lib/config/util.js index 966be40..40e3b0b 100644 --- a/node_modules/@babel/core/lib/config/util.js +++ b/node_modules/@babel/core/lib/config/util.js @@ -6,34 +6,25 @@ Object.defineProperty(exports, "__esModule", { exports.mergeOptions = mergeOptions; function mergeOptions(target, source) { - var _arr = Object.keys(source); - - for (var _i = 0; _i < _arr.length; _i++) { - var k = _arr[_i]; - + for (const k of Object.keys(source)) { if (k === "parserOpts" && source.parserOpts) { - var parserOpts = source.parserOpts; - var targetObj = target.parserOpts = target.parserOpts || {}; + const parserOpts = source.parserOpts; + const targetObj = target.parserOpts = target.parserOpts || {}; mergeDefaultFields(targetObj, parserOpts); } else if (k === "generatorOpts" && source.generatorOpts) { - var generatorOpts = source.generatorOpts; - - var _targetObj = target.generatorOpts = target.generatorOpts || {}; - - mergeDefaultFields(_targetObj, generatorOpts); + const generatorOpts = source.generatorOpts; + const targetObj = target.generatorOpts = target.generatorOpts || {}; + mergeDefaultFields(targetObj, generatorOpts); } else { - var val = source[k]; + const val = source[k]; if (val !== undefined) target[k] = val; } } } function mergeDefaultFields(target, source) { - var _arr2 = Object.keys(source); - - for (var _i2 = 0; _i2 < _arr2.length; _i2++) { - var k = _arr2[_i2]; - var val = source[k]; + for (const k of Object.keys(source)) { + const val = source[k]; if (val !== undefined) target[k] = val; } } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/option-assertions.js b/node_modules/@babel/core/lib/config/validation/option-assertions.js index 4bed019..60d6225 100644 --- a/node_modules/@babel/core/lib/config/validation/option-assertions.js +++ b/node_modules/@babel/core/lib/config/validation/option-assertions.js @@ -3,9 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); +exports.msg = msg; +exports.access = access; +exports.assertRootMode = assertRootMode; exports.assertSourceMaps = assertSourceMaps; exports.assertCompact = assertCompact; exports.assertSourceType = assertSourceType; +exports.assertCallerMetadata = assertCallerMetadata; exports.assertInputSourceMap = assertInputSourceMap; exports.assertString = assertString; exports.assertFunction = assertFunction; @@ -18,109 +22,166 @@ exports.assertConfigFileSearch = assertConfigFileSearch; exports.assertBabelrcSearch = assertBabelrcSearch; exports.assertPluginList = assertPluginList; -function assertSourceMaps(key, value) { +function msg(loc) { + switch (loc.type) { + case "root": + return ``; + + case "env": + return `${msg(loc.parent)}.env["${loc.name}"]`; + + case "overrides": + return `${msg(loc.parent)}.overrides[${loc.index}]`; + + case "option": + return `${msg(loc.parent)}.${loc.name}`; + + case "access": + return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`; + + default: + throw new Error(`Assertion failure: Unknown type ${loc.type}`); + } +} + +function access(loc, name) { + return { + type: "access", + name, + parent: loc + }; +} + +function assertRootMode(loc, value) { + if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") { + throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`); + } + + return value; +} + +function assertSourceMaps(loc, value) { if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") { - throw new Error("." + key + " must be a boolean, \"inline\", \"both\", or undefined"); + throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`); } return value; } -function assertCompact(key, value) { +function assertCompact(loc, value) { if (value !== undefined && typeof value !== "boolean" && value !== "auto") { - throw new Error("." + key + " must be a boolean, \"auto\", or undefined"); + throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`); } return value; } -function assertSourceType(key, value) { +function assertSourceType(loc, value) { if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") { - throw new Error("." + key + " must be \"module\", \"script\", \"unambiguous\", or undefined"); + throw new Error(`${msg(loc)} must be "module", "script", "unambiguous", or undefined`); } return value; } -function assertInputSourceMap(key, value) { +function assertCallerMetadata(loc, value) { + const obj = assertObject(loc, value); + + if (obj) { + if (typeof obj["name"] !== "string") { + throw new Error(`${msg(loc)} set but does not contain "name" property string`); + } + + for (const prop of Object.keys(obj)) { + const propLoc = access(loc, prop); + const value = obj[prop]; + + if (value != null && typeof value !== "boolean" && typeof value !== "string" && typeof value !== "number") { + throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`); + } + } + } + + return value; +} + +function assertInputSourceMap(loc, value) { if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) { - throw new Error(".inputSourceMap must be a boolean, object, or undefined"); + throw new Error(`${msg(loc)} must be a boolean, object, or undefined`); } return value; } -function assertString(key, value) { +function assertString(loc, value) { if (value !== undefined && typeof value !== "string") { - throw new Error("." + key + " must be a string, or undefined"); + throw new Error(`${msg(loc)} must be a string, or undefined`); } return value; } -function assertFunction(key, value) { +function assertFunction(loc, value) { if (value !== undefined && typeof value !== "function") { - throw new Error("." + key + " must be a function, or undefined"); + throw new Error(`${msg(loc)} must be a function, or undefined`); } return value; } -function assertBoolean(key, value) { +function assertBoolean(loc, value) { if (value !== undefined && typeof value !== "boolean") { - throw new Error("." + key + " must be a boolean, or undefined"); + throw new Error(`${msg(loc)} must be a boolean, or undefined`); } return value; } -function assertObject(key, value) { +function assertObject(loc, value) { if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) { - throw new Error("." + key + " must be an object, or undefined"); + throw new Error(`${msg(loc)} must be an object, or undefined`); } return value; } -function assertArray(key, value) { +function assertArray(loc, value) { if (value != null && !Array.isArray(value)) { - throw new Error("." + key + " must be an array, or undefined"); + throw new Error(`${msg(loc)} must be an array, or undefined`); } return value; } -function assertIgnoreList(key, value) { - var arr = assertArray(key, value); +function assertIgnoreList(loc, value) { + const arr = assertArray(loc, value); if (arr) { - arr.forEach(function (item, i) { - return assertIgnoreItem(key, i, item); - }); + arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item)); } return arr; } -function assertIgnoreItem(key, index, value) { +function assertIgnoreItem(loc, value) { if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) { - throw new Error("." + key + "[" + index + "] must be an array of string/Funtion/RegExp values, or undefined"); + throw new Error(`${msg(loc)} must be an array of string/Funtion/RegExp values, or undefined`); } return value; } -function assertConfigApplicableTest(key, value) { +function assertConfigApplicableTest(loc, value) { if (value === undefined) return value; if (Array.isArray(value)) { - value.forEach(function (item, i) { + value.forEach((item, i) => { if (!checkValidTest(item)) { - throw new Error("." + key + "[" + i + "] must be a string/Function/RegExp."); + throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`); } }); } else if (!checkValidTest(value)) { - throw new Error("." + key + " must be a string/Function/RegExp, or an array of those"); + throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`); } return value; @@ -130,79 +191,77 @@ function checkValidTest(value) { return typeof value === "string" || typeof value === "function" || value instanceof RegExp; } -function assertConfigFileSearch(key, value) { +function assertConfigFileSearch(loc, value) { if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") { - throw new Error("." + key + " must be a undefined, a boolean, a string, " + ("got " + JSON.stringify(value))); + throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`); } return value; } -function assertBabelrcSearch(key, value) { +function assertBabelrcSearch(loc, value) { if (value === undefined || typeof value === "boolean") return value; if (Array.isArray(value)) { - value.forEach(function (item, i) { - if (typeof item !== "string") { - throw new Error("." + key + "[" + i + "] must be a string."); + value.forEach((item, i) => { + if (!checkValidTest(item)) { + throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`); } }); - } else if (typeof value !== "string") { - throw new Error("." + key + " must be a undefined, a boolean, a string, " + ("or an array of strings, got " + JSON.stringify(value))); + } else if (!checkValidTest(value)) { + throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` + `or an array of those, got ${JSON.stringify(value)}`); } return value; } -function assertPluginList(key, value) { - var arr = assertArray(key, value); +function assertPluginList(loc, value) { + const arr = assertArray(loc, value); if (arr) { - arr.forEach(function (item, i) { - return assertPluginItem(key, i, item); - }); + arr.forEach((item, i) => assertPluginItem(access(loc, i), item)); } return arr; } -function assertPluginItem(key, index, value) { +function assertPluginItem(loc, value) { if (Array.isArray(value)) { if (value.length === 0) { - throw new Error("." + key + "[" + index + "] must include an object"); + throw new Error(`${msg(loc)} must include an object`); } if (value.length > 3) { - throw new Error("." + key + "[" + index + "] may only be a two-tuple or three-tuple"); + throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`); } - assertPluginTarget(key, index, true, value[0]); + assertPluginTarget(access(loc, 0), value[0]); if (value.length > 1) { - var opts = value[1]; + const opts = value[1]; if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts))) { - throw new Error("." + key + "[" + index + "][1] must be an object, false, or undefined"); + throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`); } } if (value.length === 3) { - var name = value[2]; + const name = value[2]; if (name !== undefined && typeof name !== "string") { - throw new Error("." + key + "[" + index + "][2] must be a string, or undefined"); + throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`); } } } else { - assertPluginTarget(key, index, false, value); + assertPluginTarget(loc, value); } return value; } -function assertPluginTarget(key, index, inArray, value) { +function assertPluginTarget(loc, value) { if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") { - throw new Error("." + key + "[" + index + "]" + (inArray ? "[0]" : "") + " must be a string, object, function"); + throw new Error(`${msg(loc)} must be a string, object, function`); } return value; diff --git a/node_modules/@babel/core/lib/config/validation/options.js b/node_modules/@babel/core/lib/config/validation/options.js index d3b59ed..0c06acf 100644 --- a/node_modules/@babel/core/lib/config/validation/options.js +++ b/node_modules/@babel/core/lib/config/validation/options.js @@ -13,33 +13,37 @@ var _optionAssertions = require("./option-assertions"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var ROOT_VALIDATORS = { +const ROOT_VALIDATORS = { cwd: _optionAssertions.assertString, root: _optionAssertions.assertString, + rootMode: _optionAssertions.assertRootMode, configFile: _optionAssertions.assertConfigFileSearch, + caller: _optionAssertions.assertCallerMetadata, filename: _optionAssertions.assertString, filenameRelative: _optionAssertions.assertString, - babelrc: _optionAssertions.assertBoolean, - babelrcRoots: _optionAssertions.assertBabelrcSearch, code: _optionAssertions.assertBoolean, ast: _optionAssertions.assertBoolean, envName: _optionAssertions.assertString }; -var NONPRESET_VALIDATORS = { - extends: _optionAssertions.assertString, - env: assertEnvSet, - ignore: _optionAssertions.assertIgnoreList, - only: _optionAssertions.assertIgnoreList, - overrides: assertOverridesList, - test: _optionAssertions.assertConfigApplicableTest, - include: _optionAssertions.assertConfigApplicableTest, - exclude: _optionAssertions.assertConfigApplicableTest +const BABELRC_VALIDATORS = { + babelrc: _optionAssertions.assertBoolean, + babelrcRoots: _optionAssertions.assertBabelrcSearch }; -var COMMON_VALIDATORS = { +const NONPRESET_VALIDATORS = { + extends: _optionAssertions.assertString, + ignore: _optionAssertions.assertIgnoreList, + only: _optionAssertions.assertIgnoreList +}; +const COMMON_VALIDATORS = { inputSourceMap: _optionAssertions.assertInputSourceMap, presets: _optionAssertions.assertPluginList, plugins: _optionAssertions.assertPluginList, passPerPreset: _optionAssertions.assertBoolean, + env: assertEnvSet, + overrides: assertOverridesList, + test: _optionAssertions.assertConfigApplicableTest, + include: _optionAssertions.assertConfigApplicableTest, + exclude: _optionAssertions.assertConfigApplicableTest, retainLines: _optionAssertions.assertBoolean, comments: _optionAssertions.assertBoolean, shouldPrintComment: _optionAssertions.assertFunction, @@ -62,44 +66,60 @@ var COMMON_VALIDATORS = { generatorOpts: _optionAssertions.assertObject }; +function getSource(loc) { + return loc.type === "root" ? loc.source : getSource(loc.parent); +} + function validate(type, opts) { + return validateNested({ + type: "root", + source: type + }, opts); +} + +function validateNested(loc, opts) { + const type = getSource(loc); assertNoDuplicateSourcemap(opts); - Object.keys(opts).forEach(function (key) { + Object.keys(opts).forEach(key => { + const optLoc = { + type: "option", + name: key, + parent: loc + }; + if (type === "preset" && NONPRESET_VALIDATORS[key]) { - throw new Error("." + key + " is not allowed in preset options"); + throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`); } if (type !== "arguments" && ROOT_VALIDATORS[key]) { - throw new Error("." + key + " is only allowed in root programmatic options"); + throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`); } - if (type === "env" && key === "env") { - throw new Error("." + key + " is not allowed inside another env block"); + if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) { + if (type === "babelrcfile" || type === "extendsfile") { + throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, ` + `or babel.config.js/config file options`); + } + + throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`); } - if (type === "env" && key === "overrides") { - throw new Error("." + key + " is not allowed inside an env block"); - } - - if (type === "override" && key === "overrides") { - throw new Error("." + key + " is not allowed inside an overrides block"); - } - - var validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || ROOT_VALIDATORS[key]; - if (validator) validator(key, opts[key]);else throw buildUnknownError(key); + const validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError; + validator(optLoc, opts[key]); }); return opts; } -function buildUnknownError(key) { +function throwUnknownError(loc) { + const key = loc.name; + if (_removed.default[key]) { - var _removed$key = _removed.default[key], - message = _removed$key.message, - _removed$key$version = _removed$key.version, - version = _removed$key$version === void 0 ? 5 : _removed$key$version; - throw new ReferenceError("Using removed Babel " + version + " option: ." + key + " - " + message); + const { + message, + version = 5 + } = _removed.default[key]; + throw new ReferenceError(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`); } else { - var unknownOptErr = "Unknown option: ." + key + ". Check out http://babeljs.io/docs/usage/options/ for more information about options."; + const unknownOptErr = `Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`; throw new ReferenceError(unknownOptErr); } } @@ -114,48 +134,53 @@ function assertNoDuplicateSourcemap(opts) { } } -function assertEnvSet(key, value) { - var obj = (0, _optionAssertions.assertObject)(key, value); +function assertEnvSet(loc, value) { + if (loc.parent.type === "env") { + throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside of another .env block`); + } + + const parent = loc.parent; + const obj = (0, _optionAssertions.assertObject)(loc, value); if (obj) { - var _arr = Object.keys(obj); - - for (var _i = 0; _i < _arr.length; _i++) { - var _key = _arr[_i]; - - var _env = (0, _optionAssertions.assertObject)(_key, obj[_key]); - - if (_env) validate("env", _env); + for (const envName of Object.keys(obj)) { + const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]); + if (!env) continue; + const envLoc = { + type: "env", + name: envName, + parent + }; + validateNested(envLoc, env); } } return obj; } -function assertOverridesList(key, value) { - var arr = (0, _optionAssertions.assertArray)(key, value); +function assertOverridesList(loc, value) { + if (loc.parent.type === "env") { + throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .env block`); + } + + if (loc.parent.type === "overrides") { + throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .overrides block`); + } + + const parent = loc.parent; + const arr = (0, _optionAssertions.assertArray)(loc, value); if (arr) { - for (var _iterator = arr.entries(), _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i2 >= _iterator.length) break; - _ref = _iterator[_i2++]; - } else { - _i2 = _iterator.next(); - if (_i2.done) break; - _ref = _i2.value; - } - - var _ref2 = _ref, - index = _ref2[0], - item = _ref2[1]; - - var _env2 = (0, _optionAssertions.assertObject)("" + index, item); - - if (!_env2) throw new Error("." + key + "[" + index + "] must be an object"); - validate("override", _env2); + for (const [index, item] of arr.entries()) { + const objLoc = (0, _optionAssertions.access)(loc, index); + const env = (0, _optionAssertions.assertObject)(objLoc, item); + if (!env) throw new Error(`${(0, _optionAssertions.msg)(objLoc)} must be an object`); + const overridesLoc = { + type: "overrides", + index, + parent + }; + validateNested(overridesLoc, env); } } diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js b/node_modules/@babel/core/lib/config/validation/plugins.js index dac27c0..73b498c 100644 --- a/node_modules/@babel/core/lib/config/validation/plugins.js +++ b/node_modules/@babel/core/lib/config/validation/plugins.js @@ -7,7 +7,7 @@ exports.validatePluginObject = validatePluginObject; var _optionAssertions = require("./option-assertions"); -var VALIDATORS = { +const VALIDATORS = { name: _optionAssertions.assertString, manipulateOptions: _optionAssertions.assertFunction, pre: _optionAssertions.assertFunction, @@ -19,15 +19,13 @@ var VALIDATORS = { }; function assertVisitorMap(key, value) { - var obj = (0, _optionAssertions.assertObject)(key, value); + const obj = (0, _optionAssertions.assertObject)(key, value); if (obj) { - Object.keys(obj).forEach(function (prop) { - return assertVisitorHandler(prop, obj[prop]); - }); + Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop])); if (obj.enter || obj.exit) { - throw new Error("." + key + " cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes."); + throw new Error(`.${key} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`); } } @@ -36,22 +34,22 @@ function assertVisitorMap(key, value) { function assertVisitorHandler(key, value) { if (value && typeof value === "object") { - Object.keys(value).forEach(function (handler) { + Object.keys(value).forEach(handler => { if (handler !== "enter" && handler !== "exit") { - throw new Error(".visitor[\"" + key + "\"] may only have .enter and/or .exit handlers."); + throw new Error(`.visitor["${key}"] may only have .enter and/or .exit handlers.`); } }); } else if (typeof value !== "function") { - throw new Error(".visitor[\"" + key + "\"] must be a function"); + throw new Error(`.visitor["${key}"] must be a function`); } return value; } function validatePluginObject(obj) { - Object.keys(obj).forEach(function (key) { - var validator = VALIDATORS[key]; - if (validator) validator(key, obj[key]);else throw new Error("." + key + " is not a valid Plugin property"); + Object.keys(obj).forEach(key => { + const validator = VALIDATORS[key]; + if (validator) validator(key, obj[key]);else throw new Error(`.${key} is not a valid Plugin property`); }); return obj; } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/index.js b/node_modules/@babel/core/lib/index.js index 88b683d..aa0b43e 100644 --- a/node_modules/@babel/core/lib/index.js +++ b/node_modules/@babel/core/lib/index.js @@ -6,119 +6,149 @@ Object.defineProperty(exports, "__esModule", { exports.Plugin = Plugin; Object.defineProperty(exports, "File", { enumerable: true, - get: function get() { + get: function () { return _file.default; } }); Object.defineProperty(exports, "buildExternalHelpers", { enumerable: true, - get: function get() { + get: function () { return _buildExternalHelpers.default; } }); Object.defineProperty(exports, "resolvePlugin", { enumerable: true, - get: function get() { + get: function () { return _files.resolvePlugin; } }); Object.defineProperty(exports, "resolvePreset", { enumerable: true, - get: function get() { + get: function () { return _files.resolvePreset; } }); Object.defineProperty(exports, "version", { enumerable: true, - get: function get() { + get: function () { return _package.version; } }); Object.defineProperty(exports, "getEnv", { enumerable: true, - get: function get() { + get: function () { return _environment.getEnv; } }); +Object.defineProperty(exports, "tokTypes", { + enumerable: true, + get: function () { + return _parser().tokTypes; + } +}); Object.defineProperty(exports, "traverse", { enumerable: true, - get: function get() { + get: function () { return _traverse().default; } }); Object.defineProperty(exports, "template", { enumerable: true, - get: function get() { + get: function () { return _template().default; } }); +Object.defineProperty(exports, "createConfigItem", { + enumerable: true, + get: function () { + return _item.createConfigItem; + } +}); Object.defineProperty(exports, "loadPartialConfig", { enumerable: true, - get: function get() { + get: function () { return _config.loadPartialConfig; } }); Object.defineProperty(exports, "loadOptions", { enumerable: true, - get: function get() { + get: function () { return _config.loadOptions; } }); -Object.defineProperty(exports, "OptionManager", { - enumerable: true, - get: function get() { - return _config.OptionManager; - } -}); -Object.defineProperty(exports, "createConfigItem", { - enumerable: true, - get: function get() { - return _item.createConfigItem; - } -}); Object.defineProperty(exports, "transform", { enumerable: true, - get: function get() { - return _transform.default; + get: function () { + return _transform.transform; } }); Object.defineProperty(exports, "transformSync", { enumerable: true, - get: function get() { - return _transformSync.default; + get: function () { + return _transform.transformSync; + } +}); +Object.defineProperty(exports, "transformAsync", { + enumerable: true, + get: function () { + return _transform.transformAsync; } }); Object.defineProperty(exports, "transformFile", { enumerable: true, - get: function get() { - return _transformFile.default; + get: function () { + return _transformFile.transformFile; } }); Object.defineProperty(exports, "transformFileSync", { enumerable: true, - get: function get() { - return _transformFileSync.default; + get: function () { + return _transformFile.transformFileSync; + } +}); +Object.defineProperty(exports, "transformFileAsync", { + enumerable: true, + get: function () { + return _transformFile.transformFileAsync; } }); Object.defineProperty(exports, "transformFromAst", { enumerable: true, - get: function get() { - return _transformAst.default; + get: function () { + return _transformAst.transformFromAst; } }); Object.defineProperty(exports, "transformFromAstSync", { enumerable: true, - get: function get() { - return _transformAstSync.default; + get: function () { + return _transformAst.transformFromAstSync; + } +}); +Object.defineProperty(exports, "transformFromAstAsync", { + enumerable: true, + get: function () { + return _transformAst.transformFromAstAsync; } }); Object.defineProperty(exports, "parse", { enumerable: true, - get: function get() { - return _parse.default; + get: function () { + return _parse.parse; } }); -exports.types = exports.DEFAULT_EXTENSIONS = void 0; +Object.defineProperty(exports, "parseSync", { + enumerable: true, + get: function () { + return _parse.parseSync; + } +}); +Object.defineProperty(exports, "parseAsync", { + enumerable: true, + get: function () { + return _parse.parseAsync; + } +}); +exports.types = exports.OptionManager = exports.DEFAULT_EXTENSIONS = void 0; var _file = _interopRequireDefault(require("./transformation/file/file")); @@ -131,9 +161,9 @@ var _package = require("../package.json"); var _environment = require("./config/helpers/environment"); function _types() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - _types = function _types() { + _types = function () { return data; }; @@ -142,15 +172,25 @@ function _types() { Object.defineProperty(exports, "types", { enumerable: true, - get: function get() { + get: function () { return _types(); } }); -function _traverse() { - var data = _interopRequireDefault(require("@babel/traverse")); +function _parser() { + const data = require("@babel/parser"); - _traverse = function _traverse() { + _parser = function () { + return data; + }; + + return data; +} + +function _traverse() { + const data = _interopRequireDefault(require("@babel/traverse")); + + _traverse = function () { return data; }; @@ -158,40 +198,43 @@ function _traverse() { } function _template() { - var data = _interopRequireDefault(require("@babel/template")); + const data = _interopRequireDefault(require("@babel/template")); - _template = function _template() { + _template = function () { return data; }; return data; } -var _config = require("./config"); - var _item = require("./config/item"); -var _transform = _interopRequireDefault(require("./transform")); +var _config = require("./config"); -var _transformSync = _interopRequireDefault(require("./transform-sync")); +var _transform = require("./transform"); -var _transformFile = _interopRequireDefault(require("./transform-file")); +var _transformFile = require("./transform-file"); -var _transformFileSync = _interopRequireDefault(require("./transform-file-sync")); +var _transformAst = require("./transform-ast"); -var _transformAst = _interopRequireDefault(require("./transform-ast")); - -var _transformAstSync = _interopRequireDefault(require("./transform-ast-sync")); - -var _parse = _interopRequireDefault(require("./parse")); +var _parse = require("./parse"); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function Plugin(alias) { - throw new Error("The (" + alias + ") Babel 5 plugin is being run with an unsupported Babel version."); +const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs"]); +exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS; + +class OptionManager { + init(opts) { + return (0, _config.loadOptions)(opts); + } + } -var DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs"]); -exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS; \ No newline at end of file +exports.OptionManager = OptionManager; + +function Plugin(alias) { + throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`); +} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parse.js b/node_modules/@babel/core/lib/parse.js index 71b4b77..8f1bf2e 100644 --- a/node_modules/@babel/core/lib/parse.js +++ b/node_modules/@babel/core/lib/parse.js @@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = parse; +exports.parseSync = parseSync; +exports.parseAsync = parseAsync; +exports.parse = void 0; var _config = _interopRequireDefault(require("./config")); @@ -13,13 +15,51 @@ var _normalizeOpts = _interopRequireDefault(require("./transformation/normalize- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function parse(code, opts) { - var config = (0, _config.default)(opts); +const parse = function parse(code, opts, callback) { + if (typeof opts === "function") { + callback = opts; + opts = undefined; + } + + if (callback === undefined) return parseSync(code, opts); + const config = (0, _config.default)(opts); if (config === null) { return null; } - var file = (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code); - return file.ast; + const cb = callback; + process.nextTick(() => { + let ast = null; + + try { + const cfg = (0, _config.default)(opts); + if (cfg === null) return cb(null, null); + ast = (0, _normalizeFile.default)(cfg.passes, (0, _normalizeOpts.default)(cfg), code).ast; + } catch (err) { + return cb(err); + } + + cb(null, ast); + }); +}; + +exports.parse = parse; + +function parseSync(code, opts) { + const config = (0, _config.default)(opts); + + if (config === null) { + return null; + } + + return (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code).ast; +} + +function parseAsync(code, opts) { + return new Promise((res, rej) => { + parse(code, opts, (err, result) => { + if (err == null) res(result);else rej(err); + }); + }); } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/tools/build-external-helpers.js b/node_modules/@babel/core/lib/tools/build-external-helpers.js index d85daee..5e06a3b 100644 --- a/node_modules/@babel/core/lib/tools/build-external-helpers.js +++ b/node_modules/@babel/core/lib/tools/build-external-helpers.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.default = _default; function helpers() { - var data = _interopRequireWildcard(require("@babel/helpers")); + const data = _interopRequireWildcard(require("@babel/helpers")); - helpers = function helpers() { + helpers = function () { return data; }; @@ -16,9 +16,9 @@ function helpers() { } function _generator() { - var data = _interopRequireDefault(require("@babel/generator")); + const data = _interopRequireDefault(require("@babel/generator")); - _generator = function _generator() { + _generator = function () { return data; }; @@ -26,9 +26,9 @@ function _generator() { } function _template() { - var data = _interopRequireDefault(require("@babel/template")); + const data = _interopRequireDefault(require("@babel/template")); - _template = function _template() { + _template = function () { return data; }; @@ -36,49 +36,55 @@ function _template() { } function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; return data; } -var _templateObject = _taggedTemplateLiteralLoose(["\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n "]); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } -function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; } - -var buildUmdWrapper = function buildUmdWrapper(replacements) { - return (0, _template().default)(_templateObject)(replacements); -}; +const buildUmdWrapper = replacements => _template().default` + (function (root, factory) { + if (typeof define === "function" && define.amd) { + define(AMD_ARGUMENTS, factory); + } else if (typeof exports === "object") { + factory(COMMON_ARGUMENTS); + } else { + factory(BROWSER_ARGUMENTS); + } + })(UMD_ROOT, function (FACTORY_PARAMETERS) { + FACTORY_BODY + }); + `(replacements); function buildGlobal(whitelist) { - var namespace = t().identifier("babelHelpers"); - var body = []; - var container = t().functionExpression(null, [t().identifier("global")], t().blockStatement(body)); - var tree = t().program([t().expressionStatement(t().callExpression(container, [t().conditionalExpression(t().binaryExpression("===", t().unaryExpression("typeof", t().identifier("global")), t().stringLiteral("undefined")), t().identifier("self"), t().identifier("global"))]))]); + const namespace = t().identifier("babelHelpers"); + const body = []; + const container = t().functionExpression(null, [t().identifier("global")], t().blockStatement(body)); + const tree = t().program([t().expressionStatement(t().callExpression(container, [t().conditionalExpression(t().binaryExpression("===", t().unaryExpression("typeof", t().identifier("global")), t().stringLiteral("undefined")), t().identifier("self"), t().identifier("global"))]))]); body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().assignmentExpression("=", t().memberExpression(t().identifier("global"), namespace), t().objectExpression([])))])); buildHelpers(body, namespace, whitelist); return tree; } function buildModule(whitelist) { - var body = []; - var refs = buildHelpers(body, null, whitelist); - body.unshift(t().exportNamedDeclaration(null, Object.keys(refs).map(function (name) { + const body = []; + const refs = buildHelpers(body, null, whitelist); + body.unshift(t().exportNamedDeclaration(null, Object.keys(refs).map(name => { return t().exportSpecifier(t().cloneNode(refs[name]), t().identifier(name)); }))); return t().program(body, [], "module"); } function buildUmd(whitelist) { - var namespace = t().identifier("babelHelpers"); - var body = []; + const namespace = t().identifier("babelHelpers"); + const body = []; body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().identifier("global"))])); buildHelpers(body, namespace, whitelist); return t().program([buildUmdWrapper({ @@ -92,40 +98,35 @@ function buildUmd(whitelist) { } function buildVar(whitelist) { - var namespace = t().identifier("babelHelpers"); - var body = []; + const namespace = t().identifier("babelHelpers"); + const body = []; body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().objectExpression([]))])); - var tree = t().program(body); + const tree = t().program(body); buildHelpers(body, namespace, whitelist); body.push(t().expressionStatement(namespace)); return tree; } function buildHelpers(body, namespace, whitelist) { - var getHelperReference = function getHelperReference(name) { - return namespace ? t().memberExpression(namespace, t().identifier(name)) : t().identifier("_" + name); + const getHelperReference = name => { + return namespace ? t().memberExpression(namespace, t().identifier(name)) : t().identifier(`_${name}`); }; - var refs = {}; + const refs = {}; helpers().list.forEach(function (name) { if (whitelist && whitelist.indexOf(name) < 0) return; - var ref = refs[name] = getHelperReference(name); - - var _helpers$get = helpers().get(name, getHelperReference, ref), - nodes = _helpers$get.nodes; - - body.push.apply(body, nodes); + const ref = refs[name] = getHelperReference(name); + const { + nodes + } = helpers().get(name, getHelperReference, ref); + body.push(...nodes); }); return refs; } -function _default(whitelist, outputType) { - if (outputType === void 0) { - outputType = "global"; - } - - var tree; - var build = { +function _default(whitelist, outputType = "global") { + let tree; + const build = { global: buildGlobal, module: buildModule, umd: buildUmd, @@ -135,7 +136,7 @@ function _default(whitelist, outputType) { if (build) { tree = build(whitelist); } else { - throw new Error("Unsupported output type " + outputType); + throw new Error(`Unsupported output type ${outputType}`); } return (0, _generator().default)(tree).code; diff --git a/node_modules/@babel/core/lib/transform-ast-sync.js b/node_modules/@babel/core/lib/transform-ast-sync.js deleted file mode 100644 index 798d0cf..0000000 --- a/node_modules/@babel/core/lib/transform-ast-sync.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = transformFromAstSync; - -var _config = _interopRequireDefault(require("./config")); - -var _transformation = require("./transformation"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function transformFromAstSync(ast, code, opts) { - var config = (0, _config.default)(opts); - if (config === null) return null; - if (!ast) throw new Error("No AST given"); - return (0, _transformation.runSync)(config, code, ast); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-ast.js b/node_modules/@babel/core/lib/transform-ast.js index be05fc7..05161cf 100644 --- a/node_modules/@babel/core/lib/transform-ast.js +++ b/node_modules/@babel/core/lib/transform-ast.js @@ -3,26 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = void 0; +exports.transformFromAstSync = transformFromAstSync; +exports.transformFromAstAsync = transformFromAstAsync; +exports.transformFromAst = void 0; var _config = _interopRequireDefault(require("./config")); var _transformation = require("./transformation"); -var _transformAstSync = _interopRequireDefault(require("./transform-ast-sync")); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var transformFromAst = function transformFromAst(ast, code, opts, callback) { +const transformFromAst = function transformFromAst(ast, code, opts, callback) { if (typeof opts === "function") { - opts = undefined; callback = opts; + opts = undefined; } - if (callback === undefined) return (0, _transformAstSync.default)(ast, code, opts); - var cb = callback; - process.nextTick(function () { - var cfg; + if (callback === undefined) return transformFromAstSync(ast, code, opts); + const cb = callback; + process.nextTick(() => { + let cfg; try { cfg = (0, _config.default)(opts); @@ -36,4 +36,19 @@ var transformFromAst = function transformFromAst(ast, code, opts, callback) { }); }; -exports.default = transformFromAst; \ No newline at end of file +exports.transformFromAst = transformFromAst; + +function transformFromAstSync(ast, code, opts) { + const config = (0, _config.default)(opts); + if (config === null) return null; + if (!ast) throw new Error("No AST given"); + return (0, _transformation.runSync)(config, code, ast); +} + +function transformFromAstAsync(ast, code, opts) { + return new Promise((res, rej) => { + transformFromAst(ast, code, opts, (err, result) => { + if (err == null) res(result);else rej(err); + }); + }); +} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file-browser.js b/node_modules/@babel/core/lib/transform-file-browser.js index a2d0c72..6442c98 100644 --- a/node_modules/@babel/core/lib/transform-file-browser.js +++ b/node_modules/@babel/core/lib/transform-file-browser.js @@ -3,16 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = transformFile; - -function transformFile(filename, opts, callback) { - if (opts === void 0) { - opts = {}; - } +exports.transformFileSync = transformFileSync; +exports.transformFileAsync = transformFileAsync; +exports.transformFile = void 0; +const transformFile = function transformFile(filename, opts, callback) { if (typeof opts === "function") { callback = opts; } callback(new Error("Transforming files is not supported in browsers"), null); +}; + +exports.transformFile = transformFile; + +function transformFileSync() { + throw new Error("Transforming files is not supported in browsers"); +} + +function transformFileAsync() { + return Promise.reject(new Error("Transforming files is not supported in browsers")); } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file-sync-browser.js b/node_modules/@babel/core/lib/transform-file-sync-browser.js deleted file mode 100644 index 3f5740d..0000000 --- a/node_modules/@babel/core/lib/transform-file-sync-browser.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = transformFileSync; - -function transformFileSync() { - throw new Error("Transforming files is not supported in browsers"); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file-sync.js b/node_modules/@babel/core/lib/transform-file-sync.js deleted file mode 100644 index 9a04ccc..0000000 --- a/node_modules/@babel/core/lib/transform-file-sync.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = transformFileSync; - -function _fs() { - var data = _interopRequireDefault(require("fs")); - - _fs = function _fs() { - return data; - }; - - return data; -} - -var _config = _interopRequireDefault(require("./config")); - -var _transformation = require("./transformation"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function transformFileSync(filename, opts) { - var options; - - if (opts == null) { - options = { - filename: filename - }; - } else if (opts && typeof opts === "object") { - options = Object.assign({}, opts, { - filename: filename - }); - } - - var config = (0, _config.default)(options); - if (config === null) return null; - return (0, _transformation.runSync)(config, _fs().default.readFileSync(filename, "utf8")); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file.js b/node_modules/@babel/core/lib/transform-file.js index 02f8006..74423aa 100644 --- a/node_modules/@babel/core/lib/transform-file.js +++ b/node_modules/@babel/core/lib/transform-file.js @@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = void 0; +exports.transformFileSync = transformFileSync; +exports.transformFileAsync = transformFileAsync; +exports.transformFile = void 0; function _fs() { - var data = _interopRequireDefault(require("fs")); + const data = _interopRequireDefault(require("fs")); - _fs = function _fs() { + _fs = function () { return data; }; @@ -21,8 +23,10 @@ var _transformation = require("./transformation"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var transformFile = function transformFile(filename, opts, callback) { - var options; +({}); + +const transformFile = function transformFile(filename, opts, callback) { + let options; if (typeof opts === "function") { callback = opts; @@ -31,16 +35,16 @@ var transformFile = function transformFile(filename, opts, callback) { if (opts == null) { options = { - filename: filename + filename }; } else if (opts && typeof opts === "object") { options = Object.assign({}, opts, { - filename: filename + filename }); } - process.nextTick(function () { - var cfg; + process.nextTick(() => { + let cfg; try { cfg = (0, _config.default)(options); @@ -49,7 +53,7 @@ var transformFile = function transformFile(filename, opts, callback) { return callback(err); } - var config = cfg; + const config = cfg; _fs().default.readFile(filename, "utf8", function (err, code) { if (err) return callback(err, null); @@ -58,4 +62,30 @@ var transformFile = function transformFile(filename, opts, callback) { }); }; -exports.default = transformFile; \ No newline at end of file +exports.transformFile = transformFile; + +function transformFileSync(filename, opts) { + let options; + + if (opts == null) { + options = { + filename + }; + } else if (opts && typeof opts === "object") { + options = Object.assign({}, opts, { + filename + }); + } + + const config = (0, _config.default)(options); + if (config === null) return null; + return (0, _transformation.runSync)(config, _fs().default.readFileSync(filename, "utf8")); +} + +function transformFileAsync(filename, opts) { + return new Promise((res, rej) => { + transformFile(filename, opts, (err, result) => { + if (err == null) res(result);else rej(err); + }); + }); +} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-sync.js b/node_modules/@babel/core/lib/transform-sync.js deleted file mode 100644 index c5d1f8d..0000000 --- a/node_modules/@babel/core/lib/transform-sync.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = transformSync; - -var _config = _interopRequireDefault(require("./config")); - -var _transformation = require("./transformation"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function transformSync(code, opts) { - var config = (0, _config.default)(opts); - if (config === null) return null; - return (0, _transformation.runSync)(config, code); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform.js b/node_modules/@babel/core/lib/transform.js index 8540cb4..34332fc 100644 --- a/node_modules/@babel/core/lib/transform.js +++ b/node_modules/@babel/core/lib/transform.js @@ -3,26 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = void 0; +exports.transformSync = transformSync; +exports.transformAsync = transformAsync; +exports.transform = void 0; var _config = _interopRequireDefault(require("./config")); var _transformation = require("./transformation"); -var _transformSync = _interopRequireDefault(require("./transform-sync")); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var transform = function transform(code, opts, callback) { +const transform = function transform(code, opts, callback) { if (typeof opts === "function") { - opts = undefined; callback = opts; + opts = undefined; } - if (callback === undefined) return (0, _transformSync.default)(code, opts); - var cb = callback; - process.nextTick(function () { - var cfg; + if (callback === undefined) return transformSync(code, opts); + const cb = callback; + process.nextTick(() => { + let cfg; try { cfg = (0, _config.default)(opts); @@ -35,4 +35,18 @@ var transform = function transform(code, opts, callback) { }); }; -exports.default = transform; \ No newline at end of file +exports.transform = transform; + +function transformSync(code, opts) { + const config = (0, _config.default)(opts); + if (config === null) return null; + return (0, _transformation.runSync)(config, code); +} + +function transformAsync(code, opts) { + return new Promise((res, rej) => { + transform(code, opts, (err, result) => { + if (err == null) res(result);else rej(err); + }); + }); +} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js index 3bbf9b4..49273a2 100644 --- a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +++ b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.default = loadBlockHoistPlugin; function _sortBy() { - var data = _interopRequireDefault(require("lodash/sortBy")); + const data = _interopRequireDefault(require("lodash/sortBy")); - _sortBy = function _sortBy() { + _sortBy = function () { return data; }; @@ -19,11 +19,11 @@ var _config = _interopRequireDefault(require("../config")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var LOADED_PLUGIN; +let LOADED_PLUGIN; function loadBlockHoistPlugin() { if (!LOADED_PLUGIN) { - var config = (0, _config.default)({ + const config = (0, _config.default)({ babelrc: false, configFile: false, plugins: [blockHoistPlugin] @@ -35,16 +35,17 @@ function loadBlockHoistPlugin() { return LOADED_PLUGIN; } -var blockHoistPlugin = { +const blockHoistPlugin = { name: "internal.blockHoist", visitor: { Block: { - exit: function exit(_ref) { - var node = _ref.node; - var hasChange = false; + exit({ + node + }) { + let hasChange = false; - for (var i = 0; i < node.body.length; i++) { - var bodyNode = node.body[i]; + for (let i = 0; i < node.body.length; i++) { + const bodyNode = node.body[i]; if (bodyNode && bodyNode._blockHoist != null) { hasChange = true; @@ -54,12 +55,13 @@ var blockHoistPlugin = { if (!hasChange) return; node.body = (0, _sortBy().default)(node.body, function (bodyNode) { - var priority = bodyNode && bodyNode._blockHoist; + let priority = bodyNode && bodyNode._blockHoist; if (priority == null) priority = 1; if (priority === true) priority = 2; return -1 * priority; }); } + } } }; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/file.js b/node_modules/@babel/core/lib/transformation/file/file.js index eba50b5..390d0e2 100644 --- a/node_modules/@babel/core/lib/transformation/file/file.js +++ b/node_modules/@babel/core/lib/transformation/file/file.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; function helpers() { - var data = _interopRequireWildcard(require("@babel/helpers")); + const data = _interopRequireWildcard(require("@babel/helpers")); - helpers = function helpers() { + helpers = function () { return data; }; @@ -16,9 +16,9 @@ function helpers() { } function _traverse() { - var data = _interopRequireWildcard(require("@babel/traverse")); + const data = _interopRequireWildcard(require("@babel/traverse")); - _traverse = function _traverse() { + _traverse = function () { return data; }; @@ -26,9 +26,9 @@ function _traverse() { } function _codeFrame() { - var data = require("@babel/code-frame"); + const data = require("@babel/code-frame"); - _codeFrame = function _codeFrame() { + _codeFrame = function () { return data; }; @@ -36,47 +36,64 @@ function _codeFrame() { } function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; return data; } +function _semver() { + const data = _interopRequireDefault(require("semver")); + + _semver = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } -var errorVisitor = { - enter: function enter(path, state) { - var loc = path.node.loc; +const errorVisitor = { + enter(path, state) { + const loc = path.node.loc; if (loc) { state.loc = loc; path.stop(); } } + }; -var File = function () { - function File(options, _ref) { - var code = _ref.code, - ast = _ref.ast, - shebang = _ref.shebang, - inputMap = _ref.inputMap; +class File { + constructor(options, { + code, + ast, + inputMap + }) { this._map = new Map(); this.declarations = {}; this.path = null; this.ast = {}; this.metadata = {}; - this.hub = new (_traverse().Hub)(this); this.code = ""; - this.shebang = ""; this.inputMap = null; + this.hub = { + file: this, + getCode: () => this.code, + getScope: () => this.scope, + addHelper: this.addHelper.bind(this), + buildError: this.buildCodeFrameError.bind(this) + }; this.opts = options; this.code = code; this.ast = ast; - this.shebang = shebang; this.inputMap = inputMap; this.path = _traverse().NodePath.get({ hub: this.hub, @@ -88,44 +105,58 @@ var File = function () { this.scope = this.path.scope; } - var _proto = File.prototype; + get shebang() { + const { + interpreter + } = this.path.node; + return interpreter ? interpreter.value : ""; + } + + set shebang(value) { + if (value) { + this.path.get("interpreter").replaceWith(t().interpreterDirective(value)); + } else { + this.path.get("interpreter").remove(); + } + } + + set(key, val) { + if (key === "helpersNamespace") { + throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." + "If you are using @babel/plugin-external-helpers you will need to use a newer " + "version than the one you currently have installed. " + "If you have your own implementation, you'll want to explore using 'helperGenerator' " + "alongside 'file.availableHelper()'."); + } - _proto.set = function set(key, val) { this._map.set(key, val); - }; + } - _proto.get = function get(key) { + get(key) { return this._map.get(key); - }; + } - _proto.has = function has(key) { + has(key) { return this._map.has(key); - }; + } - _proto.getModuleName = function getModuleName() { - var _opts = this.opts, - filename = _opts.filename, - _opts$filenameRelativ = _opts.filenameRelative, - filenameRelative = _opts$filenameRelativ === void 0 ? filename : _opts$filenameRelativ, - moduleId = _opts.moduleId, - _opts$moduleIds = _opts.moduleIds, - moduleIds = _opts$moduleIds === void 0 ? !!moduleId : _opts$moduleIds, - getModuleId = _opts.getModuleId, - sourceRootTmp = _opts.sourceRoot, - _opts$moduleRoot = _opts.moduleRoot, - moduleRoot = _opts$moduleRoot === void 0 ? sourceRootTmp : _opts$moduleRoot, - _opts$sourceRoot = _opts.sourceRoot, - sourceRoot = _opts$sourceRoot === void 0 ? moduleRoot : _opts$sourceRoot; + getModuleName() { + const { + filename, + filenameRelative = filename, + moduleId, + moduleIds = !!moduleId, + getModuleId, + sourceRoot: sourceRootTmp, + moduleRoot = sourceRootTmp, + sourceRoot = moduleRoot + } = this.opts; if (!moduleIds) return null; if (moduleId != null && !getModuleId) { return moduleId; } - var moduleName = moduleRoot != null ? moduleRoot + "/" : ""; + let moduleName = moduleRoot != null ? moduleRoot + "/" : ""; if (filenameRelative) { - var sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : ""; + const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : ""; moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, ""); } @@ -136,112 +167,100 @@ var File = function () { } else { return moduleName; } - }; + } - _proto.resolveModuleSource = function resolveModuleSource(source) { - return source; - }; - - _proto.addImport = function addImport() { + addImport() { throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'."); - }; + } - _proto.addHelper = function addHelper(name) { - var _this = this; + availableHelper(name, versionRange) { + let minVersion; - var declar = this.declarations[name]; - if (declar) return t().cloneNode(declar); - var generator = this.get("helperGenerator"); - var runtime = this.get("helpersNamespace"); - - if (generator) { - var res = generator(name); - if (res) return res; - } else if (runtime) { - return t().memberExpression(t().cloneNode(runtime), t().identifier(name)); + try { + minVersion = helpers().minVersion(name); + } catch (err) { + if (err.code !== "BABEL_HELPER_UNKNOWN") throw err; + return false; } - var uid = this.declarations[name] = this.scope.generateUidIdentifier(name); - var dependencies = {}; + if (typeof versionRange !== "string") return true; + if (_semver().default.valid(versionRange)) versionRange = `^${versionRange}`; + return !_semver().default.intersects(`<${minVersion}`, versionRange) && !_semver().default.intersects(`>=8.0.0`, versionRange); + } - for (var _iterator = helpers().getDependencies(name), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref2; + addHelper(name) { + const declar = this.declarations[name]; + if (declar) return t().cloneNode(declar); + const generator = this.get("helperGenerator"); - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } + if (generator) { + const res = generator(name); + if (res) return res; + } - var dep = _ref2; + const uid = this.declarations[name] = this.scope.generateUidIdentifier(name); + const dependencies = {}; + + for (const dep of helpers().getDependencies(name)) { dependencies[dep] = this.addHelper(dep); } - var _helpers$get = helpers().get(name, function (dep) { - return dependencies[dep]; - }, uid, Object.keys(this.scope.getAllBindings())), - nodes = _helpers$get.nodes, - globals = _helpers$get.globals; - - globals.forEach(function (name) { - if (_this.path.scope.hasBinding(name, true)) { - _this.path.scope.rename(name); + const { + nodes, + globals + } = helpers().get(name, dep => dependencies[dep], uid, Object.keys(this.scope.getAllBindings())); + globals.forEach(name => { + if (this.path.scope.hasBinding(name, true)) { + this.path.scope.rename(name); } }); - nodes.forEach(function (node) { + nodes.forEach(node => { node._compact = true; }); this.path.unshiftContainer("body", nodes); - this.path.get("body").forEach(function (path) { + this.path.get("body").forEach(path => { if (nodes.indexOf(path.node) === -1) return; - if (path.isVariableDeclaration()) _this.scope.registerDeclaration(path); + if (path.isVariableDeclaration()) this.scope.registerDeclaration(path); }); return uid; - }; + } - _proto.addTemplateObject = function addTemplateObject() { + addTemplateObject() { throw new Error("This function has been moved into the template literal transform itself."); - }; + } - _proto.buildCodeFrameError = function buildCodeFrameError(node, msg, Error) { - if (Error === void 0) { - Error = SyntaxError; - } - - var loc = node && (node.loc || node._loc); - msg = this.opts.filename + ": " + msg; + buildCodeFrameError(node, msg, Error = SyntaxError) { + let loc = node && (node.loc || node._loc); + msg = `${this.opts.filename}: ${msg}`; if (!loc && node) { - var state = { + const state = { loc: null }; (0, _traverse().default)(node, errorVisitor, this.scope, state); loc = state.loc; - var txt = "This is an error on an internal node. Probably an internal error."; + let txt = "This is an error on an internal node. Probably an internal error."; if (loc) txt += " Location has been estimated."; - msg += " (" + txt + ")"; + msg += ` (${txt})`; } if (loc) { - var _opts$highlightCode = this.opts.highlightCode, - highlightCode = _opts$highlightCode === void 0 ? true : _opts$highlightCode; + const { + highlightCode = true + } = this.opts; msg += "\n" + (0, _codeFrame().codeFrameColumns)(this.code, { start: { line: loc.start.line, column: loc.start.column + 1 } }, { - highlightCode: highlightCode + highlightCode }); } return new Error(msg); - }; + } - return File; -}(); +} exports.default = File; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js b/node_modules/@babel/core/lib/transformation/file/generate.js index 216aa04..6be495c 100644 --- a/node_modules/@babel/core/lib/transformation/file/generate.js +++ b/node_modules/@babel/core/lib/transformation/file/generate.js @@ -6,19 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.default = generateCode; function _convertSourceMap() { - var data = _interopRequireDefault(require("convert-source-map")); + const data = _interopRequireDefault(require("convert-source-map")); - _convertSourceMap = function _convertSourceMap() { - return data; - }; - - return data; -} - -function _sourceMap() { - var data = _interopRequireDefault(require("source-map")); - - _sourceMap = function _sourceMap() { + _convertSourceMap = function () { return data; }; @@ -26,63 +16,42 @@ function _sourceMap() { } function _generator() { - var data = _interopRequireDefault(require("@babel/generator")); + const data = _interopRequireDefault(require("@babel/generator")); - _generator = function _generator() { + _generator = function () { return data; }; return data; } +var _mergeMap = _interopRequireDefault(require("./merge-map")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function generateCode(pluginPasses, file) { - var opts = file.opts, - ast = file.ast, - shebang = file.shebang, - code = file.code, - inputMap = file.inputMap; - var results = []; + const { + opts, + ast, + code, + inputMap + } = file; + const results = []; - for (var _iterator = pluginPasses, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var plugins = _ref; - - for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var plugin = _ref2; - var generatorOverride = plugin.generatorOverride; + for (const plugins of pluginPasses) { + for (const plugin of plugins) { + const { + generatorOverride + } = plugin; if (generatorOverride) { - var _result2 = generatorOverride(ast, opts.generatorOpts, code, _generator().default); - - if (_result2 !== undefined) results.push(_result2); + const result = generatorOverride(ast, opts.generatorOpts, code, _generator().default); + if (result !== undefined) results.push(result); } } } - var result; + let result; if (results.length === 0) { result = (0, _generator().default)(ast, opts.generatorOpts, code); @@ -90,22 +59,19 @@ function generateCode(pluginPasses, file) { result = results[0]; if (typeof result.then === "function") { - throw new Error("You appear to be using an async parser plugin, " + "which your current version of Babel does not support. " + "If you're using a published plugin, " + "you may need to upgrade your @babel/core version."); + throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`); } } else { throw new Error("More than one plugin attempted to override codegen."); } - var _result = result, - outputCode = _result.code, - outputMap = _result.map; - - if (shebang) { - outputCode = shebang + "\n" + outputCode; - } + let { + code: outputCode, + map: outputMap + } = result; if (outputMap && inputMap) { - outputMap = mergeSourceMap(inputMap.toObject(), outputMap); + outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap); } if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") { @@ -117,39 +83,7 @@ function generateCode(pluginPasses, file) { } return { - outputCode: outputCode, - outputMap: outputMap + outputCode, + outputMap }; -} - -function mergeSourceMap(inputMap, map) { - var inputMapConsumer = new (_sourceMap().default.SourceMapConsumer)(inputMap); - var outputMapConsumer = new (_sourceMap().default.SourceMapConsumer)(map); - var mergedGenerator = new (_sourceMap().default.SourceMapGenerator)({ - file: inputMapConsumer.file, - sourceRoot: inputMapConsumer.sourceRoot - }); - var source = outputMapConsumer.sources[0]; - inputMapConsumer.eachMapping(function (mapping) { - var generatedPosition = outputMapConsumer.generatedPositionFor({ - line: mapping.generatedLine, - column: mapping.generatedColumn, - source: source - }); - - if (generatedPosition.column != null) { - mergedGenerator.addMapping({ - source: mapping.source, - original: mapping.source == null ? null : { - line: mapping.originalLine, - column: mapping.originalColumn - }, - generated: generatedPosition, - name: mapping.name - }); - } - }); - var mergedMap = mergedGenerator.toJSON(); - inputMap.mappings = mergedMap.mappings; - return inputMap; } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/merge-map.js b/node_modules/@babel/core/lib/transformation/file/merge-map.js new file mode 100644 index 0000000..a92b9ed --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/file/merge-map.js @@ -0,0 +1,255 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = mergeSourceMap; + +function _sourceMap() { + const data = _interopRequireDefault(require("source-map")); + + _sourceMap = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function mergeSourceMap(inputMap, map) { + const input = buildMappingData(inputMap); + const output = buildMappingData(map); + const mergedGenerator = new (_sourceMap().default.SourceMapGenerator)(); + + for (const _ref of input.sources) { + const { + source + } = _ref; + + if (typeof source.content === "string") { + mergedGenerator.setSourceContent(source.path, source.content); + } + } + + if (output.sources.length === 1) { + const defaultSource = output.sources[0]; + const insertedMappings = new Map(); + eachInputGeneratedRange(input, (generated, original, source) => { + eachOverlappingGeneratedOutputRange(defaultSource, generated, item => { + const key = makeMappingKey(item); + if (insertedMappings.has(key)) return; + insertedMappings.set(key, item); + mergedGenerator.addMapping({ + source: source.path, + original: { + line: original.line, + column: original.columnStart + }, + generated: { + line: item.line, + column: item.columnStart + }, + name: original.name + }); + }); + }); + + for (const item of insertedMappings.values()) { + if (item.columnEnd === Infinity) { + continue; + } + + const clearItem = { + line: item.line, + columnStart: item.columnEnd + }; + const key = makeMappingKey(clearItem); + + if (insertedMappings.has(key)) { + continue; + } + + mergedGenerator.addMapping({ + generated: { + line: clearItem.line, + column: clearItem.columnStart + } + }); + } + } + + const result = mergedGenerator.toJSON(); + + if (typeof input.sourceRoot === "string") { + result.sourceRoot = input.sourceRoot; + } + + return result; +} + +function makeMappingKey(item) { + return `${item.line}/${item.columnStart}`; +} + +function eachOverlappingGeneratedOutputRange(outputFile, inputGeneratedRange, callback) { + const overlappingOriginal = filterApplicableOriginalRanges(outputFile, inputGeneratedRange); + + for (const _ref2 of overlappingOriginal) { + const { + generated + } = _ref2; + + for (const item of generated) { + callback(item); + } + } +} + +function filterApplicableOriginalRanges({ + mappings +}, { + line, + columnStart, + columnEnd +}) { + return filterSortedArray(mappings, ({ + original: outOriginal + }) => { + if (line > outOriginal.line) return -1; + if (line < outOriginal.line) return 1; + if (columnStart >= outOriginal.columnEnd) return -1; + if (columnEnd <= outOriginal.columnStart) return 1; + return 0; + }); +} + +function eachInputGeneratedRange(map, callback) { + for (const _ref3 of map.sources) { + const { + source, + mappings + } = _ref3; + + for (const _ref4 of mappings) { + const { + original, + generated + } = _ref4; + + for (const item of generated) { + callback(item, original, source); + } + } + } +} + +function buildMappingData(map) { + const consumer = new (_sourceMap().default.SourceMapConsumer)(Object.assign({}, map, { + sourceRoot: null + })); + const sources = new Map(); + const mappings = new Map(); + let last = null; + consumer.computeColumnSpans(); + consumer.eachMapping(m => { + if (m.originalLine === null) return; + let source = sources.get(m.source); + + if (!source) { + source = { + path: m.source, + content: consumer.sourceContentFor(m.source, true) + }; + sources.set(m.source, source); + } + + let sourceData = mappings.get(source); + + if (!sourceData) { + sourceData = { + source, + mappings: [] + }; + mappings.set(source, sourceData); + } + + const obj = { + line: m.originalLine, + columnStart: m.originalColumn, + columnEnd: Infinity, + name: m.name + }; + + if (last && last.source === source && last.mapping.line === m.originalLine) { + last.mapping.columnEnd = m.originalColumn; + } + + last = { + source, + mapping: obj + }; + sourceData.mappings.push({ + original: obj, + generated: consumer.allGeneratedPositionsFor({ + source: m.source, + line: m.originalLine, + column: m.originalColumn + }).map(item => ({ + line: item.line, + columnStart: item.column, + columnEnd: item.lastColumn + 1 + })) + }); + }, null, _sourceMap().default.SourceMapConsumer.ORIGINAL_ORDER); + return { + file: map.file, + sourceRoot: map.sourceRoot, + sources: Array.from(mappings.values()) + }; +} + +function findInsertionLocation(array, callback) { + let left = 0; + let right = array.length; + + while (left < right) { + const mid = Math.floor((left + right) / 2); + const item = array[mid]; + const result = callback(item); + + if (result === 0) { + left = mid; + break; + } + + if (result >= 0) { + right = mid; + } else { + left = mid + 1; + } + } + + let i = left; + + if (i < array.length) { + while (i >= 0 && callback(array[i]) >= 0) { + i--; + } + + return i + 1; + } + + return i; +} + +function filterSortedArray(array, callback) { + const start = findInsertionLocation(array, callback); + const results = []; + + for (let i = start; i < array.length && callback(array[i]) === 0; i++) { + results.push(array[i]); + } + + return results; +} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/index.js b/node_modules/@babel/core/lib/transformation/index.js index 02c8c66..748e2ac 100644 --- a/node_modules/@babel/core/lib/transformation/index.js +++ b/node_modules/@babel/core/lib/transformation/index.js @@ -7,9 +7,9 @@ exports.runAsync = runAsync; exports.runSync = runSync; function _traverse() { - var data = _interopRequireDefault(require("@babel/traverse")); + const data = _interopRequireDefault(require("@babel/traverse")); - _traverse = function _traverse() { + _traverse = function () { return data; }; @@ -29,7 +29,7 @@ var _generate = _interopRequireDefault(require("./file/generate")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function runAsync(config, code, ast, callback) { - var result; + let result; try { result = runSync(config, code, ast); @@ -41,14 +41,13 @@ function runAsync(config, code, ast, callback) { } function runSync(config, code, ast) { - var file = (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast); + const file = (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast); transformFile(file, config.passes); - var opts = file.opts; - - var _ref = opts.code !== false ? (0, _generate.default)(config.passes, file) : {}, - outputCode = _ref.outputCode, - outputMap = _ref.outputMap; - + const opts = file.opts; + const { + outputCode, + outputMap + } = opts.code !== false ? (0, _generate.default)(config.passes, file) : {}; return { metadata: file.metadata, options: opts, @@ -60,72 +59,42 @@ function runSync(config, code, ast) { } function transformFile(file, pluginPasses) { - for (var _iterator = pluginPasses, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref2; + for (const pluginPairs of pluginPasses) { + const passPairs = []; + const passes = []; + const visitors = []; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var pluginPairs = _ref2; - var passPairs = []; - var passes = []; - var visitors = []; - - for (var _iterator2 = pluginPairs.concat([(0, _blockHoistPlugin.default)()]), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var plugin = _ref3; - var pass = new _pluginPass.default(file, plugin.key, plugin.options); + for (const plugin of pluginPairs.concat([(0, _blockHoistPlugin.default)()])) { + const pass = new _pluginPass.default(file, plugin.key, plugin.options); passPairs.push([plugin, pass]); passes.push(pass); visitors.push(plugin.visitor); } - for (var _i3 = 0; _i3 < passPairs.length; _i3++) { - var _passPairs$_i = passPairs[_i3], - _plugin = _passPairs$_i[0], - _pass = _passPairs$_i[1]; - var fn = _plugin.pre; + for (const [plugin, pass] of passPairs) { + const fn = plugin.pre; if (fn) { - var result = fn.call(_pass, file); + const result = fn.call(pass, file); if (isThenable(result)) { - throw new Error("You appear to be using an plugin with an async .pre, " + "which your current version of Babel does not support." + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version."); + throw new Error(`You appear to be using an plugin with an async .pre, ` + `which your current version of Babel does not support.` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); } } } - var visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod); + const visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod); (0, _traverse().default)(file.ast, visitor, file.scope); - for (var _i4 = 0; _i4 < passPairs.length; _i4++) { - var _passPairs$_i2 = passPairs[_i4], - _plugin2 = _passPairs$_i2[0], - _pass2 = _passPairs$_i2[1]; - var _fn = _plugin2.post; + for (const [plugin, pass] of passPairs) { + const fn = plugin.post; - if (_fn) { - var _result = _fn.call(_pass2, file); + if (fn) { + const result = fn.call(pass, file); - if (isThenable(_result)) { - throw new Error("You appear to be using an plugin with an async .post, " + "which your current version of Babel does not support." + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version."); + if (isThenable(result)) { + throw new Error(`You appear to be using an plugin with an async .post, ` + `which your current version of Babel does not support.` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); } } } @@ -133,5 +102,5 @@ function transformFile(file, pluginPasses) { } function isThenable(val) { - return !!val && (typeof val === "object" || typeof val === "function") && typeof val.then === "function"; + return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function"; } \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/normalize-file.js b/node_modules/@babel/core/lib/transformation/normalize-file.js index 257089a..fbe3b58 100644 --- a/node_modules/@babel/core/lib/transformation/normalize-file.js +++ b/node_modules/@babel/core/lib/transformation/normalize-file.js @@ -5,10 +5,40 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = normalizeFile; -function t() { - var data = _interopRequireWildcard(require("@babel/types")); +function _path() { + const data = _interopRequireDefault(require("path")); - t = function t() { + _path = function () { + return data; + }; + + return data; +} + +function _debug() { + const data = _interopRequireDefault(require("debug")); + + _debug = function () { + return data; + }; + + return data; +} + +function _cloneDeep() { + const data = _interopRequireDefault(require("lodash/cloneDeep")); + + _cloneDeep = function () { + return data; + }; + + return data; +} + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { return data; }; @@ -16,19 +46,19 @@ function t() { } function _convertSourceMap() { - var data = _interopRequireDefault(require("convert-source-map")); + const data = _interopRequireDefault(require("convert-source-map")); - _convertSourceMap = function _convertSourceMap() { + _convertSourceMap = function () { return data; }; return data; } -function _babylon() { - var data = require("babylon"); +function _parser() { + const data = require("@babel/parser"); - _babylon = function _babylon() { + _parser = function () { return data; }; @@ -36,9 +66,9 @@ function _babylon() { } function _codeFrame() { - var data = require("@babel/code-frame"); + const data = require("@babel/code-frame"); - _codeFrame = function _codeFrame() { + _codeFrame = function () { return data; }; @@ -49,32 +79,51 @@ var _file = _interopRequireDefault(require("./file/file")); var _missingPluginHelper = _interopRequireDefault(require("./util/missing-plugin-helper")); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } -var shebangRegex = /^#!.*/; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const debug = (0, _debug().default)("babel:transform:file"); function normalizeFile(pluginPasses, options, code, ast) { - code = "" + (code || ""); - var shebang = null; - var inputMap = null; + code = `${code || ""}`; + let inputMap = null; if (options.inputSourceMap !== false) { - inputMap = _convertSourceMap().default.fromSource(code); - - if (inputMap) { - code = _convertSourceMap().default.removeComments(code); - } else if (typeof options.inputSourceMap === "object") { + if (typeof options.inputSourceMap === "object") { inputMap = _convertSourceMap().default.fromObject(options.inputSourceMap); } - } - var shebangMatch = shebangRegex.exec(code); + if (!inputMap) { + try { + inputMap = _convertSourceMap().default.fromSource(code); - if (shebangMatch) { - shebang = shebangMatch[0]; - code = code.replace(shebangRegex, ""); + if (inputMap) { + code = _convertSourceMap().default.removeComments(code); + } + } catch (err) { + debug("discarding unknown inline input sourcemap", err); + code = _convertSourceMap().default.removeComments(code); + } + } + + if (!inputMap) { + if (typeof options.filename === "string") { + try { + inputMap = _convertSourceMap().default.fromMapFileSource(code, _path().default.dirname(options.filename)); + + if (inputMap) { + code = _convertSourceMap().default.removeMapFileComments(code); + } + } catch (err) { + debug("discarding unknown file input sourcemap", err); + code = _convertSourceMap().default.removeMapFileComments(code); + } + } else { + debug("discarding un-loadable file input sourcemap"); + code = _convertSourceMap().default.removeMapFileComments(code); + } + } } if (ast) { @@ -83,64 +132,45 @@ function normalizeFile(pluginPasses, options, code, ast) { } else if (ast.type !== "File") { throw new Error("AST root must be a Program or File node"); } + + ast = (0, _cloneDeep().default)(ast); } else { ast = parser(pluginPasses, options, code); } return new _file.default(options, { - code: code, - ast: ast, - shebang: shebang, - inputMap: inputMap + code, + ast, + inputMap }); } -function parser(pluginPasses, options, code) { +function parser(pluginPasses, { + parserOpts, + highlightCode = true, + filename = "unknown" +}, code) { try { - var results = []; + const results = []; - for (var _iterator = pluginPasses, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var plugins = _ref; - - for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var plugin = _ref2; - var parserOverride = plugin.parserOverride; + for (const plugins of pluginPasses) { + for (const plugin of plugins) { + const { + parserOverride + } = plugin; if (parserOverride) { - var _ast = parserOverride(code, options.parserOpts, _babylon().parse); - - if (_ast !== undefined) results.push(_ast); + const ast = parserOverride(code, parserOpts, _parser().parse); + if (ast !== undefined) results.push(ast); } } } if (results.length === 0) { - return (0, _babylon().parse)(code, options.parserOpts); + return (0, _parser().parse)(code, parserOpts); } else if (results.length === 1) { if (typeof results[0].then === "function") { - throw new Error("You appear to be using an async codegen plugin, " + "which your current version of Babel does not support. " + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version."); + throw new Error(`You appear to be using an async codegen plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); } return results[0]; @@ -152,21 +182,25 @@ function parser(pluginPasses, options, code) { err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file."; } - var loc = err.loc, - missingPlugin = err.missingPlugin; + const { + loc, + missingPlugin + } = err; if (loc) { - var codeFrame = (0, _codeFrame().codeFrameColumns)(code, { + const codeFrame = (0, _codeFrame().codeFrameColumns)(code, { start: { line: loc.line, column: loc.column + 1 } - }, options); + }, { + highlightCode + }); if (missingPlugin) { - err.message = (options.filename || "unknown") + ": " + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame); + err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame); } else { - err.message = (options.filename || "unknown") + ": " + err.message + "\n\n" + codeFrame; + err.message = `${filename}: ${err.message}\n\n` + codeFrame; } err.code = "BABEL_PARSE_ERROR"; diff --git a/node_modules/@babel/core/lib/transformation/normalize-opts.js b/node_modules/@babel/core/lib/transformation/normalize-opts.js index b9b32e0..1465ad6 100644 --- a/node_modules/@babel/core/lib/transformation/normalize-opts.js +++ b/node_modules/@babel/core/lib/transformation/normalize-opts.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.default = normalizeOptions; function _path() { - var data = _interopRequireDefault(require("path")); + const data = _interopRequireDefault(require("path")); - _path = function _path() { + _path = function () { return data; }; @@ -18,74 +18,43 @@ function _path() { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function normalizeOptions(config) { - var _config$options = config.options, - filename = _config$options.filename, - _config$options$filen = _config$options.filenameRelative, - filenameRelative = _config$options$filen === void 0 ? filename || "unknown" : _config$options$filen, - _config$options$sourc = _config$options.sourceType, - sourceType = _config$options$sourc === void 0 ? "module" : _config$options$sourc, - inputSourceMap = _config$options.inputSourceMap, - _config$options$sourc2 = _config$options.sourceMaps, - sourceMaps = _config$options$sourc2 === void 0 ? !!inputSourceMap : _config$options$sourc2, - moduleRoot = _config$options.moduleRoot, - _config$options$sourc3 = _config$options.sourceRoot, - sourceRoot = _config$options$sourc3 === void 0 ? moduleRoot : _config$options$sourc3, - _config$options$sourc4 = _config$options.sourceFileName, - sourceFileName = _config$options$sourc4 === void 0 ? filenameRelative : _config$options$sourc4, - _config$options$comme = _config$options.comments, - comments = _config$options$comme === void 0 ? true : _config$options$comme, - _config$options$compa = _config$options.compact, - compact = _config$options$compa === void 0 ? "auto" : _config$options$compa; - var opts = config.options; - var options = Object.assign({}, opts, { + const { + filename, + cwd, + filenameRelative = typeof filename === "string" ? _path().default.relative(cwd, filename) : "unknown", + sourceType = "module", + inputSourceMap, + sourceMaps = !!inputSourceMap, + moduleRoot, + sourceRoot = moduleRoot, + sourceFileName = _path().default.basename(filenameRelative), + comments = true, + compact = "auto" + } = config.options; + const opts = config.options; + const options = Object.assign({}, opts, { parserOpts: Object.assign({ sourceType: _path().default.extname(filenameRelative) === ".mjs" ? "module" : sourceType, sourceFileName: filename, plugins: [] }, opts.parserOpts), generatorOpts: Object.assign({ - filename: filename, + filename, auxiliaryCommentBefore: opts.auxiliaryCommentBefore, auxiliaryCommentAfter: opts.auxiliaryCommentAfter, retainLines: opts.retainLines, - comments: comments, + comments, shouldPrintComment: opts.shouldPrintComment, - compact: compact, + compact, minified: opts.minified, - sourceMaps: sourceMaps, - sourceRoot: sourceRoot, - sourceFileName: sourceFileName + sourceMaps, + sourceRoot, + sourceFileName }, opts.generatorOpts) }); - for (var _iterator = config.passes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var plugins = _ref; - - for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var plugin = _ref2; - + for (const plugins of config.passes) { + for (const plugin of plugins) { if (plugin.manipulateOptions) { plugin.manipulateOptions(options, options.parserOpts); } diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js b/node_modules/@babel/core/lib/transformation/plugin-pass.js index d728858..2c746d1 100644 --- a/node_modules/@babel/core/lib/transformation/plugin-pass.js +++ b/node_modules/@babel/core/lib/transformation/plugin-pass.js @@ -5,42 +5,44 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -var PluginPass = function () { - function PluginPass(file, key, options) { +class PluginPass { + constructor(file, key, options) { this._map = new Map(); this.key = key; this.file = file; this.opts = options || {}; - this.filename = typeof file.opts.filename === "string" ? file.opts.filename : undefined; + this.cwd = file.opts.cwd; + this.filename = file.opts.filename; } - var _proto = PluginPass.prototype; - - _proto.set = function set(key, val) { + set(key, val) { this._map.set(key, val); - }; + } - _proto.get = function get(key) { + get(key) { return this._map.get(key); - }; + } - _proto.addHelper = function addHelper(name) { + availableHelper(name, versionRange) { + return this.file.availableHelper(name, versionRange); + } + + addHelper(name) { return this.file.addHelper(name); - }; + } - _proto.addImport = function addImport() { + addImport() { return this.file.addImport(); - }; + } - _proto.getModuleName = function getModuleName() { + getModuleName() { return this.file.getModuleName(); - }; + } - _proto.buildCodeFrameError = function buildCodeFrameError(node, msg, Error) { + buildCodeFrameError(node, msg, Error) { return this.file.buildCodeFrameError(node, msg, Error); - }; + } - return PluginPass; -}(); +} exports.default = PluginPass; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js b/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js index f66aecd..93ebb8d 100644 --- a/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js +++ b/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js @@ -4,17 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = generateMissingPluginMessage; -var pluginNameMap = { - asyncGenerators: { - syntax: { - name: "@babel/plugin-syntax-async-generators", - url: "https://git.io/vb4SY" - }, - transform: { - name: "@babel/plugin-proposal-async-generator-functions", - url: "https://git.io/vb4yp" - } - }, +const pluginNameMap = { classProperties: { syntax: { name: "@babel/plugin-syntax-class-properties", @@ -147,26 +137,6 @@ var pluginNameMap = { url: "https://git.io/vb4yS" } }, - objectRestSpread: { - syntax: { - name: "@babel/plugin-syntax-object-rest-spread", - url: "https://git.io/vb4y5" - }, - transform: { - name: "@babel/plugin-proposal-object-rest-spread", - url: "https://git.io/vb4Ss" - } - }, - optionalCatchBinding: { - syntax: { - name: "@babel/plugin-syntax-optional-catch-binding", - url: "https://git.io/vb4Sn" - }, - transform: { - name: "@babel/plugin-proposal-optional-catch-binding", - url: "https://git.io/vb4SI" - } - }, optionalChaining: { syntax: { name: "@babel/plugin-syntax-optional-chaining", @@ -206,30 +176,61 @@ var pluginNameMap = { name: "@babel/plugin-transform-typescript", url: "https://git.io/vb4Sm" } + }, + asyncGenerators: { + syntax: { + name: "@babel/plugin-syntax-async-generators", + url: "https://git.io/vb4SY" + }, + transform: { + name: "@babel/plugin-proposal-async-generator-functions", + url: "https://git.io/vb4yp" + } + }, + objectRestSpread: { + syntax: { + name: "@babel/plugin-syntax-object-rest-spread", + url: "https://git.io/vb4y5" + }, + transform: { + name: "@babel/plugin-proposal-object-rest-spread", + url: "https://git.io/vb4Ss" + } + }, + optionalCatchBinding: { + syntax: { + name: "@babel/plugin-syntax-optional-catch-binding", + url: "https://git.io/vb4Sn" + }, + transform: { + name: "@babel/plugin-proposal-optional-catch-binding", + url: "https://git.io/vb4SI" + } } }; -var getNameURLCombination = function getNameURLCombination(_ref) { - var name = _ref.name, - url = _ref.url; - return name + " (" + url + ")"; -}; +const getNameURLCombination = ({ + name, + url +}) => `${name} (${url})`; function generateMissingPluginMessage(missingPluginName, loc, codeFrame) { - var helpMessage = "Support for the experimental syntax '" + missingPluginName + "' isn't currently enabled " + ("(" + loc.line + ":" + (loc.column + 1) + "):\n\n") + codeFrame; - var pluginInfo = pluginNameMap[missingPluginName]; + let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame; + const pluginInfo = pluginNameMap[missingPluginName]; if (pluginInfo) { - var syntaxPlugin = pluginInfo.syntax, - transformPlugin = pluginInfo.transform; + const { + syntax: syntaxPlugin, + transform: transformPlugin + } = pluginInfo; if (syntaxPlugin) { if (transformPlugin) { - var transformPluginInfo = getNameURLCombination(transformPlugin); - helpMessage += "\n\nAdd " + transformPluginInfo + " to the 'plugins' section of your Babel config " + "to enable transformation."; + const transformPluginInfo = getNameURLCombination(transformPlugin); + helpMessage += `\n\nAdd ${transformPluginInfo} to the 'plugins' section of your Babel config ` + `to enable transformation.`; } else { - var syntaxPluginInfo = getNameURLCombination(syntaxPlugin); - helpMessage += "\n\nAdd " + syntaxPluginInfo + " to the 'plugins' section of your Babel config " + "to enable parsing."; + const syntaxPluginInfo = getNameURLCombination(syntaxPlugin); + helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`; } } } diff --git a/node_modules/@babel/core/node_modules/.bin/babylon b/node_modules/@babel/core/node_modules/.bin/babylon deleted file mode 120000 index c2adc01..0000000 --- a/node_modules/@babel/core/node_modules/.bin/babylon +++ /dev/null @@ -1 +0,0 @@ -../babylon/bin/babylon.js \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/.bin/jsesc b/node_modules/@babel/core/node_modules/.bin/jsesc new file mode 100644 index 0000000..e59ea43 --- /dev/null +++ b/node_modules/@babel/core/node_modules/.bin/jsesc @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@" + ret=$? +else + node "$basedir/../jsesc/bin/jsesc" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/@babel/core/node_modules/.bin/jsesc.cmd b/node_modules/@babel/core/node_modules/.bin/jsesc.cmd new file mode 100644 index 0000000..66206ea --- /dev/null +++ b/node_modules/@babel/core/node_modules/.bin/jsesc.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\jsesc\bin\jsesc" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\jsesc\bin\jsesc" %* +) \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/.bin/json5 b/node_modules/@babel/core/node_modules/.bin/json5 new file mode 100644 index 0000000..71e29db --- /dev/null +++ b/node_modules/@babel/core/node_modules/.bin/json5 @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" + ret=$? +else + node "$basedir/../json5/lib/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/@babel/core/node_modules/.bin/json5.cmd b/node_modules/@babel/core/node_modules/.bin/json5.cmd new file mode 100644 index 0000000..4ef655f --- /dev/null +++ b/node_modules/@babel/core/node_modules/.bin/json5.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\json5\lib\cli.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\json5\lib\cli.js" %* +) \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/code-frame/LICENSE b/node_modules/@babel/core/node_modules/@babel/code-frame/LICENSE new file mode 100644 index 0000000..620366e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/code-frame/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-2018 Sebastian McKenzie + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/code-frame/README.md b/node_modules/@babel/core/node_modules/@babel/code-frame/README.md new file mode 100644 index 0000000..185f93d --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/code-frame/README.md @@ -0,0 +1,19 @@ +# @babel/code-frame + +> Generate errors that contain a code frame that point to source locations. + +See our website [@babel/code-frame](https://babeljs.io/docs/en/next/babel-code-frame.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/code-frame +``` + +or using yarn: + +```sh +yarn add @babel/code-frame --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js new file mode 100644 index 0000000..1f64c6c --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js @@ -0,0 +1,173 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.codeFrameColumns = codeFrameColumns; +exports.default = _default; + +function _highlight() { + const data = _interopRequireWildcard(require("@babel/highlight")); + + _highlight = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +let deprecationWarningShown = false; + +function getDefs(chalk) { + return { + gutter: chalk.grey, + marker: chalk.red.bold, + message: chalk.red.bold + }; +} + +const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + +function getMarkerLines(loc, source, opts) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line; + const startColumn = startLoc.column; + const endLine = endLoc.line; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source.length, endLine + linesBelow); + + if (startLine === -1) { + start = 0; + } + + if (endLine === -1) { + end = source.length; + } + + const lineDiff = endLine - startLine; + const markerLines = {}; + + if (lineDiff) { + for (let i = 0; i <= lineDiff; i++) { + const lineNumber = i + startLine; + + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + const sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + const sourceLength = source[lineNumber - i].length; + markerLines[lineNumber] = [0, sourceLength]; + } + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } + } + + return { + start, + end, + markerLines + }; +} + +function codeFrameColumns(rawLines, loc, opts = {}) { + const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts); + const chalk = (0, _highlight().getChalk)(opts); + const defs = getDefs(chalk); + + const maybeHighlight = (chalkFn, string) => { + return highlighted ? chalkFn(string) : string; + }; + + if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts); + const lines = rawLines.split(NEWLINE); + const { + start, + end, + markerLines + } = getMarkerLines(loc, lines, opts); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end).length; + let frame = lines.slice(start, end).map((line, index) => { + const number = start + 1 + index; + const paddedNumber = ` ${number}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} | `; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + + if (hasMarker) { + let markerLine = ""; + + if (Array.isArray(hasMarker)) { + const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); + + if (lastMarkerLine && opts.message) { + markerLine += " " + maybeHighlight(defs.message, opts.message); + } + } + + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return ` ${maybeHighlight(defs.gutter, gutter)}${line}`; + } + }).join("\n"); + + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; + } + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } +} + +function _default(rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + const deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + + colNumber = Math.max(colNumber, 0); + const location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/code-frame/package.json b/node_modules/@babel/core/node_modules/@babel/code-frame/package.json new file mode 100644 index 0000000..75acc74 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/code-frame/package.json @@ -0,0 +1,51 @@ +{ + "_from": "@babel/code-frame@^7.0.0", + "_id": "@babel/code-frame@7.0.0", + "_inBundle": false, + "_integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "_location": "/@babel/core/@babel/code-frame", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/code-frame@^7.0.0", + "name": "@babel/code-frame", + "escapedName": "@babel%2fcode-frame", + "scope": "@babel", + "rawSpec": "^7.0.0", + "saveSpec": null, + "fetchSpec": "^7.0.0" + }, + "_requiredBy": [ + "/@babel/core", + "/@babel/core/@babel/template", + "/@babel/core/@babel/traverse" + ], + "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "_shasum": "06e2ab19bdb535385559aabb5ba59729482800f8", + "_spec": "@babel/code-frame@^7.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "@babel/highlight": "^7.0.0" + }, + "deprecated": false, + "description": "Generate errors that contain a code frame that point to source locations.", + "devDependencies": { + "chalk": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/code-frame", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" + }, + "version": "7.0.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/generator/LICENSE b/node_modules/@babel/core/node_modules/@babel/generator/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/generator/README.md b/node_modules/@babel/core/node_modules/@babel/generator/README.md new file mode 100644 index 0000000..fc980b1 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/README.md @@ -0,0 +1,19 @@ +# @babel/generator + +> Turns an AST into code. + +See our website [@babel/generator](https://babeljs.io/docs/en/next/babel-generator.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/generator +``` + +or using yarn: + +```sh +yarn add @babel/generator --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/buffer.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/buffer.js new file mode 100644 index 0000000..8a80014 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/buffer.js @@ -0,0 +1,257 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _trimRight() { + const data = _interopRequireDefault(require("trim-right")); + + _trimRight = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const SPACES_RE = /^[ \t]+$/; + +class Buffer { + constructor(map) { + this._map = null; + this._buf = []; + this._last = ""; + this._queue = []; + this._position = { + line: 1, + column: 0 + }; + this._sourcePosition = { + identifierName: null, + line: null, + column: null, + filename: null + }; + this._disallowedPop = null; + this._map = map; + } + + get() { + this._flush(); + + const map = this._map; + const result = { + code: (0, _trimRight().default)(this._buf.join("")), + map: null, + rawMappings: map && map.getRawMappings() + }; + + if (map) { + Object.defineProperty(result, "map", { + configurable: true, + enumerable: true, + + get() { + return this.map = map.get(); + }, + + set(value) { + Object.defineProperty(this, "map", { + value, + writable: true + }); + } + + }); + } + + return result; + } + + append(str) { + this._flush(); + + const { + line, + column, + filename, + identifierName, + force + } = this._sourcePosition; + + this._append(str, line, column, identifierName, filename, force); + } + + queue(str) { + if (str === "\n") { + while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) { + this._queue.shift(); + } + } + + const { + line, + column, + filename, + identifierName, + force + } = this._sourcePosition; + + this._queue.unshift([str, line, column, identifierName, filename, force]); + } + + _flush() { + let item; + + while (item = this._queue.pop()) this._append(...item); + } + + _append(str, line, column, identifierName, filename, force) { + if (this._map && str[0] !== "\n") { + this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force); + } + + this._buf.push(str); + + this._last = str[str.length - 1]; + + for (let i = 0; i < str.length; i++) { + if (str[i] === "\n") { + this._position.line++; + this._position.column = 0; + } else { + this._position.column++; + } + } + } + + removeTrailingNewline() { + if (this._queue.length > 0 && this._queue[0][0] === "\n") { + this._queue.shift(); + } + } + + removeLastSemicolon() { + if (this._queue.length > 0 && this._queue[0][0] === ";") { + this._queue.shift(); + } + } + + endsWith(suffix) { + if (suffix.length === 1) { + let last; + + if (this._queue.length > 0) { + const str = this._queue[0][0]; + last = str[str.length - 1]; + } else { + last = this._last; + } + + return last === suffix; + } + + const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, ""); + + if (suffix.length <= end.length) { + return end.slice(-suffix.length) === suffix; + } + + return false; + } + + hasContent() { + return this._queue.length > 0 || !!this._last; + } + + exactSource(loc, cb) { + this.source("start", loc, true); + cb(); + this.source("end", loc); + + this._disallowPop("start", loc); + } + + source(prop, loc, force) { + if (prop && !loc) return; + + this._normalizePosition(prop, loc, this._sourcePosition, force); + } + + withSource(prop, loc, cb) { + if (!this._map) return cb(); + const originalLine = this._sourcePosition.line; + const originalColumn = this._sourcePosition.column; + const originalFilename = this._sourcePosition.filename; + const originalIdentifierName = this._sourcePosition.identifierName; + this.source(prop, loc); + cb(); + + if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) { + this._sourcePosition.line = originalLine; + this._sourcePosition.column = originalColumn; + this._sourcePosition.filename = originalFilename; + this._sourcePosition.identifierName = originalIdentifierName; + this._sourcePosition.force = false; + this._disallowedPop = null; + } + } + + _disallowPop(prop, loc) { + if (prop && !loc) return; + this._disallowedPop = this._normalizePosition(prop, loc); + } + + _normalizePosition(prop, loc, targetObj, force) { + const pos = loc ? loc[prop] : null; + + if (targetObj === undefined) { + targetObj = { + identifierName: null, + line: null, + column: null, + filename: null, + force: false + }; + } + + const origLine = targetObj.line; + const origColumn = targetObj.column; + const origFilename = targetObj.filename; + targetObj.identifierName = prop === "start" && loc && loc.identifierName || null; + targetObj.line = pos ? pos.line : null; + targetObj.column = pos ? pos.column : null; + targetObj.filename = loc && loc.filename || null; + + if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) { + targetObj.force = force; + } + + return targetObj; + } + + getCurrentColumn() { + const extra = this._queue.reduce((acc, item) => item[0] + acc, ""); + + const lastIndex = extra.lastIndexOf("\n"); + return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex; + } + + getCurrentLine() { + const extra = this._queue.reduce((acc, item) => item[0] + acc, ""); + + let count = 0; + + for (let i = 0; i < extra.length; i++) { + if (extra[i] === "\n") count++; + } + + return this._position.line + count; + } + +} + +exports.default = Buffer; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/base.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/base.js new file mode 100644 index 0000000..f8e2130 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/base.js @@ -0,0 +1,97 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.File = File; +exports.Program = Program; +exports.BlockStatement = BlockStatement; +exports.Noop = Noop; +exports.Directive = Directive; +exports.DirectiveLiteral = DirectiveLiteral; +exports.InterpreterDirective = InterpreterDirective; +exports.Placeholder = Placeholder; + +function File(node) { + if (node.program) { + this.print(node.program.interpreter, node); + } + + this.print(node.program, node); +} + +function Program(node) { + this.printInnerComments(node, false); + this.printSequence(node.directives, node); + if (node.directives && node.directives.length) this.newline(); + this.printSequence(node.body, node); +} + +function BlockStatement(node) { + this.token("{"); + this.printInnerComments(node); + const hasDirectives = node.directives && node.directives.length; + + if (node.body.length || hasDirectives) { + this.newline(); + this.printSequence(node.directives, node, { + indent: true + }); + if (hasDirectives) this.newline(); + this.printSequence(node.body, node, { + indent: true + }); + this.removeTrailingNewline(); + this.source("end", node.loc); + if (!this.endsWith("\n")) this.newline(); + this.rightBrace(); + } else { + this.source("end", node.loc); + this.token("}"); + } +} + +function Noop() {} + +function Directive(node) { + this.print(node.value, node); + this.semicolon(); +} + +const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/; +const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/; + +function DirectiveLiteral(node) { + const raw = this.getPossibleRaw(node); + + if (raw != null) { + this.token(raw); + return; + } + + const { + value + } = node; + + if (!unescapedDoubleQuoteRE.test(value)) { + this.token(`"${value}"`); + } else if (!unescapedSingleQuoteRE.test(value)) { + this.token(`'${value}'`); + } else { + throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes."); + } +} + +function InterpreterDirective(node) { + this.token(`#!${node.value}\n`); +} + +function Placeholder(node) { + this.token("%%"); + this.print(node.name); + this.token("%%"); + + if (node.expectedNode === "Statement") { + this.semicolon(); + } +} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/classes.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/classes.js similarity index 89% rename from node_modules/@babel/generator/lib/generators/classes.js rename to node_modules/@babel/core/node_modules/@babel/generator/lib/generators/classes.js index 1f51305..7f54632 100644 --- a/node_modules/@babel/generator/lib/generators/classes.js +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/classes.js @@ -8,12 +8,13 @@ exports.ClassBody = ClassBody; exports.ClassProperty = ClassProperty; exports.ClassPrivateProperty = ClassPrivateProperty; exports.ClassMethod = ClassMethod; +exports.ClassPrivateMethod = ClassPrivateMethod; exports._classMethodHead = _classMethodHead; function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -23,7 +24,7 @@ function t() { function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function ClassDeclaration(node, parent) { - if (!t().isExportDefaultDeclaration(parent) && !t().isExportNamedDeclaration(parent)) { + if (!this.format.decoratorsBeforeExport || !t().isExportDefaultDeclaration(parent) && !t().isExportNamedDeclaration(parent)) { this.printJoin(node.decorators, node); } @@ -141,6 +142,7 @@ function ClassPrivateProperty(node) { } this.print(node.key, node); + this.print(node.typeAnnotation, node); if (node.value) { this.space(); @@ -159,6 +161,13 @@ function ClassMethod(node) { this.print(node.body, node); } +function ClassPrivateMethod(node) { + this._classMethodHead(node); + + this.space(); + this.print(node.body, node); +} + function _classMethodHead(node) { this.printJoin(node.decorators, node); diff --git a/node_modules/@babel/generator/lib/generators/expressions.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/expressions.js similarity index 91% rename from node_modules/@babel/generator/lib/generators/expressions.js rename to node_modules/@babel/core/node_modules/@babel/generator/lib/generators/expressions.js index b60a601..45efa98 100644 --- a/node_modules/@babel/generator/lib/generators/expressions.js +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/expressions.js @@ -28,9 +28,9 @@ exports.PrivateName = PrivateName; exports.AwaitExpression = exports.YieldExpression = void 0; function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -42,7 +42,7 @@ var n = _interopRequireWildcard(require("../node")); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function UnaryExpression(node) { - if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof") { + if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") { this.word(node.operator); this.space(); } else { @@ -99,6 +99,7 @@ function NewExpression(node, parent) { return; } + this.print(node.typeArguments, node); this.print(node.typeParameters, node); if (node.optional) { @@ -124,7 +125,7 @@ function Super() { function Decorator(node) { this.token("@"); - this.print(node.callee, node); + this.print(node.expression, node); this.newline(); } @@ -135,7 +136,7 @@ function OptionalMemberExpression(node) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } - var computed = node.computed; + let computed = node.computed; if (t().isLiteral(node.property) && typeof node.property.value === "number") { computed = true; @@ -160,6 +161,7 @@ function OptionalMemberExpression(node) { function OptionalCallExpression(node) { this.print(node.callee, node); + this.print(node.typeArguments, node); this.print(node.typeParameters, node); if (node.optional) { @@ -173,6 +175,7 @@ function OptionalCallExpression(node) { function CallExpression(node) { this.print(node.callee, node); + this.print(node.typeArguments, node); this.print(node.typeParameters, node); this.token("("); this.printList(node.arguments, node); @@ -193,16 +196,16 @@ function buildYieldAwait(keyword) { if (node.argument) { this.space(); - var terminatorState = this.startTerminatorless(); + const terminatorState = this.startTerminatorless(); this.print(node.argument, node); this.endTerminatorless(terminatorState); } }; } -var YieldExpression = buildYieldAwait("yield"); +const YieldExpression = buildYieldAwait("yield"); exports.YieldExpression = YieldExpression; -var AwaitExpression = buildYieldAwait("await"); +const AwaitExpression = buildYieldAwait("await"); exports.AwaitExpression = AwaitExpression; function EmptyStatement() { @@ -225,7 +228,7 @@ function AssignmentPattern(node) { } function AssignmentExpression(node, parent) { - var parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent); + const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent); if (parens) { this.token("("); @@ -261,7 +264,7 @@ function MemberExpression(node) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } - var computed = node.computed; + let computed = node.computed; if (t().isLiteral(node.property) && typeof node.property.value === "number") { computed = true; diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/flow.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/flow.js new file mode 100644 index 0000000..0b24d2c --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/flow.js @@ -0,0 +1,628 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.AnyTypeAnnotation = AnyTypeAnnotation; +exports.ArrayTypeAnnotation = ArrayTypeAnnotation; +exports.BooleanTypeAnnotation = BooleanTypeAnnotation; +exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; +exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; +exports.DeclareClass = DeclareClass; +exports.DeclareFunction = DeclareFunction; +exports.InferredPredicate = InferredPredicate; +exports.DeclaredPredicate = DeclaredPredicate; +exports.DeclareInterface = DeclareInterface; +exports.DeclareModule = DeclareModule; +exports.DeclareModuleExports = DeclareModuleExports; +exports.DeclareTypeAlias = DeclareTypeAlias; +exports.DeclareOpaqueType = DeclareOpaqueType; +exports.DeclareVariable = DeclareVariable; +exports.DeclareExportDeclaration = DeclareExportDeclaration; +exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; +exports.ExistsTypeAnnotation = ExistsTypeAnnotation; +exports.FunctionTypeAnnotation = FunctionTypeAnnotation; +exports.FunctionTypeParam = FunctionTypeParam; +exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends; +exports._interfaceish = _interfaceish; +exports._variance = _variance; +exports.InterfaceDeclaration = InterfaceDeclaration; +exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; +exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; +exports.MixedTypeAnnotation = MixedTypeAnnotation; +exports.EmptyTypeAnnotation = EmptyTypeAnnotation; +exports.NullableTypeAnnotation = NullableTypeAnnotation; +exports.NumberTypeAnnotation = NumberTypeAnnotation; +exports.StringTypeAnnotation = StringTypeAnnotation; +exports.ThisTypeAnnotation = ThisTypeAnnotation; +exports.TupleTypeAnnotation = TupleTypeAnnotation; +exports.TypeofTypeAnnotation = TypeofTypeAnnotation; +exports.TypeAlias = TypeAlias; +exports.TypeAnnotation = TypeAnnotation; +exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation; +exports.TypeParameter = TypeParameter; +exports.OpaqueType = OpaqueType; +exports.ObjectTypeAnnotation = ObjectTypeAnnotation; +exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; +exports.ObjectTypeCallProperty = ObjectTypeCallProperty; +exports.ObjectTypeIndexer = ObjectTypeIndexer; +exports.ObjectTypeProperty = ObjectTypeProperty; +exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; +exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; +exports.UnionTypeAnnotation = UnionTypeAnnotation; +exports.TypeCastExpression = TypeCastExpression; +exports.Variance = Variance; +exports.VoidTypeAnnotation = VoidTypeAnnotation; +Object.defineProperty(exports, "NumberLiteralTypeAnnotation", { + enumerable: true, + get: function () { + return _types2.NumericLiteral; + } +}); +Object.defineProperty(exports, "StringLiteralTypeAnnotation", { + enumerable: true, + get: function () { + return _types2.StringLiteral; + } +}); + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +var _modules = require("./modules"); + +var _types2 = require("./types"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function AnyTypeAnnotation() { + this.word("any"); +} + +function ArrayTypeAnnotation(node) { + this.print(node.elementType, node); + this.token("["); + this.token("]"); +} + +function BooleanTypeAnnotation() { + this.word("boolean"); +} + +function BooleanLiteralTypeAnnotation(node) { + this.word(node.value ? "true" : "false"); +} + +function NullLiteralTypeAnnotation() { + this.word("null"); +} + +function DeclareClass(node, parent) { + if (!t().isDeclareExportDeclaration(parent)) { + this.word("declare"); + this.space(); + } + + this.word("class"); + this.space(); + + this._interfaceish(node); +} + +function DeclareFunction(node, parent) { + if (!t().isDeclareExportDeclaration(parent)) { + this.word("declare"); + this.space(); + } + + this.word("function"); + this.space(); + this.print(node.id, node); + this.print(node.id.typeAnnotation.typeAnnotation, node); + + if (node.predicate) { + this.space(); + this.print(node.predicate, node); + } + + this.semicolon(); +} + +function InferredPredicate() { + this.token("%"); + this.word("checks"); +} + +function DeclaredPredicate(node) { + this.token("%"); + this.word("checks"); + this.token("("); + this.print(node.value, node); + this.token(")"); +} + +function DeclareInterface(node) { + this.word("declare"); + this.space(); + this.InterfaceDeclaration(node); +} + +function DeclareModule(node) { + this.word("declare"); + this.space(); + this.word("module"); + this.space(); + this.print(node.id, node); + this.space(); + this.print(node.body, node); +} + +function DeclareModuleExports(node) { + this.word("declare"); + this.space(); + this.word("module"); + this.token("."); + this.word("exports"); + this.print(node.typeAnnotation, node); +} + +function DeclareTypeAlias(node) { + this.word("declare"); + this.space(); + this.TypeAlias(node); +} + +function DeclareOpaqueType(node, parent) { + if (!t().isDeclareExportDeclaration(parent)) { + this.word("declare"); + this.space(); + } + + this.OpaqueType(node); +} + +function DeclareVariable(node, parent) { + if (!t().isDeclareExportDeclaration(parent)) { + this.word("declare"); + this.space(); + } + + this.word("var"); + this.space(); + this.print(node.id, node); + this.print(node.id.typeAnnotation, node); + this.semicolon(); +} + +function DeclareExportDeclaration(node) { + this.word("declare"); + this.space(); + this.word("export"); + this.space(); + + if (node.default) { + this.word("default"); + this.space(); + } + + FlowExportDeclaration.apply(this, arguments); +} + +function DeclareExportAllDeclaration() { + this.word("declare"); + this.space(); + + _modules.ExportAllDeclaration.apply(this, arguments); +} + +function FlowExportDeclaration(node) { + if (node.declaration) { + const declar = node.declaration; + this.print(declar, node); + if (!t().isStatement(declar)) this.semicolon(); + } else { + this.token("{"); + + if (node.specifiers.length) { + this.space(); + this.printList(node.specifiers, node); + this.space(); + } + + this.token("}"); + + if (node.source) { + this.space(); + this.word("from"); + this.space(); + this.print(node.source, node); + } + + this.semicolon(); + } +} + +function ExistsTypeAnnotation() { + this.token("*"); +} + +function FunctionTypeAnnotation(node, parent) { + this.print(node.typeParameters, node); + this.token("("); + this.printList(node.params, node); + + if (node.rest) { + if (node.params.length) { + this.token(","); + this.space(); + } + + this.token("..."); + this.print(node.rest, node); + } + + this.token(")"); + + if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) { + this.token(":"); + } else { + this.space(); + this.token("=>"); + } + + this.space(); + this.print(node.returnType, node); +} + +function FunctionTypeParam(node) { + this.print(node.name, node); + if (node.optional) this.token("?"); + + if (node.name) { + this.token(":"); + this.space(); + } + + this.print(node.typeAnnotation, node); +} + +function InterfaceExtends(node) { + this.print(node.id, node); + this.print(node.typeParameters, node); +} + +function _interfaceish(node) { + this.print(node.id, node); + this.print(node.typeParameters, node); + + if (node.extends.length) { + this.space(); + this.word("extends"); + this.space(); + this.printList(node.extends, node); + } + + if (node.mixins && node.mixins.length) { + this.space(); + this.word("mixins"); + this.space(); + this.printList(node.mixins, node); + } + + if (node.implements && node.implements.length) { + this.space(); + this.word("implements"); + this.space(); + this.printList(node.implements, node); + } + + this.space(); + this.print(node.body, node); +} + +function _variance(node) { + if (node.variance) { + if (node.variance.kind === "plus") { + this.token("+"); + } else if (node.variance.kind === "minus") { + this.token("-"); + } + } +} + +function InterfaceDeclaration(node) { + this.word("interface"); + this.space(); + + this._interfaceish(node); +} + +function andSeparator() { + this.space(); + this.token("&"); + this.space(); +} + +function InterfaceTypeAnnotation(node) { + this.word("interface"); + + if (node.extends && node.extends.length) { + this.space(); + this.word("extends"); + this.space(); + this.printList(node.extends, node); + } + + this.space(); + this.print(node.body, node); +} + +function IntersectionTypeAnnotation(node) { + this.printJoin(node.types, node, { + separator: andSeparator + }); +} + +function MixedTypeAnnotation() { + this.word("mixed"); +} + +function EmptyTypeAnnotation() { + this.word("empty"); +} + +function NullableTypeAnnotation(node) { + this.token("?"); + this.print(node.typeAnnotation, node); +} + +function NumberTypeAnnotation() { + this.word("number"); +} + +function StringTypeAnnotation() { + this.word("string"); +} + +function ThisTypeAnnotation() { + this.word("this"); +} + +function TupleTypeAnnotation(node) { + this.token("["); + this.printList(node.types, node); + this.token("]"); +} + +function TypeofTypeAnnotation(node) { + this.word("typeof"); + this.space(); + this.print(node.argument, node); +} + +function TypeAlias(node) { + this.word("type"); + this.space(); + this.print(node.id, node); + this.print(node.typeParameters, node); + this.space(); + this.token("="); + this.space(); + this.print(node.right, node); + this.semicolon(); +} + +function TypeAnnotation(node) { + this.token(":"); + this.space(); + if (node.optional) this.token("?"); + this.print(node.typeAnnotation, node); +} + +function TypeParameterInstantiation(node) { + this.token("<"); + this.printList(node.params, node, {}); + this.token(">"); +} + +function TypeParameter(node) { + this._variance(node); + + this.word(node.name); + + if (node.bound) { + this.print(node.bound, node); + } + + if (node.default) { + this.space(); + this.token("="); + this.space(); + this.print(node.default, node); + } +} + +function OpaqueType(node) { + this.word("opaque"); + this.space(); + this.word("type"); + this.space(); + this.print(node.id, node); + this.print(node.typeParameters, node); + + if (node.supertype) { + this.token(":"); + this.space(); + this.print(node.supertype, node); + } + + if (node.impltype) { + this.space(); + this.token("="); + this.space(); + this.print(node.impltype, node); + } + + this.semicolon(); +} + +function ObjectTypeAnnotation(node) { + if (node.exact) { + this.token("{|"); + } else { + this.token("{"); + } + + const props = node.properties.concat(node.callProperties || [], node.indexers || [], node.internalSlots || []); + + if (props.length) { + this.space(); + this.printJoin(props, node, { + addNewlines(leading) { + if (leading && !props[0]) return 1; + }, + + indent: true, + statement: true, + iterator: () => { + if (props.length !== 1) { + this.token(","); + this.space(); + } + } + }); + this.space(); + } + + if (node.exact) { + this.token("|}"); + } else { + this.token("}"); + } +} + +function ObjectTypeInternalSlot(node) { + if (node.static) { + this.word("static"); + this.space(); + } + + this.token("["); + this.token("["); + this.print(node.id, node); + this.token("]"); + this.token("]"); + if (node.optional) this.token("?"); + + if (!node.method) { + this.token(":"); + this.space(); + } + + this.print(node.value, node); +} + +function ObjectTypeCallProperty(node) { + if (node.static) { + this.word("static"); + this.space(); + } + + this.print(node.value, node); +} + +function ObjectTypeIndexer(node) { + if (node.static) { + this.word("static"); + this.space(); + } + + this._variance(node); + + this.token("["); + + if (node.id) { + this.print(node.id, node); + this.token(":"); + this.space(); + } + + this.print(node.key, node); + this.token("]"); + this.token(":"); + this.space(); + this.print(node.value, node); +} + +function ObjectTypeProperty(node) { + if (node.proto) { + this.word("proto"); + this.space(); + } + + if (node.static) { + this.word("static"); + this.space(); + } + + this._variance(node); + + this.print(node.key, node); + if (node.optional) this.token("?"); + + if (!node.method) { + this.token(":"); + this.space(); + } + + this.print(node.value, node); +} + +function ObjectTypeSpreadProperty(node) { + this.token("..."); + this.print(node.argument, node); +} + +function QualifiedTypeIdentifier(node) { + this.print(node.qualification, node); + this.token("."); + this.print(node.id, node); +} + +function orSeparator() { + this.space(); + this.token("|"); + this.space(); +} + +function UnionTypeAnnotation(node) { + this.printJoin(node.types, node, { + separator: orSeparator + }); +} + +function TypeCastExpression(node) { + this.token("("); + this.print(node.expression, node); + this.print(node.typeAnnotation, node); + this.token(")"); +} + +function Variance(node) { + if (node.kind === "plus") { + this.token("+"); + } else { + this.token("-"); + } +} + +function VoidTypeAnnotation() { + this.word("void"); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/index.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/index.js new file mode 100644 index 0000000..f2b4cec --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/index.js @@ -0,0 +1,137 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _templateLiterals = require("./template-literals"); + +Object.keys(_templateLiterals).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _templateLiterals[key]; + } + }); +}); + +var _expressions = require("./expressions"); + +Object.keys(_expressions).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _expressions[key]; + } + }); +}); + +var _statements = require("./statements"); + +Object.keys(_statements).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _statements[key]; + } + }); +}); + +var _classes = require("./classes"); + +Object.keys(_classes).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _classes[key]; + } + }); +}); + +var _methods = require("./methods"); + +Object.keys(_methods).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _methods[key]; + } + }); +}); + +var _modules = require("./modules"); + +Object.keys(_modules).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _modules[key]; + } + }); +}); + +var _types = require("./types"); + +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _types[key]; + } + }); +}); + +var _flow = require("./flow"); + +Object.keys(_flow).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _flow[key]; + } + }); +}); + +var _base = require("./base"); + +Object.keys(_base).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _base[key]; + } + }); +}); + +var _jsx = require("./jsx"); + +Object.keys(_jsx).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _jsx[key]; + } + }); +}); + +var _typescript = require("./typescript"); + +Object.keys(_typescript).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _typescript[key]; + } + }); +}); \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/jsx.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/jsx.js new file mode 100644 index 0000000..4850913 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/jsx.js @@ -0,0 +1,145 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.JSXAttribute = JSXAttribute; +exports.JSXIdentifier = JSXIdentifier; +exports.JSXNamespacedName = JSXNamespacedName; +exports.JSXMemberExpression = JSXMemberExpression; +exports.JSXSpreadAttribute = JSXSpreadAttribute; +exports.JSXExpressionContainer = JSXExpressionContainer; +exports.JSXSpreadChild = JSXSpreadChild; +exports.JSXText = JSXText; +exports.JSXElement = JSXElement; +exports.JSXOpeningElement = JSXOpeningElement; +exports.JSXClosingElement = JSXClosingElement; +exports.JSXEmptyExpression = JSXEmptyExpression; +exports.JSXFragment = JSXFragment; +exports.JSXOpeningFragment = JSXOpeningFragment; +exports.JSXClosingFragment = JSXClosingFragment; + +function JSXAttribute(node) { + this.print(node.name, node); + + if (node.value) { + this.token("="); + this.print(node.value, node); + } +} + +function JSXIdentifier(node) { + this.word(node.name); +} + +function JSXNamespacedName(node) { + this.print(node.namespace, node); + this.token(":"); + this.print(node.name, node); +} + +function JSXMemberExpression(node) { + this.print(node.object, node); + this.token("."); + this.print(node.property, node); +} + +function JSXSpreadAttribute(node) { + this.token("{"); + this.token("..."); + this.print(node.argument, node); + this.token("}"); +} + +function JSXExpressionContainer(node) { + this.token("{"); + this.print(node.expression, node); + this.token("}"); +} + +function JSXSpreadChild(node) { + this.token("{"); + this.token("..."); + this.print(node.expression, node); + this.token("}"); +} + +function JSXText(node) { + const raw = this.getPossibleRaw(node); + + if (raw != null) { + this.token(raw); + } else { + this.token(node.value); + } +} + +function JSXElement(node) { + const open = node.openingElement; + this.print(open, node); + if (open.selfClosing) return; + this.indent(); + + for (const child of node.children) { + this.print(child, node); + } + + this.dedent(); + this.print(node.closingElement, node); +} + +function spaceSeparator() { + this.space(); +} + +function JSXOpeningElement(node) { + this.token("<"); + this.print(node.name, node); + this.print(node.typeParameters, node); + + if (node.attributes.length > 0) { + this.space(); + this.printJoin(node.attributes, node, { + separator: spaceSeparator + }); + } + + if (node.selfClosing) { + this.space(); + this.token("/>"); + } else { + this.token(">"); + } +} + +function JSXClosingElement(node) { + this.token(""); +} + +function JSXEmptyExpression(node) { + this.printInnerComments(node); +} + +function JSXFragment(node) { + this.print(node.openingFragment, node); + this.indent(); + + for (const child of node.children) { + this.print(child, node); + } + + this.dedent(); + this.print(node.closingFragment, node); +} + +function JSXOpeningFragment() { + this.token("<"); + this.token(">"); +} + +function JSXClosingFragment() { + this.token(""); +} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/methods.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/methods.js similarity index 81% rename from node_modules/@babel/generator/lib/generators/methods.js rename to node_modules/@babel/core/node_modules/@babel/generator/lib/generators/methods.js index 91fdafb..39965ba 100644 --- a/node_modules/@babel/generator/lib/generators/methods.js +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/methods.js @@ -13,9 +13,9 @@ exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression; exports.ArrowFunctionExpression = ArrowFunctionExpression; function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -35,7 +35,7 @@ function _params(node) { } function _parameters(parameters, parent) { - for (var i = 0; i < parameters.length; i++) { + for (let i = 0; i < parameters.length; i++) { this._param(parameters[i], parent); if (i < parameters.length - 1) { @@ -53,8 +53,8 @@ function _param(parameter, parent) { } function _methodHead(node) { - var kind = node.kind; - var key = node.key; + const kind = node.kind; + const key = node.key; if (kind === "get" || kind === "set") { this.word(kind); @@ -130,10 +130,26 @@ function ArrowFunctionExpression(node) { this.space(); } - var firstParam = node.params[0]; + const firstParam = node.params[0]; if (node.params.length === 1 && t().isIdentifier(firstParam) && !hasTypes(node, firstParam)) { - this.print(firstParam, node); + if (this.format.retainLines && node.loc && node.body.loc && node.loc.start.line < node.body.loc.start.line) { + this.token("("); + + if (firstParam.loc && firstParam.loc.start.line > node.loc.start.line) { + this.indent(); + this.print(firstParam, node); + this.dedent(); + + this._catchUp("start", node.body.loc); + } else { + this.print(firstParam, node); + } + + this.token(")"); + } else { + this.print(firstParam, node); + } } else { this._params(node); } diff --git a/node_modules/@babel/generator/lib/generators/modules.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/modules.js similarity index 90% rename from node_modules/@babel/generator/lib/generators/modules.js rename to node_modules/@babel/core/node_modules/@babel/generator/lib/generators/modules.js index bcfd609..af87bd5 100644 --- a/node_modules/@babel/generator/lib/generators/modules.js +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/modules.js @@ -15,9 +15,9 @@ exports.ImportDeclaration = ImportDeclaration; exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -87,7 +87,7 @@ function ExportAllDeclaration(node) { } function ExportNamedDeclaration(node) { - if (t().isClassDeclaration(node.declaration)) { + if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) { this.printJoin(node.declaration.decorators, node); } @@ -97,7 +97,7 @@ function ExportNamedDeclaration(node) { } function ExportDefaultDeclaration(node) { - if (t().isClassDeclaration(node.declaration)) { + if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) { this.printJoin(node.declaration.decorators, node); } @@ -110,7 +110,7 @@ function ExportDefaultDeclaration(node) { function ExportDeclaration(node) { if (node.declaration) { - var declar = node.declaration; + const declar = node.declaration; this.print(declar, node); if (!t().isStatement(declar)) this.semicolon(); } else { @@ -119,11 +119,11 @@ function ExportDeclaration(node) { this.space(); } - var specifiers = node.specifiers.slice(0); - var hasSpecial = false; + const specifiers = node.specifiers.slice(0); + let hasSpecial = false; while (true) { - var first = specifiers[0]; + const first = specifiers[0]; if (t().isExportDefaultSpecifier(first) || t().isExportNamespaceSpecifier(first)) { hasSpecial = true; @@ -170,11 +170,11 @@ function ImportDeclaration(node) { this.space(); } - var specifiers = node.specifiers.slice(0); + const specifiers = node.specifiers.slice(0); if (specifiers && specifiers.length) { while (true) { - var first = specifiers[0]; + const first = specifiers[0]; if (t().isImportDefaultSpecifier(first) || t().isImportNamespaceSpecifier(first)) { this.print(specifiers.shift(), node); diff --git a/node_modules/@babel/generator/lib/generators/statements.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/statements.js similarity index 84% rename from node_modules/@babel/generator/lib/generators/statements.js rename to node_modules/@babel/core/node_modules/@babel/generator/lib/generators/statements.js index 1e588f8..c74363d 100644 --- a/node_modules/@babel/generator/lib/generators/statements.js +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/statements.js @@ -19,9 +19,9 @@ exports.VariableDeclarator = VariableDeclarator; exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0; function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -46,7 +46,7 @@ function IfStatement(node) { this.print(node.test, node); this.token(")"); this.space(); - var needsBlock = node.alternate && t().isIfStatement(getLastStatement(node.consequent)); + const needsBlock = node.alternate && t().isIfStatement(getLastStatement(node.consequent)); if (needsBlock) { this.token("{"); @@ -109,7 +109,7 @@ function WhileStatement(node) { this.printBlock(node); } -var buildForXStatement = function buildForXStatement(op) { +const buildForXStatement = function (op) { return function (node) { this.word("for"); this.space(); @@ -130,9 +130,9 @@ var buildForXStatement = function buildForXStatement(op) { }; }; -var ForInStatement = buildForXStatement("in"); +const ForInStatement = buildForXStatement("in"); exports.ForInStatement = ForInStatement; -var ForOfStatement = buildForXStatement("of"); +const ForOfStatement = buildForXStatement("of"); exports.ForOfStatement = ForOfStatement; function DoWhileStatement(node) { @@ -148,19 +148,15 @@ function DoWhileStatement(node) { this.semicolon(); } -function buildLabelStatement(prefix, key) { - if (key === void 0) { - key = "label"; - } - +function buildLabelStatement(prefix, key = "label") { return function (node) { this.word(prefix); - var label = node[key]; + const label = node[key]; if (label) { this.space(); - var isLabel = key == "label"; - var terminatorState = this.startTerminatorless(isLabel); + const isLabel = key == "label"; + const terminatorState = this.startTerminatorless(isLabel); this.print(label, node); this.endTerminatorless(terminatorState); } @@ -169,13 +165,13 @@ function buildLabelStatement(prefix, key) { }; } -var ContinueStatement = buildLabelStatement("continue"); +const ContinueStatement = buildLabelStatement("continue"); exports.ContinueStatement = ContinueStatement; -var ReturnStatement = buildLabelStatement("return", "argument"); +const ReturnStatement = buildLabelStatement("return", "argument"); exports.ReturnStatement = ReturnStatement; -var BreakStatement = buildLabelStatement("break"); +const BreakStatement = buildLabelStatement("break"); exports.BreakStatement = BreakStatement; -var ThrowStatement = buildLabelStatement("throw", "argument"); +const ThrowStatement = buildLabelStatement("throw", "argument"); exports.ThrowStatement = ThrowStatement; function LabeledStatement(node) { @@ -229,9 +225,11 @@ function SwitchStatement(node) { this.token("{"); this.printSequence(node.cases, node, { indent: true, - addNewlines: function addNewlines(leading, cas) { + + addNewlines(leading, cas) { if (!leading && node.cases[node.cases.length - 1] === cas) return -1; } + }); this.token("}"); } @@ -263,17 +261,13 @@ function DebuggerStatement() { function variableDeclarationIndent() { this.token(","); this.newline(); - if (this.endsWith("\n")) for (var i = 0; i < 4; i++) { - this.space(true); - } + if (this.endsWith("\n")) for (let i = 0; i < 4; i++) this.space(true); } function constDeclarationIndent() { this.token(","); this.newline(); - if (this.endsWith("\n")) for (var i = 0; i < 6; i++) { - this.space(true); - } + if (this.endsWith("\n")) for (let i = 0; i < 6; i++) this.space(true); } function VariableDeclaration(node, parent) { @@ -284,28 +278,24 @@ function VariableDeclaration(node, parent) { this.word(node.kind); this.space(); - var hasInits = false; + let hasInits = false; if (!t().isFor(parent)) { - var _arr = node.declarations; - - for (var _i = 0; _i < _arr.length; _i++) { - var declar = _arr[_i]; - + for (const declar of node.declarations) { if (declar.init) { hasInits = true; } } } - var separator; + let separator; if (hasInits) { separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent; } this.printList(node.declarations, node, { - separator: separator + separator }); if (t().isFor(parent)) { diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/template-literals.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/template-literals.js new file mode 100644 index 0000000..0543303 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/template-literals.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TaggedTemplateExpression = TaggedTemplateExpression; +exports.TemplateElement = TemplateElement; +exports.TemplateLiteral = TemplateLiteral; + +function TaggedTemplateExpression(node) { + this.print(node.tag, node); + this.print(node.typeParameters, node); + this.print(node.quasi, node); +} + +function TemplateElement(node, parent) { + const isFirst = parent.quasis[0] === node; + const isLast = parent.quasis[parent.quasis.length - 1] === node; + const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${"); + this.token(value); +} + +function TemplateLiteral(node) { + const quasis = node.quasis; + + for (let i = 0; i < quasis.length; i++) { + this.print(quasis[i], node); + + if (i + 1 < quasis.length) { + this.print(node.expressions[i], node); + } + } +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/types.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/types.js new file mode 100644 index 0000000..12ae494 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/types.js @@ -0,0 +1,198 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Identifier = Identifier; +exports.ArgumentPlaceholder = ArgumentPlaceholder; +exports.SpreadElement = exports.RestElement = RestElement; +exports.ObjectPattern = exports.ObjectExpression = ObjectExpression; +exports.ObjectMethod = ObjectMethod; +exports.ObjectProperty = ObjectProperty; +exports.ArrayPattern = exports.ArrayExpression = ArrayExpression; +exports.RegExpLiteral = RegExpLiteral; +exports.BooleanLiteral = BooleanLiteral; +exports.NullLiteral = NullLiteral; +exports.NumericLiteral = NumericLiteral; +exports.StringLiteral = StringLiteral; +exports.BigIntLiteral = BigIntLiteral; +exports.PipelineTopicExpression = PipelineTopicExpression; +exports.PipelineBareFunction = PipelineBareFunction; +exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _jsesc() { + const data = _interopRequireDefault(require("jsesc")); + + _jsesc = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function Identifier(node) { + this.exactSource(node.loc, () => { + this.word(node.name); + }); +} + +function ArgumentPlaceholder() { + this.token("?"); +} + +function RestElement(node) { + this.token("..."); + this.print(node.argument, node); +} + +function ObjectExpression(node) { + const props = node.properties; + this.token("{"); + this.printInnerComments(node); + + if (props.length) { + this.space(); + this.printList(props, node, { + indent: true, + statement: true + }); + this.space(); + } + + this.token("}"); +} + +function ObjectMethod(node) { + this.printJoin(node.decorators, node); + + this._methodHead(node); + + this.space(); + this.print(node.body, node); +} + +function ObjectProperty(node) { + this.printJoin(node.decorators, node); + + if (node.computed) { + this.token("["); + this.print(node.key, node); + this.token("]"); + } else { + if (t().isAssignmentPattern(node.value) && t().isIdentifier(node.key) && node.key.name === node.value.left.name) { + this.print(node.value, node); + return; + } + + this.print(node.key, node); + + if (node.shorthand && t().isIdentifier(node.key) && t().isIdentifier(node.value) && node.key.name === node.value.name) { + return; + } + } + + this.token(":"); + this.space(); + this.print(node.value, node); +} + +function ArrayExpression(node) { + const elems = node.elements; + const len = elems.length; + this.token("["); + this.printInnerComments(node); + + for (let i = 0; i < elems.length; i++) { + const elem = elems[i]; + + if (elem) { + if (i > 0) this.space(); + this.print(elem, node); + if (i < len - 1) this.token(","); + } else { + this.token(","); + } + } + + this.token("]"); +} + +function RegExpLiteral(node) { + this.word(`/${node.pattern}/${node.flags}`); +} + +function BooleanLiteral(node) { + this.word(node.value ? "true" : "false"); +} + +function NullLiteral() { + this.word("null"); +} + +function NumericLiteral(node) { + const raw = this.getPossibleRaw(node); + const value = node.value + ""; + + if (raw == null) { + this.number(value); + } else if (this.format.minified) { + this.number(raw.length < value.length ? raw : value); + } else { + this.number(raw); + } +} + +function StringLiteral(node) { + const raw = this.getPossibleRaw(node); + + if (!this.format.minified && raw != null) { + this.token(raw); + return; + } + + const opts = this.format.jsescOption; + + if (this.format.jsonCompatibleStrings) { + opts.json = true; + } + + const val = (0, _jsesc().default)(node.value, opts); + return this.token(val); +} + +function BigIntLiteral(node) { + const raw = this.getPossibleRaw(node); + + if (!this.format.minified && raw != null) { + this.token(raw); + return; + } + + this.token(node.value); +} + +function PipelineTopicExpression(node) { + this.print(node.expression, node); +} + +function PipelineBareFunction(node) { + this.print(node.callee, node); +} + +function PipelinePrimaryTopicReference() { + this.token("#"); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/typescript.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/typescript.js new file mode 100644 index 0000000..0355057 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/typescript.js @@ -0,0 +1,715 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TSTypeAnnotation = TSTypeAnnotation; +exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; +exports.TSTypeParameter = TSTypeParameter; +exports.TSParameterProperty = TSParameterProperty; +exports.TSDeclareFunction = TSDeclareFunction; +exports.TSDeclareMethod = TSDeclareMethod; +exports.TSQualifiedName = TSQualifiedName; +exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; +exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; +exports.TSPropertySignature = TSPropertySignature; +exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName; +exports.TSMethodSignature = TSMethodSignature; +exports.TSIndexSignature = TSIndexSignature; +exports.TSAnyKeyword = TSAnyKeyword; +exports.TSUnknownKeyword = TSUnknownKeyword; +exports.TSNumberKeyword = TSNumberKeyword; +exports.TSObjectKeyword = TSObjectKeyword; +exports.TSBooleanKeyword = TSBooleanKeyword; +exports.TSStringKeyword = TSStringKeyword; +exports.TSSymbolKeyword = TSSymbolKeyword; +exports.TSVoidKeyword = TSVoidKeyword; +exports.TSUndefinedKeyword = TSUndefinedKeyword; +exports.TSNullKeyword = TSNullKeyword; +exports.TSNeverKeyword = TSNeverKeyword; +exports.TSThisType = TSThisType; +exports.TSFunctionType = TSFunctionType; +exports.TSConstructorType = TSConstructorType; +exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType; +exports.TSTypeReference = TSTypeReference; +exports.TSTypePredicate = TSTypePredicate; +exports.TSTypeQuery = TSTypeQuery; +exports.TSTypeLiteral = TSTypeLiteral; +exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody; +exports.tsPrintBraced = tsPrintBraced; +exports.TSArrayType = TSArrayType; +exports.TSTupleType = TSTupleType; +exports.TSOptionalType = TSOptionalType; +exports.TSRestType = TSRestType; +exports.TSUnionType = TSUnionType; +exports.TSIntersectionType = TSIntersectionType; +exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType; +exports.TSConditionalType = TSConditionalType; +exports.TSInferType = TSInferType; +exports.TSParenthesizedType = TSParenthesizedType; +exports.TSTypeOperator = TSTypeOperator; +exports.TSIndexedAccessType = TSIndexedAccessType; +exports.TSMappedType = TSMappedType; +exports.TSLiteralType = TSLiteralType; +exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; +exports.TSInterfaceDeclaration = TSInterfaceDeclaration; +exports.TSInterfaceBody = TSInterfaceBody; +exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; +exports.TSAsExpression = TSAsExpression; +exports.TSTypeAssertion = TSTypeAssertion; +exports.TSEnumDeclaration = TSEnumDeclaration; +exports.TSEnumMember = TSEnumMember; +exports.TSModuleDeclaration = TSModuleDeclaration; +exports.TSModuleBlock = TSModuleBlock; +exports.TSImportType = TSImportType; +exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; +exports.TSExternalModuleReference = TSExternalModuleReference; +exports.TSNonNullExpression = TSNonNullExpression; +exports.TSExportAssignment = TSExportAssignment; +exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; +exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase; + +function TSTypeAnnotation(node) { + this.token(":"); + this.space(); + if (node.optional) this.token("?"); + this.print(node.typeAnnotation, node); +} + +function TSTypeParameterInstantiation(node) { + this.token("<"); + this.printList(node.params, node, {}); + this.token(">"); +} + +function TSTypeParameter(node) { + this.word(node.name); + + if (node.constraint) { + this.space(); + this.word("extends"); + this.space(); + this.print(node.constraint, node); + } + + if (node.default) { + this.space(); + this.token("="); + this.space(); + this.print(node.default, node); + } +} + +function TSParameterProperty(node) { + if (node.accessibility) { + this.word(node.accessibility); + this.space(); + } + + if (node.readonly) { + this.word("readonly"); + this.space(); + } + + this._param(node.parameter); +} + +function TSDeclareFunction(node) { + if (node.declare) { + this.word("declare"); + this.space(); + } + + this._functionHead(node); + + this.token(";"); +} + +function TSDeclareMethod(node) { + this._classMethodHead(node); + + this.token(";"); +} + +function TSQualifiedName(node) { + this.print(node.left, node); + this.token("."); + this.print(node.right, node); +} + +function TSCallSignatureDeclaration(node) { + this.tsPrintSignatureDeclarationBase(node); +} + +function TSConstructSignatureDeclaration(node) { + this.word("new"); + this.space(); + this.tsPrintSignatureDeclarationBase(node); +} + +function TSPropertySignature(node) { + const { + readonly, + initializer + } = node; + + if (readonly) { + this.word("readonly"); + this.space(); + } + + this.tsPrintPropertyOrMethodName(node); + this.print(node.typeAnnotation, node); + + if (initializer) { + this.space(); + this.token("="); + this.space(); + this.print(initializer, node); + } + + this.token(";"); +} + +function tsPrintPropertyOrMethodName(node) { + if (node.computed) { + this.token("["); + } + + this.print(node.key, node); + + if (node.computed) { + this.token("]"); + } + + if (node.optional) { + this.token("?"); + } +} + +function TSMethodSignature(node) { + this.tsPrintPropertyOrMethodName(node); + this.tsPrintSignatureDeclarationBase(node); + this.token(";"); +} + +function TSIndexSignature(node) { + const { + readonly + } = node; + + if (readonly) { + this.word("readonly"); + this.space(); + } + + this.token("["); + + this._parameters(node.parameters, node); + + this.token("]"); + this.print(node.typeAnnotation, node); + this.token(";"); +} + +function TSAnyKeyword() { + this.word("any"); +} + +function TSUnknownKeyword() { + this.word("unknown"); +} + +function TSNumberKeyword() { + this.word("number"); +} + +function TSObjectKeyword() { + this.word("object"); +} + +function TSBooleanKeyword() { + this.word("boolean"); +} + +function TSStringKeyword() { + this.word("string"); +} + +function TSSymbolKeyword() { + this.word("symbol"); +} + +function TSVoidKeyword() { + this.word("void"); +} + +function TSUndefinedKeyword() { + this.word("undefined"); +} + +function TSNullKeyword() { + this.word("null"); +} + +function TSNeverKeyword() { + this.word("never"); +} + +function TSThisType() { + this.word("this"); +} + +function TSFunctionType(node) { + this.tsPrintFunctionOrConstructorType(node); +} + +function TSConstructorType(node) { + this.word("new"); + this.space(); + this.tsPrintFunctionOrConstructorType(node); +} + +function tsPrintFunctionOrConstructorType(node) { + const { + typeParameters, + parameters + } = node; + this.print(typeParameters, node); + this.token("("); + + this._parameters(parameters, node); + + this.token(")"); + this.space(); + this.token("=>"); + this.space(); + this.print(node.typeAnnotation.typeAnnotation, node); +} + +function TSTypeReference(node) { + this.print(node.typeName, node); + this.print(node.typeParameters, node); +} + +function TSTypePredicate(node) { + this.print(node.parameterName); + this.space(); + this.word("is"); + this.space(); + this.print(node.typeAnnotation.typeAnnotation); +} + +function TSTypeQuery(node) { + this.word("typeof"); + this.space(); + this.print(node.exprName); +} + +function TSTypeLiteral(node) { + this.tsPrintTypeLiteralOrInterfaceBody(node.members, node); +} + +function tsPrintTypeLiteralOrInterfaceBody(members, node) { + this.tsPrintBraced(members, node); +} + +function tsPrintBraced(members, node) { + this.token("{"); + + if (members.length) { + this.indent(); + this.newline(); + + for (const member of members) { + this.print(member, node); + this.newline(); + } + + this.dedent(); + this.rightBrace(); + } else { + this.token("}"); + } +} + +function TSArrayType(node) { + this.print(node.elementType, node); + this.token("[]"); +} + +function TSTupleType(node) { + this.token("["); + this.printList(node.elementTypes, node); + this.token("]"); +} + +function TSOptionalType(node) { + this.print(node.typeAnnotation, node); + this.token("?"); +} + +function TSRestType(node) { + this.token("..."); + this.print(node.typeAnnotation, node); +} + +function TSUnionType(node) { + this.tsPrintUnionOrIntersectionType(node, "|"); +} + +function TSIntersectionType(node) { + this.tsPrintUnionOrIntersectionType(node, "&"); +} + +function tsPrintUnionOrIntersectionType(node, sep) { + this.printJoin(node.types, node, { + separator() { + this.space(); + this.token(sep); + this.space(); + } + + }); +} + +function TSConditionalType(node) { + this.print(node.checkType); + this.space(); + this.word("extends"); + this.space(); + this.print(node.extendsType); + this.space(); + this.token("?"); + this.space(); + this.print(node.trueType); + this.space(); + this.token(":"); + this.space(); + this.print(node.falseType); +} + +function TSInferType(node) { + this.token("infer"); + this.space(); + this.print(node.typeParameter); +} + +function TSParenthesizedType(node) { + this.token("("); + this.print(node.typeAnnotation, node); + this.token(")"); +} + +function TSTypeOperator(node) { + this.token(node.operator); + this.space(); + this.print(node.typeAnnotation, node); +} + +function TSIndexedAccessType(node) { + this.print(node.objectType, node); + this.token("["); + this.print(node.indexType, node); + this.token("]"); +} + +function TSMappedType(node) { + const { + readonly, + typeParameter, + optional + } = node; + this.token("{"); + this.space(); + + if (readonly) { + tokenIfPlusMinus(this, readonly); + this.word("readonly"); + this.space(); + } + + this.token("["); + this.word(typeParameter.name); + this.space(); + this.word("in"); + this.space(); + this.print(typeParameter.constraint, typeParameter); + this.token("]"); + + if (optional) { + tokenIfPlusMinus(this, optional); + this.token("?"); + } + + this.token(":"); + this.space(); + this.print(node.typeAnnotation, node); + this.space(); + this.token("}"); +} + +function tokenIfPlusMinus(self, tok) { + if (tok !== true) { + self.token(tok); + } +} + +function TSLiteralType(node) { + this.print(node.literal, node); +} + +function TSExpressionWithTypeArguments(node) { + this.print(node.expression, node); + this.print(node.typeParameters, node); +} + +function TSInterfaceDeclaration(node) { + const { + declare, + id, + typeParameters, + extends: extendz, + body + } = node; + + if (declare) { + this.word("declare"); + this.space(); + } + + this.word("interface"); + this.space(); + this.print(id, node); + this.print(typeParameters, node); + + if (extendz) { + this.space(); + this.word("extends"); + this.space(); + this.printList(extendz, node); + } + + this.space(); + this.print(body, node); +} + +function TSInterfaceBody(node) { + this.tsPrintTypeLiteralOrInterfaceBody(node.body, node); +} + +function TSTypeAliasDeclaration(node) { + const { + declare, + id, + typeParameters, + typeAnnotation + } = node; + + if (declare) { + this.word("declare"); + this.space(); + } + + this.word("type"); + this.space(); + this.print(id, node); + this.print(typeParameters, node); + this.space(); + this.token("="); + this.space(); + this.print(typeAnnotation, node); + this.token(";"); +} + +function TSAsExpression(node) { + const { + expression, + typeAnnotation + } = node; + this.print(expression, node); + this.space(); + this.word("as"); + this.space(); + this.print(typeAnnotation, node); +} + +function TSTypeAssertion(node) { + const { + typeAnnotation, + expression + } = node; + this.token("<"); + this.print(typeAnnotation, node); + this.token(">"); + this.space(); + this.print(expression, node); +} + +function TSEnumDeclaration(node) { + const { + declare, + const: isConst, + id, + members + } = node; + + if (declare) { + this.word("declare"); + this.space(); + } + + if (isConst) { + this.word("const"); + this.space(); + } + + this.word("enum"); + this.space(); + this.print(id, node); + this.space(); + this.tsPrintBraced(members, node); +} + +function TSEnumMember(node) { + const { + id, + initializer + } = node; + this.print(id, node); + + if (initializer) { + this.space(); + this.token("="); + this.space(); + this.print(initializer, node); + } + + this.token(","); +} + +function TSModuleDeclaration(node) { + const { + declare, + id + } = node; + + if (declare) { + this.word("declare"); + this.space(); + } + + if (!node.global) { + this.word(id.type === "Identifier" ? "namespace" : "module"); + this.space(); + } + + this.print(id, node); + + if (!node.body) { + this.token(";"); + return; + } + + let body = node.body; + + while (body.type === "TSModuleDeclaration") { + this.token("."); + this.print(body.id, body); + body = body.body; + } + + this.space(); + this.print(body, node); +} + +function TSModuleBlock(node) { + this.tsPrintBraced(node.body, node); +} + +function TSImportType(node) { + const { + argument, + qualifier, + typeParameters + } = node; + this.word("import"); + this.token("("); + this.print(argument, node); + this.token(")"); + + if (qualifier) { + this.token("."); + this.print(qualifier, node); + } + + if (typeParameters) { + this.print(typeParameters, node); + } +} + +function TSImportEqualsDeclaration(node) { + const { + isExport, + id, + moduleReference + } = node; + + if (isExport) { + this.word("export"); + this.space(); + } + + this.word("import"); + this.space(); + this.print(id, node); + this.space(); + this.token("="); + this.space(); + this.print(moduleReference, node); + this.token(";"); +} + +function TSExternalModuleReference(node) { + this.token("require("); + this.print(node.expression, node); + this.token(")"); +} + +function TSNonNullExpression(node) { + this.print(node.expression, node); + this.token("!"); +} + +function TSExportAssignment(node) { + this.word("export"); + this.space(); + this.token("="); + this.space(); + this.print(node.expression, node); + this.token(";"); +} + +function TSNamespaceExportDeclaration(node) { + this.word("export"); + this.space(); + this.word("as"); + this.space(); + this.word("namespace"); + this.space(); + this.print(node.id, node); +} + +function tsPrintSignatureDeclarationBase(node) { + const { + typeParameters, + parameters + } = node; + this.print(typeParameters, node); + this.token("("); + + this._parameters(parameters, node); + + this.token(")"); + this.print(node.typeAnnotation, node); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/index.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/index.js new file mode 100644 index 0000000..fcdb288 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/index.js @@ -0,0 +1,92 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.CodeGenerator = void 0; + +var _sourceMap = _interopRequireDefault(require("./source-map")); + +var _printer = _interopRequireDefault(require("./printer")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +class Generator extends _printer.default { + constructor(ast, opts = {}, code) { + const format = normalizeOptions(code, opts); + const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null; + super(format, map); + this.ast = ast; + } + + generate() { + return super.generate(this.ast); + } + +} + +function normalizeOptions(code, opts) { + const format = { + auxiliaryCommentBefore: opts.auxiliaryCommentBefore, + auxiliaryCommentAfter: opts.auxiliaryCommentAfter, + shouldPrintComment: opts.shouldPrintComment, + retainLines: opts.retainLines, + retainFunctionParens: opts.retainFunctionParens, + comments: opts.comments == null || opts.comments, + compact: opts.compact, + minified: opts.minified, + concise: opts.concise, + jsonCompatibleStrings: opts.jsonCompatibleStrings, + indent: { + adjustMultilineComment: true, + style: " ", + base: 0 + }, + decoratorsBeforeExport: !!opts.decoratorsBeforeExport, + jsescOption: Object.assign({ + quotes: "double", + wrap: true + }, opts.jsescOption) + }; + + if (format.minified) { + format.compact = true; + + format.shouldPrintComment = format.shouldPrintComment || (() => format.comments); + } else { + format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0); + } + + if (format.compact === "auto") { + format.compact = code.length > 500000; + + if (format.compact) { + console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`); + } + } + + if (format.compact) { + format.indent.adjustMultilineComment = false; + } + + return format; +} + +class CodeGenerator { + constructor(ast, opts, code) { + this._generator = new Generator(ast, opts, code); + } + + generate() { + return this._generator.generate(); + } + +} + +exports.CodeGenerator = CodeGenerator; + +function _default(ast, opts, code) { + const gen = new Generator(ast, opts, code); + return gen.generate(); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/node/index.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/node/index.js new file mode 100644 index 0000000..bef46f0 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/node/index.js @@ -0,0 +1,117 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.needsWhitespace = needsWhitespace; +exports.needsWhitespaceBefore = needsWhitespaceBefore; +exports.needsWhitespaceAfter = needsWhitespaceAfter; +exports.needsParens = needsParens; + +var whitespace = _interopRequireWildcard(require("./whitespace")); + +var parens = _interopRequireWildcard(require("./parentheses")); + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function expandAliases(obj) { + const newObj = {}; + + function add(type, func) { + const fn = newObj[type]; + newObj[type] = fn ? function (node, parent, stack) { + const result = fn(node, parent, stack); + return result == null ? func(node, parent, stack) : result; + } : func; + } + + for (const type of Object.keys(obj)) { + const aliases = t().FLIPPED_ALIAS_KEYS[type]; + + if (aliases) { + for (const alias of aliases) { + add(alias, obj[type]); + } + } else { + add(type, obj[type]); + } + } + + return newObj; +} + +const expandedParens = expandAliases(parens); +const expandedWhitespaceNodes = expandAliases(whitespace.nodes); +const expandedWhitespaceList = expandAliases(whitespace.list); + +function find(obj, node, parent, printStack) { + const fn = obj[node.type]; + return fn ? fn(node, parent, printStack) : null; +} + +function isOrHasCallExpression(node) { + if (t().isCallExpression(node)) { + return true; + } + + if (t().isMemberExpression(node)) { + return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property); + } else { + return false; + } +} + +function needsWhitespace(node, parent, type) { + if (!node) return 0; + + if (t().isExpressionStatement(node)) { + node = node.expression; + } + + let linesInfo = find(expandedWhitespaceNodes, node, parent); + + if (!linesInfo) { + const items = find(expandedWhitespaceList, node, parent); + + if (items) { + for (let i = 0; i < items.length; i++) { + linesInfo = needsWhitespace(items[i], node, type); + if (linesInfo) break; + } + } + } + + if (typeof linesInfo === "object" && linesInfo !== null) { + return linesInfo[type] || 0; + } + + return 0; +} + +function needsWhitespaceBefore(node, parent) { + return needsWhitespace(node, parent, "before"); +} + +function needsWhitespaceAfter(node, parent) { + return needsWhitespace(node, parent, "after"); +} + +function needsParens(node, parent, printStack) { + if (!parent) return false; + + if (t().isNewExpression(parent) && parent.callee === node) { + if (isOrHasCallExpression(node)) return true; + } + + return find(expandedParens, node, parent, printStack); +} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/parentheses.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/node/parentheses.js similarity index 78% rename from node_modules/@babel/generator/lib/node/parentheses.js rename to node_modules/@babel/core/node_modules/@babel/generator/lib/node/parentheses.js index c3c6df5..3f98dc1 100644 --- a/node_modules/@babel/generator/lib/node/parentheses.js +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/node/parentheses.js @@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.FunctionTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation; +exports.NullableTypeAnnotation = NullableTypeAnnotation; +exports.FunctionTypeAnnotation = FunctionTypeAnnotation; exports.UpdateExpression = UpdateExpression; exports.ObjectExpression = ObjectExpression; exports.DoExpression = DoExpression; @@ -11,6 +12,7 @@ exports.Binary = Binary; exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; exports.TSAsExpression = TSAsExpression; exports.TSTypeAssertion = TSTypeAssertion; +exports.TSIntersectionType = exports.TSUnionType = TSUnionType; exports.BinaryExpression = BinaryExpression; exports.SequenceExpression = SequenceExpression; exports.AwaitExpression = exports.YieldExpression = YieldExpression; @@ -19,13 +21,14 @@ exports.UnaryLike = UnaryLike; exports.FunctionExpression = FunctionExpression; exports.ArrowFunctionExpression = ArrowFunctionExpression; exports.ConditionalExpression = ConditionalExpression; +exports.OptionalMemberExpression = OptionalMemberExpression; exports.AssignmentExpression = AssignmentExpression; exports.NewExpression = NewExpression; function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -34,7 +37,7 @@ function t() { function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } -var PRECEDENCE = { +const PRECEDENCE = { "||": 0, "&&": 1, "|": 2, @@ -61,14 +64,16 @@ var PRECEDENCE = { "**": 10 }; -var isClassExtendsClause = function isClassExtendsClause(node, parent) { - return (t().isClassDeclaration(parent) || t().isClassExpression(parent)) && parent.superClass === node; -}; +const isClassExtendsClause = (node, parent) => (t().isClassDeclaration(parent) || t().isClassExpression(parent)) && parent.superClass === node; function NullableTypeAnnotation(node, parent) { return t().isArrayTypeAnnotation(parent); } +function FunctionTypeAnnotation(node, parent) { + return t().isUnionTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isArrayTypeAnnotation(parent); +} + function UpdateExpression(node, parent) { return t().isMemberExpression(parent, { object: node @@ -105,10 +110,10 @@ function Binary(node, parent) { } if (t().isBinary(parent)) { - var parentOp = parent.operator; - var parentPos = PRECEDENCE[parentOp]; - var nodeOp = node.operator; - var nodePos = PRECEDENCE[nodeOp]; + const parentOp = parent.operator; + const parentPos = PRECEDENCE[parentOp]; + const nodeOp = node.operator; + const nodePos = PRECEDENCE[nodeOp]; if (parentPos === nodePos && parent.right === node && !t().isLogicalExpression(parent) || parentPos > nodePos) { return true; @@ -130,6 +135,10 @@ function TSTypeAssertion() { return true; } +function TSUnionType(node, parent) { + return t().isTSArrayType(parent) || t().isTSOptionalType(parent) || t().isTSIntersectionType(parent) || t().isTSUnionType(parent) || t().isTSRestType(parent); +} + function BinaryExpression(node, parent) { return node.operator === "in" && (t().isVariableDeclarator(parent) || t().isFor(parent)); } @@ -143,7 +152,7 @@ function SequenceExpression(node, parent) { } function YieldExpression(node, parent) { - return t().isBinary(parent) || t().isUnaryLike(parent) || t().isCallExpression(parent) || t().isMemberExpression(parent) || t().isNewExpression(parent) || t().isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); + return t().isBinary(parent) || t().isUnaryLike(parent) || t().isCallExpression(parent) || t().isMemberExpression(parent) || t().isNewExpression(parent) || t().isAwaitExpression(parent) && t().isYieldExpression(node) || t().isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); } function ClassExpression(node, parent, printStack) { @@ -178,18 +187,22 @@ function ArrowFunctionExpression(node, parent) { function ConditionalExpression(node, parent) { if (t().isUnaryLike(parent) || t().isBinary(parent) || t().isConditionalExpression(parent, { test: node - }) || t().isAwaitExpression(parent) || t().isTaggedTemplateExpression(parent) || t().isTSTypeAssertion(parent) || t().isTSAsExpression(parent)) { + }) || t().isAwaitExpression(parent) || t().isOptionalMemberExpression(parent) || t().isTaggedTemplateExpression(parent) || t().isTSTypeAssertion(parent) || t().isTSAsExpression(parent)) { return true; } return UnaryLike(node, parent); } +function OptionalMemberExpression(node, parent) { + return t().isCallExpression(parent) || t().isMemberExpression(parent); +} + function AssignmentExpression(node) { if (t().isObjectPattern(node.left)) { return true; } else { - return ConditionalExpression.apply(void 0, arguments); + return ConditionalExpression(...arguments); } } @@ -197,17 +210,14 @@ function NewExpression(node, parent) { return isClassExtendsClause(node, parent); } -function isFirstInStatement(printStack, _temp) { - var _ref = _temp === void 0 ? {} : _temp, - _ref$considerArrow = _ref.considerArrow, - considerArrow = _ref$considerArrow === void 0 ? false : _ref$considerArrow, - _ref$considerDefaultE = _ref.considerDefaultExports, - considerDefaultExports = _ref$considerDefaultE === void 0 ? false : _ref$considerDefaultE; - - var i = printStack.length - 1; - var node = printStack[i]; +function isFirstInStatement(printStack, { + considerArrow = false, + considerDefaultExports = false +} = {}) { + let i = printStack.length - 1; + let node = printStack[i]; i--; - var parent = printStack[i]; + let parent = printStack[i]; while (i > 0) { if (t().isExpressionStatement(parent, { diff --git a/node_modules/@babel/generator/lib/node/whitespace.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/node/whitespace.js similarity index 78% rename from node_modules/@babel/generator/lib/node/whitespace.js rename to node_modules/@babel/core/node_modules/@babel/generator/lib/node/whitespace.js index 12fe0fc..0612186 100644 --- a/node_modules/@babel/generator/lib/node/whitespace.js +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/node/whitespace.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.list = exports.nodes = void 0; function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -17,11 +17,7 @@ function t() { function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } -function crawl(node, state) { - if (state === void 0) { - state = {}; - } - +function crawl(node, state = {}) { if (t().isMemberExpression(node)) { crawl(node.object, state); if (node.computed) crawl(node.property, state); @@ -58,9 +54,9 @@ function isType(node) { return t().isLiteral(node) || t().isObjectExpression(node) || t().isArrayExpression(node) || t().isIdentifier(node) || t().isMemberExpression(node); } -var nodes = { - AssignmentExpression: function AssignmentExpression(node) { - var state = crawl(node.right); +const nodes = { + AssignmentExpression(node) { + const state = crawl(node.right); if (state.hasCall && state.hasHelper || state.hasFunction) { return { @@ -69,27 +65,31 @@ var nodes = { }; } }, - SwitchCase: function SwitchCase(node, parent) { + + SwitchCase(node, parent) { return { before: node.consequent.length || parent.cases[0] === node, after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node }; }, - LogicalExpression: function LogicalExpression(node) { + + LogicalExpression(node) { if (t().isFunction(node.left) || t().isFunction(node.right)) { return { after: true }; } }, - Literal: function Literal(node) { + + Literal(node) { if (node.value === "use strict") { return { after: true }; } }, - CallExpression: function CallExpression(node) { + + CallExpression(node) { if (t().isFunction(node.callee) || isHelper(node)) { return { before: true, @@ -97,13 +97,14 @@ var nodes = { }; } }, - VariableDeclaration: function VariableDeclaration(node) { - for (var i = 0; i < node.declarations.length; i++) { - var declar = node.declarations[i]; - var enabled = isHelper(declar.id) && !isType(declar.init); + + VariableDeclaration(node) { + for (let i = 0; i < node.declarations.length; i++) { + const declar = node.declarations[i]; + let enabled = isHelper(declar.id) && !isType(declar.init); if (!enabled) { - var state = crawl(declar.init); + const state = crawl(declar.init); enabled = isHelper(declar.init) && state.hasCall || state.hasFunction; } @@ -115,7 +116,8 @@ var nodes = { } } }, - IfStatement: function IfStatement(node) { + + IfStatement(node) { if (t().isBlockStatement(node.consequent)) { return { before: true, @@ -123,6 +125,7 @@ var nodes = { }; } } + }; exports.nodes = nodes; @@ -150,24 +153,30 @@ nodes.ObjectTypeIndexer = function (node, parent) { } }; -var list = { - VariableDeclaration: function VariableDeclaration(node) { - return node.declarations.map(function (decl) { - return decl.init; - }); - }, - ArrayExpression: function ArrayExpression(node) { - return node.elements; - }, - ObjectExpression: function ObjectExpression(node) { - return node.properties; +nodes.ObjectTypeInternalSlot = function (node, parent) { + if (parent.internalSlots[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length) && (!parent.indexers || !parent.indexers.length)) { + return { + before: true + }; } }; -exports.list = list; -[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) { - var type = _ref[0], - amounts = _ref[1]; +const list = { + VariableDeclaration(node) { + return node.declarations.map(decl => decl.init); + }, + + ArrayExpression(node) { + return node.elements; + }, + + ObjectExpression(node) { + return node.properties; + } + +}; +exports.list = list; +[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function ([type, amounts]) { if (typeof amounts === "boolean") { amounts = { after: amounts, diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/printer.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/printer.js new file mode 100644 index 0000000..9458169 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/printer.js @@ -0,0 +1,501 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _isInteger() { + const data = _interopRequireDefault(require("lodash/isInteger")); + + _isInteger = function () { + return data; + }; + + return data; +} + +function _repeat() { + const data = _interopRequireDefault(require("lodash/repeat")); + + _repeat = function () { + return data; + }; + + return data; +} + +var _buffer = _interopRequireDefault(require("./buffer")); + +var n = _interopRequireWildcard(require("./node")); + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +var generatorFunctions = _interopRequireWildcard(require("./generators")); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const SCIENTIFIC_NOTATION = /e/i; +const ZERO_DECIMAL_INTEGER = /\.0+$/; +const NON_DECIMAL_LITERAL = /^0[box]/; + +class Printer { + constructor(format, map) { + this.inForStatementInitCounter = 0; + this._printStack = []; + this._indent = 0; + this._insideAux = false; + this._printedCommentStarts = {}; + this._parenPushNewlineState = null; + this._noLineTerminator = false; + this._printAuxAfterOnNextUserNode = false; + this._printedComments = new WeakSet(); + this._endsWithInteger = false; + this._endsWithWord = false; + this.format = format || {}; + this._buf = new _buffer.default(map); + } + + generate(ast) { + this.print(ast); + + this._maybeAddAuxComment(); + + return this._buf.get(); + } + + indent() { + if (this.format.compact || this.format.concise) return; + this._indent++; + } + + dedent() { + if (this.format.compact || this.format.concise) return; + this._indent--; + } + + semicolon(force = false) { + this._maybeAddAuxComment(); + + this._append(";", !force); + } + + rightBrace() { + if (this.format.minified) { + this._buf.removeLastSemicolon(); + } + + this.token("}"); + } + + space(force = false) { + if (this.format.compact) return; + + if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) { + this._space(); + } + } + + word(str) { + if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) { + this._space(); + } + + this._maybeAddAuxComment(); + + this._append(str); + + this._endsWithWord = true; + } + + number(str) { + this.word(str); + this._endsWithInteger = (0, _isInteger().default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== "."; + } + + token(str) { + if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) { + this._space(); + } + + this._maybeAddAuxComment(); + + this._append(str); + } + + newline(i) { + if (this.format.retainLines || this.format.compact) return; + + if (this.format.concise) { + this.space(); + return; + } + + if (this.endsWith("\n\n")) return; + if (typeof i !== "number") i = 1; + i = Math.min(2, i); + if (this.endsWith("{\n") || this.endsWith(":\n")) i--; + if (i <= 0) return; + + for (let j = 0; j < i; j++) { + this._newline(); + } + } + + endsWith(str) { + return this._buf.endsWith(str); + } + + removeTrailingNewline() { + this._buf.removeTrailingNewline(); + } + + exactSource(loc, cb) { + this._catchUp("start", loc); + + this._buf.exactSource(loc, cb); + } + + source(prop, loc) { + this._catchUp(prop, loc); + + this._buf.source(prop, loc); + } + + withSource(prop, loc, cb) { + this._catchUp(prop, loc); + + this._buf.withSource(prop, loc, cb); + } + + _space() { + this._append(" ", true); + } + + _newline() { + this._append("\n", true); + } + + _append(str, queue = false) { + this._maybeAddParen(str); + + this._maybeIndent(str); + + if (queue) this._buf.queue(str);else this._buf.append(str); + this._endsWithWord = false; + this._endsWithInteger = false; + } + + _maybeIndent(str) { + if (this._indent && this.endsWith("\n") && str[0] !== "\n") { + this._buf.queue(this._getIndent()); + } + } + + _maybeAddParen(str) { + const parenPushNewlineState = this._parenPushNewlineState; + if (!parenPushNewlineState) return; + this._parenPushNewlineState = null; + let i; + + for (i = 0; i < str.length && str[i] === " "; i++) continue; + + if (i === str.length) return; + const cha = str[i]; + + if (cha !== "\n") { + if (cha !== "/") return; + if (i + 1 === str.length) return; + const chaPost = str[i + 1]; + if (chaPost !== "/" && chaPost !== "*") return; + } + + this.token("("); + this.indent(); + parenPushNewlineState.printed = true; + } + + _catchUp(prop, loc) { + if (!this.format.retainLines) return; + const pos = loc ? loc[prop] : null; + + if (pos && pos.line !== null) { + const count = pos.line - this._buf.getCurrentLine(); + + for (let i = 0; i < count; i++) { + this._newline(); + } + } + } + + _getIndent() { + return (0, _repeat().default)(this.format.indent.style, this._indent); + } + + startTerminatorless(isLabel = false) { + if (isLabel) { + this._noLineTerminator = true; + return null; + } else { + return this._parenPushNewlineState = { + printed: false + }; + } + } + + endTerminatorless(state) { + this._noLineTerminator = false; + + if (state && state.printed) { + this.dedent(); + this.newline(); + this.token(")"); + } + } + + print(node, parent) { + if (!node) return; + const oldConcise = this.format.concise; + + if (node._compact) { + this.format.concise = true; + } + + const printMethod = this[node.type]; + + if (!printMethod) { + throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node && node.constructor.name)}`); + } + + this._printStack.push(node); + + const oldInAux = this._insideAux; + this._insideAux = !node.loc; + + this._maybeAddAuxComment(this._insideAux && !oldInAux); + + let needsParens = n.needsParens(node, parent, this._printStack); + + if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) { + needsParens = true; + } + + if (needsParens) this.token("("); + + this._printLeadingComments(node); + + const loc = t().isProgram(node) || t().isFile(node) ? null : node.loc; + this.withSource("start", loc, () => { + printMethod.call(this, node, parent); + }); + + this._printTrailingComments(node); + + if (needsParens) this.token(")"); + + this._printStack.pop(); + + this.format.concise = oldConcise; + this._insideAux = oldInAux; + } + + _maybeAddAuxComment(enteredPositionlessNode) { + if (enteredPositionlessNode) this._printAuxBeforeComment(); + if (!this._insideAux) this._printAuxAfterComment(); + } + + _printAuxBeforeComment() { + if (this._printAuxAfterOnNextUserNode) return; + this._printAuxAfterOnNextUserNode = true; + const comment = this.format.auxiliaryCommentBefore; + + if (comment) { + this._printComment({ + type: "CommentBlock", + value: comment + }); + } + } + + _printAuxAfterComment() { + if (!this._printAuxAfterOnNextUserNode) return; + this._printAuxAfterOnNextUserNode = false; + const comment = this.format.auxiliaryCommentAfter; + + if (comment) { + this._printComment({ + type: "CommentBlock", + value: comment + }); + } + } + + getPossibleRaw(node) { + const extra = node.extra; + + if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) { + return extra.raw; + } + } + + printJoin(nodes, parent, opts = {}) { + if (!nodes || !nodes.length) return; + if (opts.indent) this.indent(); + const newlineOpts = { + addNewlines: opts.addNewlines + }; + + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (!node) continue; + if (opts.statement) this._printNewline(true, node, parent, newlineOpts); + this.print(node, parent); + + if (opts.iterator) { + opts.iterator(node, i); + } + + if (opts.separator && i < nodes.length - 1) { + opts.separator.call(this); + } + + if (opts.statement) this._printNewline(false, node, parent, newlineOpts); + } + + if (opts.indent) this.dedent(); + } + + printAndIndentOnComments(node, parent) { + const indent = node.leadingComments && node.leadingComments.length > 0; + if (indent) this.indent(); + this.print(node, parent); + if (indent) this.dedent(); + } + + printBlock(parent) { + const node = parent.body; + + if (!t().isEmptyStatement(node)) { + this.space(); + } + + this.print(node, parent); + } + + _printTrailingComments(node) { + this._printComments(this._getComments(false, node)); + } + + _printLeadingComments(node) { + this._printComments(this._getComments(true, node)); + } + + printInnerComments(node, indent = true) { + if (!node.innerComments || !node.innerComments.length) return; + if (indent) this.indent(); + + this._printComments(node.innerComments); + + if (indent) this.dedent(); + } + + printSequence(nodes, parent, opts = {}) { + opts.statement = true; + return this.printJoin(nodes, parent, opts); + } + + printList(items, parent, opts = {}) { + if (opts.separator == null) { + opts.separator = commaSeparator; + } + + return this.printJoin(items, parent, opts); + } + + _printNewline(leading, node, parent, opts) { + if (this.format.retainLines || this.format.compact) return; + + if (this.format.concise) { + this.space(); + return; + } + + let lines = 0; + + if (this._buf.hasContent()) { + if (!leading) lines++; + if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0; + const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter; + if (needs(node, parent)) lines++; + } + + this.newline(lines); + } + + _getComments(leading, node) { + return node && (leading ? node.leadingComments : node.trailingComments) || []; + } + + _printComment(comment) { + if (!this.format.shouldPrintComment(comment.value)) return; + if (comment.ignore) return; + if (this._printedComments.has(comment)) return; + + this._printedComments.add(comment); + + if (comment.start != null) { + if (this._printedCommentStarts[comment.start]) return; + this._printedCommentStarts[comment.start] = true; + } + + const isBlockComment = comment.type === "CommentBlock"; + this.newline(this._buf.hasContent() && !this._noLineTerminator && isBlockComment ? 1 : 0); + if (!this.endsWith("[") && !this.endsWith("{")) this.space(); + let val = !isBlockComment && !this._noLineTerminator ? `//${comment.value}\n` : `/*${comment.value}*/`; + + if (isBlockComment && this.format.indent.adjustMultilineComment) { + const offset = comment.loc && comment.loc.start.column; + + if (offset) { + const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); + val = val.replace(newlineRegex, "\n"); + } + + const indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn()); + val = val.replace(/\n(?!$)/g, `\n${(0, _repeat().default)(" ", indentSize)}`); + } + + if (this.endsWith("/")) this._space(); + this.withSource("start", comment.loc, () => { + this._append(val); + }); + this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0); + } + + _printComments(comments) { + if (!comments || !comments.length) return; + + for (const comment of comments) { + this._printComment(comment); + } + } + +} + +exports.default = Printer; +Object.assign(Printer.prototype, generatorFunctions); + +function commaSeparator() { + this.token(","); + this.space(); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/lib/source-map.js b/node_modules/@babel/core/node_modules/@babel/generator/lib/source-map.js new file mode 100644 index 0000000..12b7030 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/lib/source-map.js @@ -0,0 +1,81 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _sourceMap() { + const data = _interopRequireDefault(require("source-map")); + + _sourceMap = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +class SourceMap { + constructor(opts, code) { + this._cachedMap = null; + this._code = code; + this._opts = opts; + this._rawMappings = []; + } + + get() { + if (!this._cachedMap) { + const map = this._cachedMap = new (_sourceMap().default.SourceMapGenerator)({ + sourceRoot: this._opts.sourceRoot + }); + const code = this._code; + + if (typeof code === "string") { + map.setSourceContent(this._opts.sourceFileName, code); + } else if (typeof code === "object") { + Object.keys(code).forEach(sourceFileName => { + map.setSourceContent(sourceFileName, code[sourceFileName]); + }); + } + + this._rawMappings.forEach(map.addMapping, map); + } + + return this._cachedMap.toJSON(); + } + + getRawMappings() { + return this._rawMappings.slice(); + } + + mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) { + if (this._lastGenLine !== generatedLine && line === null) return; + + if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) { + return; + } + + this._cachedMap = null; + this._lastGenLine = generatedLine; + this._lastSourceLine = line; + this._lastSourceColumn = column; + + this._rawMappings.push({ + name: identifierName || undefined, + generated: { + line: generatedLine, + column: generatedColumn + }, + source: line == null ? undefined : filename || this._opts.sourceFileName, + original: line == null ? undefined : { + line: line, + column: column + } + }); + } + +} + +exports.default = SourceMap; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/generator/package.json b/node_modules/@babel/core/node_modules/@babel/generator/package.json new file mode 100644 index 0000000..d537b9a --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/generator/package.json @@ -0,0 +1,61 @@ +{ + "_from": "@babel/generator@^7.4.0", + "_id": "@babel/generator@7.4.0", + "_inBundle": false, + "_integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", + "_location": "/@babel/core/@babel/generator", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/generator@^7.4.0", + "name": "@babel/generator", + "escapedName": "@babel%2fgenerator", + "scope": "@babel", + "rawSpec": "^7.4.0", + "saveSpec": null, + "fetchSpec": "^7.4.0" + }, + "_requiredBy": [ + "/@babel/core", + "/@babel/core/@babel/traverse" + ], + "_resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", + "_shasum": "c230e79589ae7a729fd4631b9ded4dc220418196", + "_spec": "@babel/generator@^7.4.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "@babel/types": "^7.4.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "deprecated": false, + "description": "Turns an AST into code.", + "devDependencies": { + "@babel/helper-fixtures": "^7.2.0", + "@babel/parser": "^7.4.0" + }, + "files": [ + "lib" + ], + "gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/generator", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-generator" + }, + "version": "7.4.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/helper-function-name/LICENSE b/node_modules/@babel/core/node_modules/@babel/helper-function-name/LICENSE new file mode 100644 index 0000000..a06ec0e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-function-name/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-2018 Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/helper-function-name/README.md b/node_modules/@babel/core/node_modules/@babel/helper-function-name/README.md new file mode 100644 index 0000000..a8a6809 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-function-name/README.md @@ -0,0 +1,19 @@ +# @babel/helper-function-name + +> Helper function to change the property 'name' of every function + +See our website [@babel/helper-function-name](https://babeljs.io/docs/en/next/babel-helper-function-name.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/helper-function-name +``` + +or using yarn: + +```sh +yarn add @babel/helper-function-name --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/helper-function-name/lib/index.js b/node_modules/@babel/core/node_modules/@babel/helper-function-name/lib/index.js new file mode 100644 index 0000000..c6dd4af --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-function-name/lib/index.js @@ -0,0 +1,198 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function _helperGetFunctionArity() { + const data = _interopRequireDefault(require("@babel/helper-get-function-arity")); + + _helperGetFunctionArity = function () { + return data; + }; + + return data; +} + +function _template() { + const data = _interopRequireDefault(require("@babel/template")); + + _template = function () { + return data; + }; + + return data; +} + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const buildPropertyMethodAssignmentWrapper = (0, _template().default)(` + (function (FUNCTION_KEY) { + function FUNCTION_ID() { + return FUNCTION_KEY.apply(this, arguments); + } + + FUNCTION_ID.toString = function () { + return FUNCTION_KEY.toString(); + } + + return FUNCTION_ID; + })(FUNCTION) +`); +const buildGeneratorPropertyMethodAssignmentWrapper = (0, _template().default)(` + (function (FUNCTION_KEY) { + function* FUNCTION_ID() { + return yield* FUNCTION_KEY.apply(this, arguments); + } + + FUNCTION_ID.toString = function () { + return FUNCTION_KEY.toString(); + }; + + return FUNCTION_ID; + })(FUNCTION) +`); +const visitor = { + "ReferencedIdentifier|BindingIdentifier"(path, state) { + if (path.node.name !== state.name) return; + const localDeclar = path.scope.getBindingIdentifier(state.name); + if (localDeclar !== state.outerDeclar) return; + state.selfReference = true; + path.stop(); + } + +}; + +function getNameFromLiteralId(id) { + if (t().isNullLiteral(id)) { + return "null"; + } + + if (t().isRegExpLiteral(id)) { + return `_${id.pattern}_${id.flags}`; + } + + if (t().isTemplateLiteral(id)) { + return id.quasis.map(quasi => quasi.value.raw).join(""); + } + + if (id.value !== undefined) { + return id.value + ""; + } + + return ""; +} + +function wrap(state, method, id, scope) { + if (state.selfReference) { + if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) { + scope.rename(id.name); + } else { + if (!t().isFunction(method)) return; + let build = buildPropertyMethodAssignmentWrapper; + + if (method.generator) { + build = buildGeneratorPropertyMethodAssignmentWrapper; + } + + const template = build({ + FUNCTION: method, + FUNCTION_ID: id, + FUNCTION_KEY: scope.generateUidIdentifier(id.name) + }).expression; + const params = template.callee.body.body[0].params; + + for (let i = 0, len = (0, _helperGetFunctionArity().default)(method); i < len; i++) { + params.push(scope.generateUidIdentifier("x")); + } + + return template; + } + } + + method.id = id; + scope.getProgramParent().references[id.name] = true; +} + +function visit(node, name, scope) { + const state = { + selfAssignment: false, + selfReference: false, + outerDeclar: scope.getBindingIdentifier(name), + references: [], + name: name + }; + const binding = scope.getOwnBinding(name); + + if (binding) { + if (binding.kind === "param") { + state.selfReference = true; + } else {} + } else if (state.outerDeclar || scope.hasGlobal(name)) { + scope.traverse(node, visitor, state); + } + + return state; +} + +function _default({ + node, + parent, + scope, + id +}, localBinding = false) { + if (node.id) return; + + if ((t().isObjectProperty(parent) || t().isObjectMethod(parent, { + kind: "method" + })) && (!parent.computed || t().isLiteral(parent.key))) { + id = parent.key; + } else if (t().isVariableDeclarator(parent)) { + id = parent.id; + + if (t().isIdentifier(id) && !localBinding) { + const binding = scope.parent.getBinding(id.name); + + if (binding && binding.constant && scope.getBinding(id.name) === binding) { + node.id = t().cloneNode(id); + node.id[t().NOT_LOCAL_BINDING] = true; + return; + } + } + } else if (t().isAssignmentExpression(parent)) { + id = parent.left; + } else if (!id) { + return; + } + + let name; + + if (id && t().isLiteral(id)) { + name = getNameFromLiteralId(id); + } else if (id && t().isIdentifier(id)) { + name = id.name; + } + + if (name === undefined) { + return; + } + + name = t().toBindingIdentifierName(name); + id = t().identifier(name); + id[t().NOT_LOCAL_BINDING] = true; + const state = visit(node, name, scope); + return wrap(state, node, id, scope) || node; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/helper-function-name/package.json b/node_modules/@babel/core/node_modules/@babel/helper-function-name/package.json new file mode 100644 index 0000000..1a14047 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-function-name/package.json @@ -0,0 +1,45 @@ +{ + "_from": "@babel/helper-function-name@^7.1.0", + "_id": "@babel/helper-function-name@7.1.0", + "_inBundle": false, + "_integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "_location": "/@babel/core/@babel/helper-function-name", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/helper-function-name@^7.1.0", + "name": "@babel/helper-function-name", + "escapedName": "@babel%2fhelper-function-name", + "scope": "@babel", + "rawSpec": "^7.1.0", + "saveSpec": null, + "fetchSpec": "^7.1.0" + }, + "_requiredBy": [ + "/@babel/core/@babel/traverse" + ], + "_resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "_shasum": "a0ceb01685f73355d4360c1247f582bfafc8ff53", + "_spec": "@babel/helper-function-name@^7.1.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\traverse", + "bundleDependencies": false, + "dependencies": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + }, + "deprecated": false, + "description": "Helper function to change the property 'name' of every function", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/helper-function-name", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name" + }, + "version": "7.1.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/LICENSE b/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/LICENSE new file mode 100644 index 0000000..620366e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-2018 Sebastian McKenzie + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/README.md b/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/README.md new file mode 100644 index 0000000..1de8084 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/README.md @@ -0,0 +1,19 @@ +# @babel/helper-get-function-arity + +> Helper function to get function arity + +See our website [@babel/helper-get-function-arity](https://babeljs.io/docs/en/next/babel-helper-get-function-arity.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/helper-get-function-arity +``` + +or using yarn: + +```sh +yarn add @babel/helper-get-function-arity --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/lib/index.js b/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/lib/index.js new file mode 100644 index 0000000..5723401 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/lib/index.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _default(node) { + const params = node.params; + + for (let i = 0; i < params.length; i++) { + const param = params[i]; + + if (t().isAssignmentPattern(param) || t().isRestElement(param)) { + return i; + } + } + + return params.length; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/package.json b/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/package.json new file mode 100644 index 0000000..c44376d --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/package.json @@ -0,0 +1,40 @@ +{ + "_from": "@babel/helper-get-function-arity@^7.0.0", + "_id": "@babel/helper-get-function-arity@7.0.0", + "_inBundle": false, + "_integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "_location": "/@babel/core/@babel/helper-get-function-arity", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/helper-get-function-arity@^7.0.0", + "name": "@babel/helper-get-function-arity", + "escapedName": "@babel%2fhelper-get-function-arity", + "scope": "@babel", + "rawSpec": "^7.0.0", + "saveSpec": null, + "fetchSpec": "^7.0.0" + }, + "_requiredBy": [ + "/@babel/core/@babel/helper-function-name" + ], + "_resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "_shasum": "83572d4320e2a4657263734113c42868b64e49c3", + "_spec": "@babel/helper-get-function-arity@^7.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\helper-function-name", + "bundleDependencies": false, + "dependencies": { + "@babel/types": "^7.0.0" + }, + "deprecated": false, + "description": "Helper function to get function arity", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/helper-get-function-arity", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity" + }, + "version": "7.0.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/LICENSE b/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/README.md b/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/README.md new file mode 100644 index 0000000..d241fee --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/README.md @@ -0,0 +1,19 @@ +# @babel/helper-split-export-declaration + +> + +See our website [@babel/helper-split-export-declaration](https://babeljs.io/docs/en/next/babel-helper-split-export-declaration.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/helper-split-export-declaration +``` + +or using yarn: + +```sh +yarn add @babel/helper-split-export-declaration --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/lib/index.js b/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/lib/index.js new file mode 100644 index 0000000..ddb34bc --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/lib/index.js @@ -0,0 +1,68 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = splitExportDeclaration; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function splitExportDeclaration(exportDeclaration) { + if (!exportDeclaration.isExportDeclaration()) { + throw new Error("Only export declarations can be splitted."); + } + + const isDefault = exportDeclaration.isExportDefaultDeclaration(); + const declaration = exportDeclaration.get("declaration"); + const isClassDeclaration = declaration.isClassDeclaration(); + + if (isDefault) { + const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration; + const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope; + let id = declaration.node.id; + let needBindingRegistration = false; + + if (!id) { + needBindingRegistration = true; + id = scope.generateUidIdentifier("default"); + + if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) { + declaration.node.id = t().cloneNode(id); + } + } + + const updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]); + const updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]); + exportDeclaration.insertAfter(updatedExportDeclaration); + exportDeclaration.replaceWith(updatedDeclaration); + + if (needBindingRegistration) { + scope.registerDeclaration(exportDeclaration); + } + + return exportDeclaration; + } + + if (exportDeclaration.get("specifiers").length > 0) { + throw new Error("It doesn't make sense to split exported specifiers."); + } + + const bindingIdentifiers = declaration.getOuterBindingIdentifiers(); + const specifiers = Object.keys(bindingIdentifiers).map(name => { + return t().exportSpecifier(t().identifier(name), t().identifier(name)); + }); + const aliasDeclar = t().exportNamedDeclaration(null, specifiers); + exportDeclaration.insertAfter(aliasDeclar); + exportDeclaration.replaceWith(declaration.node); + return exportDeclaration; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/package.json b/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/package.json new file mode 100644 index 0000000..58a88e3 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/package.json @@ -0,0 +1,44 @@ +{ + "_from": "@babel/helper-split-export-declaration@^7.4.0", + "_id": "@babel/helper-split-export-declaration@7.4.0", + "_inBundle": false, + "_integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", + "_location": "/@babel/core/@babel/helper-split-export-declaration", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/helper-split-export-declaration@^7.4.0", + "name": "@babel/helper-split-export-declaration", + "escapedName": "@babel%2fhelper-split-export-declaration", + "scope": "@babel", + "rawSpec": "^7.4.0", + "saveSpec": null, + "fetchSpec": "^7.4.0" + }, + "_requiredBy": [ + "/@babel/core/@babel/traverse" + ], + "_resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", + "_shasum": "571bfd52701f492920d63b7f735030e9a3e10b55", + "_spec": "@babel/helper-split-export-declaration@^7.4.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\traverse", + "bundleDependencies": false, + "dependencies": { + "@babel/types": "^7.4.0" + }, + "deprecated": false, + "description": ">", + "gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/helper-split-export-declaration", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration" + }, + "version": "7.4.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/helpers/LICENSE b/node_modules/@babel/core/node_modules/@babel/helpers/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helpers/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/helpers/README.md b/node_modules/@babel/core/node_modules/@babel/helpers/README.md new file mode 100644 index 0000000..537d8e4 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helpers/README.md @@ -0,0 +1,19 @@ +# @babel/helpers + +> Collection of helper functions used by Babel transforms. + +See our website [@babel/helpers](https://babeljs.io/docs/en/next/babel-helpers.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/helpers +``` + +or using yarn: + +```sh +yarn add @babel/helpers --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers.js b/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers.js new file mode 100644 index 0000000..46ad95c --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers.js @@ -0,0 +1,1816 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _template() { + const data = _interopRequireDefault(require("@babel/template")); + + _template = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const helpers = Object.create(null); +var _default = helpers; +exports.default = _default; + +const helper = minVersion => tpl => ({ + minVersion, + ast: () => _template().default.program.ast(tpl) +}); + +helpers.typeof = helper("7.0.0-beta.0")` + export default function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { return typeof obj; }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype + ? "symbol" + : typeof obj; + }; + } + + return _typeof(obj); + } +`; +helpers.jsx = helper("7.0.0-beta.0")` + var REACT_ELEMENT_TYPE; + + export default function _createRawReactElement(type, props, key, children) { + if (!REACT_ELEMENT_TYPE) { + REACT_ELEMENT_TYPE = ( + typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") + ) || 0xeac7; + } + + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) { + // If we're going to assign props.children, we create a new object now + // to avoid mutating defaultProps. + props = { + children: void 0, + }; + } + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } else if (!props) { + props = defaultProps || {}; + } + + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = new Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 3]; + } + props.children = childArray; + } + + return { + $$typeof: REACT_ELEMENT_TYPE, + type: type, + key: key === undefined ? null : '' + key, + ref: null, + props: props, + _owner: null, + }; + } +`; +helpers.asyncIterator = helper("7.0.0-beta.0")` + export default function _asyncIterator(iterable) { + var method + if (typeof Symbol === "function") { + if (Symbol.asyncIterator) { + method = iterable[Symbol.asyncIterator] + if (method != null) return method.call(iterable); + } + if (Symbol.iterator) { + method = iterable[Symbol.iterator] + if (method != null) return method.call(iterable); + } + } + throw new TypeError("Object is not async iterable"); + } +`; +helpers.AwaitValue = helper("7.0.0-beta.0")` + export default function _AwaitValue(value) { + this.wrapped = value; + } +`; +helpers.AsyncGenerator = helper("7.0.0-beta.0")` + import AwaitValue from "AwaitValue"; + + export default function AsyncGenerator(gen) { + var front, back; + + function send(key, arg) { + return new Promise(function (resolve, reject) { + var request = { + key: key, + arg: arg, + resolve: resolve, + reject: reject, + next: null, + }; + + if (back) { + back = back.next = request; + } else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg) + var value = result.value; + var wrappedAwait = value instanceof AwaitValue; + + Promise.resolve(wrappedAwait ? value.wrapped : value).then( + function (arg) { + if (wrappedAwait) { + resume("next", arg); + return + } + + settle(result.done ? "return" : "normal", arg); + }, + function (err) { resume("throw", err); }); + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ value: value, done: true }); + break; + case "throw": + front.reject(value); + break; + default: + front.resolve({ value: value, done: false }); + break; + } + + front = front.next; + if (front) { + resume(front.key, front.arg); + } else { + back = null; + } + } + + this._invoke = send; + + // Hide "return" method if generator return is not supported + if (typeof gen.return !== "function") { + this.return = undefined; + } + } + + if (typeof Symbol === "function" && Symbol.asyncIterator) { + AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; }; + } + + AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); }; + AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); }; + AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); }; +`; +helpers.wrapAsyncGenerator = helper("7.0.0-beta.0")` + import AsyncGenerator from "AsyncGenerator"; + + export default function _wrapAsyncGenerator(fn) { + return function () { + return new AsyncGenerator(fn.apply(this, arguments)); + }; + } +`; +helpers.awaitAsyncGenerator = helper("7.0.0-beta.0")` + import AwaitValue from "AwaitValue"; + + export default function _awaitAsyncGenerator(value) { + return new AwaitValue(value); + } +`; +helpers.asyncGeneratorDelegate = helper("7.0.0-beta.0")` + export default function _asyncGeneratorDelegate(inner, awaitWrap) { + var iter = {}, waiting = false; + + function pump(key, value) { + waiting = true; + value = new Promise(function (resolve) { resolve(inner[key](value)); }); + return { done: false, value: awaitWrap(value) }; + }; + + if (typeof Symbol === "function" && Symbol.iterator) { + iter[Symbol.iterator] = function () { return this; }; + } + + iter.next = function (value) { + if (waiting) { + waiting = false; + return value; + } + return pump("next", value); + }; + + if (typeof inner.throw === "function") { + iter.throw = function (value) { + if (waiting) { + waiting = false; + throw value; + } + return pump("throw", value); + }; + } + + if (typeof inner.return === "function") { + iter.return = function (value) { + return pump("return", value); + }; + } + + return iter; + } +`; +helpers.asyncToGenerator = helper("7.0.0-beta.0")` + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + + export default function _asyncToGenerator(fn) { + return function () { + var self = this, args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; + } +`; +helpers.classCallCheck = helper("7.0.0-beta.0")` + export default function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } +`; +helpers.createClass = helper("7.0.0-beta.0")` + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i ++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + export default function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } +`; +helpers.defineEnumerableProperties = helper("7.0.0-beta.0")` + export default function _defineEnumerableProperties(obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, key, desc); + } + + // Symbols are not enumerated over by for-in loops. If native + // Symbols are available, fetch all of the descs object's own + // symbol properties and define them on our target object too. + if (Object.getOwnPropertySymbols) { + var objectSymbols = Object.getOwnPropertySymbols(descs); + for (var i = 0; i < objectSymbols.length; i++) { + var sym = objectSymbols[i]; + var desc = descs[sym]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, sym, desc); + } + } + return obj; + } +`; +helpers.defaults = helper("7.0.0-beta.0")` + export default function _defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + if (value && value.configurable && obj[key] === undefined) { + Object.defineProperty(obj, key, value); + } + } + return obj; + } +`; +helpers.defineProperty = helper("7.0.0-beta.0")` + export default function _defineProperty(obj, key, value) { + // Shortcircuit the slow defineProperty path when possible. + // We are trying to avoid issues where setters defined on the + // prototype cause side effects under the fast path of simple + // assignment. By checking for existence of the property with + // the in operator, we can optimize most of this overhead away. + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } +`; +helpers.extends = helper("7.0.0-beta.0")` + export default function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + + return _extends.apply(this, arguments); + } +`; +helpers.objectSpread = helper("7.0.0-beta.0")` + import defineProperty from "defineProperty"; + + export default function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = (arguments[i] != null) ? arguments[i] : {}; + var ownKeys = Object.keys(source); + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + })); + } + ownKeys.forEach(function(key) { + defineProperty(target, key, source[key]); + }); + } + return target; + } +`; +helpers.inherits = helper("7.0.0-beta.0")` + import setPrototypeOf from "setPrototypeOf"; + + export default function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf(subClass, superClass); + } +`; +helpers.inheritsLoose = helper("7.0.0-beta.0")` + export default function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } +`; +helpers.getPrototypeOf = helper("7.0.0-beta.0")` + export default function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf + ? Object.getPrototypeOf + : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); + } +`; +helpers.setPrototypeOf = helper("7.0.0-beta.0")` + export default function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); + } +`; +helpers.construct = helper("7.0.0-beta.0")` + import setPrototypeOf from "setPrototypeOf"; + + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + + // core-js@3 + if (Reflect.construct.sham) return false; + + // Proxy can't be polyfilled. Every browser implemented + // proxies before or at the same time as Reflect.construct, + // so if they support Proxy they also support Reflect.construct. + if (typeof Proxy === "function") return true; + + // Since Reflect.construct can't be properly polyfilled, some + // implementations (e.g. core-js@2) don't set the correct internal slots. + // Those polyfills don't allow us to subclass built-ins, so we need to + // use our fallback implementation. + try { + // If the internal slots aren't set, this throws an error similar to + // TypeError: this is not a Date object. + Date.prototype.toString.call(Reflect.construct(Date, [], function() {})); + return true; + } catch (e) { + return false; + } + } + + export default function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + // NOTE: If Parent !== Class, the correct __proto__ is set *after* + // calling the constructor. + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + // Avoid issues with Class being present but undefined when it wasn't + // present in the original call. + return _construct.apply(null, arguments); + } +`; +helpers.isNativeFunction = helper("7.0.0-beta.0")` + export default function _isNativeFunction(fn) { + // Note: This function returns "true" for core-js functions. + return Function.toString.call(fn).indexOf("[native code]") !== -1; + } +`; +helpers.wrapNativeSuper = helper("7.0.0-beta.0")` + import getPrototypeOf from "getPrototypeOf"; + import setPrototypeOf from "setPrototypeOf"; + import isNativeFunction from "isNativeFunction"; + import construct from "construct"; + + export default function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !isNativeFunction(Class)) return Class; + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + _cache.set(Class, Wrapper); + } + function Wrapper() { + return construct(Class, arguments, getPrototypeOf(this).constructor) + } + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true, + } + }); + + return setPrototypeOf(Wrapper, Class); + } + + return _wrapNativeSuper(Class) + } +`; +helpers.instanceof = helper("7.0.0-beta.0")` + export default function _instanceof(left, right) { + if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { + return right[Symbol.hasInstance](left); + } else { + return left instanceof right; + } + } +`; +helpers.interopRequireDefault = helper("7.0.0-beta.0")` + export default function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } +`; +helpers.interopRequireWildcard = helper("7.0.0-beta.0")` + export default function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = Object.defineProperty && Object.getOwnPropertyDescriptor + ? Object.getOwnPropertyDescriptor(obj, key) + : {}; + if (desc.get || desc.set) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + } + newObj.default = obj; + return newObj; + } + } +`; +helpers.newArrowCheck = helper("7.0.0-beta.0")` + export default function _newArrowCheck(innerThis, boundThis) { + if (innerThis !== boundThis) { + throw new TypeError("Cannot instantiate an arrow function"); + } + } +`; +helpers.objectDestructuringEmpty = helper("7.0.0-beta.0")` + export default function _objectDestructuringEmpty(obj) { + if (obj == null) throw new TypeError("Cannot destructure undefined"); + } +`; +helpers.objectWithoutPropertiesLoose = helper("7.0.0-beta.0")` + export default function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; + } +`; +helpers.objectWithoutProperties = helper("7.0.0-beta.0")` + import objectWithoutPropertiesLoose from "objectWithoutPropertiesLoose"; + + export default function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = objectWithoutPropertiesLoose(source, excluded); + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; + } +`; +helpers.assertThisInitialized = helper("7.0.0-beta.0")` + export default function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return self; + } +`; +helpers.possibleConstructorReturn = helper("7.0.0-beta.0")` + import assertThisInitialized from "assertThisInitialized"; + + export default function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + return assertThisInitialized(self); + } +`; +helpers.superPropBase = helper("7.0.0-beta.0")` + import getPrototypeOf from "getPrototypeOf"; + + export default function _superPropBase(object, property) { + // Yes, this throws if object is null to being with, that's on purpose. + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = getPrototypeOf(object); + if (object === null) break; + } + return object; + } +`; +helpers.get = helper("7.0.0-beta.0")` + import getPrototypeOf from "getPrototypeOf"; + import superPropBase from "superPropBase"; + + export default function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = superPropBase(target, property); + + if (!base) return; + + var desc = Object.getOwnPropertyDescriptor(base, property); + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + return _get(target, property, receiver || target); + } +`; +helpers.set = helper("7.0.0-beta.0")` + import getPrototypeOf from "getPrototypeOf"; + import superPropBase from "superPropBase"; + import defineProperty from "defineProperty"; + + function set(target, property, value, receiver) { + if (typeof Reflect !== "undefined" && Reflect.set) { + set = Reflect.set; + } else { + set = function set(target, property, value, receiver) { + var base = superPropBase(target, property); + var desc; + + if (base) { + desc = Object.getOwnPropertyDescriptor(base, property); + if (desc.set) { + desc.set.call(receiver, value); + return true; + } else if (!desc.writable) { + // Both getter and non-writable fall into this. + return false; + } + } + + // Without a super that defines the property, spec boils down to + // "define on receiver" for some reason. + desc = Object.getOwnPropertyDescriptor(receiver, property); + if (desc) { + if (!desc.writable) { + // Setter, getter, and non-writable fall into this. + return false; + } + + desc.value = value; + Object.defineProperty(receiver, property, desc); + } else { + // Avoid setters that may be defined on Sub's prototype, but not on + // the instance. + defineProperty(receiver, property, value); + } + + return true; + }; + } + + return set(target, property, value, receiver); + } + + export default function _set(target, property, value, receiver, isStrict) { + var s = set(target, property, value, receiver || target); + if (!s && isStrict) { + throw new Error('failed to set property'); + } + + return value; + } +`; +helpers.taggedTemplateLiteral = helper("7.0.0-beta.0")` + export default function _taggedTemplateLiteral(strings, raw) { + if (!raw) { raw = strings.slice(0); } + return Object.freeze(Object.defineProperties(strings, { + raw: { value: Object.freeze(raw) } + })); + } +`; +helpers.taggedTemplateLiteralLoose = helper("7.0.0-beta.0")` + export default function _taggedTemplateLiteralLoose(strings, raw) { + if (!raw) { raw = strings.slice(0); } + strings.raw = raw; + return strings; + } +`; +helpers.temporalRef = helper("7.0.0-beta.0")` + import undef from "temporalUndefined"; + + export default function _temporalRef(val, name) { + if (val === undef) { + throw new ReferenceError(name + " is not defined - temporal dead zone"); + } else { + return val; + } + } +`; +helpers.readOnlyError = helper("7.0.0-beta.0")` + export default function _readOnlyError(name) { + throw new Error("\\"" + name + "\\" is read-only"); + } +`; +helpers.classNameTDZError = helper("7.0.0-beta.0")` + export default function _classNameTDZError(name) { + throw new Error("Class \\"" + name + "\\" cannot be referenced in computed property keys."); + } +`; +helpers.temporalUndefined = helper("7.0.0-beta.0")` + export default {}; +`; +helpers.slicedToArray = helper("7.0.0-beta.0")` + import arrayWithHoles from "arrayWithHoles"; + import iterableToArrayLimit from "iterableToArrayLimit"; + import nonIterableRest from "nonIterableRest"; + + export default function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); + } +`; +helpers.slicedToArrayLoose = helper("7.0.0-beta.0")` + import arrayWithHoles from "arrayWithHoles"; + import iterableToArrayLimitLoose from "iterableToArrayLimitLoose"; + import nonIterableRest from "nonIterableRest"; + + export default function _slicedToArrayLoose(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || nonIterableRest(); + } +`; +helpers.toArray = helper("7.0.0-beta.0")` + import arrayWithHoles from "arrayWithHoles"; + import iterableToArray from "iterableToArray"; + import nonIterableRest from "nonIterableRest"; + + export default function _toArray(arr) { + return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest(); + } +`; +helpers.toConsumableArray = helper("7.0.0-beta.0")` + import arrayWithoutHoles from "arrayWithoutHoles"; + import iterableToArray from "iterableToArray"; + import nonIterableSpread from "nonIterableSpread"; + + export default function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); + } +`; +helpers.arrayWithoutHoles = helper("7.0.0-beta.0")` + export default function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + return arr2; + } + } +`; +helpers.arrayWithHoles = helper("7.0.0-beta.0")` + export default function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } +`; +helpers.iterableToArray = helper("7.0.0-beta.0")` + export default function _iterableToArray(iter) { + if ( + Symbol.iterator in Object(iter) || + Object.prototype.toString.call(iter) === "[object Arguments]" + ) return Array.from(iter); + } +`; +helpers.iterableToArrayLimit = helper("7.0.0-beta.0")` + export default function _iterableToArrayLimit(arr, i) { + // this is an expanded form of \`for...of\` that properly supports abrupt completions of + // iterators etc. variable names have been minimised to reduce the size of this massive + // helper. sometimes spec compliancy is annoying :( + // + // _n = _iteratorNormalCompletion + // _d = _didIteratorError + // _e = _iteratorError + // _i = _iterator + // _s = _step + + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } +`; +helpers.iterableToArrayLimitLoose = helper("7.0.0-beta.0")` + export default function _iterableToArrayLimitLoose(arr, i) { + var _arr = []; + for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { + _arr.push(_step.value); + if (i && _arr.length === i) break; + } + return _arr; + } +`; +helpers.nonIterableSpread = helper("7.0.0-beta.0")` + export default function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance"); + } +`; +helpers.nonIterableRest = helper("7.0.0-beta.0")` + export default function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } +`; +helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")` + export default function _skipFirstGeneratorNext(fn) { + return function () { + var it = fn.apply(this, arguments); + it.next(); + return it; + } + } +`; +helpers.toPrimitive = helper("7.1.5")` + export default function _toPrimitive( + input, + hint /*: "default" | "string" | "number" | void */ + ) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } +`; +helpers.toPropertyKey = helper("7.1.5")` + import toPrimitive from "toPrimitive"; + + export default function _toPropertyKey(arg) { + var key = toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } +`; +helpers.initializerWarningHelper = helper("7.0.0-beta.0")` + export default function _initializerWarningHelper(descriptor, context){ + throw new Error( + 'Decorating class property failed. Please ensure that ' + + 'proposal-class-properties is enabled and set to use loose mode. ' + + 'To use proposal-class-properties in spec mode with decorators, wait for ' + + 'the next major version of decorators in stage 2.' + ); + } +`; +helpers.initializerDefineProperty = helper("7.0.0-beta.0")` + export default function _initializerDefineProperty(target, property, descriptor, context){ + if (!descriptor) return; + + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0, + }); + } +`; +helpers.applyDecoratedDescriptor = helper("7.0.0-beta.0")` + export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){ + var desc = {}; + Object.keys(descriptor).forEach(function(key){ + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + if ('value' in desc || desc.initializer){ + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function(desc, decorator){ + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0){ + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0){ + // This is a hack to avoid this being processed by 'transform-runtime'. + // See issue #9. + Object.defineProperty(target, property, desc); + desc = null; + } + + return desc; + } +`; +helpers.classPrivateFieldLooseKey = helper("7.0.0-beta.0")` + var id = 0; + export default function _classPrivateFieldKey(name) { + return "__private_" + (id++) + "_" + name; + } +`; +helpers.classPrivateFieldLooseBase = helper("7.0.0-beta.0")` + export default function _classPrivateFieldBase(receiver, privateKey) { + if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { + throw new TypeError("attempted to use private field on non-instance"); + } + return receiver; + } +`; +helpers.classPrivateFieldGet = helper("7.0.0-beta.0")` + export default function _classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + var descriptor = privateMap.get(receiver); + if (descriptor.get) { + return descriptor.get.call(receiver); + } + return descriptor.value; + } +`; +helpers.classPrivateFieldSet = helper("7.0.0-beta.0")` + export default function _classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + var descriptor = privateMap.get(receiver); + if (descriptor.set) { + descriptor.set.call(receiver, value); + } else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + + descriptor.value = value; + } + + return value; + } +`; +helpers.classStaticPrivateFieldSpecGet = helper("7.0.2")` + export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) { + if (receiver !== classConstructor) { + throw new TypeError("Private static access of wrong provenance"); + } + return descriptor.value; + } +`; +helpers.classStaticPrivateFieldSpecSet = helper("7.0.2")` + export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) { + if (receiver !== classConstructor) { + throw new TypeError("Private static access of wrong provenance"); + } + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + descriptor.value = value; + return value; + } +`; +helpers.classStaticPrivateMethodGet = helper("7.3.2")` + export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) { + if (receiver !== classConstructor) { + throw new TypeError("Private static access of wrong provenance"); + } + return method; + } +`; +helpers.classStaticPrivateMethodSet = helper("7.3.2")` + export default function _classStaticPrivateMethodSet() { + throw new TypeError("attempted to set read only static private field"); + } +`; +helpers.decorate = helper("7.1.5")` + import toArray from "toArray"; + import toPropertyKey from "toPropertyKey"; + + // These comments are stripped by @babel/template + /*:: + type PropertyDescriptor = + | { + value: any, + writable: boolean, + configurable: boolean, + enumerable: boolean, + } + | { + get?: () => any, + set?: (v: any) => void, + configurable: boolean, + enumerable: boolean, + }; + + type FieldDescriptor ={ + writable: boolean, + configurable: boolean, + enumerable: boolean, + }; + + type Placement = "static" | "prototype" | "own"; + type Key = string | symbol; // PrivateName is not supported yet. + + type ElementDescriptor = + | { + kind: "method", + key: Key, + placement: Placement, + descriptor: PropertyDescriptor + } + | { + kind: "field", + key: Key, + placement: Placement, + descriptor: FieldDescriptor, + initializer?: () => any, + }; + + // This is exposed to the user code + type ElementObjectInput = ElementDescriptor & { + [@@toStringTag]?: "Descriptor" + }; + + // This is exposed to the user code + type ElementObjectOutput = ElementDescriptor & { + [@@toStringTag]?: "Descriptor" + extras?: ElementDescriptor[], + finisher?: ClassFinisher, + }; + + // This is exposed to the user code + type ClassObject = { + [@@toStringTag]?: "Descriptor", + kind: "class", + elements: ElementDescriptor[], + }; + + type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput; + type ClassDecorator = (descriptor: ClassObject) => ?ClassObject; + type ClassFinisher = (cl: Class) => Class; + + // Only used by Babel in the transform output, not part of the spec. + type ElementDefinition = + | { + kind: "method", + value: any, + key: Key, + static?: boolean, + decorators?: ElementDecorator[], + } + | { + kind: "field", + value: () => any, + key: Key, + static?: boolean, + decorators?: ElementDecorator[], + }; + + declare function ClassFactory(initialize: (instance: C) => void): { + F: Class, + d: ElementDefinition[] + } + + */ + + /*:: + // Various combinations with/without extras and with one or many finishers + + type ElementFinisherExtras = { + element: ElementDescriptor, + finisher?: ClassFinisher, + extras?: ElementDescriptor[], + }; + + type ElementFinishersExtras = { + element: ElementDescriptor, + finishers: ClassFinisher[], + extras: ElementDescriptor[], + }; + + type ElementsFinisher = { + elements: ElementDescriptor[], + finisher?: ClassFinisher, + }; + + type ElementsFinishers = { + elements: ElementDescriptor[], + finishers: ClassFinisher[], + }; + + */ + + /*:: + + type Placements = { + static: Key[], + prototype: Key[], + own: Key[], + }; + + */ + + // ClassDefinitionEvaluation (Steps 26-*) + export default function _decorate( + decorators /*: ClassDecorator[] */, + factory /*: ClassFactory */, + superClass /*: ?Class<*> */, + mixins /*: ?Array */, + ) /*: Class<*> */ { + var api = _getDecoratorsApi(); + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + api = mixins[i](api); + } + } + + var r = factory(function initialize(O) { + api.initializeInstanceElements(O, decorated.elements); + }, superClass); + var decorated = api.decorateClass( + _coalesceClassElements(r.d.map(_createElementDescriptor)), + decorators, + ); + + api.initializeClassElements(r.F, decorated.elements); + + return api.runClassFinishers(r.F, decorated.finishers); + } + + function _getDecoratorsApi() { + _getDecoratorsApi = function() { + return api; + }; + + var api = { + elementsDefinitionOrder: [["method"], ["field"]], + + // InitializeInstanceElements + initializeInstanceElements: function( + /*::*/ O /*: C */, + elements /*: ElementDescriptor[] */, + ) { + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element /*: ElementDescriptor */) { + if (element.kind === kind && element.placement === "own") { + this.defineClassElement(O, element); + } + }, this); + }, this); + }, + + // InitializeClassElements + initializeClassElements: function( + /*::*/ F /*: Class */, + elements /*: ElementDescriptor[] */, + ) { + var proto = F.prototype; + + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element /*: ElementDescriptor */) { + var placement = element.placement; + if ( + element.kind === kind && + (placement === "static" || placement === "prototype") + ) { + var receiver = placement === "static" ? F : proto; + this.defineClassElement(receiver, element); + } + }, this); + }, this); + }, + + // DefineClassElement + defineClassElement: function( + /*::*/ receiver /*: C | Class */, + element /*: ElementDescriptor */, + ) { + var descriptor /*: PropertyDescriptor */ = element.descriptor; + if (element.kind === "field") { + var initializer = element.initializer; + descriptor = { + enumerable: descriptor.enumerable, + writable: descriptor.writable, + configurable: descriptor.configurable, + value: initializer === void 0 ? void 0 : initializer.call(receiver), + }; + } + Object.defineProperty(receiver, element.key, descriptor); + }, + + // DecorateClass + decorateClass: function( + elements /*: ElementDescriptor[] */, + decorators /*: ClassDecorator[] */, + ) /*: ElementsFinishers */ { + var newElements /*: ElementDescriptor[] */ = []; + var finishers /*: ClassFinisher[] */ = []; + var placements /*: Placements */ = { + static: [], + prototype: [], + own: [], + }; + + elements.forEach(function(element /*: ElementDescriptor */) { + this.addElementPlacement(element, placements); + }, this); + + elements.forEach(function(element /*: ElementDescriptor */) { + if (!_hasDecorators(element)) return newElements.push(element); + + var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement( + element, + placements, + ); + newElements.push(elementFinishersExtras.element); + newElements.push.apply(newElements, elementFinishersExtras.extras); + finishers.push.apply(finishers, elementFinishersExtras.finishers); + }, this); + + if (!decorators) { + return { elements: newElements, finishers: finishers }; + } + + var result /*: ElementsFinishers */ = this.decorateConstructor( + newElements, + decorators, + ); + finishers.push.apply(finishers, result.finishers); + result.finishers = finishers; + + return result; + }, + + // AddElementPlacement + addElementPlacement: function( + element /*: ElementDescriptor */, + placements /*: Placements */, + silent /*: boolean */, + ) { + var keys = placements[element.placement]; + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + keys.push(element.key); + }, + + // DecorateElement + decorateElement: function( + element /*: ElementDescriptor */, + placements /*: Placements */, + ) /*: ElementFinishersExtras */ { + var extras /*: ElementDescriptor[] */ = []; + var finishers /*: ClassFinisher[] */ = []; + + for ( + var decorators = element.decorators, i = decorators.length - 1; + i >= 0; + i-- + ) { + // (inlined) RemoveElementPlacement + var keys = placements[element.placement]; + keys.splice(keys.indexOf(element.key), 1); + + var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor( + element, + ); + var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras( + (0, decorators[i])(elementObject) /*: ElementObjectOutput */ || + elementObject, + ); + + element = elementFinisherExtras.element; + this.addElementPlacement(element, placements); + + if (elementFinisherExtras.finisher) { + finishers.push(elementFinisherExtras.finisher); + } + + var newExtras /*: ElementDescriptor[] | void */ = + elementFinisherExtras.extras; + if (newExtras) { + for (var j = 0; j < newExtras.length; j++) { + this.addElementPlacement(newExtras[j], placements); + } + extras.push.apply(extras, newExtras); + } + } + + return { element: element, finishers: finishers, extras: extras }; + }, + + // DecorateConstructor + decorateConstructor: function( + elements /*: ElementDescriptor[] */, + decorators /*: ClassDecorator[] */, + ) /*: ElementsFinishers */ { + var finishers /*: ClassFinisher[] */ = []; + + for (var i = decorators.length - 1; i >= 0; i--) { + var obj /*: ClassObject */ = this.fromClassDescriptor(elements); + var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor( + (0, decorators[i])(obj) /*: ClassObject */ || obj, + ); + + if (elementsAndFinisher.finisher !== undefined) { + finishers.push(elementsAndFinisher.finisher); + } + + if (elementsAndFinisher.elements !== undefined) { + elements = elementsAndFinisher.elements; + + for (var j = 0; j < elements.length - 1; j++) { + for (var k = j + 1; k < elements.length; k++) { + if ( + elements[j].key === elements[k].key && + elements[j].placement === elements[k].placement + ) { + throw new TypeError( + "Duplicated element (" + elements[j].key + ")", + ); + } + } + } + } + } + + return { elements: elements, finishers: finishers }; + }, + + // FromElementDescriptor + fromElementDescriptor: function( + element /*: ElementDescriptor */, + ) /*: ElementObject */ { + var obj /*: ElementObject */ = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor, + }; + + var desc = { + value: "Descriptor", + configurable: true, + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + + if (element.kind === "field") obj.initializer = element.initializer; + + return obj; + }, + + // ToElementDescriptors + toElementDescriptors: function( + elementObjects /*: ElementObject[] */, + ) /*: ElementDescriptor[] */ { + if (elementObjects === undefined) return; + return toArray(elementObjects).map(function(elementObject) { + var element = this.toElementDescriptor(elementObject); + this.disallowProperty(elementObject, "finisher", "An element descriptor"); + this.disallowProperty(elementObject, "extras", "An element descriptor"); + return element; + }, this); + }, + + // ToElementDescriptor + toElementDescriptor: function( + elementObject /*: ElementObject */, + ) /*: ElementDescriptor */ { + var kind = String(elementObject.kind); + if (kind !== "method" && kind !== "field") { + throw new TypeError( + 'An element descriptor\\'s .kind property must be either "method" or' + + ' "field", but a decorator created an element descriptor with' + + ' .kind "' + + kind + + '"', + ); + } + + var key = toPropertyKey(elementObject.key); + + var placement = String(elementObject.placement); + if ( + placement !== "static" && + placement !== "prototype" && + placement !== "own" + ) { + throw new TypeError( + 'An element descriptor\\'s .placement property must be one of "static",' + + ' "prototype" or "own", but a decorator created an element descriptor' + + ' with .placement "' + + placement + + '"', + ); + } + + var descriptor /*: PropertyDescriptor */ = elementObject.descriptor; + + this.disallowProperty(elementObject, "elements", "An element descriptor"); + + var element /*: ElementDescriptor */ = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor), + }; + + if (kind !== "field") { + this.disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + this.disallowProperty( + descriptor, + "get", + "The property descriptor of a field descriptor", + ); + this.disallowProperty( + descriptor, + "set", + "The property descriptor of a field descriptor", + ); + this.disallowProperty( + descriptor, + "value", + "The property descriptor of a field descriptor", + ); + + element.initializer = elementObject.initializer; + } + + return element; + }, + + toElementFinisherExtras: function( + elementObject /*: ElementObject */, + ) /*: ElementFinisherExtras */ { + var element /*: ElementDescriptor */ = this.toElementDescriptor( + elementObject, + ); + var finisher /*: ClassFinisher */ = _optionalCallableProperty( + elementObject, + "finisher", + ); + var extras /*: ElementDescriptors[] */ = this.toElementDescriptors( + elementObject.extras, + ); + + return { element: element, finisher: finisher, extras: extras }; + }, + + // FromClassDescriptor + fromClassDescriptor: function( + elements /*: ElementDescriptor[] */, + ) /*: ClassObject */ { + var obj = { + kind: "class", + elements: elements.map(this.fromElementDescriptor, this), + }; + + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + + return obj; + }, + + // ToClassDescriptor + toClassDescriptor: function( + obj /*: ClassObject */, + ) /*: ElementsFinisher */ { + var kind = String(obj.kind); + if (kind !== "class") { + throw new TypeError( + 'A class descriptor\\'s .kind property must be "class", but a decorator' + + ' created a class descriptor with .kind "' + + kind + + '"', + ); + } + + this.disallowProperty(obj, "key", "A class descriptor"); + this.disallowProperty(obj, "placement", "A class descriptor"); + this.disallowProperty(obj, "descriptor", "A class descriptor"); + this.disallowProperty(obj, "initializer", "A class descriptor"); + this.disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + var elements = this.toElementDescriptors(obj.elements); + + return { elements: elements, finisher: finisher }; + }, + + // RunClassFinishers + runClassFinishers: function( + constructor /*: Class<*> */, + finishers /*: ClassFinisher[] */, + ) /*: Class<*> */ { + for (var i = 0; i < finishers.length; i++) { + var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor); + if (newConstructor !== undefined) { + // NOTE: This should check if IsConstructor(newConstructor) is false. + if (typeof newConstructor !== "function") { + throw new TypeError("Finishers must return a constructor."); + } + constructor = newConstructor; + } + } + return constructor; + }, + + disallowProperty: function(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } + } + }; + + return api; + } + + // ClassElementEvaluation + function _createElementDescriptor( + def /*: ElementDefinition */, + ) /*: ElementDescriptor */ { + var key = toPropertyKey(def.key); + + var descriptor /*: PropertyDescriptor */; + if (def.kind === "method") { + descriptor = { + value: def.value, + writable: true, + configurable: true, + enumerable: false, + }; + } else if (def.kind === "get") { + descriptor = { get: def.value, configurable: true, enumerable: false }; + } else if (def.kind === "set") { + descriptor = { set: def.value, configurable: true, enumerable: false }; + } else if (def.kind === "field") { + descriptor = { configurable: true, writable: true, enumerable: true }; + } + + var element /*: ElementDescriptor */ = { + kind: def.kind === "field" ? "field" : "method", + key: key, + placement: def.static + ? "static" + : def.kind === "field" + ? "own" + : "prototype", + descriptor: descriptor, + }; + if (def.decorators) element.decorators = def.decorators; + if (def.kind === "field") element.initializer = def.value; + + return element; + } + + // CoalesceGetterSetter + function _coalesceGetterSetter( + element /*: ElementDescriptor */, + other /*: ElementDescriptor */, + ) { + if (element.descriptor.get !== undefined) { + other.descriptor.get = element.descriptor.get; + } else { + other.descriptor.set = element.descriptor.set; + } + } + + // CoalesceClassElements + function _coalesceClassElements( + elements /*: ElementDescriptor[] */, + ) /*: ElementDescriptor[] */ { + var newElements /*: ElementDescriptor[] */ = []; + + var isSameElement = function( + other /*: ElementDescriptor */, + ) /*: boolean */ { + return ( + other.kind === "method" && + other.key === element.key && + other.placement === element.placement + ); + }; + + for (var i = 0; i < elements.length; i++) { + var element /*: ElementDescriptor */ = elements[i]; + var other /*: ElementDescriptor */; + + if ( + element.kind === "method" && + (other = newElements.find(isSameElement)) + ) { + if ( + _isDataDescriptor(element.descriptor) || + _isDataDescriptor(other.descriptor) + ) { + if (_hasDecorators(element) || _hasDecorators(other)) { + throw new ReferenceError( + "Duplicated methods (" + element.key + ") can't be decorated.", + ); + } + other.descriptor = element.descriptor; + } else { + if (_hasDecorators(element)) { + if (_hasDecorators(other)) { + throw new ReferenceError( + "Decorators can't be placed on different accessors with for " + + "the same property (" + + element.key + + ").", + ); + } + other.decorators = element.decorators; + } + _coalesceGetterSetter(element, other); + } + } else { + newElements.push(element); + } + } + + return newElements; + } + + function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ { + return element.decorators && element.decorators.length; + } + + function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ { + return ( + desc !== undefined && + !(desc.value === undefined && desc.writable === undefined) + ); + } + + function _optionalCallableProperty /*::*/( + obj /*: T */, + name /*: $Keys */, + ) /*: ?Function */ { + var value = obj[name]; + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + return value; + } + +`; +helpers.classPrivateMethodGet = helper("7.1.6")` + export default function _classPrivateMethodGet(receiver, privateSet, fn) { + if (!privateSet.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return fn; + } +`; +helpers.classPrivateMethodSet = helper("7.1.6")` + export default function _classPrivateMethodSet() { + throw new TypeError("attempted to reassign private method"); + } +`; +helpers.wrapRegExp = helper("7.2.6")` + import wrapNativeSuper from "wrapNativeSuper"; + import getPrototypeOf from "getPrototypeOf"; + import possibleConstructorReturn from "possibleConstructorReturn"; + import inherits from "inherits"; + + export default function _wrapRegExp(re, groups) { + _wrapRegExp = function(re, groups) { + return new BabelRegExp(re, groups); + }; + + var _RegExp = wrapNativeSuper(RegExp); + var _super = RegExp.prototype; + var _groups = new WeakMap(); + + function BabelRegExp(re, groups) { + var _this = _RegExp.call(this, re); + _groups.set(_this, groups); + return _this; + } + inherits(BabelRegExp, _RegExp); + + BabelRegExp.prototype.exec = function(str) { + var result = _super.exec.call(this, str); + if (result) result.groups = buildGroups(result, this); + return result; + }; + BabelRegExp.prototype[Symbol.replace] = function(str, substitution) { + if (typeof substitution === "string") { + var groups = _groups.get(this); + return _super[Symbol.replace].call( + this, + str, + substitution.replace(/\\$<([^>]+)>/g, function(_, name) { + return "$" + groups[name]; + }) + ); + } else if (typeof substitution === "function") { + var _this = this; + return _super[Symbol.replace].call( + this, + str, + function() { + var args = []; + args.push.apply(args, arguments); + if (typeof args[args.length - 1] !== "object") { + // Modern engines already pass result.groups as the last arg. + args.push(buildGroups(args, _this)); + } + return substitution.apply(this, args); + } + ); + } else { + return _super[Symbol.replace].call(this, str, substitution); + } + } + + function buildGroups(result, re) { + // NOTE: This function should return undefined if there are no groups, + // but in that case Babel doesn't add the wrapper anyway. + + var g = _groups.get(re); + return Object.keys(g).reduce(function(groups, name) { + groups[name] = result[g[name]]; + return groups; + }, Object.create(null)); + } + + return _wrapRegExp.apply(this, arguments); + } +`; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/helpers/lib/index.js b/node_modules/@babel/core/node_modules/@babel/helpers/lib/index.js new file mode 100644 index 0000000..916b072 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helpers/lib/index.js @@ -0,0 +1,285 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.get = get; +exports.minVersion = minVersion; +exports.getDependencies = getDependencies; +exports.default = exports.list = void 0; + +function _traverse() { + const data = _interopRequireDefault(require("@babel/traverse")); + + _traverse = function () { + return data; + }; + + return data; +} + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +var _helpers = _interopRequireDefault(require("./helpers")); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function makePath(path) { + const parts = []; + + for (; path.parentPath; path = path.parentPath) { + parts.push(path.key); + if (path.inList) parts.push(path.listKey); + } + + return parts.reverse().join("."); +} + +function getHelperMetadata(file) { + const globals = new Set(); + const localBindingNames = new Set(); + const dependencies = new Map(); + let exportName; + let exportPath; + const exportBindingAssignments = []; + const importPaths = []; + const importBindingsReferences = []; + (0, _traverse().default)(file, { + ImportDeclaration(child) { + const name = child.node.source.value; + + if (!_helpers.default[name]) { + throw child.buildCodeFrameError(`Unknown helper ${name}`); + } + + if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) { + throw child.buildCodeFrameError("Helpers can only import a default value"); + } + + const bindingIdentifier = child.node.specifiers[0].local; + dependencies.set(bindingIdentifier, name); + importPaths.push(makePath(child)); + }, + + ExportDefaultDeclaration(child) { + const decl = child.get("declaration"); + + if (decl.isFunctionDeclaration()) { + if (!decl.node.id) { + throw decl.buildCodeFrameError("Helpers should give names to their exported func declaration"); + } + + exportName = decl.node.id.name; + } + + exportPath = makePath(child); + }, + + ExportAllDeclaration(child) { + throw child.buildCodeFrameError("Helpers can only export default"); + }, + + ExportNamedDeclaration(child) { + throw child.buildCodeFrameError("Helpers can only export default"); + }, + + Statement(child) { + if (child.isModuleDeclaration()) return; + child.skip(); + } + + }); + (0, _traverse().default)(file, { + Program(path) { + const bindings = path.scope.getAllBindings(); + Object.keys(bindings).forEach(name => { + if (name === exportName) return; + if (dependencies.has(bindings[name].identifier)) return; + localBindingNames.add(name); + }); + }, + + ReferencedIdentifier(child) { + const name = child.node.name; + const binding = child.scope.getBinding(name, true); + + if (!binding) { + globals.add(name); + } else if (dependencies.has(binding.identifier)) { + importBindingsReferences.push(makePath(child)); + } + }, + + AssignmentExpression(child) { + const left = child.get("left"); + if (!(exportName in left.getBindingIdentifiers())) return; + + if (!left.isIdentifier()) { + throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers"); + } + + const binding = child.scope.getBinding(exportName); + + if (binding && binding.scope.path.isProgram()) { + exportBindingAssignments.push(makePath(child)); + } + } + + }); + if (!exportPath) throw new Error("Helpers must default-export something."); + exportBindingAssignments.reverse(); + return { + globals: Array.from(globals), + localBindingNames: Array.from(localBindingNames), + dependencies, + exportBindingAssignments, + exportPath, + exportName, + importBindingsReferences, + importPaths + }; +} + +function permuteHelperAST(file, metadata, id, localBindings, getDependency) { + if (localBindings && !id) { + throw new Error("Unexpected local bindings for module-based helpers."); + } + + if (!id) return; + const { + localBindingNames, + dependencies, + exportBindingAssignments, + exportPath, + exportName, + importBindingsReferences, + importPaths + } = metadata; + const dependenciesRefs = {}; + dependencies.forEach((name, id) => { + dependenciesRefs[id.name] = typeof getDependency === "function" && getDependency(name) || id; + }); + const toRename = {}; + const bindings = new Set(localBindings || []); + localBindingNames.forEach(name => { + let newName = name; + + while (bindings.has(newName)) newName = "_" + newName; + + if (newName !== name) toRename[name] = newName; + }); + + if (id.type === "Identifier" && exportName !== id.name) { + toRename[exportName] = id.name; + } + + (0, _traverse().default)(file, { + Program(path) { + const exp = path.get(exportPath); + const imps = importPaths.map(p => path.get(p)); + const impsBindingRefs = importBindingsReferences.map(p => path.get(p)); + const decl = exp.get("declaration"); + + if (id.type === "Identifier") { + if (decl.isFunctionDeclaration()) { + exp.replaceWith(decl); + } else { + exp.replaceWith(t().variableDeclaration("var", [t().variableDeclarator(id, decl.node)])); + } + } else if (id.type === "MemberExpression") { + if (decl.isFunctionDeclaration()) { + exportBindingAssignments.forEach(assignPath => { + const assign = path.get(assignPath); + assign.replaceWith(t().assignmentExpression("=", id, assign.node)); + }); + exp.replaceWith(decl); + path.pushContainer("body", t().expressionStatement(t().assignmentExpression("=", id, t().identifier(exportName)))); + } else { + exp.replaceWith(t().expressionStatement(t().assignmentExpression("=", id, decl.node))); + } + } else { + throw new Error("Unexpected helper format."); + } + + Object.keys(toRename).forEach(name => { + path.scope.rename(name, toRename[name]); + }); + + for (const path of imps) path.remove(); + + for (const path of impsBindingRefs) { + const node = t().cloneNode(dependenciesRefs[path.node.name]); + path.replaceWith(node); + } + + path.stop(); + } + + }); +} + +const helperData = Object.create(null); + +function loadHelper(name) { + if (!helperData[name]) { + const helper = _helpers.default[name]; + + if (!helper) { + throw Object.assign(new ReferenceError(`Unknown helper ${name}`), { + code: "BABEL_HELPER_UNKNOWN", + helper: name + }); + } + + const fn = () => { + return t().file(helper.ast()); + }; + + const metadata = getHelperMetadata(fn()); + helperData[name] = { + build(getDependency, id, localBindings) { + const file = fn(); + permuteHelperAST(file, metadata, id, localBindings, getDependency); + return { + nodes: file.program.body, + globals: metadata.globals + }; + }, + + minVersion() { + return helper.minVersion; + }, + + dependencies: metadata.dependencies + }; + } + + return helperData[name]; +} + +function get(name, getDependency, id, localBindings) { + return loadHelper(name).build(getDependency, id, localBindings); +} + +function minVersion(name) { + return loadHelper(name).minVersion(); +} + +function getDependencies(name) { + return Array.from(loadHelper(name).dependencies.values()); +} + +const list = Object.keys(_helpers.default).map(name => name.replace(/^_/, "")).filter(name => name !== "__esModule"); +exports.list = list; +var _default = get; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/helpers/package.json b/node_modules/@babel/core/node_modules/@babel/helpers/package.json new file mode 100644 index 0000000..b8021e1 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/helpers/package.json @@ -0,0 +1,54 @@ +{ + "_from": "@babel/helpers@^7.4.0", + "_id": "@babel/helpers@7.4.2", + "_inBundle": false, + "_integrity": "sha512-gQR1eQeroDzFBikhrCccm5Gs2xBjZ57DNjGbqTaHo911IpmSxflOQWMAHPw/TXk8L3isv7s9lYzUkexOeTQUYg==", + "_location": "/@babel/core/@babel/helpers", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/helpers@^7.4.0", + "name": "@babel/helpers", + "escapedName": "@babel%2fhelpers", + "scope": "@babel", + "rawSpec": "^7.4.0", + "saveSpec": null, + "fetchSpec": "^7.4.0" + }, + "_requiredBy": [ + "/@babel/core" + ], + "_resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.2.tgz", + "_shasum": "3bdfa46a552ca77ef5a0f8551be5f0845ae989be", + "_spec": "@babel/helpers@^7.4.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.0", + "@babel/types": "^7.4.0" + }, + "deprecated": false, + "description": "Collection of helper functions used by Babel transforms.", + "devDependencies": { + "@babel/helper-plugin-test-runner": "^7.0.0" + }, + "gitHead": "7dea0f23de51af336a2fab0286a73af30cddf3be", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/helpers", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-helpers" + }, + "version": "7.4.2" +} diff --git a/node_modules/@babel/core/node_modules/@babel/highlight/LICENSE b/node_modules/@babel/core/node_modules/@babel/highlight/LICENSE new file mode 100644 index 0000000..620366e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/highlight/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-2018 Sebastian McKenzie + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/highlight/README.md b/node_modules/@babel/core/node_modules/@babel/highlight/README.md new file mode 100644 index 0000000..72dae60 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/highlight/README.md @@ -0,0 +1,19 @@ +# @babel/highlight + +> Syntax highlight JavaScript strings for output in terminals. + +See our website [@babel/highlight](https://babeljs.io/docs/en/next/babel-highlight.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/highlight +``` + +or using yarn: + +```sh +yarn add @babel/highlight --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/highlight/lib/index.js b/node_modules/@babel/core/node_modules/@babel/highlight/lib/index.js new file mode 100644 index 0000000..6ac5b4a --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/highlight/lib/index.js @@ -0,0 +1,129 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.shouldHighlight = shouldHighlight; +exports.getChalk = getChalk; +exports.default = highlight; + +function _jsTokens() { + const data = _interopRequireWildcard(require("js-tokens")); + + _jsTokens = function () { + return data; + }; + + return data; +} + +function _esutils() { + const data = _interopRequireDefault(require("esutils")); + + _esutils = function () { + return data; + }; + + return data; +} + +function _chalk() { + const data = _interopRequireDefault(require("chalk")); + + _chalk = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +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 + }; +} + +const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; +const JSX_TAG = /^[a-z][\w-]*$/i; +const BRACKET = /^[()[\]{}]$/; + +function getTokenType(match) { + const [offset, text] = match.slice(-2); + const token = (0, _jsTokens().matchToToken)(match); + + if (token.type === "name") { + if (_esutils().default.keyword.isReservedWordES6(token.value)) { + return "keyword"; + } + + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " colorize(str)).join("\n"); + } else { + return args[0]; + } + }); +} + +function shouldHighlight(options) { + return _chalk().default.supportsColor || options.forceColor; +} + +function getChalk(options) { + let chalk = _chalk().default; + + if (options.forceColor) { + chalk = new (_chalk().default.constructor)({ + enabled: true, + level: 1 + }); + } + + return chalk; +} + +function highlight(code, options = {}) { + if (shouldHighlight(options)) { + const chalk = getChalk(options); + const defs = getDefs(chalk); + return highlightTokens(defs, code); + } else { + return code; + } +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/highlight/package.json b/node_modules/@babel/core/node_modules/@babel/highlight/package.json new file mode 100644 index 0000000..2f421e0 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/highlight/package.json @@ -0,0 +1,50 @@ +{ + "_from": "@babel/highlight@^7.0.0", + "_id": "@babel/highlight@7.0.0", + "_inBundle": false, + "_integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "_location": "/@babel/core/@babel/highlight", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/highlight@^7.0.0", + "name": "@babel/highlight", + "escapedName": "@babel%2fhighlight", + "scope": "@babel", + "rawSpec": "^7.0.0", + "saveSpec": null, + "fetchSpec": "^7.0.0" + }, + "_requiredBy": [ + "/@babel/core/@babel/code-frame" + ], + "_resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "_shasum": "f710c38c8d458e6dd9a201afb637fcb781ce99e4", + "_spec": "@babel/highlight@^7.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\code-frame", + "author": { + "name": "suchipi", + "email": "me@suchipi.com" + }, + "bundleDependencies": false, + "dependencies": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "deprecated": false, + "description": "Syntax highlight JavaScript strings for output in terminals.", + "devDependencies": { + "strip-ansi": "^4.0.0" + }, + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/highlight", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight" + }, + "version": "7.0.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/template/LICENSE b/node_modules/@babel/core/node_modules/@babel/template/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/template/README.md b/node_modules/@babel/core/node_modules/@babel/template/README.md new file mode 100644 index 0000000..cf8f944 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/README.md @@ -0,0 +1,19 @@ +# @babel/template + +> Generate an AST from a string template. + +See our website [@babel/template](https://babeljs.io/docs/en/next/babel-template.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/template +``` + +or using yarn: + +```sh +yarn add @babel/template --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/template/lib/builder.js b/node_modules/@babel/core/node_modules/@babel/template/lib/builder.js new file mode 100644 index 0000000..2a0e629 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/lib/builder.js @@ -0,0 +1,83 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createTemplateBuilder; + +var _options = require("./options"); + +var _string = _interopRequireDefault(require("./string")); + +var _literal = _interopRequireDefault(require("./literal")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const NO_PLACEHOLDER = (0, _options.validate)({ + placeholderPattern: false +}); + +function createTemplateBuilder(formatter, defaultOpts) { + const templateFnCache = new WeakMap(); + const templateAstCache = new WeakMap(); + const cachedOpts = defaultOpts || (0, _options.validate)(null); + return Object.assign((tpl, ...args) => { + if (typeof tpl === "string") { + if (args.length > 1) throw new Error("Unexpected extra params."); + return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])))); + } else if (Array.isArray(tpl)) { + let builder = templateFnCache.get(tpl); + + if (!builder) { + builder = (0, _literal.default)(formatter, tpl, cachedOpts); + templateFnCache.set(tpl, builder); + } + + return extendedTrace(builder(args)); + } else if (typeof tpl === "object" && tpl) { + if (args.length > 0) throw new Error("Unexpected extra params."); + return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl))); + } + + throw new Error(`Unexpected template param ${typeof tpl}`); + }, { + ast: (tpl, ...args) => { + if (typeof tpl === "string") { + if (args.length > 1) throw new Error("Unexpected extra params."); + return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))(); + } else if (Array.isArray(tpl)) { + let builder = templateAstCache.get(tpl); + + if (!builder) { + builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER)); + templateAstCache.set(tpl, builder); + } + + return builder(args)(); + } + + throw new Error(`Unexpected template param ${typeof tpl}`); + } + }); +} + +function extendedTrace(fn) { + let rootStack = ""; + + try { + throw new Error(); + } catch (error) { + if (error.stack) { + rootStack = error.stack.split("\n").slice(3).join("\n"); + } + } + + return arg => { + try { + return fn(arg); + } catch (err) { + err.stack += `\n =============\n${rootStack}`; + throw err; + } + }; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/template/lib/formatters.js b/node_modules/@babel/core/node_modules/@babel/template/lib/formatters.js new file mode 100644 index 0000000..59e0984 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/lib/formatters.js @@ -0,0 +1,63 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0; + +function makeStatementFormatter(fn) { + return { + code: str => `/* @babel/template */;\n${str}`, + validate: () => {}, + unwrap: ast => { + return fn(ast.program.body.slice(1)); + } + }; +} + +const smart = makeStatementFormatter(body => { + if (body.length > 1) { + return body; + } else { + return body[0]; + } +}); +exports.smart = smart; +const statements = makeStatementFormatter(body => body); +exports.statements = statements; +const statement = makeStatementFormatter(body => { + if (body.length === 0) { + throw new Error("Found nothing to return."); + } + + if (body.length > 1) { + throw new Error("Found multiple statements but wanted one"); + } + + return body[0]; +}); +exports.statement = statement; +const expression = { + code: str => `(\n${str}\n)`, + validate: ({ + program + }) => { + if (program.body.length > 1) { + throw new Error("Found multiple statements but wanted one"); + } + + const expression = program.body[0].expression; + + if (expression.start === 0) { + throw new Error("Parse result included parens."); + } + }, + unwrap: ast => ast.program.body[0].expression +}; +exports.expression = expression; +const program = { + code: str => str, + validate: () => {}, + unwrap: ast => ast.program +}; +exports.program = program; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/template/lib/index.js b/node_modules/@babel/core/node_modules/@babel/template/lib/index.js new file mode 100644 index 0000000..7ce85e9 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/lib/index.js @@ -0,0 +1,36 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0; + +var formatters = _interopRequireWildcard(require("./formatters")); + +var _builder = _interopRequireDefault(require("./builder")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +const smart = (0, _builder.default)(formatters.smart); +exports.smart = smart; +const statement = (0, _builder.default)(formatters.statement); +exports.statement = statement; +const statements = (0, _builder.default)(formatters.statements); +exports.statements = statements; +const expression = (0, _builder.default)(formatters.expression); +exports.expression = expression; +const program = (0, _builder.default)(formatters.program); +exports.program = program; + +var _default = Object.assign(smart.bind(undefined), { + smart, + statement, + statements, + expression, + program, + ast: smart.ast +}); + +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/template/lib/literal.js b/node_modules/@babel/core/node_modules/@babel/template/lib/literal.js new file mode 100644 index 0000000..0b8f904 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/lib/literal.js @@ -0,0 +1,82 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = literalTemplate; + +var _options = require("./options"); + +var _parse = _interopRequireDefault(require("./parse")); + +var _populate = _interopRequireDefault(require("./populate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function literalTemplate(formatter, tpl, opts) { + const { + metadata, + names + } = buildLiteralData(formatter, tpl, opts); + return arg => { + const defaultReplacements = arg.reduce((acc, replacement, i) => { + acc[names[i]] = replacement; + return acc; + }, {}); + return arg => { + const replacements = (0, _options.normalizeReplacements)(arg); + + if (replacements) { + Object.keys(replacements).forEach(key => { + if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) { + throw new Error("Unexpected replacement overlap."); + } + }); + } + + return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements)); + }; + }; +} + +function buildLiteralData(formatter, tpl, opts) { + let names; + let nameSet; + let metadata; + let prefix = ""; + + do { + prefix += "$"; + const result = buildTemplateCode(tpl, prefix); + names = result.names; + nameSet = new Set(names); + metadata = (0, _parse.default)(formatter, formatter.code(result.code), { + parser: opts.parser, + placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])), + placeholderPattern: opts.placeholderPattern, + preserveComments: opts.preserveComments, + syntacticPlaceholders: opts.syntacticPlaceholders + }); + } while (metadata.placeholders.some(placeholder => placeholder.isDuplicate && nameSet.has(placeholder.name))); + + return { + metadata, + names + }; +} + +function buildTemplateCode(tpl, prefix) { + const names = []; + let code = tpl[0]; + + for (let i = 1; i < tpl.length; i++) { + const value = `${prefix}${i - 1}`; + names.push(value); + code += value + tpl[i]; + } + + return { + names, + code + }; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/template/lib/options.js b/node_modules/@babel/core/node_modules/@babel/template/lib/options.js new file mode 100644 index 0000000..35ed733 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/lib/options.js @@ -0,0 +1,82 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.merge = merge; +exports.validate = validate; +exports.normalizeReplacements = normalizeReplacements; + +function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } + +function merge(a, b) { + const { + placeholderWhitelist = a.placeholderWhitelist, + placeholderPattern = a.placeholderPattern, + preserveComments = a.preserveComments, + syntacticPlaceholders = a.syntacticPlaceholders + } = b; + return { + parser: Object.assign({}, a.parser, b.parser), + placeholderWhitelist, + placeholderPattern, + preserveComments, + syntacticPlaceholders + }; +} + +function validate(opts) { + if (opts != null && typeof opts !== "object") { + throw new Error("Unknown template options."); + } + + const _ref = opts || {}, + { + placeholderWhitelist, + placeholderPattern, + preserveComments, + syntacticPlaceholders + } = _ref, + parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]); + + if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) { + throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined"); + } + + if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) { + throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined"); + } + + if (preserveComments != null && typeof preserveComments !== "boolean") { + throw new Error("'.preserveComments' must be a boolean, null, or undefined"); + } + + if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") { + throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined"); + } + + if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) { + throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); + } + + return { + parser, + placeholderWhitelist: placeholderWhitelist || undefined, + placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern, + preserveComments: preserveComments == null ? false : preserveComments, + syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders + }; +} + +function normalizeReplacements(replacements) { + if (Array.isArray(replacements)) { + return replacements.reduce((acc, replacement, i) => { + acc["$" + i] = replacement; + return acc; + }, {}); + } else if (typeof replacements === "object" || replacements == null) { + return replacements || undefined; + } + + throw new Error("Template replacements must be an array, object, null, or undefined"); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js b/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js new file mode 100644 index 0000000..3173349 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js @@ -0,0 +1,193 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = parseAndBuildMetadata; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _parser() { + const data = require("@babel/parser"); + + _parser = function () { + return data; + }; + + return data; +} + +function _codeFrame() { + const data = require("@babel/code-frame"); + + _codeFrame = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +const PATTERN = /^[_$A-Z0-9]+$/; + +function parseAndBuildMetadata(formatter, code, opts) { + const ast = parseWithCodeFrame(code, opts.parser); + const { + placeholderWhitelist, + placeholderPattern, + preserveComments, + syntacticPlaceholders + } = opts; + t().removePropertiesDeep(ast, { + preserveComments + }); + formatter.validate(ast); + const syntactic = { + placeholders: [], + placeholderNames: new Set() + }; + const legacy = { + placeholders: [], + placeholderNames: new Set() + }; + const isLegacyRef = { + value: undefined + }; + t().traverse(ast, placeholderVisitorHandler, { + syntactic, + legacy, + isLegacyRef, + placeholderWhitelist, + placeholderPattern, + syntacticPlaceholders + }); + return Object.assign({ + ast + }, isLegacyRef.value ? legacy : syntactic); +} + +function placeholderVisitorHandler(node, ancestors, state) { + let name; + + if (t().isPlaceholder(node)) { + if (state.syntacticPlaceholders === false) { + throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false."); + } else { + name = node.name.name; + state.isLegacyRef.value = false; + } + } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) { + return; + } else if (t().isIdentifier(node) || t().isJSXIdentifier(node)) { + name = node.name; + state.isLegacyRef.value = true; + } else if (t().isStringLiteral(node)) { + name = node.value; + state.isLegacyRef.value = true; + } else { + return; + } + + if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) { + throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); + } + + if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) { + return; + } + + ancestors = ancestors.slice(); + const { + node: parent, + key + } = ancestors[ancestors.length - 1]; + let type; + + if (t().isStringLiteral(node) || t().isPlaceholder(node, { + expectedNode: "StringLiteral" + })) { + type = "string"; + } else if (t().isNewExpression(parent) && key === "arguments" || t().isCallExpression(parent) && key === "arguments" || t().isFunction(parent) && key === "params") { + type = "param"; + } else if (t().isExpressionStatement(parent) && !t().isPlaceholder(node)) { + type = "statement"; + ancestors = ancestors.slice(0, -1); + } else if (t().isStatement(node) && t().isPlaceholder(node)) { + type = "statement"; + } else { + type = "other"; + } + + const { + placeholders, + placeholderNames + } = state.isLegacyRef.value ? state.legacy : state.syntactic; + placeholders.push({ + name, + type, + resolve: ast => resolveAncestors(ast, ancestors), + isDuplicate: placeholderNames.has(name) + }); + placeholderNames.add(name); +} + +function resolveAncestors(ast, ancestors) { + let parent = ast; + + for (let i = 0; i < ancestors.length - 1; i++) { + const { + key, + index + } = ancestors[i]; + + if (index === undefined) { + parent = parent[key]; + } else { + parent = parent[key][index]; + } + } + + const { + key, + index + } = ancestors[ancestors.length - 1]; + return { + parent, + key, + index + }; +} + +function parseWithCodeFrame(code, parserOpts) { + parserOpts = Object.assign({ + allowReturnOutsideFunction: true, + allowSuperOutsideMethod: true, + sourceType: "module" + }, parserOpts, { + plugins: (parserOpts.plugins || []).concat("placeholders") + }); + + try { + return (0, _parser().parse)(code, parserOpts); + } catch (err) { + const loc = err.loc; + + if (loc) { + err.message += "\n" + (0, _codeFrame().codeFrameColumns)(code, { + start: loc + }); + err.code = "BABEL_TEMPLATE_PARSE_ERROR"; + } + + throw err; + } +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/template/lib/populate.js b/node_modules/@babel/core/node_modules/@babel/template/lib/populate.js new file mode 100644 index 0000000..c69f7fd --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/lib/populate.js @@ -0,0 +1,133 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = populatePlaceholders; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function populatePlaceholders(metadata, replacements) { + const ast = t().cloneNode(metadata.ast); + + if (replacements) { + metadata.placeholders.forEach(placeholder => { + if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) { + const placeholderName = placeholder.name; + throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a + placeholder you may want to consider passing one of the following options to @babel/template: + - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])} + - { placeholderPattern: /^${placeholderName}$/ }`); + } + }); + Object.keys(replacements).forEach(key => { + if (!metadata.placeholderNames.has(key)) { + throw new Error(`Unknown substitution "${key}" given`); + } + }); + } + + metadata.placeholders.slice().reverse().forEach(placeholder => { + try { + applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null); + } catch (e) { + e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`; + throw e; + } + }); + return ast; +} + +function applyReplacement(placeholder, ast, replacement) { + if (placeholder.isDuplicate) { + if (Array.isArray(replacement)) { + replacement = replacement.map(node => t().cloneNode(node)); + } else if (typeof replacement === "object") { + replacement = t().cloneNode(replacement); + } + } + + const { + parent, + key, + index + } = placeholder.resolve(ast); + + if (placeholder.type === "string") { + if (typeof replacement === "string") { + replacement = t().stringLiteral(replacement); + } + + if (!replacement || !t().isStringLiteral(replacement)) { + throw new Error("Expected string substitution"); + } + } else if (placeholder.type === "statement") { + if (index === undefined) { + if (!replacement) { + replacement = t().emptyStatement(); + } else if (Array.isArray(replacement)) { + replacement = t().blockStatement(replacement); + } else if (typeof replacement === "string") { + replacement = t().expressionStatement(t().identifier(replacement)); + } else if (!t().isStatement(replacement)) { + replacement = t().expressionStatement(replacement); + } + } else { + if (replacement && !Array.isArray(replacement)) { + if (typeof replacement === "string") { + replacement = t().identifier(replacement); + } + + if (!t().isStatement(replacement)) { + replacement = t().expressionStatement(replacement); + } + } + } + } else if (placeholder.type === "param") { + if (typeof replacement === "string") { + replacement = t().identifier(replacement); + } + + if (index === undefined) throw new Error("Assertion failure."); + } else { + if (typeof replacement === "string") { + replacement = t().identifier(replacement); + } + + if (Array.isArray(replacement)) { + throw new Error("Cannot replace single expression with an array."); + } + } + + if (index === undefined) { + t().validate(parent, key, replacement); + parent[key] = replacement; + } else { + const items = parent[key].slice(); + + if (placeholder.type === "statement" || placeholder.type === "param") { + if (replacement == null) { + items.splice(index, 1); + } else if (Array.isArray(replacement)) { + items.splice(index, 1, ...replacement); + } else { + items[index] = replacement; + } + } else { + items[index] = replacement; + } + + t().validate(parent, key, items); + parent[key] = items; + } +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/template/lib/string.js b/node_modules/@babel/core/node_modules/@babel/template/lib/string.js new file mode 100644 index 0000000..02ad457 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/lib/string.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = stringTemplate; + +var _options = require("./options"); + +var _parse = _interopRequireDefault(require("./parse")); + +var _populate = _interopRequireDefault(require("./populate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringTemplate(formatter, code, opts) { + code = formatter.code(code); + let metadata; + return arg => { + const replacements = (0, _options.normalizeReplacements)(arg); + if (!metadata) metadata = (0, _parse.default)(formatter, code, opts); + return formatter.unwrap((0, _populate.default)(metadata, replacements)); + }; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/template/package.json b/node_modules/@babel/core/node_modules/@babel/template/package.json new file mode 100644 index 0000000..593f15e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/template/package.json @@ -0,0 +1,53 @@ +{ + "_from": "@babel/template@^7.4.0", + "_id": "@babel/template@7.4.0", + "_inBundle": false, + "_integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", + "_location": "/@babel/core/@babel/template", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/template@^7.4.0", + "name": "@babel/template", + "escapedName": "@babel%2ftemplate", + "scope": "@babel", + "rawSpec": "^7.4.0", + "saveSpec": null, + "fetchSpec": "^7.4.0" + }, + "_requiredBy": [ + "/@babel/core", + "/@babel/core/@babel/helper-function-name", + "/@babel/core/@babel/helpers" + ], + "_resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", + "_shasum": "12474e9c077bae585c5d835a95c0b0b790c25c8b", + "_spec": "@babel/template@^7.4.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.0", + "@babel/types": "^7.4.0" + }, + "deprecated": false, + "description": "Generate an AST from a string template.", + "gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/template", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-template" + }, + "version": "7.4.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/LICENSE b/node_modules/@babel/core/node_modules/@babel/traverse/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/README.md b/node_modules/@babel/core/node_modules/@babel/traverse/README.md new file mode 100644 index 0000000..61dc580 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/README.md @@ -0,0 +1,19 @@ +# @babel/traverse + +> The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes + +See our website [@babel/traverse](https://babeljs.io/docs/en/next/babel-traverse.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/traverse +``` + +or using yarn: + +```sh +yarn add @babel/traverse --dev +``` diff --git a/node_modules/@babel/traverse/lib/cache.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/cache.js similarity index 88% rename from node_modules/@babel/traverse/lib/cache.js rename to node_modules/@babel/core/node_modules/@babel/traverse/lib/cache.js index 6ba2e26..89f2007 100644 --- a/node_modules/@babel/traverse/lib/cache.js +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/cache.js @@ -7,9 +7,9 @@ exports.clear = clear; exports.clearPath = clearPath; exports.clearScope = clearScope; exports.scope = exports.path = void 0; -var path = new WeakMap(); +let path = new WeakMap(); exports.path = path; -var scope = new WeakMap(); +let scope = new WeakMap(); exports.scope = scope; function clear() { diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js new file mode 100644 index 0000000..7becbcd --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js @@ -0,0 +1,152 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _path = _interopRequireDefault(require("./path")); + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const testing = process.env.NODE_ENV === "test"; + +class TraversalContext { + constructor(scope, opts, state, parentPath) { + this.queue = null; + this.parentPath = parentPath; + this.scope = scope; + this.state = state; + this.opts = opts; + } + + shouldVisit(node) { + const opts = this.opts; + if (opts.enter || opts.exit) return true; + if (opts[node.type]) return true; + const keys = t().VISITOR_KEYS[node.type]; + if (!keys || !keys.length) return false; + + for (const key of keys) { + if (node[key]) return true; + } + + return false; + } + + create(node, obj, key, listKey) { + return _path.default.get({ + parentPath: this.parentPath, + parent: node, + container: obj, + key: key, + listKey + }); + } + + maybeQueue(path, notPriority) { + if (this.trap) { + throw new Error("Infinite cycle detected"); + } + + if (this.queue) { + if (notPriority) { + this.queue.push(path); + } else { + this.priorityQueue.push(path); + } + } + } + + visitMultiple(container, parent, listKey) { + if (container.length === 0) return false; + const queue = []; + + for (let key = 0; key < container.length; key++) { + const node = container[key]; + + if (node && this.shouldVisit(node)) { + queue.push(this.create(parent, container, key, listKey)); + } + } + + return this.visitQueue(queue); + } + + visitSingle(node, key) { + if (this.shouldVisit(node[key])) { + return this.visitQueue([this.create(node, node, key)]); + } else { + return false; + } + } + + visitQueue(queue) { + this.queue = queue; + this.priorityQueue = []; + const visited = []; + let stop = false; + + for (const path of queue) { + path.resync(); + + if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { + path.pushContext(this); + } + + if (path.key === null) continue; + + if (testing && queue.length >= 10000) { + this.trap = true; + } + + if (visited.indexOf(path.node) >= 0) continue; + visited.push(path.node); + + if (path.visit()) { + stop = true; + break; + } + + if (this.priorityQueue.length) { + stop = this.visitQueue(this.priorityQueue); + this.priorityQueue = []; + this.queue = queue; + if (stop) break; + } + } + + for (const path of queue) { + path.popContext(); + } + + this.queue = null; + return stop; + } + + visit(node, key) { + const nodes = node[key]; + if (!nodes) return false; + + if (Array.isArray(nodes)) { + return this.visitMultiple(nodes, node, key); + } else { + return this.visitSingle(node, key); + } + } + +} + +exports.default = TraversalContext; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/hub.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/hub.js new file mode 100644 index 0000000..fe139d2 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/hub.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +class Hub { + getCode() {} + + getScope() {} + + addHelper() { + throw new Error("Helpers are not supported by the default hub."); + } + + buildError(node, msg, Error = TypeError) { + return new Error(msg); + } + +} + +exports.default = Hub; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js new file mode 100644 index 0000000..1865e2a --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js @@ -0,0 +1,130 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverse; +Object.defineProperty(exports, "NodePath", { + enumerable: true, + get: function () { + return _path.default; + } +}); +Object.defineProperty(exports, "Scope", { + enumerable: true, + get: function () { + return _scope.default; + } +}); +Object.defineProperty(exports, "Hub", { + enumerable: true, + get: function () { + return _hub.default; + } +}); +exports.visitors = void 0; + +var _context = _interopRequireDefault(require("./context")); + +var visitors = _interopRequireWildcard(require("./visitors")); + +exports.visitors = visitors; + +function _includes() { + const data = _interopRequireDefault(require("lodash/includes")); + + _includes = function () { + return data; + }; + + return data; +} + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +var cache = _interopRequireWildcard(require("./cache")); + +var _path = _interopRequireDefault(require("./path")); + +var _scope = _interopRequireDefault(require("./scope")); + +var _hub = _interopRequireDefault(require("./hub")); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function traverse(parent, opts, scope, state, parentPath) { + if (!parent) return; + if (!opts) opts = {}; + + if (!opts.noScope && !scope) { + if (parent.type !== "Program" && parent.type !== "File") { + throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + `Instead of that you tried to traverse a ${parent.type} node without ` + "passing scope and parentPath."); + } + } + + visitors.explode(opts); + traverse.node(parent, opts, scope, state, parentPath); +} + +traverse.visitors = visitors; +traverse.verify = visitors.verify; +traverse.explode = visitors.explode; + +traverse.cheap = function (node, enter) { + return t().traverseFast(node, enter); +}; + +traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { + const keys = t().VISITOR_KEYS[node.type]; + if (!keys) return; + const context = new _context.default(scope, opts, state, parentPath); + + for (const key of keys) { + if (skipKeys && skipKeys[key]) continue; + if (context.visit(node, key)) return; + } +}; + +traverse.clearNode = function (node, opts) { + t().removeProperties(node, opts); + cache.path.delete(node); +}; + +traverse.removeProperties = function (tree, opts) { + t().traverseFast(tree, traverse.clearNode, opts); + return tree; +}; + +function hasBlacklistedType(path, state) { + if (path.node.type === state.type) { + state.has = true; + path.stop(); + } +} + +traverse.hasType = function (tree, type, blacklistTypes) { + if ((0, _includes().default)(blacklistTypes, tree.type)) return false; + if (tree.type === type) return true; + const state = { + has: false, + type: type + }; + traverse(tree, { + noScope: true, + blacklist: blacklistTypes, + enter: hasBlacklistedType + }, null, state); + return state.has; +}; + +traverse.cache = cache; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/ancestry.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/ancestry.js new file mode 100644 index 0000000..60e6a98 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/ancestry.js @@ -0,0 +1,188 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.findParent = findParent; +exports.find = find; +exports.getFunctionParent = getFunctionParent; +exports.getStatementParent = getStatementParent; +exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom; +exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom; +exports.getAncestry = getAncestry; +exports.isAncestor = isAncestor; +exports.isDescendant = isDescendant; +exports.inType = inType; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +var _index = _interopRequireDefault(require("./index")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function findParent(callback) { + let path = this; + + while (path = path.parentPath) { + if (callback(path)) return path; + } + + return null; +} + +function find(callback) { + let path = this; + + do { + if (callback(path)) return path; + } while (path = path.parentPath); + + return null; +} + +function getFunctionParent() { + return this.findParent(p => p.isFunction()); +} + +function getStatementParent() { + let path = this; + + do { + if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { + break; + } else { + path = path.parentPath; + } + } while (path); + + if (path && (path.isProgram() || path.isFile())) { + throw new Error("File/Program node, we can't possibly find a statement parent to this"); + } + + return path; +} + +function getEarliestCommonAncestorFrom(paths) { + return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) { + let earliest; + const keys = t().VISITOR_KEYS[deepest.type]; + + for (const ancestry of ancestries) { + const path = ancestry[i + 1]; + + if (!earliest) { + earliest = path; + continue; + } + + if (path.listKey && earliest.listKey === path.listKey) { + if (path.key < earliest.key) { + earliest = path; + continue; + } + } + + const earliestKeyIndex = keys.indexOf(earliest.parentKey); + const currentKeyIndex = keys.indexOf(path.parentKey); + + if (earliestKeyIndex > currentKeyIndex) { + earliest = path; + } + } + + return earliest; + }); +} + +function getDeepestCommonAncestorFrom(paths, filter) { + if (!paths.length) { + return this; + } + + if (paths.length === 1) { + return paths[0]; + } + + let minDepth = Infinity; + let lastCommonIndex, lastCommon; + const ancestries = paths.map(path => { + const ancestry = []; + + do { + ancestry.unshift(path); + } while ((path = path.parentPath) && path !== this); + + if (ancestry.length < minDepth) { + minDepth = ancestry.length; + } + + return ancestry; + }); + const first = ancestries[0]; + + depthLoop: for (let i = 0; i < minDepth; i++) { + const shouldMatch = first[i]; + + for (const ancestry of ancestries) { + if (ancestry[i] !== shouldMatch) { + break depthLoop; + } + } + + lastCommonIndex = i; + lastCommon = shouldMatch; + } + + if (lastCommon) { + if (filter) { + return filter(lastCommon, lastCommonIndex, ancestries); + } else { + return lastCommon; + } + } else { + throw new Error("Couldn't find intersection"); + } +} + +function getAncestry() { + let path = this; + const paths = []; + + do { + paths.push(path); + } while (path = path.parentPath); + + return paths; +} + +function isAncestor(maybeDescendant) { + return maybeDescendant.isDescendant(this); +} + +function isDescendant(maybeAncestor) { + return !!this.findParent(parent => parent === maybeAncestor); +} + +function inType() { + let path = this; + + while (path) { + for (const type of arguments) { + if (path.node.type === type) return true; + } + + path = path.parentPath; + } + + return false; +} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/comments.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/comments.js similarity index 77% rename from node_modules/@babel/traverse/lib/path/comments.js rename to node_modules/@babel/core/node_modules/@babel/traverse/lib/path/comments.js index a281ae8..09ec514 100644 --- a/node_modules/@babel/traverse/lib/path/comments.js +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/comments.js @@ -8,9 +8,9 @@ exports.addComment = addComment; exports.addComments = addComments; function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -21,15 +21,15 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function shareCommentsWithSiblings() { if (typeof this.key === "string") return; - var node = this.node; + const node = this.node; if (!node) return; - var trailing = node.trailingComments; - var leading = node.leadingComments; + const trailing = node.trailingComments; + const leading = node.leadingComments; if (!trailing && !leading) return; - var prev = this.getSibling(this.key - 1); - var next = this.getSibling(this.key + 1); - var hasPrev = Boolean(prev.node); - var hasNext = Boolean(next.node); + const prev = this.getSibling(this.key - 1); + const next = this.getSibling(this.key + 1); + const hasPrev = Boolean(prev.node); + const hasNext = Boolean(next.node); if (hasPrev && hasNext) {} else if (hasPrev) { prev.addComments("trailing", trailing); diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js new file mode 100644 index 0000000..8dbd0fc --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js @@ -0,0 +1,245 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.call = call; +exports._call = _call; +exports.isBlacklisted = isBlacklisted; +exports.visit = visit; +exports.skip = skip; +exports.skipKey = skipKey; +exports.stop = stop; +exports.setScope = setScope; +exports.setContext = setContext; +exports.resync = resync; +exports._resyncParent = _resyncParent; +exports._resyncKey = _resyncKey; +exports._resyncList = _resyncList; +exports._resyncRemoved = _resyncRemoved; +exports.popContext = popContext; +exports.pushContext = pushContext; +exports.setup = setup; +exports.setKey = setKey; +exports.requeue = requeue; +exports._getQueueContexts = _getQueueContexts; + +var _index = _interopRequireDefault(require("../index")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function call(key) { + const opts = this.opts; + this.debug(key); + + if (this.node) { + if (this._call(opts[key])) return true; + } + + if (this.node) { + return this._call(opts[this.node.type] && opts[this.node.type][key]); + } + + return false; +} + +function _call(fns) { + if (!fns) return false; + + for (const fn of fns) { + if (!fn) continue; + const node = this.node; + if (!node) return true; + const ret = fn.call(this.state, this, this.state); + + if (ret && typeof ret === "object" && typeof ret.then === "function") { + throw new Error(`You appear to be using a plugin with an async traversal visitor, ` + `which your current version of Babel does not support.` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); + } + + if (ret) { + throw new Error(`Unexpected return value from visitor method ${fn}`); + } + + if (this.node !== node) return true; + if (this.shouldStop || this.shouldSkip || this.removed) return true; + } + + return false; +} + +function isBlacklisted() { + const blacklist = this.opts.blacklist; + return blacklist && blacklist.indexOf(this.node.type) > -1; +} + +function visit() { + if (!this.node) { + return false; + } + + if (this.isBlacklisted()) { + return false; + } + + if (this.opts.shouldSkip && this.opts.shouldSkip(this)) { + return false; + } + + if (this.call("enter") || this.shouldSkip) { + this.debug("Skip..."); + return this.shouldStop; + } + + this.debug("Recursing into..."); + + _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); + + this.call("exit"); + return this.shouldStop; +} + +function skip() { + this.shouldSkip = true; +} + +function skipKey(key) { + this.skipKeys[key] = true; +} + +function stop() { + this.shouldStop = true; + this.shouldSkip = true; +} + +function setScope() { + if (this.opts && this.opts.noScope) return; + let path = this.parentPath; + let target; + + while (path && !target) { + if (path.opts && path.opts.noScope) return; + target = path.scope; + path = path.parentPath; + } + + this.scope = this.getScope(target); + if (this.scope) this.scope.init(); +} + +function setContext(context) { + this.shouldSkip = false; + this.shouldStop = false; + this.removed = false; + this.skipKeys = {}; + + if (context) { + this.context = context; + this.state = context.state; + this.opts = context.opts; + } + + this.setScope(); + return this; +} + +function resync() { + if (this.removed) return; + + this._resyncParent(); + + this._resyncList(); + + this._resyncKey(); +} + +function _resyncParent() { + if (this.parentPath) { + this.parent = this.parentPath.node; + } +} + +function _resyncKey() { + if (!this.container) return; + if (this.node === this.container[this.key]) return; + + if (Array.isArray(this.container)) { + for (let i = 0; i < this.container.length; i++) { + if (this.container[i] === this.node) { + return this.setKey(i); + } + } + } else { + for (const key of Object.keys(this.container)) { + if (this.container[key] === this.node) { + return this.setKey(key); + } + } + } + + this.key = null; +} + +function _resyncList() { + if (!this.parent || !this.inList) return; + const newContainer = this.parent[this.listKey]; + if (this.container === newContainer) return; + this.container = newContainer || null; +} + +function _resyncRemoved() { + if (this.key == null || !this.container || this.container[this.key] !== this.node) { + this._markRemoved(); + } +} + +function popContext() { + this.contexts.pop(); + + if (this.contexts.length > 0) { + this.setContext(this.contexts[this.contexts.length - 1]); + } else { + this.setContext(undefined); + } +} + +function pushContext(context) { + this.contexts.push(context); + this.setContext(context); +} + +function setup(parentPath, container, listKey, key) { + this.inList = !!listKey; + this.listKey = listKey; + this.parentKey = listKey || key; + this.container = container; + this.parentPath = parentPath || this.parentPath; + this.setKey(key); +} + +function setKey(key) { + this.key = key; + this.node = this.container[this.key]; + this.type = this.node && this.node.type; +} + +function requeue(pathToQueue = this) { + if (pathToQueue.removed) return; + const contexts = this.contexts; + + for (const context of contexts) { + context.maybeQueue(pathToQueue); + } +} + +function _getQueueContexts() { + let path = this; + let contexts = this.contexts; + + while (!contexts.length) { + path = path.parentPath; + if (!path) break; + contexts = path.contexts; + } + + return contexts; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/conversion.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/conversion.js new file mode 100644 index 0000000..9faa905 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/conversion.js @@ -0,0 +1,463 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.toComputedKey = toComputedKey; +exports.ensureBlock = ensureBlock; +exports.arrowFunctionToShadowed = arrowFunctionToShadowed; +exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment; +exports.arrowFunctionToExpression = arrowFunctionToExpression; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _helperFunctionName() { + const data = _interopRequireDefault(require("@babel/helper-function-name")); + + _helperFunctionName = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function toComputedKey() { + const node = this.node; + let key; + + if (this.isMemberExpression()) { + key = node.property; + } else if (this.isProperty() || this.isMethod()) { + key = node.key; + } else { + throw new ReferenceError("todo"); + } + + if (!node.computed) { + if (t().isIdentifier(key)) key = t().stringLiteral(key.name); + } + + return key; +} + +function ensureBlock() { + const body = this.get("body"); + const bodyNode = body.node; + + if (Array.isArray(body)) { + throw new Error("Can't convert array path to a block statement"); + } + + if (!bodyNode) { + throw new Error("Can't convert node without a body"); + } + + if (body.isBlockStatement()) { + return bodyNode; + } + + const statements = []; + let stringPath = "body"; + let key; + let listKey; + + if (body.isStatement()) { + listKey = "body"; + key = 0; + statements.push(body.node); + } else { + stringPath += ".body.0"; + + if (this.isFunction()) { + key = "argument"; + statements.push(t().returnStatement(body.node)); + } else { + key = "expression"; + statements.push(t().expressionStatement(body.node)); + } + } + + this.node.body = t().blockStatement(statements); + const parentPath = this.get(stringPath); + body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key); + return this.node; +} + +function arrowFunctionToShadowed() { + if (!this.isArrowFunctionExpression()) return; + this.arrowFunctionToExpression(); +} + +function unwrapFunctionEnvironment() { + if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) { + throw this.buildCodeFrameError("Can only unwrap the environment of a function."); + } + + hoistFunctionEnvironment(this); +} + +function arrowFunctionToExpression({ + allowInsertArrow = true, + specCompliant = false +} = {}) { + if (!this.isArrowFunctionExpression()) { + throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression."); + } + + const thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow); + this.ensureBlock(); + this.node.type = "FunctionExpression"; + + if (specCompliant) { + const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId"); + + if (checkBinding) { + this.parentPath.scope.push({ + id: checkBinding, + init: t().objectExpression([]) + }); + } + + this.get("body").unshiftContainer("body", t().expressionStatement(t().callExpression(this.hub.addHelper("newArrowCheck"), [t().thisExpression(), checkBinding ? t().identifier(checkBinding.name) : t().identifier(thisBinding)]))); + this.replaceWith(t().callExpression(t().memberExpression((0, _helperFunctionName().default)(this, true) || this.node, t().identifier("bind")), [checkBinding ? t().identifier(checkBinding.name) : t().thisExpression()])); + } +} + +function hoistFunctionEnvironment(fnPath, specCompliant = false, allowInsertArrow = true) { + const thisEnvFn = fnPath.findParent(p => { + return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({ + static: false + }); + }); + const inConstructor = thisEnvFn && thisEnvFn.node.kind === "constructor"; + + if (thisEnvFn.isClassProperty()) { + throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property"); + } + + const { + thisPaths, + argumentsPaths, + newTargetPaths, + superProps, + superCalls + } = getScopeInformation(fnPath); + + if (inConstructor && superCalls.length > 0) { + if (!allowInsertArrow) { + throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow"); + } + + const allSuperCalls = []; + thisEnvFn.traverse({ + Function(child) { + if (child.isArrowFunctionExpression()) return; + child.skip(); + }, + + ClassProperty(child) { + child.skip(); + }, + + CallExpression(child) { + if (!child.get("callee").isSuper()) return; + allSuperCalls.push(child); + } + + }); + const superBinding = getSuperBinding(thisEnvFn); + allSuperCalls.forEach(superCall => { + const callee = t().identifier(superBinding); + callee.loc = superCall.node.callee.loc; + superCall.get("callee").replaceWith(callee); + }); + } + + let thisBinding; + + if (thisPaths.length > 0 || specCompliant) { + thisBinding = getThisBinding(thisEnvFn, inConstructor); + + if (!specCompliant || inConstructor && hasSuperClass(thisEnvFn)) { + thisPaths.forEach(thisChild => { + const thisRef = thisChild.isJSX() ? t().jsxIdentifier(thisBinding) : t().identifier(thisBinding); + thisRef.loc = thisChild.node.loc; + thisChild.replaceWith(thisRef); + }); + if (specCompliant) thisBinding = null; + } + } + + if (argumentsPaths.length > 0) { + const argumentsBinding = getBinding(thisEnvFn, "arguments", () => t().identifier("arguments")); + argumentsPaths.forEach(argumentsChild => { + const argsRef = t().identifier(argumentsBinding); + argsRef.loc = argumentsChild.node.loc; + argumentsChild.replaceWith(argsRef); + }); + } + + if (newTargetPaths.length > 0) { + const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t().metaProperty(t().identifier("new"), t().identifier("target"))); + newTargetPaths.forEach(targetChild => { + const targetRef = t().identifier(newTargetBinding); + targetRef.loc = targetChild.node.loc; + targetChild.replaceWith(targetRef); + }); + } + + if (superProps.length > 0) { + if (!allowInsertArrow) { + throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage"); + } + + const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []); + flatSuperProps.forEach(superProp => { + const key = superProp.node.computed ? "" : superProp.get("property").node.name; + + if (superProp.parentPath.isCallExpression({ + callee: superProp.node + })) { + const superBinding = getSuperPropCallBinding(thisEnvFn, key); + + if (superProp.node.computed) { + const prop = superProp.get("property").node; + superProp.replaceWith(t().identifier(superBinding)); + superProp.parentPath.node.arguments.unshift(prop); + } else { + superProp.replaceWith(t().identifier(superBinding)); + } + } else { + const isAssignment = superProp.parentPath.isAssignmentExpression({ + left: superProp.node + }); + const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key); + const args = []; + + if (superProp.node.computed) { + args.push(superProp.get("property").node); + } + + if (isAssignment) { + const value = superProp.parentPath.node.right; + args.push(value); + superProp.parentPath.replaceWith(t().callExpression(t().identifier(superBinding), args)); + } else { + superProp.replaceWith(t().callExpression(t().identifier(superBinding), args)); + } + } + }); + } + + return thisBinding; +} + +function standardizeSuperProperty(superProp) { + if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") { + const assignmentPath = superProp.parentPath; + const op = assignmentPath.node.operator.slice(0, -1); + const value = assignmentPath.node.right; + assignmentPath.node.operator = "="; + + if (superProp.node.computed) { + const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp"); + assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, t().assignmentExpression("=", tmp, superProp.node.property), true)); + assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(tmp.name), true), value)); + } else { + assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, superProp.node.property)); + assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(superProp.node.property.name)), value)); + } + + return [assignmentPath.get("left"), assignmentPath.get("right").get("left")]; + } else if (superProp.parentPath.isUpdateExpression()) { + const updateExpr = superProp.parentPath; + const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp"); + const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null; + const parts = [t().assignmentExpression("=", tmp, t().memberExpression(superProp.node.object, computedKey ? t().assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t().assignmentExpression("=", t().memberExpression(superProp.node.object, computedKey ? t().identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t().binaryExpression("+", t().identifier(tmp.name), t().numericLiteral(1)))]; + + if (!superProp.parentPath.node.prefix) { + parts.push(t().identifier(tmp.name)); + } + + updateExpr.replaceWith(t().sequenceExpression(parts)); + const left = updateExpr.get("expressions.0.right"); + const right = updateExpr.get("expressions.1.left"); + return [left, right]; + } + + return [superProp]; +} + +function hasSuperClass(thisEnvFn) { + return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass; +} + +function getThisBinding(thisEnvFn, inConstructor) { + return getBinding(thisEnvFn, "this", thisBinding => { + if (!inConstructor || !hasSuperClass(thisEnvFn)) return t().thisExpression(); + const supers = new WeakSet(); + thisEnvFn.traverse({ + Function(child) { + if (child.isArrowFunctionExpression()) return; + child.skip(); + }, + + ClassProperty(child) { + child.skip(); + }, + + CallExpression(child) { + if (!child.get("callee").isSuper()) return; + if (supers.has(child.node)) return; + supers.add(child.node); + child.replaceWithMultiple([child.node, t().assignmentExpression("=", t().identifier(thisBinding), t().identifier("this"))]); + } + + }); + }); +} + +function getSuperBinding(thisEnvFn) { + return getBinding(thisEnvFn, "supercall", () => { + const argsBinding = thisEnvFn.scope.generateUidIdentifier("args"); + return t().arrowFunctionExpression([t().restElement(argsBinding)], t().callExpression(t().super(), [t().spreadElement(t().identifier(argsBinding.name))])); + }); +} + +function getSuperPropCallBinding(thisEnvFn, propName) { + return getBinding(thisEnvFn, `superprop_call:${propName || ""}`, () => { + const argsBinding = thisEnvFn.scope.generateUidIdentifier("args"); + const argsList = [t().restElement(argsBinding)]; + let fnBody; + + if (propName) { + fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(propName)), [t().spreadElement(t().identifier(argsBinding.name))]); + } else { + const method = thisEnvFn.scope.generateUidIdentifier("prop"); + argsList.unshift(method); + fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(method.name), true), [t().spreadElement(t().identifier(argsBinding.name))]); + } + + return t().arrowFunctionExpression(argsList, fnBody); + }); +} + +function getSuperPropBinding(thisEnvFn, isAssignment, propName) { + const op = isAssignment ? "set" : "get"; + return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => { + const argsList = []; + let fnBody; + + if (propName) { + fnBody = t().memberExpression(t().super(), t().identifier(propName)); + } else { + const method = thisEnvFn.scope.generateUidIdentifier("prop"); + argsList.unshift(method); + fnBody = t().memberExpression(t().super(), t().identifier(method.name), true); + } + + if (isAssignment) { + const valueIdent = thisEnvFn.scope.generateUidIdentifier("value"); + argsList.push(valueIdent); + fnBody = t().assignmentExpression("=", fnBody, t().identifier(valueIdent.name)); + } + + return t().arrowFunctionExpression(argsList, fnBody); + }); +} + +function getBinding(thisEnvFn, key, init) { + const cacheKey = "binding:" + key; + let data = thisEnvFn.getData(cacheKey); + + if (!data) { + const id = thisEnvFn.scope.generateUidIdentifier(key); + data = id.name; + thisEnvFn.setData(cacheKey, data); + thisEnvFn.scope.push({ + id: id, + init: init(data) + }); + } + + return data; +} + +function getScopeInformation(fnPath) { + const thisPaths = []; + const argumentsPaths = []; + const newTargetPaths = []; + const superProps = []; + const superCalls = []; + fnPath.traverse({ + ClassProperty(child) { + child.skip(); + }, + + Function(child) { + if (child.isArrowFunctionExpression()) return; + child.skip(); + }, + + ThisExpression(child) { + thisPaths.push(child); + }, + + JSXIdentifier(child) { + if (child.node.name !== "this") return; + + if (!child.parentPath.isJSXMemberExpression({ + object: child.node + }) && !child.parentPath.isJSXOpeningElement({ + name: child.node + })) { + return; + } + + thisPaths.push(child); + }, + + CallExpression(child) { + if (child.get("callee").isSuper()) superCalls.push(child); + }, + + MemberExpression(child) { + if (child.get("object").isSuper()) superProps.push(child); + }, + + ReferencedIdentifier(child) { + if (child.node.name !== "arguments") return; + argumentsPaths.push(child); + }, + + MetaProperty(child) { + if (!child.get("meta").isIdentifier({ + name: "new" + })) return; + if (!child.get("property").isIdentifier({ + name: "target" + })) return; + newTargetPaths.push(child); + } + + }); + return { + thisPaths, + argumentsPaths, + newTargetPaths, + superProps, + superCalls + }; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/evaluation.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/evaluation.js new file mode 100644 index 0000000..61c0a55 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/evaluation.js @@ -0,0 +1,404 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.evaluateTruthy = evaluateTruthy; +exports.evaluate = evaluate; +const VALID_CALLEES = ["String", "Number", "Math"]; +const INVALID_METHODS = ["random"]; + +function evaluateTruthy() { + const res = this.evaluate(); + if (res.confident) return !!res.value; +} + +function deopt(path, state) { + if (!state.confident) return; + state.deoptPath = path; + state.confident = false; +} + +function evaluateCached(path, state) { + const { + node + } = path; + const { + seen + } = state; + + if (seen.has(node)) { + const existing = seen.get(node); + + if (existing.resolved) { + return existing.value; + } else { + deopt(path, state); + return; + } + } else { + const item = { + resolved: false + }; + seen.set(node, item); + + const val = _evaluate(path, state); + + if (state.confident) { + item.resolved = true; + item.value = val; + } + + return val; + } +} + +function _evaluate(path, state) { + if (!state.confident) return; + const { + node + } = path; + + if (path.isSequenceExpression()) { + const exprs = path.get("expressions"); + return evaluateCached(exprs[exprs.length - 1], state); + } + + if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) { + return node.value; + } + + if (path.isNullLiteral()) { + return null; + } + + if (path.isTemplateLiteral()) { + return evaluateQuasis(path, node.quasis, state); + } + + if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) { + const object = path.get("tag.object"); + const { + node: { + name + } + } = object; + const property = path.get("tag.property"); + + if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name, true) && property.isIdentifier && property.node.name === "raw") { + return evaluateQuasis(path, node.quasi.quasis, state, true); + } + } + + if (path.isConditionalExpression()) { + const testResult = evaluateCached(path.get("test"), state); + if (!state.confident) return; + + if (testResult) { + return evaluateCached(path.get("consequent"), state); + } else { + return evaluateCached(path.get("alternate"), state); + } + } + + if (path.isExpressionWrapper()) { + return evaluateCached(path.get("expression"), state); + } + + if (path.isMemberExpression() && !path.parentPath.isCallExpression({ + callee: node + })) { + const property = path.get("property"); + const object = path.get("object"); + + if (object.isLiteral() && property.isIdentifier()) { + const value = object.node.value; + const type = typeof value; + + if (type === "number" || type === "string") { + return value[property.node.name]; + } + } + } + + if (path.isReferencedIdentifier()) { + const binding = path.scope.getBinding(node.name); + + if (binding && binding.constantViolations.length > 0) { + return deopt(binding.path, state); + } + + if (binding && path.node.start < binding.path.node.end) { + return deopt(binding.path, state); + } + + if (binding && binding.hasValue) { + return binding.value; + } else { + if (node.name === "undefined") { + return binding ? deopt(binding.path, state) : undefined; + } else if (node.name === "Infinity") { + return binding ? deopt(binding.path, state) : Infinity; + } else if (node.name === "NaN") { + return binding ? deopt(binding.path, state) : NaN; + } + + const resolved = path.resolve(); + + if (resolved === path) { + return deopt(path, state); + } else { + return evaluateCached(resolved, state); + } + } + } + + if (path.isUnaryExpression({ + prefix: true + })) { + if (node.operator === "void") { + return undefined; + } + + const argument = path.get("argument"); + + if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) { + return "function"; + } + + const arg = evaluateCached(argument, state); + if (!state.confident) return; + + switch (node.operator) { + case "!": + return !arg; + + case "+": + return +arg; + + case "-": + return -arg; + + case "~": + return ~arg; + + case "typeof": + return typeof arg; + } + } + + if (path.isArrayExpression()) { + const arr = []; + const elems = path.get("elements"); + + for (const elem of elems) { + const elemValue = elem.evaluate(); + + if (elemValue.confident) { + arr.push(elemValue.value); + } else { + return deopt(elem, state); + } + } + + return arr; + } + + if (path.isObjectExpression()) { + const obj = {}; + const props = path.get("properties"); + + for (const prop of props) { + if (prop.isObjectMethod() || prop.isSpreadElement()) { + return deopt(prop, state); + } + + const keyPath = prop.get("key"); + let key = keyPath; + + if (prop.node.computed) { + key = key.evaluate(); + + if (!key.confident) { + return deopt(keyPath, state); + } + + key = key.value; + } else if (key.isIdentifier()) { + key = key.node.name; + } else { + key = key.node.value; + } + + const valuePath = prop.get("value"); + let value = valuePath.evaluate(); + + if (!value.confident) { + return deopt(valuePath, state); + } + + value = value.value; + obj[key] = value; + } + + return obj; + } + + if (path.isLogicalExpression()) { + const wasConfident = state.confident; + const left = evaluateCached(path.get("left"), state); + const leftConfident = state.confident; + state.confident = wasConfident; + const right = evaluateCached(path.get("right"), state); + const rightConfident = state.confident; + + switch (node.operator) { + case "||": + state.confident = leftConfident && (!!left || rightConfident); + if (!state.confident) return; + return left || right; + + case "&&": + state.confident = leftConfident && (!left || rightConfident); + if (!state.confident) return; + return left && right; + } + } + + if (path.isBinaryExpression()) { + const left = evaluateCached(path.get("left"), state); + if (!state.confident) return; + const right = evaluateCached(path.get("right"), state); + if (!state.confident) return; + + switch (node.operator) { + case "-": + return left - right; + + case "+": + return left + right; + + case "/": + return left / right; + + case "*": + return left * right; + + case "%": + return left % right; + + case "**": + return Math.pow(left, right); + + case "<": + return left < right; + + case ">": + return left > right; + + case "<=": + return left <= right; + + case ">=": + return left >= right; + + case "==": + return left == right; + + case "!=": + return left != right; + + case "===": + return left === right; + + case "!==": + return left !== right; + + case "|": + return left | right; + + case "&": + return left & right; + + case "^": + return left ^ right; + + case "<<": + return left << right; + + case ">>": + return left >> right; + + case ">>>": + return left >>> right; + } + } + + if (path.isCallExpression()) { + const callee = path.get("callee"); + let context; + let func; + + if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) { + func = global[node.callee.name]; + } + + if (callee.isMemberExpression()) { + const object = callee.get("object"); + const property = callee.get("property"); + + if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) { + context = global[object.node.name]; + func = context[property.node.name]; + } + + if (object.isLiteral() && property.isIdentifier()) { + const type = typeof object.node.value; + + if (type === "string" || type === "number") { + context = object.node.value; + func = context[property.node.name]; + } + } + } + + if (func) { + const args = path.get("arguments").map(arg => evaluateCached(arg, state)); + if (!state.confident) return; + return func.apply(context, args); + } + } + + deopt(path, state); +} + +function evaluateQuasis(path, quasis, state, raw = false) { + let str = ""; + let i = 0; + const exprs = path.get("expressions"); + + for (const elem of quasis) { + if (!state.confident) break; + str += raw ? elem.value.raw : elem.value.cooked; + const expr = exprs[i++]; + if (expr) str += String(evaluateCached(expr, state)); + } + + if (!state.confident) return; + return str; +} + +function evaluate() { + const state = { + confident: true, + deoptPath: null, + seen: new Map() + }; + let value = evaluateCached(this, state); + if (!state.confident) value = undefined; + return { + confident: state.confident, + deopt: state.deoptPath, + value: value + }; +} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/family.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/family.js similarity index 82% rename from node_modules/@babel/traverse/lib/path/family.js rename to node_modules/@babel/core/node_modules/@babel/traverse/lib/path/family.js index 2da6623..42b3fc6 100644 --- a/node_modules/@babel/traverse/lib/path/family.js +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/family.js @@ -21,9 +21,9 @@ exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths; var _index = _interopRequireDefault(require("./index")); function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -48,7 +48,7 @@ function addCompletionRecords(path, paths) { } function getCompletionRecords() { - var paths = []; + let paths = []; if (this.isIfStatement()) { paths = addCompletionRecords(this.get("consequent"), paths); @@ -91,9 +91,9 @@ function getNextSibling() { } function getAllNextSiblings() { - var _key = this.key; - var sibling = this.getSibling(++_key); - var siblings = []; + let _key = this.key; + let sibling = this.getSibling(++_key); + const siblings = []; while (sibling.node) { siblings.push(sibling); @@ -104,9 +104,9 @@ function getAllNextSiblings() { } function getAllPrevSiblings() { - var _key = this.key; - var sibling = this.getSibling(--_key); - var siblings = []; + let _key = this.key; + let sibling = this.getSibling(--_key); + const siblings = []; while (sibling.node) { siblings.push(sibling); @@ -118,7 +118,7 @@ function getAllPrevSiblings() { function get(key, context) { if (context === true) context = this.context; - var parts = key.split("."); + const parts = key.split("."); if (parts.length === 1) { return this._getKey(key, context); @@ -128,16 +128,14 @@ function get(key, context) { } function _getKey(key, context) { - var _this = this; - - var node = this.node; - var container = node[key]; + const node = this.node; + const container = node[key]; if (Array.isArray(container)) { - return container.map(function (_, i) { + return container.map((_, i) => { return _index.default.get({ listKey: key, - parentPath: _this, + parentPath: this, parent: node, container: container, key: i @@ -154,12 +152,9 @@ function _getKey(key, context) { } function _getPattern(parts, context) { - var path = this; - var _arr = parts; - - for (var _i = 0; _i < _arr.length; _i++) { - var part = _arr[_i]; + let path = this; + for (const part of parts) { if (part === ".") { path = path.parentPath; } else { @@ -182,28 +177,20 @@ function getOuterBindingIdentifiers(duplicates) { return t().getOuterBindingIdentifiers(this.node, duplicates); } -function getBindingIdentifierPaths(duplicates, outerOnly) { - if (duplicates === void 0) { - duplicates = false; - } - - if (outerOnly === void 0) { - outerOnly = false; - } - - var path = this; - var search = [].concat(path); - var ids = Object.create(null); +function getBindingIdentifierPaths(duplicates = false, outerOnly = false) { + const path = this; + let search = [].concat(path); + const ids = Object.create(null); while (search.length) { - var id = search.shift(); + const id = search.shift(); if (!id) continue; if (!id.node) continue; - var keys = t().getBindingIdentifiers.keys[id.node.type]; + const keys = t().getBindingIdentifiers.keys[id.node.type]; if (id.isIdentifier()) { if (duplicates) { - var _ids = ids[id.node.name] = ids[id.node.name] || []; + const _ids = ids[id.node.name] = ids[id.node.name] || []; _ids.push(id); } else { @@ -214,7 +201,7 @@ function getBindingIdentifierPaths(duplicates, outerOnly) { } if (id.isExportDeclaration()) { - var declaration = id.get("declaration"); + const declaration = id.get("declaration"); if (declaration.isDeclaration()) { search.push(declaration); @@ -235,9 +222,9 @@ function getBindingIdentifierPaths(duplicates, outerOnly) { } if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var child = id.get(key); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const child = id.get(key); if (Array.isArray(child) || child.node) { search = search.concat(child); diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/index.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/index.js new file mode 100644 index 0000000..0dc983a --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/index.js @@ -0,0 +1,219 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var virtualTypes = _interopRequireWildcard(require("./lib/virtual-types")); + +function _debug() { + const data = _interopRequireDefault(require("debug")); + + _debug = function () { + return data; + }; + + return data; +} + +var _index = _interopRequireDefault(require("../index")); + +var _scope = _interopRequireDefault(require("../scope")); + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +var _cache = require("../cache"); + +function _generator() { + const data = _interopRequireDefault(require("@babel/generator")); + + _generator = function () { + return data; + }; + + return data; +} + +var NodePath_ancestry = _interopRequireWildcard(require("./ancestry")); + +var NodePath_inference = _interopRequireWildcard(require("./inference")); + +var NodePath_replacement = _interopRequireWildcard(require("./replacement")); + +var NodePath_evaluation = _interopRequireWildcard(require("./evaluation")); + +var NodePath_conversion = _interopRequireWildcard(require("./conversion")); + +var NodePath_introspection = _interopRequireWildcard(require("./introspection")); + +var NodePath_context = _interopRequireWildcard(require("./context")); + +var NodePath_removal = _interopRequireWildcard(require("./removal")); + +var NodePath_modification = _interopRequireWildcard(require("./modification")); + +var NodePath_family = _interopRequireWildcard(require("./family")); + +var NodePath_comments = _interopRequireWildcard(require("./comments")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +const debug = (0, _debug().default)("babel"); + +class NodePath { + constructor(hub, parent) { + this.parent = parent; + this.hub = hub; + this.contexts = []; + this.data = {}; + this.shouldSkip = false; + this.shouldStop = false; + this.removed = false; + this.state = null; + this.opts = null; + this.skipKeys = null; + this.parentPath = null; + this.context = null; + this.container = null; + this.listKey = null; + this.inList = false; + this.parentKey = null; + this.key = null; + this.node = null; + this.scope = null; + this.type = null; + this.typeAnnotation = null; + } + + static get({ + hub, + parentPath, + parent, + container, + listKey, + key + }) { + if (!hub && parentPath) { + hub = parentPath.hub; + } + + if (!parent) { + throw new Error("To get a node path the parent needs to exist"); + } + + const targetNode = container[key]; + const paths = _cache.path.get(parent) || []; + + if (!_cache.path.has(parent)) { + _cache.path.set(parent, paths); + } + + let path; + + for (let i = 0; i < paths.length; i++) { + const pathCheck = paths[i]; + + if (pathCheck.node === targetNode) { + path = pathCheck; + break; + } + } + + if (!path) { + path = new NodePath(hub, parent); + paths.push(path); + } + + path.setup(parentPath, container, listKey, key); + return path; + } + + getScope(scope) { + return this.isScope() ? new _scope.default(this) : scope; + } + + setData(key, val) { + return this.data[key] = val; + } + + getData(key, def) { + let val = this.data[key]; + if (!val && def) val = this.data[key] = def; + return val; + } + + buildCodeFrameError(msg, Error = SyntaxError) { + return this.hub.buildError(this.node, msg, Error); + } + + traverse(visitor, state) { + (0, _index.default)(this.node, visitor, this.scope, state, this); + } + + set(key, node) { + t().validate(this.node, key, node); + this.node[key] = node; + } + + getPathLocation() { + const parts = []; + let path = this; + + do { + let key = path.key; + if (path.inList) key = `${path.listKey}[${key}]`; + parts.unshift(key); + } while (path = path.parentPath); + + return parts.join("."); + } + + debug(message) { + if (!debug.enabled) return; + debug(`${this.getPathLocation()} ${this.type}: ${message}`); + } + + toString() { + return (0, _generator().default)(this.node).code; + } + +} + +exports.default = NodePath; +Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments); + +for (const type of t().TYPES) { + const typeKey = `is${type}`; + const fn = t()[typeKey]; + + NodePath.prototype[typeKey] = function (opts) { + return fn(this.node, opts); + }; + + NodePath.prototype[`assert${type}`] = function (opts) { + if (!fn(this.node, opts)) { + throw new TypeError(`Expected node path of type ${type}`); + } + }; +} + +for (const type of Object.keys(virtualTypes)) { + if (type[0] === "_") continue; + if (t().TYPES.indexOf(type) < 0) t().TYPES.push(type); + const virtualType = virtualTypes[type]; + + NodePath.prototype[`is${type}`] = function (opts) { + return virtualType.checkPath(this, opts); + }; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/index.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/index.js new file mode 100644 index 0000000..80a77d0 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/index.js @@ -0,0 +1,132 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getTypeAnnotation = getTypeAnnotation; +exports._getTypeAnnotation = _getTypeAnnotation; +exports.isBaseType = isBaseType; +exports.couldBeBaseType = couldBeBaseType; +exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; +exports.isGenericType = isGenericType; + +var inferers = _interopRequireWildcard(require("./inferers")); + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function getTypeAnnotation() { + if (this.typeAnnotation) return this.typeAnnotation; + let type = this._getTypeAnnotation() || t().anyTypeAnnotation(); + if (t().isTypeAnnotation(type)) type = type.typeAnnotation; + return this.typeAnnotation = type; +} + +function _getTypeAnnotation() { + const node = this.node; + + if (!node) { + if (this.key === "init" && this.parentPath.isVariableDeclarator()) { + const declar = this.parentPath.parentPath; + const declarParent = declar.parentPath; + + if (declar.key === "left" && declarParent.isForInStatement()) { + return t().stringTypeAnnotation(); + } + + if (declar.key === "left" && declarParent.isForOfStatement()) { + return t().anyTypeAnnotation(); + } + + return t().voidTypeAnnotation(); + } else { + return; + } + } + + if (node.typeAnnotation) { + return node.typeAnnotation; + } + + let inferer = inferers[node.type]; + + if (inferer) { + return inferer.call(this, node); + } + + inferer = inferers[this.parentPath.type]; + + if (inferer && inferer.validParent) { + return this.parentPath.getTypeAnnotation(); + } +} + +function isBaseType(baseName, soft) { + return _isBaseType(baseName, this.getTypeAnnotation(), soft); +} + +function _isBaseType(baseName, type, soft) { + if (baseName === "string") { + return t().isStringTypeAnnotation(type); + } else if (baseName === "number") { + return t().isNumberTypeAnnotation(type); + } else if (baseName === "boolean") { + return t().isBooleanTypeAnnotation(type); + } else if (baseName === "any") { + return t().isAnyTypeAnnotation(type); + } else if (baseName === "mixed") { + return t().isMixedTypeAnnotation(type); + } else if (baseName === "empty") { + return t().isEmptyTypeAnnotation(type); + } else if (baseName === "void") { + return t().isVoidTypeAnnotation(type); + } else { + if (soft) { + return false; + } else { + throw new Error(`Unknown base type ${baseName}`); + } + } +} + +function couldBeBaseType(name) { + const type = this.getTypeAnnotation(); + if (t().isAnyTypeAnnotation(type)) return true; + + if (t().isUnionTypeAnnotation(type)) { + for (const type2 of type.types) { + if (t().isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { + return true; + } + } + + return false; + } else { + return _isBaseType(name, type, true); + } +} + +function baseTypeStrictlyMatches(right) { + const left = this.getTypeAnnotation(); + right = right.getTypeAnnotation(); + + if (!t().isAnyTypeAnnotation(left) && t().isFlowBaseAnnotation(left)) { + return right.type === left.type; + } +} + +function isGenericType(genericName) { + const type = this.getTypeAnnotation(); + return t().isGenericTypeAnnotation(type) && t().isIdentifier(type.id, { + name: genericName + }); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js new file mode 100644 index 0000000..35601ab --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js @@ -0,0 +1,181 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _default(node) { + if (!this.isReferenced()) return; + const binding = this.scope.getBinding(node.name); + + if (binding) { + if (binding.identifier.typeAnnotation) { + return binding.identifier.typeAnnotation; + } else { + return getTypeAnnotationBindingConstantViolations(binding, this, node.name); + } + } + + if (node.name === "undefined") { + return t().voidTypeAnnotation(); + } else if (node.name === "NaN" || node.name === "Infinity") { + return t().numberTypeAnnotation(); + } else if (node.name === "arguments") {} +} + +function getTypeAnnotationBindingConstantViolations(binding, path, name) { + const types = []; + const functionConstantViolations = []; + let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); + const testType = getConditionalAnnotation(binding, path, name); + + if (testType) { + const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); + constantViolations = constantViolations.filter(path => testConstantViolations.indexOf(path) < 0); + types.push(testType.typeAnnotation); + } + + if (constantViolations.length) { + constantViolations = constantViolations.concat(functionConstantViolations); + + for (const violation of constantViolations) { + types.push(violation.getTypeAnnotation()); + } + } + + if (types.length) { + return t().createUnionTypeAnnotation(types); + } +} + +function getConstantViolationsBefore(binding, path, functions) { + const violations = binding.constantViolations.slice(); + violations.unshift(binding.path); + return violations.filter(violation => { + violation = violation.resolve(); + + const status = violation._guessExecutionStatusRelativeTo(path); + + if (functions && status === "function") functions.push(violation); + return status === "before"; + }); +} + +function inferAnnotationFromBinaryExpression(name, path) { + const operator = path.node.operator; + const right = path.get("right").resolve(); + const left = path.get("left").resolve(); + let target; + + if (left.isIdentifier({ + name + })) { + target = right; + } else if (right.isIdentifier({ + name + })) { + target = left; + } + + if (target) { + if (operator === "===") { + return target.getTypeAnnotation(); + } + + if (t().BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { + return t().numberTypeAnnotation(); + } + + return; + } + + if (operator !== "===" && operator !== "==") return; + let typeofPath; + let typePath; + + if (left.isUnaryExpression({ + operator: "typeof" + })) { + typeofPath = left; + typePath = right; + } else if (right.isUnaryExpression({ + operator: "typeof" + })) { + typeofPath = right; + typePath = left; + } + + if (!typeofPath) return; + if (!typeofPath.get("argument").isIdentifier({ + name + })) return; + typePath = typePath.resolve(); + if (!typePath.isLiteral()) return; + const typeValue = typePath.node.value; + if (typeof typeValue !== "string") return; + return t().createTypeAnnotationBasedOnTypeof(typeValue); +} + +function getParentConditionalPath(binding, path, name) { + let parentPath; + + while (parentPath = path.parentPath) { + if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { + if (path.key === "test") { + return; + } + + return parentPath; + } + + if (parentPath.isFunction()) { + if (parentPath.parentPath.scope.getBinding(name) !== binding) return; + } + + path = parentPath; + } +} + +function getConditionalAnnotation(binding, path, name) { + const ifStatement = getParentConditionalPath(binding, path, name); + if (!ifStatement) return; + const test = ifStatement.get("test"); + const paths = [test]; + const types = []; + + for (let i = 0; i < paths.length; i++) { + const path = paths[i]; + + if (path.isLogicalExpression()) { + if (path.node.operator === "&&") { + paths.push(path.get("left")); + paths.push(path.get("right")); + } + } else if (path.isBinaryExpression()) { + const type = inferAnnotationFromBinaryExpression(name, path); + if (type) types.push(type); + } + } + + if (types.length) { + return { + typeAnnotation: t().createUnionTypeAnnotation(types), + ifStatement + }; + } + + return getConditionalAnnotation(ifStatement, name); +} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/inference/inferers.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferers.js similarity index 87% rename from node_modules/@babel/traverse/lib/path/inference/inferers.js rename to node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferers.js index 002f95e..5890b93 100644 --- a/node_modules/@babel/traverse/lib/path/inference/inferers.js +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferers.js @@ -12,6 +12,7 @@ exports.BinaryExpression = BinaryExpression; exports.LogicalExpression = LogicalExpression; exports.ConditionalExpression = ConditionalExpression; exports.SequenceExpression = SequenceExpression; +exports.ParenthesizedExpression = ParenthesizedExpression; exports.AssignmentExpression = AssignmentExpression; exports.UpdateExpression = UpdateExpression; exports.StringLiteral = StringLiteral; @@ -27,15 +28,15 @@ exports.CallExpression = CallExpression; exports.TaggedTemplateExpression = TaggedTemplateExpression; Object.defineProperty(exports, "Identifier", { enumerable: true, - get: function get() { + get: function () { return _infererReference.default; } }); function t() { - var data = _interopRequireWildcard(require("@babel/types")); + const data = _interopRequireWildcard(require("@babel/types")); - t = function t() { + t = function () { return data; }; @@ -49,10 +50,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function VariableDeclarator() { - var id = this.get("id"); + const id = this.get("id"); if (!id.isIdentifier()) return; - var init = this.get("init"); - var type = init.getTypeAnnotation(); + const init = this.get("init"); + let type = init.getTypeAnnotation(); if (type && type.type === "AnyTypeAnnotation") { if (init.isCallExpression() && init.get("callee").isIdentifier({ @@ -82,7 +83,7 @@ function TemplateLiteral() { } function UnaryExpression(node) { - var operator = node.operator; + const operator = node.operator; if (operator === "void") { return t().voidTypeAnnotation(); @@ -96,15 +97,15 @@ function UnaryExpression(node) { } function BinaryExpression(node) { - var operator = node.operator; + const operator = node.operator; if (t().NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { return t().numberTypeAnnotation(); } else if (t().BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) { return t().booleanTypeAnnotation(); } else if (operator === "+") { - var right = this.get("right"); - var left = this.get("left"); + const right = this.get("right"); + const left = this.get("left"); if (left.isBaseType("number") && right.isBaseType("number")) { return t().numberTypeAnnotation(); @@ -128,12 +129,16 @@ function SequenceExpression() { return this.get("expressions").pop().getTypeAnnotation(); } +function ParenthesizedExpression() { + return this.get("expression").getTypeAnnotation(); +} + function AssignmentExpression() { return this.get("right").getTypeAnnotation(); } function UpdateExpression(node) { - var operator = node.operator; + const operator = node.operator; if (operator === "++" || operator === "--") { return t().numberTypeAnnotation(); @@ -178,13 +183,15 @@ function Func() { return t().genericTypeAnnotation(t().identifier("Function")); } -var isArrayFrom = t().buildMatchMemberExpression("Array.from"); -var isObjectKeys = t().buildMatchMemberExpression("Object.keys"); -var isObjectValues = t().buildMatchMemberExpression("Object.values"); -var isObjectEntries = t().buildMatchMemberExpression("Object.entries"); +const isArrayFrom = t().buildMatchMemberExpression("Array.from"); +const isObjectKeys = t().buildMatchMemberExpression("Object.keys"); +const isObjectValues = t().buildMatchMemberExpression("Object.values"); +const isObjectEntries = t().buildMatchMemberExpression("Object.entries"); function CallExpression() { - var callee = this.node.callee; + const { + callee + } = this.node; if (isObjectKeys(callee)) { return t().arrayTypeAnnotation(t().stringTypeAnnotation()); diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/introspection.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/introspection.js new file mode 100644 index 0000000..3eab276 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/introspection.js @@ -0,0 +1,371 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.matchesPattern = matchesPattern; +exports.has = has; +exports.isStatic = isStatic; +exports.isnt = isnt; +exports.equals = equals; +exports.isNodeType = isNodeType; +exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression; +exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement; +exports.isCompletionRecord = isCompletionRecord; +exports.isStatementOrBlock = isStatementOrBlock; +exports.referencesImport = referencesImport; +exports.getSource = getSource; +exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore; +exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo; +exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions; +exports.resolve = resolve; +exports._resolve = _resolve; +exports.isConstantExpression = isConstantExpression; +exports.isInStrictMode = isInStrictMode; +exports.is = void 0; + +function _includes() { + const data = _interopRequireDefault(require("lodash/includes")); + + _includes = function () { + return data; + }; + + return data; +} + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function matchesPattern(pattern, allowPartial) { + return t().matchesPattern(this.node, pattern, allowPartial); +} + +function has(key) { + const val = this.node && this.node[key]; + + if (val && Array.isArray(val)) { + return !!val.length; + } else { + return !!val; + } +} + +function isStatic() { + return this.scope.isStatic(this.node); +} + +const is = has; +exports.is = is; + +function isnt(key) { + return !this.has(key); +} + +function equals(key, value) { + return this.node[key] === value; +} + +function isNodeType(type) { + return t().isType(this.type, type); +} + +function canHaveVariableDeclarationOrExpression() { + return (this.key === "init" || this.key === "left") && this.parentPath.isFor(); +} + +function canSwapBetweenExpressionAndStatement(replacement) { + if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) { + return false; + } + + if (this.isExpression()) { + return t().isBlockStatement(replacement); + } else if (this.isBlockStatement()) { + return t().isExpression(replacement); + } + + return false; +} + +function isCompletionRecord(allowInsideFunction) { + let path = this; + let first = true; + + do { + const container = path.container; + + if (path.isFunction() && !first) { + return !!allowInsideFunction; + } + + first = false; + + if (Array.isArray(container) && path.key !== container.length - 1) { + return false; + } + } while ((path = path.parentPath) && !path.isProgram()); + + return true; +} + +function isStatementOrBlock() { + if (this.parentPath.isLabeledStatement() || t().isBlockStatement(this.container)) { + return false; + } else { + return (0, _includes().default)(t().STATEMENT_OR_BLOCK_KEYS, this.key); + } +} + +function referencesImport(moduleSource, importName) { + if (!this.isReferencedIdentifier()) return false; + const binding = this.scope.getBinding(this.node.name); + if (!binding || binding.kind !== "module") return false; + const path = binding.path; + const parent = path.parentPath; + if (!parent.isImportDeclaration()) return false; + + if (parent.node.source.value === moduleSource) { + if (!importName) return true; + } else { + return false; + } + + if (path.isImportDefaultSpecifier() && importName === "default") { + return true; + } + + if (path.isImportNamespaceSpecifier() && importName === "*") { + return true; + } + + if (path.isImportSpecifier() && path.node.imported.name === importName) { + return true; + } + + return false; +} + +function getSource() { + const node = this.node; + + if (node.end) { + const code = this.hub.getCode(); + if (code) return code.slice(node.start, node.end); + } + + return ""; +} + +function willIMaybeExecuteBefore(target) { + return this._guessExecutionStatusRelativeTo(target) !== "after"; +} + +function _guessExecutionStatusRelativeTo(target) { + const targetFuncParent = target.scope.getFunctionParent() || target.scope.getProgramParent(); + const selfFuncParent = this.scope.getFunctionParent() || target.scope.getProgramParent(); + + if (targetFuncParent.node !== selfFuncParent.node) { + const status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent); + + if (status) { + return status; + } else { + target = targetFuncParent.path; + } + } + + const targetPaths = target.getAncestry(); + if (targetPaths.indexOf(this) >= 0) return "after"; + const selfPaths = this.getAncestry(); + let commonPath; + let targetIndex; + let selfIndex; + + for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) { + const selfPath = selfPaths[selfIndex]; + targetIndex = targetPaths.indexOf(selfPath); + + if (targetIndex >= 0) { + commonPath = selfPath; + break; + } + } + + if (!commonPath) { + return "before"; + } + + const targetRelationship = targetPaths[targetIndex - 1]; + const selfRelationship = selfPaths[selfIndex - 1]; + + if (!targetRelationship || !selfRelationship) { + return "before"; + } + + if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) { + return targetRelationship.key > selfRelationship.key ? "before" : "after"; + } + + const keys = t().VISITOR_KEYS[commonPath.type]; + const targetKeyPosition = keys.indexOf(targetRelationship.key); + const selfKeyPosition = keys.indexOf(selfRelationship.key); + return targetKeyPosition > selfKeyPosition ? "before" : "after"; +} + +function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) { + const targetFuncPath = targetFuncParent.path; + if (!targetFuncPath.isFunctionDeclaration()) return; + const binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name); + if (!binding.references) return "before"; + const referencePaths = binding.referencePaths; + + for (const path of referencePaths) { + if (path.key !== "callee" || !path.parentPath.isCallExpression()) { + return; + } + } + + let allStatus; + + for (const path of referencePaths) { + const childOfFunction = !!path.find(path => path.node === targetFuncPath.node); + if (childOfFunction) continue; + + const status = this._guessExecutionStatusRelativeTo(path); + + if (allStatus) { + if (allStatus !== status) return; + } else { + allStatus = status; + } + } + + return allStatus; +} + +function resolve(dangerous, resolved) { + return this._resolve(dangerous, resolved) || this; +} + +function _resolve(dangerous, resolved) { + if (resolved && resolved.indexOf(this) >= 0) return; + resolved = resolved || []; + resolved.push(this); + + if (this.isVariableDeclarator()) { + if (this.get("id").isIdentifier()) { + return this.get("init").resolve(dangerous, resolved); + } else {} + } else if (this.isReferencedIdentifier()) { + const binding = this.scope.getBinding(this.node.name); + if (!binding) return; + if (!binding.constant) return; + if (binding.kind === "module") return; + + if (binding.path !== this) { + const ret = binding.path.resolve(dangerous, resolved); + if (this.find(parent => parent.node === ret.node)) return; + return ret; + } + } else if (this.isTypeCastExpression()) { + return this.get("expression").resolve(dangerous, resolved); + } else if (dangerous && this.isMemberExpression()) { + const targetKey = this.toComputedKey(); + if (!t().isLiteral(targetKey)) return; + const targetName = targetKey.value; + const target = this.get("object").resolve(dangerous, resolved); + + if (target.isObjectExpression()) { + const props = target.get("properties"); + + for (const prop of props) { + if (!prop.isProperty()) continue; + const key = prop.get("key"); + let match = prop.isnt("computed") && key.isIdentifier({ + name: targetName + }); + match = match || key.isLiteral({ + value: targetName + }); + if (match) return prop.get("value").resolve(dangerous, resolved); + } + } else if (target.isArrayExpression() && !isNaN(+targetName)) { + const elems = target.get("elements"); + const elem = elems[targetName]; + if (elem) return elem.resolve(dangerous, resolved); + } + } +} + +function isConstantExpression() { + if (this.isIdentifier()) { + const binding = this.scope.getBinding(this.node.name); + if (!binding) return false; + return binding.constant; + } + + if (this.isLiteral()) { + if (this.isRegExpLiteral()) { + return false; + } + + if (this.isTemplateLiteral()) { + return this.get("expressions").every(expression => expression.isConstantExpression()); + } + + return true; + } + + if (this.isUnaryExpression()) { + if (this.get("operator").node !== "void") { + return false; + } + + return this.get("argument").isConstantExpression(); + } + + if (this.isBinaryExpression()) { + return this.get("left").isConstantExpression() && this.get("right").isConstantExpression(); + } + + return false; +} + +function isInStrictMode() { + const start = this.isProgram() ? this : this.parentPath; + const strictParent = start.find(path => { + if (path.isProgram({ + sourceType: "module" + })) return true; + if (path.isClass()) return true; + if (!path.isProgram() && !path.isFunction()) return false; + + if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) { + return false; + } + + let { + node + } = path; + if (path.isFunction()) node = node.body; + + for (const directive of node.directives) { + if (directive.value.value === "use strict") { + return true; + } + } + }); + return !!strictParent; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/hoister.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/hoister.js new file mode 100644 index 0000000..544d788 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/hoister.js @@ -0,0 +1,188 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +const referenceVisitor = { + ReferencedIdentifier(path, state) { + if (path.isJSXIdentifier() && t().react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) { + return; + } + + if (path.node.name === "this") { + let scope = path.scope; + + do { + if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) { + break; + } + } while (scope = scope.parent); + + if (scope) state.breakOnScopePaths.push(scope.path); + } + + const binding = path.scope.getBinding(path.node.name); + if (!binding) return; + if (binding !== state.scope.getBinding(path.node.name)) return; + state.bindings[path.node.name] = binding; + } + +}; + +class PathHoister { + constructor(path, scope) { + this.breakOnScopePaths = []; + this.bindings = {}; + this.scopes = []; + this.scope = scope; + this.path = path; + this.attachAfter = false; + } + + isCompatibleScope(scope) { + for (const key of Object.keys(this.bindings)) { + const binding = this.bindings[key]; + + if (!scope.bindingIdentifierEquals(key, binding.identifier)) { + return false; + } + } + + return true; + } + + getCompatibleScopes() { + let scope = this.path.scope; + + do { + if (this.isCompatibleScope(scope)) { + this.scopes.push(scope); + } else { + break; + } + + if (this.breakOnScopePaths.indexOf(scope.path) >= 0) { + break; + } + } while (scope = scope.parent); + } + + getAttachmentPath() { + let path = this._getAttachmentPath(); + + if (!path) return; + let targetScope = path.scope; + + if (targetScope.path === path) { + targetScope = path.scope.parent; + } + + if (targetScope.path.isProgram() || targetScope.path.isFunction()) { + for (const name of Object.keys(this.bindings)) { + if (!targetScope.hasOwnBinding(name)) continue; + const binding = this.bindings[name]; + + if (binding.kind === "param" || binding.path.parentKey === "params") { + continue; + } + + const bindingParentPath = this.getAttachmentParentForPath(binding.path); + + if (bindingParentPath.key >= path.key) { + this.attachAfter = true; + path = binding.path; + + for (const violationPath of binding.constantViolations) { + if (this.getAttachmentParentForPath(violationPath).key > path.key) { + path = violationPath; + } + } + } + } + } + + return path; + } + + _getAttachmentPath() { + const scopes = this.scopes; + const scope = scopes.pop(); + if (!scope) return; + + if (scope.path.isFunction()) { + if (this.hasOwnParamBindings(scope)) { + if (this.scope === scope) return; + const bodies = scope.path.get("body").get("body"); + + for (let i = 0; i < bodies.length; i++) { + if (bodies[i].node._blockHoist) continue; + return bodies[i]; + } + } else { + return this.getNextScopeAttachmentParent(); + } + } else if (scope.path.isProgram()) { + return this.getNextScopeAttachmentParent(); + } + } + + getNextScopeAttachmentParent() { + const scope = this.scopes.pop(); + if (scope) return this.getAttachmentParentForPath(scope.path); + } + + getAttachmentParentForPath(path) { + do { + if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { + return path; + } + } while (path = path.parentPath); + } + + hasOwnParamBindings(scope) { + for (const name of Object.keys(this.bindings)) { + if (!scope.hasOwnBinding(name)) continue; + const binding = this.bindings[name]; + if (binding.kind === "param" && binding.constant) return true; + } + + return false; + } + + run() { + this.path.traverse(referenceVisitor, this); + this.getCompatibleScopes(); + const attachTo = this.getAttachmentPath(); + if (!attachTo) return; + if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return; + let uid = attachTo.scope.generateUidIdentifier("ref"); + const declarator = t().variableDeclarator(uid, this.path.node); + const insertFn = this.attachAfter ? "insertAfter" : "insertBefore"; + const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t().variableDeclaration("var", [declarator])]); + const parent = this.path.parentPath; + + if (parent.isJSXElement() && this.path.container === parent.node.children) { + uid = t().JSXExpressionContainer(uid); + } + + this.path.replaceWith(t().cloneNode(uid)); + return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init"); + } + +} + +exports.default = PathHoister; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js new file mode 100644 index 0000000..23ec8fe --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js @@ -0,0 +1,38 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hooks = void 0; +const hooks = [function (self, parent) { + const removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement(); + + if (removeParent) { + parent.remove(); + return true; + } +}, function (self, parent) { + if (parent.isSequenceExpression() && parent.node.expressions.length === 1) { + parent.replaceWith(parent.node.expressions[0]); + return true; + } +}, function (self, parent) { + if (parent.isBinary()) { + if (self.key === "left") { + parent.replaceWith(parent.node.right); + } else { + parent.replaceWith(parent.node.left); + } + + return true; + } +}, function (self, parent) { + if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) { + self.replaceWith({ + type: "BlockStatement", + body: [] + }); + return true; + } +}]; +exports.hooks = hooks; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/virtual-types.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/virtual-types.js new file mode 100644 index 0000000..2ac7cf0 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/virtual-types.js @@ -0,0 +1,216 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0; + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +const ReferencedIdentifier = { + types: ["Identifier", "JSXIdentifier"], + + checkPath(path, opts) { + const { + node, + parent + } = path; + + if (!t().isIdentifier(node, opts) && !t().isJSXMemberExpression(parent, opts)) { + if (t().isJSXIdentifier(node, opts)) { + if (t().react.isCompatTag(node.name)) return false; + } else { + return false; + } + } + + return t().isReferenced(node, parent, path.parentPath.parent); + } + +}; +exports.ReferencedIdentifier = ReferencedIdentifier; +const ReferencedMemberExpression = { + types: ["MemberExpression"], + + checkPath({ + node, + parent + }) { + return t().isMemberExpression(node) && t().isReferenced(node, parent); + } + +}; +exports.ReferencedMemberExpression = ReferencedMemberExpression; +const BindingIdentifier = { + types: ["Identifier"], + + checkPath(path) { + const { + node, + parent + } = path; + const grandparent = path.parentPath.parent; + return t().isIdentifier(node) && t().isBinding(node, parent, grandparent); + } + +}; +exports.BindingIdentifier = BindingIdentifier; +const Statement = { + types: ["Statement"], + + checkPath({ + node, + parent + }) { + if (t().isStatement(node)) { + if (t().isVariableDeclaration(node)) { + if (t().isForXStatement(parent, { + left: node + })) return false; + if (t().isForStatement(parent, { + init: node + })) return false; + } + + return true; + } else { + return false; + } + } + +}; +exports.Statement = Statement; +const Expression = { + types: ["Expression"], + + checkPath(path) { + if (path.isIdentifier()) { + return path.isReferencedIdentifier(); + } else { + return t().isExpression(path.node); + } + } + +}; +exports.Expression = Expression; +const Scope = { + types: ["Scopable"], + + checkPath(path) { + return t().isScope(path.node, path.parent); + } + +}; +exports.Scope = Scope; +const Referenced = { + checkPath(path) { + return t().isReferenced(path.node, path.parent); + } + +}; +exports.Referenced = Referenced; +const BlockScoped = { + checkPath(path) { + return t().isBlockScoped(path.node); + } + +}; +exports.BlockScoped = BlockScoped; +const Var = { + types: ["VariableDeclaration"], + + checkPath(path) { + return t().isVar(path.node); + } + +}; +exports.Var = Var; +const User = { + checkPath(path) { + return path.node && !!path.node.loc; + } + +}; +exports.User = User; +const Generated = { + checkPath(path) { + return !path.isUser(); + } + +}; +exports.Generated = Generated; +const Pure = { + checkPath(path, opts) { + return path.scope.isPure(path.node, opts); + } + +}; +exports.Pure = Pure; +const Flow = { + types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], + + checkPath({ + node + }) { + if (t().isFlow(node)) { + return true; + } else if (t().isImportDeclaration(node)) { + return node.importKind === "type" || node.importKind === "typeof"; + } else if (t().isExportDeclaration(node)) { + return node.exportKind === "type"; + } else if (t().isImportSpecifier(node)) { + return node.importKind === "type" || node.importKind === "typeof"; + } else { + return false; + } + } + +}; +exports.Flow = Flow; +const RestProperty = { + types: ["RestElement"], + + checkPath(path) { + return path.parentPath && path.parentPath.isObjectPattern(); + } + +}; +exports.RestProperty = RestProperty; +const SpreadProperty = { + types: ["RestElement"], + + checkPath(path) { + return path.parentPath && path.parentPath.isObjectExpression(); + } + +}; +exports.SpreadProperty = SpreadProperty; +const ExistentialTypeParam = { + types: ["ExistsTypeAnnotation"] +}; +exports.ExistentialTypeParam = ExistentialTypeParam; +const NumericLiteralTypeAnnotation = { + types: ["NumberLiteralTypeAnnotation"] +}; +exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation; +const ForAwaitStatement = { + types: ["ForOfStatement"], + + checkPath({ + node + }) { + return node.await === true; + } + +}; +exports.ForAwaitStatement = ForAwaitStatement; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/modification.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/modification.js new file mode 100644 index 0000000..b522de8 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/modification.js @@ -0,0 +1,222 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.insertBefore = insertBefore; +exports._containerInsert = _containerInsert; +exports._containerInsertBefore = _containerInsertBefore; +exports._containerInsertAfter = _containerInsertAfter; +exports.insertAfter = insertAfter; +exports.updateSiblingKeys = updateSiblingKeys; +exports._verifyNodeList = _verifyNodeList; +exports.unshiftContainer = unshiftContainer; +exports.pushContainer = pushContainer; +exports.hoist = hoist; + +var _cache = require("../cache"); + +var _hoister = _interopRequireDefault(require("./lib/hoister")); + +var _index = _interopRequireDefault(require("./index")); + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function insertBefore(nodes) { + this._assertUnremoved(); + + nodes = this._verifyNodeList(nodes); + const { + parentPath + } = this; + + if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { + return parentPath.insertBefore(nodes); + } else if (this.isNodeType("Expression") && this.listKey !== "params" && this.listKey !== "arguments" || parentPath.isForStatement() && this.key === "init") { + if (this.node) nodes.push(this.node); + return this.replaceExpressionWithStatements(nodes); + } else if (Array.isArray(this.container)) { + return this._containerInsertBefore(nodes); + } else if (this.isStatementOrBlock()) { + const shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null); + this.replaceWith(t().blockStatement(shouldInsertCurrentNode ? [this.node] : [])); + return this.unshiftContainer("body", nodes); + } else { + throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); + } +} + +function _containerInsert(from, nodes) { + this.updateSiblingKeys(from, nodes.length); + const paths = []; + this.container.splice(from, 0, ...nodes); + + for (let i = 0; i < nodes.length; i++) { + const to = from + i; + const path = this.getSibling(to); + paths.push(path); + + if (this.context && this.context.queue) { + path.pushContext(this.context); + } + } + + const contexts = this._getQueueContexts(); + + for (const path of paths) { + path.setScope(); + path.debug("Inserted."); + + for (const context of contexts) { + context.maybeQueue(path, true); + } + } + + return paths; +} + +function _containerInsertBefore(nodes) { + return this._containerInsert(this.key, nodes); +} + +function _containerInsertAfter(nodes) { + return this._containerInsert(this.key + 1, nodes); +} + +function insertAfter(nodes) { + this._assertUnremoved(); + + nodes = this._verifyNodeList(nodes); + const { + parentPath + } = this; + + if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { + return parentPath.insertAfter(nodes.map(node => { + return t().isExpression(node) ? t().expressionStatement(node) : node; + })); + } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") { + if (this.node) { + let { + scope + } = this; + + if (parentPath.isMethod({ + computed: true, + key: this.node + })) { + scope = scope.parent; + } + + const temp = scope.generateDeclaredUidIdentifier(); + nodes.unshift(t().expressionStatement(t().assignmentExpression("=", t().cloneNode(temp), this.node))); + nodes.push(t().expressionStatement(t().cloneNode(temp))); + } + + return this.replaceExpressionWithStatements(nodes); + } else if (Array.isArray(this.container)) { + return this._containerInsertAfter(nodes); + } else if (this.isStatementOrBlock()) { + const shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null); + this.replaceWith(t().blockStatement(shouldInsertCurrentNode ? [this.node] : [])); + return this.pushContainer("body", nodes); + } else { + throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); + } +} + +function updateSiblingKeys(fromIndex, incrementBy) { + if (!this.parent) return; + + const paths = _cache.path.get(this.parent); + + for (let i = 0; i < paths.length; i++) { + const path = paths[i]; + + if (path.key >= fromIndex) { + path.key += incrementBy; + } + } +} + +function _verifyNodeList(nodes) { + if (!nodes) { + return []; + } + + if (nodes.constructor !== Array) { + nodes = [nodes]; + } + + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + let msg; + + if (!node) { + msg = "has falsy node"; + } else if (typeof node !== "object") { + msg = "contains a non-object node"; + } else if (!node.type) { + msg = "without a type"; + } else if (node instanceof _index.default) { + msg = "has a NodePath when it expected a raw object"; + } + + if (msg) { + const type = Array.isArray(node) ? "array" : typeof node; + throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`); + } + } + + return nodes; +} + +function unshiftContainer(listKey, nodes) { + this._assertUnremoved(); + + nodes = this._verifyNodeList(nodes); + + const path = _index.default.get({ + parentPath: this, + parent: this.node, + container: this.node[listKey], + listKey, + key: 0 + }); + + return path.insertBefore(nodes); +} + +function pushContainer(listKey, nodes) { + this._assertUnremoved(); + + nodes = this._verifyNodeList(nodes); + const container = this.node[listKey]; + + const path = _index.default.get({ + parentPath: this, + parent: this.node, + container: container, + listKey, + key: container.length + }); + + return path.replaceWithMultiple(nodes); +} + +function hoist(scope = this.scope) { + const hoister = new _hoister.default(this, scope); + return hoister.run(); +} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/removal.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/removal.js similarity index 80% rename from node_modules/@babel/traverse/lib/path/removal.js rename to node_modules/@babel/core/node_modules/@babel/traverse/lib/path/removal.js index ce4c136..d509a6d 100644 --- a/node_modules/@babel/traverse/lib/path/removal.js +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/removal.js @@ -33,19 +33,12 @@ function remove() { } function _removeFromScope() { - var _this = this; - - var bindings = this.getBindingIdentifiers(); - Object.keys(bindings).forEach(function (name) { - return _this.scope.removeBinding(name); - }); + const bindings = this.getBindingIdentifiers(); + Object.keys(bindings).forEach(name => this.scope.removeBinding(name)); } function _callRemovalHooks() { - var _arr = _removalHooks.hooks; - - for (var _i = 0; _i < _arr.length; _i++) { - var fn = _arr[_i]; + for (const fn of _removalHooks.hooks) { if (fn(this, this.parentPath)) return true; } } diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/replacement.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/replacement.js new file mode 100644 index 0000000..36e6c9f --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/replacement.js @@ -0,0 +1,258 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.replaceWithMultiple = replaceWithMultiple; +exports.replaceWithSourceString = replaceWithSourceString; +exports.replaceWith = replaceWith; +exports._replaceWith = _replaceWith; +exports.replaceExpressionWithStatements = replaceExpressionWithStatements; +exports.replaceInline = replaceInline; + +function _codeFrame() { + const data = require("@babel/code-frame"); + + _codeFrame = function () { + return data; + }; + + return data; +} + +var _index = _interopRequireDefault(require("../index")); + +var _index2 = _interopRequireDefault(require("./index")); + +function _parser() { + const data = require("@babel/parser"); + + _parser = function () { + return data; + }; + + return data; +} + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const hoistVariablesVisitor = { + Function(path) { + path.skip(); + }, + + VariableDeclaration(path) { + if (path.node.kind !== "var") return; + const bindings = path.getBindingIdentifiers(); + + for (const key of Object.keys(bindings)) { + path.scope.push({ + id: bindings[key] + }); + } + + const exprs = []; + + for (const declar of path.node.declarations) { + if (declar.init) { + exprs.push(t().expressionStatement(t().assignmentExpression("=", declar.id, declar.init))); + } + } + + path.replaceWithMultiple(exprs); + } + +}; + +function replaceWithMultiple(nodes) { + this.resync(); + nodes = this._verifyNodeList(nodes); + t().inheritLeadingComments(nodes[0], this.node); + t().inheritTrailingComments(nodes[nodes.length - 1], this.node); + this.node = this.container[this.key] = null; + const paths = this.insertAfter(nodes); + + if (this.node) { + this.requeue(); + } else { + this.remove(); + } + + return paths; +} + +function replaceWithSourceString(replacement) { + this.resync(); + + try { + replacement = `(${replacement})`; + replacement = (0, _parser().parse)(replacement); + } catch (err) { + const loc = err.loc; + + if (loc) { + err.message += " - make sure this is an expression.\n" + (0, _codeFrame().codeFrameColumns)(replacement, { + start: { + line: loc.line, + column: loc.column + 1 + } + }); + err.code = "BABEL_REPLACE_SOURCE_ERROR"; + } + + throw err; + } + + replacement = replacement.program.body[0].expression; + + _index.default.removeProperties(replacement); + + return this.replaceWith(replacement); +} + +function replaceWith(replacement) { + this.resync(); + + if (this.removed) { + throw new Error("You can't replace this node, we've already removed it"); + } + + if (replacement instanceof _index2.default) { + replacement = replacement.node; + } + + if (!replacement) { + throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); + } + + if (this.node === replacement) { + return [this]; + } + + if (this.isProgram() && !t().isProgram(replacement)) { + throw new Error("You can only replace a Program root node with another Program node"); + } + + if (Array.isArray(replacement)) { + throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); + } + + if (typeof replacement === "string") { + throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); + } + + let nodePath = ""; + + if (this.isNodeType("Statement") && t().isExpression(replacement)) { + if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) { + replacement = t().expressionStatement(replacement); + nodePath = "expression"; + } + } + + if (this.isNodeType("Expression") && t().isStatement(replacement)) { + if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { + return this.replaceExpressionWithStatements([replacement]); + } + } + + const oldNode = this.node; + + if (oldNode) { + t().inheritsComments(replacement, oldNode); + t().removeComments(oldNode); + } + + this._replaceWith(replacement); + + this.type = replacement.type; + this.setScope(); + this.requeue(); + return [nodePath ? this.get(nodePath) : this]; +} + +function _replaceWith(node) { + if (!this.container) { + throw new ReferenceError("Container is falsy"); + } + + if (this.inList) { + t().validate(this.parent, this.key, [node]); + } else { + t().validate(this.parent, this.key, node); + } + + this.debug(`Replace with ${node && node.type}`); + this.node = this.container[this.key] = node; +} + +function replaceExpressionWithStatements(nodes) { + this.resync(); + const toSequenceExpression = t().toSequenceExpression(nodes, this.scope); + + if (toSequenceExpression) { + return this.replaceWith(toSequenceExpression)[0].get("expressions"); + } + + const container = t().arrowFunctionExpression([], t().blockStatement(nodes)); + this.replaceWith(t().callExpression(container, [])); + this.traverse(hoistVariablesVisitor); + const completionRecords = this.get("callee").getCompletionRecords(); + + for (const path of completionRecords) { + if (!path.isExpressionStatement()) continue; + const loop = path.findParent(path => path.isLoop()); + + if (loop) { + let uid = loop.getData("expressionReplacementReturnUid"); + + if (!uid) { + const callee = this.get("callee"); + uid = callee.scope.generateDeclaredUidIdentifier("ret"); + callee.get("body").pushContainer("body", t().returnStatement(t().cloneNode(uid))); + loop.setData("expressionReplacementReturnUid", uid); + } else { + uid = t().identifier(uid.name); + } + + path.get("expression").replaceWith(t().assignmentExpression("=", t().cloneNode(uid), path.node.expression)); + } else { + path.replaceWith(t().returnStatement(path.node.expression)); + } + } + + const callee = this.get("callee"); + callee.arrowFunctionToExpression(); + return callee.get("body.body"); +} + +function replaceInline(nodes) { + this.resync(); + + if (Array.isArray(nodes)) { + if (Array.isArray(this.container)) { + nodes = this._verifyNodeList(nodes); + + const paths = this._containerInsertAfter(nodes); + + this.remove(); + return paths; + } else { + return this.replaceWithMultiple(nodes); + } + } else { + return this.replaceWith(nodes); + } +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/binding.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/binding.js new file mode 100644 index 0000000..d19f116 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/binding.js @@ -0,0 +1,71 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +class Binding { + constructor({ + identifier, + scope, + path, + kind + }) { + this.identifier = identifier; + this.scope = scope; + this.path = path; + this.kind = kind; + this.constantViolations = []; + this.constant = true; + this.referencePaths = []; + this.referenced = false; + this.references = 0; + this.clearValue(); + } + + deoptValue() { + this.clearValue(); + this.hasDeoptedValue = true; + } + + setValue(value) { + if (this.hasDeoptedValue) return; + this.hasValue = true; + this.value = value; + } + + clearValue() { + this.hasDeoptedValue = false; + this.hasValue = false; + this.value = null; + } + + reassign(path) { + this.constant = false; + + if (this.constantViolations.indexOf(path) !== -1) { + return; + } + + this.constantViolations.push(path); + } + + reference(path) { + if (this.referencePaths.indexOf(path) !== -1) { + return; + } + + this.referenced = true; + this.references++; + this.referencePaths.push(path); + } + + dereference() { + this.references--; + this.referenced = !!this.references; + } + +} + +exports.default = Binding; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/index.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/index.js new file mode 100644 index 0000000..b27f226 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/index.js @@ -0,0 +1,892 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +function _includes() { + const data = _interopRequireDefault(require("lodash/includes")); + + _includes = function () { + return data; + }; + + return data; +} + +function _repeat() { + const data = _interopRequireDefault(require("lodash/repeat")); + + _repeat = function () { + return data; + }; + + return data; +} + +var _renamer = _interopRequireDefault(require("./lib/renamer")); + +var _index = _interopRequireDefault(require("../index")); + +function _defaults() { + const data = _interopRequireDefault(require("lodash/defaults")); + + _defaults = function () { + return data; + }; + + return data; +} + +var _binding = _interopRequireDefault(require("./binding")); + +function _globals() { + const data = _interopRequireDefault(require("globals")); + + _globals = function () { + return data; + }; + + return data; +} + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +var _cache = require("../cache"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function gatherNodeParts(node, parts) { + if (t().isModuleDeclaration(node)) { + if (node.source) { + gatherNodeParts(node.source, parts); + } else if (node.specifiers && node.specifiers.length) { + for (const specifier of node.specifiers) { + gatherNodeParts(specifier, parts); + } + } else if (node.declaration) { + gatherNodeParts(node.declaration, parts); + } + } else if (t().isModuleSpecifier(node)) { + gatherNodeParts(node.local, parts); + } else if (t().isMemberExpression(node)) { + gatherNodeParts(node.object, parts); + gatherNodeParts(node.property, parts); + } else if (t().isIdentifier(node)) { + parts.push(node.name); + } else if (t().isLiteral(node)) { + parts.push(node.value); + } else if (t().isCallExpression(node)) { + gatherNodeParts(node.callee, parts); + } else if (t().isObjectExpression(node) || t().isObjectPattern(node)) { + for (const prop of node.properties) { + gatherNodeParts(prop.key || prop.argument, parts); + } + } else if (t().isPrivateName(node)) { + gatherNodeParts(node.id, parts); + } else if (t().isThisExpression(node)) { + parts.push("this"); + } else if (t().isSuper(node)) { + parts.push("super"); + } +} + +const collectorVisitor = { + For(path) { + for (const key of t().FOR_INIT_KEYS) { + const declar = path.get(key); + + if (declar.isVar()) { + const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent(); + parentScope.registerBinding("var", declar); + } + } + }, + + Declaration(path) { + if (path.isBlockScoped()) return; + + if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) { + return; + } + + const parent = path.scope.getFunctionParent() || path.scope.getProgramParent(); + parent.registerDeclaration(path); + }, + + ReferencedIdentifier(path, state) { + state.references.push(path); + }, + + ForXStatement(path, state) { + const left = path.get("left"); + + if (left.isPattern() || left.isIdentifier()) { + state.constantViolations.push(path); + } + }, + + ExportDeclaration: { + exit(path) { + const { + node, + scope + } = path; + const declar = node.declaration; + + if (t().isClassDeclaration(declar) || t().isFunctionDeclaration(declar)) { + const id = declar.id; + if (!id) return; + const binding = scope.getBinding(id.name); + if (binding) binding.reference(path); + } else if (t().isVariableDeclaration(declar)) { + for (const decl of declar.declarations) { + for (const name of Object.keys(t().getBindingIdentifiers(decl))) { + const binding = scope.getBinding(name); + if (binding) binding.reference(path); + } + } + } + } + + }, + + LabeledStatement(path) { + path.scope.getProgramParent().addGlobal(path.node); + path.scope.getBlockParent().registerDeclaration(path); + }, + + AssignmentExpression(path, state) { + state.assignments.push(path); + }, + + UpdateExpression(path, state) { + state.constantViolations.push(path); + }, + + UnaryExpression(path, state) { + if (path.node.operator === "delete") { + state.constantViolations.push(path); + } + }, + + BlockScoped(path) { + let scope = path.scope; + if (scope.path === path) scope = scope.parent; + scope.getBlockParent().registerDeclaration(path); + }, + + ClassDeclaration(path) { + const id = path.node.id; + if (!id) return; + const name = id.name; + path.scope.bindings[name] = path.scope.getBinding(name); + }, + + Block(path) { + const paths = path.get("body"); + + for (const bodyPath of paths) { + if (bodyPath.isFunctionDeclaration()) { + path.scope.getBlockParent().registerDeclaration(bodyPath); + } + } + } + +}; +let uid = 0; + +class Scope { + constructor(path) { + const { + node + } = path; + + const cached = _cache.scope.get(node); + + if (cached && cached.path === path) { + return cached; + } + + _cache.scope.set(node, this); + + this.uid = uid++; + this.block = node; + this.path = path; + this.labels = new Map(); + } + + get parent() { + const parent = this.path.findParent(p => p.isScope()); + return parent && parent.scope; + } + + get parentBlock() { + return this.path.parent; + } + + get hub() { + return this.path.hub; + } + + traverse(node, opts, state) { + (0, _index.default)(node, opts, this, state, this.path); + } + + generateDeclaredUidIdentifier(name) { + const id = this.generateUidIdentifier(name); + this.push({ + id + }); + return t().cloneNode(id); + } + + generateUidIdentifier(name) { + return t().identifier(this.generateUid(name)); + } + + generateUid(name = "temp") { + name = t().toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); + let uid; + let i = 0; + + do { + uid = this._generateUid(name, i); + i++; + } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); + + const program = this.getProgramParent(); + program.references[uid] = true; + program.uids[uid] = true; + return uid; + } + + _generateUid(name, i) { + let id = name; + if (i > 1) id += i; + return `_${id}`; + } + + generateUidBasedOnNode(parent, defaultName) { + let node = parent; + + if (t().isAssignmentExpression(parent)) { + node = parent.left; + } else if (t().isVariableDeclarator(parent)) { + node = parent.id; + } else if (t().isObjectProperty(node) || t().isObjectMethod(node)) { + node = node.key; + } + + const parts = []; + gatherNodeParts(node, parts); + let id = parts.join("$"); + id = id.replace(/^_/, "") || defaultName || "ref"; + return this.generateUid(id.slice(0, 20)); + } + + generateUidIdentifierBasedOnNode(parent, defaultName) { + return t().identifier(this.generateUidBasedOnNode(parent, defaultName)); + } + + isStatic(node) { + if (t().isThisExpression(node) || t().isSuper(node)) { + return true; + } + + if (t().isIdentifier(node)) { + const binding = this.getBinding(node.name); + + if (binding) { + return binding.constant; + } else { + return this.hasBinding(node.name); + } + } + + return false; + } + + maybeGenerateMemoised(node, dontPush) { + if (this.isStatic(node)) { + return null; + } else { + const id = this.generateUidIdentifierBasedOnNode(node); + + if (!dontPush) { + this.push({ + id + }); + return t().cloneNode(id); + } + + return id; + } + } + + checkBlockScopedCollisions(local, kind, name, id) { + if (kind === "param") return; + if (local.kind === "local") return; + const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const"); + + if (duplicate) { + throw this.hub.buildError(id, `Duplicate declaration "${name}"`, TypeError); + } + } + + rename(oldName, newName, block) { + const binding = this.getBinding(oldName); + + if (binding) { + newName = newName || this.generateUidIdentifier(oldName).name; + return new _renamer.default(binding, oldName, newName).rename(block); + } + } + + _renameFromMap(map, oldName, newName, value) { + if (map[oldName]) { + map[newName] = value; + map[oldName] = null; + } + } + + dump() { + const sep = (0, _repeat().default)("-", 60); + console.log(sep); + let scope = this; + + do { + console.log("#", scope.block.type); + + for (const name of Object.keys(scope.bindings)) { + const binding = scope.bindings[name]; + console.log(" -", name, { + constant: binding.constant, + references: binding.references, + violations: binding.constantViolations.length, + kind: binding.kind + }); + } + } while (scope = scope.parent); + + console.log(sep); + } + + toArray(node, i) { + if (t().isIdentifier(node)) { + const binding = this.getBinding(node.name); + + if (binding && binding.constant && binding.path.isGenericType("Array")) { + return node; + } + } + + if (t().isArrayExpression(node)) { + return node; + } + + if (t().isIdentifier(node, { + name: "arguments" + })) { + return t().callExpression(t().memberExpression(t().memberExpression(t().memberExpression(t().identifier("Array"), t().identifier("prototype")), t().identifier("slice")), t().identifier("call")), [node]); + } + + let helperName; + const args = [node]; + + if (i === true) { + helperName = "toConsumableArray"; + } else if (i) { + args.push(t().numericLiteral(i)); + helperName = "slicedToArray"; + } else { + helperName = "toArray"; + } + + return t().callExpression(this.hub.addHelper(helperName), args); + } + + hasLabel(name) { + return !!this.getLabel(name); + } + + getLabel(name) { + return this.labels.get(name); + } + + registerLabel(path) { + this.labels.set(path.node.label.name, path); + } + + registerDeclaration(path) { + if (path.isLabeledStatement()) { + this.registerLabel(path); + } else if (path.isFunctionDeclaration()) { + this.registerBinding("hoisted", path.get("id"), path); + } else if (path.isVariableDeclaration()) { + const declarations = path.get("declarations"); + + for (const declar of declarations) { + this.registerBinding(path.node.kind, declar); + } + } else if (path.isClassDeclaration()) { + this.registerBinding("let", path); + } else if (path.isImportDeclaration()) { + const specifiers = path.get("specifiers"); + + for (const specifier of specifiers) { + this.registerBinding("module", specifier); + } + } else if (path.isExportDeclaration()) { + const declar = path.get("declaration"); + + if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) { + this.registerDeclaration(declar); + } + } else { + this.registerBinding("unknown", path); + } + } + + buildUndefinedNode() { + if (this.hasBinding("undefined")) { + return t().unaryExpression("void", t().numericLiteral(0), true); + } else { + return t().identifier("undefined"); + } + } + + registerConstantViolation(path) { + const ids = path.getBindingIdentifiers(); + + for (const name of Object.keys(ids)) { + const binding = this.getBinding(name); + if (binding) binding.reassign(path); + } + } + + registerBinding(kind, path, bindingPath = path) { + if (!kind) throw new ReferenceError("no `kind`"); + + if (path.isVariableDeclaration()) { + const declarators = path.get("declarations"); + + for (const declar of declarators) { + this.registerBinding(kind, declar); + } + + return; + } + + const parent = this.getProgramParent(); + const ids = path.getOuterBindingIdentifiers(true); + + for (const name of Object.keys(ids)) { + for (const id of ids[name]) { + const local = this.getOwnBinding(name); + + if (local) { + if (local.identifier === id) continue; + this.checkBlockScopedCollisions(local, kind, name, id); + } + + parent.references[name] = true; + + if (local) { + this.registerConstantViolation(bindingPath); + } else { + this.bindings[name] = new _binding.default({ + identifier: id, + scope: this, + path: bindingPath, + kind: kind + }); + } + } + } + } + + addGlobal(node) { + this.globals[node.name] = node; + } + + hasUid(name) { + let scope = this; + + do { + if (scope.uids[name]) return true; + } while (scope = scope.parent); + + return false; + } + + hasGlobal(name) { + let scope = this; + + do { + if (scope.globals[name]) return true; + } while (scope = scope.parent); + + return false; + } + + hasReference(name) { + let scope = this; + + do { + if (scope.references[name]) return true; + } while (scope = scope.parent); + + return false; + } + + isPure(node, constantsOnly) { + if (t().isIdentifier(node)) { + const binding = this.getBinding(node.name); + if (!binding) return false; + if (constantsOnly) return binding.constant; + return true; + } else if (t().isClass(node)) { + if (node.superClass && !this.isPure(node.superClass, constantsOnly)) { + return false; + } + + return this.isPure(node.body, constantsOnly); + } else if (t().isClassBody(node)) { + for (const method of node.body) { + if (!this.isPure(method, constantsOnly)) return false; + } + + return true; + } else if (t().isBinary(node)) { + return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); + } else if (t().isArrayExpression(node)) { + for (const elem of node.elements) { + if (!this.isPure(elem, constantsOnly)) return false; + } + + return true; + } else if (t().isObjectExpression(node)) { + for (const prop of node.properties) { + if (!this.isPure(prop, constantsOnly)) return false; + } + + return true; + } else if (t().isClassMethod(node)) { + if (node.computed && !this.isPure(node.key, constantsOnly)) return false; + if (node.kind === "get" || node.kind === "set") return false; + return true; + } else if (t().isProperty(node)) { + if (node.computed && !this.isPure(node.key, constantsOnly)) return false; + return this.isPure(node.value, constantsOnly); + } else if (t().isUnaryExpression(node)) { + return this.isPure(node.argument, constantsOnly); + } else if (t().isTaggedTemplateExpression(node)) { + return t().matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly); + } else if (t().isTemplateLiteral(node)) { + for (const expression of node.expressions) { + if (!this.isPure(expression, constantsOnly)) return false; + } + + return true; + } else { + return t().isPureish(node); + } + } + + setData(key, val) { + return this.data[key] = val; + } + + getData(key) { + let scope = this; + + do { + const data = scope.data[key]; + if (data != null) return data; + } while (scope = scope.parent); + } + + removeData(key) { + let scope = this; + + do { + const data = scope.data[key]; + if (data != null) scope.data[key] = null; + } while (scope = scope.parent); + } + + init() { + if (!this.references) this.crawl(); + } + + crawl() { + const path = this.path; + this.references = Object.create(null); + this.bindings = Object.create(null); + this.globals = Object.create(null); + this.uids = Object.create(null); + this.data = Object.create(null); + + if (path.isLoop()) { + for (const key of t().FOR_INIT_KEYS) { + const node = path.get(key); + if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); + } + } + + if (path.isFunctionExpression() && path.has("id")) { + if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { + this.registerBinding("local", path.get("id"), path); + } + } + + if (path.isClassExpression() && path.has("id")) { + if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { + this.registerBinding("local", path); + } + } + + if (path.isFunction()) { + const params = path.get("params"); + + for (const param of params) { + this.registerBinding("param", param); + } + } + + if (path.isCatchClause()) { + this.registerBinding("let", path); + } + + const parent = this.getProgramParent(); + if (parent.crawling) return; + const state = { + references: [], + constantViolations: [], + assignments: [] + }; + this.crawling = true; + path.traverse(collectorVisitor, state); + this.crawling = false; + + for (const path of state.assignments) { + const ids = path.getBindingIdentifiers(); + let programParent; + + for (const name of Object.keys(ids)) { + if (path.scope.getBinding(name)) continue; + programParent = programParent || path.scope.getProgramParent(); + programParent.addGlobal(ids[name]); + } + + path.scope.registerConstantViolation(path); + } + + for (const ref of state.references) { + const binding = ref.scope.getBinding(ref.node.name); + + if (binding) { + binding.reference(ref); + } else { + ref.scope.getProgramParent().addGlobal(ref.node); + } + } + + for (const path of state.constantViolations) { + path.scope.registerConstantViolation(path); + } + } + + push(opts) { + let path = this.path; + + if (!path.isBlockStatement() && !path.isProgram()) { + path = this.getBlockParent().path; + } + + if (path.isSwitchStatement()) { + path = (this.getFunctionParent() || this.getProgramParent()).path; + } + + if (path.isLoop() || path.isCatchClause() || path.isFunction()) { + path.ensureBlock(); + path = path.get("body"); + } + + const unique = opts.unique; + const kind = opts.kind || "var"; + const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; + const dataKey = `declaration:${kind}:${blockHoist}`; + let declarPath = !unique && path.getData(dataKey); + + if (!declarPath) { + const declar = t().variableDeclaration(kind, []); + declar._blockHoist = blockHoist; + [declarPath] = path.unshiftContainer("body", [declar]); + if (!unique) path.setData(dataKey, declarPath); + } + + const declarator = t().variableDeclarator(opts.id, opts.init); + declarPath.node.declarations.push(declarator); + this.registerBinding(kind, declarPath.get("declarations").pop()); + } + + getProgramParent() { + let scope = this; + + do { + if (scope.path.isProgram()) { + return scope; + } + } while (scope = scope.parent); + + throw new Error("Couldn't find a Program"); + } + + getFunctionParent() { + let scope = this; + + do { + if (scope.path.isFunctionParent()) { + return scope; + } + } while (scope = scope.parent); + + return null; + } + + getBlockParent() { + let scope = this; + + do { + if (scope.path.isBlockParent()) { + return scope; + } + } while (scope = scope.parent); + + throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); + } + + getAllBindings() { + const ids = Object.create(null); + let scope = this; + + do { + (0, _defaults().default)(ids, scope.bindings); + scope = scope.parent; + } while (scope); + + return ids; + } + + getAllBindingsOfKind() { + const ids = Object.create(null); + + for (const kind of arguments) { + let scope = this; + + do { + for (const name of Object.keys(scope.bindings)) { + const binding = scope.bindings[name]; + if (binding.kind === kind) ids[name] = binding; + } + + scope = scope.parent; + } while (scope); + } + + return ids; + } + + bindingIdentifierEquals(name, node) { + return this.getBindingIdentifier(name) === node; + } + + getBinding(name) { + let scope = this; + + do { + const binding = scope.getOwnBinding(name); + if (binding) return binding; + } while (scope = scope.parent); + } + + getOwnBinding(name) { + return this.bindings[name]; + } + + getBindingIdentifier(name) { + const info = this.getBinding(name); + return info && info.identifier; + } + + getOwnBindingIdentifier(name) { + const binding = this.bindings[name]; + return binding && binding.identifier; + } + + hasOwnBinding(name) { + return !!this.getOwnBinding(name); + } + + hasBinding(name, noGlobals) { + if (!name) return false; + if (this.hasOwnBinding(name)) return true; + if (this.parentHasBinding(name, noGlobals)) return true; + if (this.hasUid(name)) return true; + if (!noGlobals && (0, _includes().default)(Scope.globals, name)) return true; + if (!noGlobals && (0, _includes().default)(Scope.contextVariables, name)) return true; + return false; + } + + parentHasBinding(name, noGlobals) { + return this.parent && this.parent.hasBinding(name, noGlobals); + } + + moveBindingTo(name, scope) { + const info = this.getBinding(name); + + if (info) { + info.scope.removeOwnBinding(name); + info.scope = scope; + scope.bindings[name] = info; + } + } + + removeOwnBinding(name) { + delete this.bindings[name]; + } + + removeBinding(name) { + const info = this.getBinding(name); + + if (info) { + info.scope.removeOwnBinding(name); + } + + let scope = this; + + do { + if (scope.uids[name]) { + scope.uids[name] = false; + } + } while (scope = scope.parent); + } + +} + +exports.default = Scope; +Scope.globals = Object.keys(_globals().default.builtin); +Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/lib/renamer.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/lib/renamer.js new file mode 100644 index 0000000..b7a10ec --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/lib/renamer.js @@ -0,0 +1,138 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _binding = _interopRequireDefault(require("../binding")); + +function _helperSplitExportDeclaration() { + const data = _interopRequireDefault(require("@babel/helper-split-export-declaration")); + + _helperSplitExportDeclaration = function () { + return data; + }; + + return data; +} + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const renameVisitor = { + ReferencedIdentifier({ + node + }, state) { + if (node.name === state.oldName) { + node.name = state.newName; + } + }, + + Scope(path, state) { + if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { + path.skip(); + } + }, + + "AssignmentExpression|Declaration"(path, state) { + const ids = path.getOuterBindingIdentifiers(); + + for (const name in ids) { + if (name === state.oldName) ids[name].name = state.newName; + } + } + +}; + +class Renamer { + constructor(binding, oldName, newName) { + this.newName = newName; + this.oldName = oldName; + this.binding = binding; + } + + maybeConvertFromExportDeclaration(parentDeclar) { + const maybeExportDeclar = parentDeclar.parentPath; + + if (!maybeExportDeclar.isExportDeclaration()) { + return; + } + + if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) { + return; + } + + (0, _helperSplitExportDeclaration().default)(maybeExportDeclar); + } + + maybeConvertFromClassFunctionDeclaration(path) { + return; + if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; + if (this.binding.kind !== "hoisted") return; + path.node.id = t().identifier(this.oldName); + path.node._blockHoist = 3; + path.replaceWith(t().variableDeclaration("let", [t().variableDeclarator(t().identifier(this.newName), t().toExpression(path.node))])); + } + + maybeConvertFromClassFunctionExpression(path) { + return; + if (!path.isFunctionExpression() && !path.isClassExpression()) return; + if (this.binding.kind !== "local") return; + path.node.id = t().identifier(this.oldName); + this.binding.scope.parent.push({ + id: t().identifier(this.newName) + }); + path.replaceWith(t().assignmentExpression("=", t().identifier(this.newName), path.node)); + } + + rename(block) { + const { + binding, + oldName, + newName + } = this; + const { + scope, + path + } = binding; + const parentDeclar = path.find(path => path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression()); + + if (parentDeclar) { + const bindingIds = parentDeclar.getOuterBindingIdentifiers(); + + if (bindingIds[oldName] === binding.identifier) { + this.maybeConvertFromExportDeclaration(parentDeclar); + } + } + + scope.traverse(block || scope.block, renameVisitor, this); + + if (!block) { + scope.removeOwnBinding(oldName); + scope.bindings[newName] = binding; + this.binding.identifier.name = newName; + } + + if (binding.type === "hoisted") {} + + if (parentDeclar) { + this.maybeConvertFromClassFunctionDeclaration(parentDeclar); + this.maybeConvertFromClassFunctionExpression(parentDeclar); + } + } + +} + +exports.default = Renamer; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js b/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js new file mode 100644 index 0000000..7483fe1 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js @@ -0,0 +1,254 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.explode = explode; +exports.verify = verify; +exports.merge = merge; + +var virtualTypes = _interopRequireWildcard(require("./path/lib/virtual-types")); + +function t() { + const data = _interopRequireWildcard(require("@babel/types")); + + t = function () { + return data; + }; + + return data; +} + +function _clone() { + const data = _interopRequireDefault(require("lodash/clone")); + + _clone = function () { + return data; + }; + + return data; +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function explode(visitor) { + if (visitor._exploded) return visitor; + visitor._exploded = true; + + for (const nodeType of Object.keys(visitor)) { + if (shouldIgnoreKey(nodeType)) continue; + const parts = nodeType.split("|"); + if (parts.length === 1) continue; + const fns = visitor[nodeType]; + delete visitor[nodeType]; + + for (const part of parts) { + visitor[part] = fns; + } + } + + verify(visitor); + delete visitor.__esModule; + ensureEntranceObjects(visitor); + ensureCallbackArrays(visitor); + + for (const nodeType of Object.keys(visitor)) { + if (shouldIgnoreKey(nodeType)) continue; + const wrapper = virtualTypes[nodeType]; + if (!wrapper) continue; + const fns = visitor[nodeType]; + + for (const type of Object.keys(fns)) { + fns[type] = wrapCheck(wrapper, fns[type]); + } + + delete visitor[nodeType]; + + if (wrapper.types) { + for (const type of wrapper.types) { + if (visitor[type]) { + mergePair(visitor[type], fns); + } else { + visitor[type] = fns; + } + } + } else { + mergePair(visitor, fns); + } + } + + for (const nodeType of Object.keys(visitor)) { + if (shouldIgnoreKey(nodeType)) continue; + const fns = visitor[nodeType]; + let aliases = t().FLIPPED_ALIAS_KEYS[nodeType]; + const deprecratedKey = t().DEPRECATED_KEYS[nodeType]; + + if (deprecratedKey) { + console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecratedKey}`); + aliases = [deprecratedKey]; + } + + if (!aliases) continue; + delete visitor[nodeType]; + + for (const alias of aliases) { + const existing = visitor[alias]; + + if (existing) { + mergePair(existing, fns); + } else { + visitor[alias] = (0, _clone().default)(fns); + } + } + } + + for (const nodeType of Object.keys(visitor)) { + if (shouldIgnoreKey(nodeType)) continue; + ensureCallbackArrays(visitor[nodeType]); + } + + return visitor; +} + +function verify(visitor) { + if (visitor._verified) return; + + if (typeof visitor === "function") { + throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?"); + } + + for (const nodeType of Object.keys(visitor)) { + if (nodeType === "enter" || nodeType === "exit") { + validateVisitorMethods(nodeType, visitor[nodeType]); + } + + if (shouldIgnoreKey(nodeType)) continue; + + if (t().TYPES.indexOf(nodeType) < 0) { + throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`); + } + + const visitors = visitor[nodeType]; + + if (typeof visitors === "object") { + for (const visitorKey of Object.keys(visitors)) { + if (visitorKey === "enter" || visitorKey === "exit") { + validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]); + } else { + throw new Error("You passed `traverse()` a visitor object with the property " + `${nodeType} that has the invalid property ${visitorKey}`); + } + } + } + } + + visitor._verified = true; +} + +function validateVisitorMethods(path, val) { + const fns = [].concat(val); + + for (const fn of fns) { + if (typeof fn !== "function") { + throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`); + } + } +} + +function merge(visitors, states = [], wrapper) { + const rootVisitor = {}; + + for (let i = 0; i < visitors.length; i++) { + const visitor = visitors[i]; + const state = states[i]; + explode(visitor); + + for (const type of Object.keys(visitor)) { + let visitorType = visitor[type]; + + if (state || wrapper) { + visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper); + } + + const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {}; + mergePair(nodeVisitor, visitorType); + } + } + + return rootVisitor; +} + +function wrapWithStateOrWrapper(oldVisitor, state, wrapper) { + const newVisitor = {}; + + for (const key of Object.keys(oldVisitor)) { + let fns = oldVisitor[key]; + if (!Array.isArray(fns)) continue; + fns = fns.map(function (fn) { + let newFn = fn; + + if (state) { + newFn = function (path) { + return fn.call(state, path, state); + }; + } + + if (wrapper) { + newFn = wrapper(state.key, key, newFn); + } + + return newFn; + }); + newVisitor[key] = fns; + } + + return newVisitor; +} + +function ensureEntranceObjects(obj) { + for (const key of Object.keys(obj)) { + if (shouldIgnoreKey(key)) continue; + const fns = obj[key]; + + if (typeof fns === "function") { + obj[key] = { + enter: fns + }; + } + } +} + +function ensureCallbackArrays(obj) { + if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter]; + if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; +} + +function wrapCheck(wrapper, fn) { + const newFn = function (path) { + if (wrapper.checkPath(path)) { + return fn.apply(this, arguments); + } + }; + + newFn.toString = () => fn.toString(); + + return newFn; +} + +function shouldIgnoreKey(key) { + if (key[0] === "_") return true; + if (key === "enter" || key === "exit" || key === "shouldSkip") return true; + + if (key === "blacklist" || key === "noScope" || key === "skipKeys") { + return true; + } + + return false; +} + +function mergePair(dest, src) { + for (const key of Object.keys(src)) { + dest[key] = [].concat(dest[key] || [], src[key]); + } +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/traverse/package.json b/node_modules/@babel/core/node_modules/@babel/traverse/package.json new file mode 100644 index 0000000..d3dece2 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/traverse/package.json @@ -0,0 +1,61 @@ +{ + "_from": "@babel/traverse@^7.4.0", + "_id": "@babel/traverse@7.4.0", + "_inBundle": false, + "_integrity": "sha512-/DtIHKfyg2bBKnIN+BItaIlEg5pjAnzHOIQe5w+rHAw/rg9g0V7T4rqPX8BJPfW11kt3koyjAnTNwCzb28Y1PA==", + "_location": "/@babel/core/@babel/traverse", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/traverse@^7.4.0", + "name": "@babel/traverse", + "escapedName": "@babel%2ftraverse", + "scope": "@babel", + "rawSpec": "^7.4.0", + "saveSpec": null, + "fetchSpec": "^7.4.0" + }, + "_requiredBy": [ + "/@babel/core", + "/@babel/core/@babel/helpers" + ], + "_resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.0.tgz", + "_shasum": "14006967dd1d2b3494cdd650c686db9daf0ddada", + "_spec": "@babel/traverse@^7.4.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.0", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.0", + "@babel/parser": "^7.4.0", + "@babel/types": "^7.4.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + }, + "deprecated": false, + "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", + "devDependencies": { + "@babel/helper-plugin-test-runner": "^7.0.0" + }, + "gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/traverse", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-traverse" + }, + "version": "7.4.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/types/LICENSE b/node_modules/@babel/core/node_modules/@babel/types/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/@babel/types/README.md b/node_modules/@babel/core/node_modules/@babel/types/README.md new file mode 100644 index 0000000..8d33374 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/README.md @@ -0,0 +1,19 @@ +# @babel/types + +> Babel Types is a Lodash-esque utility library for AST nodes + +See our website [@babel/types](https://babeljs.io/docs/en/next/babel-types.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/types +``` + +or using yarn: + +```sh +yarn add @babel/types --dev +``` diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/assertNode.js b/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/assertNode.js new file mode 100644 index 0000000..194ec71 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/assertNode.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = assertNode; + +var _isNode = _interopRequireDefault(require("../validators/isNode")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function assertNode(node) { + if (!(0, _isNode.default)(node)) { + const type = node && node.type || JSON.stringify(node); + throw new TypeError(`Not a valid node of type "${type}"`); + } +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/generated/index.js b/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/generated/index.js new file mode 100644 index 0000000..a9f59b0 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/generated/index.js @@ -0,0 +1,1364 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.assertArrayExpression = assertArrayExpression; +exports.assertAssignmentExpression = assertAssignmentExpression; +exports.assertBinaryExpression = assertBinaryExpression; +exports.assertInterpreterDirective = assertInterpreterDirective; +exports.assertDirective = assertDirective; +exports.assertDirectiveLiteral = assertDirectiveLiteral; +exports.assertBlockStatement = assertBlockStatement; +exports.assertBreakStatement = assertBreakStatement; +exports.assertCallExpression = assertCallExpression; +exports.assertCatchClause = assertCatchClause; +exports.assertConditionalExpression = assertConditionalExpression; +exports.assertContinueStatement = assertContinueStatement; +exports.assertDebuggerStatement = assertDebuggerStatement; +exports.assertDoWhileStatement = assertDoWhileStatement; +exports.assertEmptyStatement = assertEmptyStatement; +exports.assertExpressionStatement = assertExpressionStatement; +exports.assertFile = assertFile; +exports.assertForInStatement = assertForInStatement; +exports.assertForStatement = assertForStatement; +exports.assertFunctionDeclaration = assertFunctionDeclaration; +exports.assertFunctionExpression = assertFunctionExpression; +exports.assertIdentifier = assertIdentifier; +exports.assertIfStatement = assertIfStatement; +exports.assertLabeledStatement = assertLabeledStatement; +exports.assertStringLiteral = assertStringLiteral; +exports.assertNumericLiteral = assertNumericLiteral; +exports.assertNullLiteral = assertNullLiteral; +exports.assertBooleanLiteral = assertBooleanLiteral; +exports.assertRegExpLiteral = assertRegExpLiteral; +exports.assertLogicalExpression = assertLogicalExpression; +exports.assertMemberExpression = assertMemberExpression; +exports.assertNewExpression = assertNewExpression; +exports.assertProgram = assertProgram; +exports.assertObjectExpression = assertObjectExpression; +exports.assertObjectMethod = assertObjectMethod; +exports.assertObjectProperty = assertObjectProperty; +exports.assertRestElement = assertRestElement; +exports.assertReturnStatement = assertReturnStatement; +exports.assertSequenceExpression = assertSequenceExpression; +exports.assertParenthesizedExpression = assertParenthesizedExpression; +exports.assertSwitchCase = assertSwitchCase; +exports.assertSwitchStatement = assertSwitchStatement; +exports.assertThisExpression = assertThisExpression; +exports.assertThrowStatement = assertThrowStatement; +exports.assertTryStatement = assertTryStatement; +exports.assertUnaryExpression = assertUnaryExpression; +exports.assertUpdateExpression = assertUpdateExpression; +exports.assertVariableDeclaration = assertVariableDeclaration; +exports.assertVariableDeclarator = assertVariableDeclarator; +exports.assertWhileStatement = assertWhileStatement; +exports.assertWithStatement = assertWithStatement; +exports.assertAssignmentPattern = assertAssignmentPattern; +exports.assertArrayPattern = assertArrayPattern; +exports.assertArrowFunctionExpression = assertArrowFunctionExpression; +exports.assertClassBody = assertClassBody; +exports.assertClassDeclaration = assertClassDeclaration; +exports.assertClassExpression = assertClassExpression; +exports.assertExportAllDeclaration = assertExportAllDeclaration; +exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration; +exports.assertExportNamedDeclaration = assertExportNamedDeclaration; +exports.assertExportSpecifier = assertExportSpecifier; +exports.assertForOfStatement = assertForOfStatement; +exports.assertImportDeclaration = assertImportDeclaration; +exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier; +exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; +exports.assertImportSpecifier = assertImportSpecifier; +exports.assertMetaProperty = assertMetaProperty; +exports.assertClassMethod = assertClassMethod; +exports.assertObjectPattern = assertObjectPattern; +exports.assertSpreadElement = assertSpreadElement; +exports.assertSuper = assertSuper; +exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression; +exports.assertTemplateElement = assertTemplateElement; +exports.assertTemplateLiteral = assertTemplateLiteral; +exports.assertYieldExpression = assertYieldExpression; +exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation; +exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation; +exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; +exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; +exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; +exports.assertClassImplements = assertClassImplements; +exports.assertDeclareClass = assertDeclareClass; +exports.assertDeclareFunction = assertDeclareFunction; +exports.assertDeclareInterface = assertDeclareInterface; +exports.assertDeclareModule = assertDeclareModule; +exports.assertDeclareModuleExports = assertDeclareModuleExports; +exports.assertDeclareTypeAlias = assertDeclareTypeAlias; +exports.assertDeclareOpaqueType = assertDeclareOpaqueType; +exports.assertDeclareVariable = assertDeclareVariable; +exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration; +exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; +exports.assertDeclaredPredicate = assertDeclaredPredicate; +exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation; +exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; +exports.assertFunctionTypeParam = assertFunctionTypeParam; +exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation; +exports.assertInferredPredicate = assertInferredPredicate; +exports.assertInterfaceExtends = assertInterfaceExtends; +exports.assertInterfaceDeclaration = assertInterfaceDeclaration; +exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; +exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; +exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation; +exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; +exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation; +exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; +exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation; +exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation; +exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; +exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty; +exports.assertObjectTypeIndexer = assertObjectTypeIndexer; +exports.assertObjectTypeProperty = assertObjectTypeProperty; +exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; +exports.assertOpaqueType = assertOpaqueType; +exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; +exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; +exports.assertStringTypeAnnotation = assertStringTypeAnnotation; +exports.assertThisTypeAnnotation = assertThisTypeAnnotation; +exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation; +exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; +exports.assertTypeAlias = assertTypeAlias; +exports.assertTypeAnnotation = assertTypeAnnotation; +exports.assertTypeCastExpression = assertTypeCastExpression; +exports.assertTypeParameter = assertTypeParameter; +exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration; +exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation; +exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation; +exports.assertVariance = assertVariance; +exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation; +exports.assertJSXAttribute = assertJSXAttribute; +exports.assertJSXClosingElement = assertJSXClosingElement; +exports.assertJSXElement = assertJSXElement; +exports.assertJSXEmptyExpression = assertJSXEmptyExpression; +exports.assertJSXExpressionContainer = assertJSXExpressionContainer; +exports.assertJSXSpreadChild = assertJSXSpreadChild; +exports.assertJSXIdentifier = assertJSXIdentifier; +exports.assertJSXMemberExpression = assertJSXMemberExpression; +exports.assertJSXNamespacedName = assertJSXNamespacedName; +exports.assertJSXOpeningElement = assertJSXOpeningElement; +exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute; +exports.assertJSXText = assertJSXText; +exports.assertJSXFragment = assertJSXFragment; +exports.assertJSXOpeningFragment = assertJSXOpeningFragment; +exports.assertJSXClosingFragment = assertJSXClosingFragment; +exports.assertNoop = assertNoop; +exports.assertPlaceholder = assertPlaceholder; +exports.assertArgumentPlaceholder = assertArgumentPlaceholder; +exports.assertAwaitExpression = assertAwaitExpression; +exports.assertBindExpression = assertBindExpression; +exports.assertClassProperty = assertClassProperty; +exports.assertOptionalMemberExpression = assertOptionalMemberExpression; +exports.assertPipelineTopicExpression = assertPipelineTopicExpression; +exports.assertPipelineBareFunction = assertPipelineBareFunction; +exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; +exports.assertOptionalCallExpression = assertOptionalCallExpression; +exports.assertClassPrivateProperty = assertClassPrivateProperty; +exports.assertClassPrivateMethod = assertClassPrivateMethod; +exports.assertImport = assertImport; +exports.assertDecorator = assertDecorator; +exports.assertDoExpression = assertDoExpression; +exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier; +exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; +exports.assertPrivateName = assertPrivateName; +exports.assertBigIntLiteral = assertBigIntLiteral; +exports.assertTSParameterProperty = assertTSParameterProperty; +exports.assertTSDeclareFunction = assertTSDeclareFunction; +exports.assertTSDeclareMethod = assertTSDeclareMethod; +exports.assertTSQualifiedName = assertTSQualifiedName; +exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; +exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; +exports.assertTSPropertySignature = assertTSPropertySignature; +exports.assertTSMethodSignature = assertTSMethodSignature; +exports.assertTSIndexSignature = assertTSIndexSignature; +exports.assertTSAnyKeyword = assertTSAnyKeyword; +exports.assertTSUnknownKeyword = assertTSUnknownKeyword; +exports.assertTSNumberKeyword = assertTSNumberKeyword; +exports.assertTSObjectKeyword = assertTSObjectKeyword; +exports.assertTSBooleanKeyword = assertTSBooleanKeyword; +exports.assertTSStringKeyword = assertTSStringKeyword; +exports.assertTSSymbolKeyword = assertTSSymbolKeyword; +exports.assertTSVoidKeyword = assertTSVoidKeyword; +exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword; +exports.assertTSNullKeyword = assertTSNullKeyword; +exports.assertTSNeverKeyword = assertTSNeverKeyword; +exports.assertTSThisType = assertTSThisType; +exports.assertTSFunctionType = assertTSFunctionType; +exports.assertTSConstructorType = assertTSConstructorType; +exports.assertTSTypeReference = assertTSTypeReference; +exports.assertTSTypePredicate = assertTSTypePredicate; +exports.assertTSTypeQuery = assertTSTypeQuery; +exports.assertTSTypeLiteral = assertTSTypeLiteral; +exports.assertTSArrayType = assertTSArrayType; +exports.assertTSTupleType = assertTSTupleType; +exports.assertTSOptionalType = assertTSOptionalType; +exports.assertTSRestType = assertTSRestType; +exports.assertTSUnionType = assertTSUnionType; +exports.assertTSIntersectionType = assertTSIntersectionType; +exports.assertTSConditionalType = assertTSConditionalType; +exports.assertTSInferType = assertTSInferType; +exports.assertTSParenthesizedType = assertTSParenthesizedType; +exports.assertTSTypeOperator = assertTSTypeOperator; +exports.assertTSIndexedAccessType = assertTSIndexedAccessType; +exports.assertTSMappedType = assertTSMappedType; +exports.assertTSLiteralType = assertTSLiteralType; +exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; +exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; +exports.assertTSInterfaceBody = assertTSInterfaceBody; +exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; +exports.assertTSAsExpression = assertTSAsExpression; +exports.assertTSTypeAssertion = assertTSTypeAssertion; +exports.assertTSEnumDeclaration = assertTSEnumDeclaration; +exports.assertTSEnumMember = assertTSEnumMember; +exports.assertTSModuleDeclaration = assertTSModuleDeclaration; +exports.assertTSModuleBlock = assertTSModuleBlock; +exports.assertTSImportType = assertTSImportType; +exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; +exports.assertTSExternalModuleReference = assertTSExternalModuleReference; +exports.assertTSNonNullExpression = assertTSNonNullExpression; +exports.assertTSExportAssignment = assertTSExportAssignment; +exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; +exports.assertTSTypeAnnotation = assertTSTypeAnnotation; +exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; +exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; +exports.assertTSTypeParameter = assertTSTypeParameter; +exports.assertExpression = assertExpression; +exports.assertBinary = assertBinary; +exports.assertScopable = assertScopable; +exports.assertBlockParent = assertBlockParent; +exports.assertBlock = assertBlock; +exports.assertStatement = assertStatement; +exports.assertTerminatorless = assertTerminatorless; +exports.assertCompletionStatement = assertCompletionStatement; +exports.assertConditional = assertConditional; +exports.assertLoop = assertLoop; +exports.assertWhile = assertWhile; +exports.assertExpressionWrapper = assertExpressionWrapper; +exports.assertFor = assertFor; +exports.assertForXStatement = assertForXStatement; +exports.assertFunction = assertFunction; +exports.assertFunctionParent = assertFunctionParent; +exports.assertPureish = assertPureish; +exports.assertDeclaration = assertDeclaration; +exports.assertPatternLike = assertPatternLike; +exports.assertLVal = assertLVal; +exports.assertTSEntityName = assertTSEntityName; +exports.assertLiteral = assertLiteral; +exports.assertImmutable = assertImmutable; +exports.assertUserWhitespacable = assertUserWhitespacable; +exports.assertMethod = assertMethod; +exports.assertObjectMember = assertObjectMember; +exports.assertProperty = assertProperty; +exports.assertUnaryLike = assertUnaryLike; +exports.assertPattern = assertPattern; +exports.assertClass = assertClass; +exports.assertModuleDeclaration = assertModuleDeclaration; +exports.assertExportDeclaration = assertExportDeclaration; +exports.assertModuleSpecifier = assertModuleSpecifier; +exports.assertFlow = assertFlow; +exports.assertFlowType = assertFlowType; +exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation; +exports.assertFlowDeclaration = assertFlowDeclaration; +exports.assertFlowPredicate = assertFlowPredicate; +exports.assertJSX = assertJSX; +exports.assertPrivate = assertPrivate; +exports.assertTSTypeElement = assertTSTypeElement; +exports.assertTSType = assertTSType; +exports.assertNumberLiteral = assertNumberLiteral; +exports.assertRegexLiteral = assertRegexLiteral; +exports.assertRestProperty = assertRestProperty; +exports.assertSpreadProperty = assertSpreadProperty; + +var _is = _interopRequireDefault(require("../../validators/is")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function assert(type, node, opts) { + if (!(0, _is.default)(type, node, opts)) { + throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`); + } +} + +function assertArrayExpression(node, opts = {}) { + assert("ArrayExpression", node, opts); +} + +function assertAssignmentExpression(node, opts = {}) { + assert("AssignmentExpression", node, opts); +} + +function assertBinaryExpression(node, opts = {}) { + assert("BinaryExpression", node, opts); +} + +function assertInterpreterDirective(node, opts = {}) { + assert("InterpreterDirective", node, opts); +} + +function assertDirective(node, opts = {}) { + assert("Directive", node, opts); +} + +function assertDirectiveLiteral(node, opts = {}) { + assert("DirectiveLiteral", node, opts); +} + +function assertBlockStatement(node, opts = {}) { + assert("BlockStatement", node, opts); +} + +function assertBreakStatement(node, opts = {}) { + assert("BreakStatement", node, opts); +} + +function assertCallExpression(node, opts = {}) { + assert("CallExpression", node, opts); +} + +function assertCatchClause(node, opts = {}) { + assert("CatchClause", node, opts); +} + +function assertConditionalExpression(node, opts = {}) { + assert("ConditionalExpression", node, opts); +} + +function assertContinueStatement(node, opts = {}) { + assert("ContinueStatement", node, opts); +} + +function assertDebuggerStatement(node, opts = {}) { + assert("DebuggerStatement", node, opts); +} + +function assertDoWhileStatement(node, opts = {}) { + assert("DoWhileStatement", node, opts); +} + +function assertEmptyStatement(node, opts = {}) { + assert("EmptyStatement", node, opts); +} + +function assertExpressionStatement(node, opts = {}) { + assert("ExpressionStatement", node, opts); +} + +function assertFile(node, opts = {}) { + assert("File", node, opts); +} + +function assertForInStatement(node, opts = {}) { + assert("ForInStatement", node, opts); +} + +function assertForStatement(node, opts = {}) { + assert("ForStatement", node, opts); +} + +function assertFunctionDeclaration(node, opts = {}) { + assert("FunctionDeclaration", node, opts); +} + +function assertFunctionExpression(node, opts = {}) { + assert("FunctionExpression", node, opts); +} + +function assertIdentifier(node, opts = {}) { + assert("Identifier", node, opts); +} + +function assertIfStatement(node, opts = {}) { + assert("IfStatement", node, opts); +} + +function assertLabeledStatement(node, opts = {}) { + assert("LabeledStatement", node, opts); +} + +function assertStringLiteral(node, opts = {}) { + assert("StringLiteral", node, opts); +} + +function assertNumericLiteral(node, opts = {}) { + assert("NumericLiteral", node, opts); +} + +function assertNullLiteral(node, opts = {}) { + assert("NullLiteral", node, opts); +} + +function assertBooleanLiteral(node, opts = {}) { + assert("BooleanLiteral", node, opts); +} + +function assertRegExpLiteral(node, opts = {}) { + assert("RegExpLiteral", node, opts); +} + +function assertLogicalExpression(node, opts = {}) { + assert("LogicalExpression", node, opts); +} + +function assertMemberExpression(node, opts = {}) { + assert("MemberExpression", node, opts); +} + +function assertNewExpression(node, opts = {}) { + assert("NewExpression", node, opts); +} + +function assertProgram(node, opts = {}) { + assert("Program", node, opts); +} + +function assertObjectExpression(node, opts = {}) { + assert("ObjectExpression", node, opts); +} + +function assertObjectMethod(node, opts = {}) { + assert("ObjectMethod", node, opts); +} + +function assertObjectProperty(node, opts = {}) { + assert("ObjectProperty", node, opts); +} + +function assertRestElement(node, opts = {}) { + assert("RestElement", node, opts); +} + +function assertReturnStatement(node, opts = {}) { + assert("ReturnStatement", node, opts); +} + +function assertSequenceExpression(node, opts = {}) { + assert("SequenceExpression", node, opts); +} + +function assertParenthesizedExpression(node, opts = {}) { + assert("ParenthesizedExpression", node, opts); +} + +function assertSwitchCase(node, opts = {}) { + assert("SwitchCase", node, opts); +} + +function assertSwitchStatement(node, opts = {}) { + assert("SwitchStatement", node, opts); +} + +function assertThisExpression(node, opts = {}) { + assert("ThisExpression", node, opts); +} + +function assertThrowStatement(node, opts = {}) { + assert("ThrowStatement", node, opts); +} + +function assertTryStatement(node, opts = {}) { + assert("TryStatement", node, opts); +} + +function assertUnaryExpression(node, opts = {}) { + assert("UnaryExpression", node, opts); +} + +function assertUpdateExpression(node, opts = {}) { + assert("UpdateExpression", node, opts); +} + +function assertVariableDeclaration(node, opts = {}) { + assert("VariableDeclaration", node, opts); +} + +function assertVariableDeclarator(node, opts = {}) { + assert("VariableDeclarator", node, opts); +} + +function assertWhileStatement(node, opts = {}) { + assert("WhileStatement", node, opts); +} + +function assertWithStatement(node, opts = {}) { + assert("WithStatement", node, opts); +} + +function assertAssignmentPattern(node, opts = {}) { + assert("AssignmentPattern", node, opts); +} + +function assertArrayPattern(node, opts = {}) { + assert("ArrayPattern", node, opts); +} + +function assertArrowFunctionExpression(node, opts = {}) { + assert("ArrowFunctionExpression", node, opts); +} + +function assertClassBody(node, opts = {}) { + assert("ClassBody", node, opts); +} + +function assertClassDeclaration(node, opts = {}) { + assert("ClassDeclaration", node, opts); +} + +function assertClassExpression(node, opts = {}) { + assert("ClassExpression", node, opts); +} + +function assertExportAllDeclaration(node, opts = {}) { + assert("ExportAllDeclaration", node, opts); +} + +function assertExportDefaultDeclaration(node, opts = {}) { + assert("ExportDefaultDeclaration", node, opts); +} + +function assertExportNamedDeclaration(node, opts = {}) { + assert("ExportNamedDeclaration", node, opts); +} + +function assertExportSpecifier(node, opts = {}) { + assert("ExportSpecifier", node, opts); +} + +function assertForOfStatement(node, opts = {}) { + assert("ForOfStatement", node, opts); +} + +function assertImportDeclaration(node, opts = {}) { + assert("ImportDeclaration", node, opts); +} + +function assertImportDefaultSpecifier(node, opts = {}) { + assert("ImportDefaultSpecifier", node, opts); +} + +function assertImportNamespaceSpecifier(node, opts = {}) { + assert("ImportNamespaceSpecifier", node, opts); +} + +function assertImportSpecifier(node, opts = {}) { + assert("ImportSpecifier", node, opts); +} + +function assertMetaProperty(node, opts = {}) { + assert("MetaProperty", node, opts); +} + +function assertClassMethod(node, opts = {}) { + assert("ClassMethod", node, opts); +} + +function assertObjectPattern(node, opts = {}) { + assert("ObjectPattern", node, opts); +} + +function assertSpreadElement(node, opts = {}) { + assert("SpreadElement", node, opts); +} + +function assertSuper(node, opts = {}) { + assert("Super", node, opts); +} + +function assertTaggedTemplateExpression(node, opts = {}) { + assert("TaggedTemplateExpression", node, opts); +} + +function assertTemplateElement(node, opts = {}) { + assert("TemplateElement", node, opts); +} + +function assertTemplateLiteral(node, opts = {}) { + assert("TemplateLiteral", node, opts); +} + +function assertYieldExpression(node, opts = {}) { + assert("YieldExpression", node, opts); +} + +function assertAnyTypeAnnotation(node, opts = {}) { + assert("AnyTypeAnnotation", node, opts); +} + +function assertArrayTypeAnnotation(node, opts = {}) { + assert("ArrayTypeAnnotation", node, opts); +} + +function assertBooleanTypeAnnotation(node, opts = {}) { + assert("BooleanTypeAnnotation", node, opts); +} + +function assertBooleanLiteralTypeAnnotation(node, opts = {}) { + assert("BooleanLiteralTypeAnnotation", node, opts); +} + +function assertNullLiteralTypeAnnotation(node, opts = {}) { + assert("NullLiteralTypeAnnotation", node, opts); +} + +function assertClassImplements(node, opts = {}) { + assert("ClassImplements", node, opts); +} + +function assertDeclareClass(node, opts = {}) { + assert("DeclareClass", node, opts); +} + +function assertDeclareFunction(node, opts = {}) { + assert("DeclareFunction", node, opts); +} + +function assertDeclareInterface(node, opts = {}) { + assert("DeclareInterface", node, opts); +} + +function assertDeclareModule(node, opts = {}) { + assert("DeclareModule", node, opts); +} + +function assertDeclareModuleExports(node, opts = {}) { + assert("DeclareModuleExports", node, opts); +} + +function assertDeclareTypeAlias(node, opts = {}) { + assert("DeclareTypeAlias", node, opts); +} + +function assertDeclareOpaqueType(node, opts = {}) { + assert("DeclareOpaqueType", node, opts); +} + +function assertDeclareVariable(node, opts = {}) { + assert("DeclareVariable", node, opts); +} + +function assertDeclareExportDeclaration(node, opts = {}) { + assert("DeclareExportDeclaration", node, opts); +} + +function assertDeclareExportAllDeclaration(node, opts = {}) { + assert("DeclareExportAllDeclaration", node, opts); +} + +function assertDeclaredPredicate(node, opts = {}) { + assert("DeclaredPredicate", node, opts); +} + +function assertExistsTypeAnnotation(node, opts = {}) { + assert("ExistsTypeAnnotation", node, opts); +} + +function assertFunctionTypeAnnotation(node, opts = {}) { + assert("FunctionTypeAnnotation", node, opts); +} + +function assertFunctionTypeParam(node, opts = {}) { + assert("FunctionTypeParam", node, opts); +} + +function assertGenericTypeAnnotation(node, opts = {}) { + assert("GenericTypeAnnotation", node, opts); +} + +function assertInferredPredicate(node, opts = {}) { + assert("InferredPredicate", node, opts); +} + +function assertInterfaceExtends(node, opts = {}) { + assert("InterfaceExtends", node, opts); +} + +function assertInterfaceDeclaration(node, opts = {}) { + assert("InterfaceDeclaration", node, opts); +} + +function assertInterfaceTypeAnnotation(node, opts = {}) { + assert("InterfaceTypeAnnotation", node, opts); +} + +function assertIntersectionTypeAnnotation(node, opts = {}) { + assert("IntersectionTypeAnnotation", node, opts); +} + +function assertMixedTypeAnnotation(node, opts = {}) { + assert("MixedTypeAnnotation", node, opts); +} + +function assertEmptyTypeAnnotation(node, opts = {}) { + assert("EmptyTypeAnnotation", node, opts); +} + +function assertNullableTypeAnnotation(node, opts = {}) { + assert("NullableTypeAnnotation", node, opts); +} + +function assertNumberLiteralTypeAnnotation(node, opts = {}) { + assert("NumberLiteralTypeAnnotation", node, opts); +} + +function assertNumberTypeAnnotation(node, opts = {}) { + assert("NumberTypeAnnotation", node, opts); +} + +function assertObjectTypeAnnotation(node, opts = {}) { + assert("ObjectTypeAnnotation", node, opts); +} + +function assertObjectTypeInternalSlot(node, opts = {}) { + assert("ObjectTypeInternalSlot", node, opts); +} + +function assertObjectTypeCallProperty(node, opts = {}) { + assert("ObjectTypeCallProperty", node, opts); +} + +function assertObjectTypeIndexer(node, opts = {}) { + assert("ObjectTypeIndexer", node, opts); +} + +function assertObjectTypeProperty(node, opts = {}) { + assert("ObjectTypeProperty", node, opts); +} + +function assertObjectTypeSpreadProperty(node, opts = {}) { + assert("ObjectTypeSpreadProperty", node, opts); +} + +function assertOpaqueType(node, opts = {}) { + assert("OpaqueType", node, opts); +} + +function assertQualifiedTypeIdentifier(node, opts = {}) { + assert("QualifiedTypeIdentifier", node, opts); +} + +function assertStringLiteralTypeAnnotation(node, opts = {}) { + assert("StringLiteralTypeAnnotation", node, opts); +} + +function assertStringTypeAnnotation(node, opts = {}) { + assert("StringTypeAnnotation", node, opts); +} + +function assertThisTypeAnnotation(node, opts = {}) { + assert("ThisTypeAnnotation", node, opts); +} + +function assertTupleTypeAnnotation(node, opts = {}) { + assert("TupleTypeAnnotation", node, opts); +} + +function assertTypeofTypeAnnotation(node, opts = {}) { + assert("TypeofTypeAnnotation", node, opts); +} + +function assertTypeAlias(node, opts = {}) { + assert("TypeAlias", node, opts); +} + +function assertTypeAnnotation(node, opts = {}) { + assert("TypeAnnotation", node, opts); +} + +function assertTypeCastExpression(node, opts = {}) { + assert("TypeCastExpression", node, opts); +} + +function assertTypeParameter(node, opts = {}) { + assert("TypeParameter", node, opts); +} + +function assertTypeParameterDeclaration(node, opts = {}) { + assert("TypeParameterDeclaration", node, opts); +} + +function assertTypeParameterInstantiation(node, opts = {}) { + assert("TypeParameterInstantiation", node, opts); +} + +function assertUnionTypeAnnotation(node, opts = {}) { + assert("UnionTypeAnnotation", node, opts); +} + +function assertVariance(node, opts = {}) { + assert("Variance", node, opts); +} + +function assertVoidTypeAnnotation(node, opts = {}) { + assert("VoidTypeAnnotation", node, opts); +} + +function assertJSXAttribute(node, opts = {}) { + assert("JSXAttribute", node, opts); +} + +function assertJSXClosingElement(node, opts = {}) { + assert("JSXClosingElement", node, opts); +} + +function assertJSXElement(node, opts = {}) { + assert("JSXElement", node, opts); +} + +function assertJSXEmptyExpression(node, opts = {}) { + assert("JSXEmptyExpression", node, opts); +} + +function assertJSXExpressionContainer(node, opts = {}) { + assert("JSXExpressionContainer", node, opts); +} + +function assertJSXSpreadChild(node, opts = {}) { + assert("JSXSpreadChild", node, opts); +} + +function assertJSXIdentifier(node, opts = {}) { + assert("JSXIdentifier", node, opts); +} + +function assertJSXMemberExpression(node, opts = {}) { + assert("JSXMemberExpression", node, opts); +} + +function assertJSXNamespacedName(node, opts = {}) { + assert("JSXNamespacedName", node, opts); +} + +function assertJSXOpeningElement(node, opts = {}) { + assert("JSXOpeningElement", node, opts); +} + +function assertJSXSpreadAttribute(node, opts = {}) { + assert("JSXSpreadAttribute", node, opts); +} + +function assertJSXText(node, opts = {}) { + assert("JSXText", node, opts); +} + +function assertJSXFragment(node, opts = {}) { + assert("JSXFragment", node, opts); +} + +function assertJSXOpeningFragment(node, opts = {}) { + assert("JSXOpeningFragment", node, opts); +} + +function assertJSXClosingFragment(node, opts = {}) { + assert("JSXClosingFragment", node, opts); +} + +function assertNoop(node, opts = {}) { + assert("Noop", node, opts); +} + +function assertPlaceholder(node, opts = {}) { + assert("Placeholder", node, opts); +} + +function assertArgumentPlaceholder(node, opts = {}) { + assert("ArgumentPlaceholder", node, opts); +} + +function assertAwaitExpression(node, opts = {}) { + assert("AwaitExpression", node, opts); +} + +function assertBindExpression(node, opts = {}) { + assert("BindExpression", node, opts); +} + +function assertClassProperty(node, opts = {}) { + assert("ClassProperty", node, opts); +} + +function assertOptionalMemberExpression(node, opts = {}) { + assert("OptionalMemberExpression", node, opts); +} + +function assertPipelineTopicExpression(node, opts = {}) { + assert("PipelineTopicExpression", node, opts); +} + +function assertPipelineBareFunction(node, opts = {}) { + assert("PipelineBareFunction", node, opts); +} + +function assertPipelinePrimaryTopicReference(node, opts = {}) { + assert("PipelinePrimaryTopicReference", node, opts); +} + +function assertOptionalCallExpression(node, opts = {}) { + assert("OptionalCallExpression", node, opts); +} + +function assertClassPrivateProperty(node, opts = {}) { + assert("ClassPrivateProperty", node, opts); +} + +function assertClassPrivateMethod(node, opts = {}) { + assert("ClassPrivateMethod", node, opts); +} + +function assertImport(node, opts = {}) { + assert("Import", node, opts); +} + +function assertDecorator(node, opts = {}) { + assert("Decorator", node, opts); +} + +function assertDoExpression(node, opts = {}) { + assert("DoExpression", node, opts); +} + +function assertExportDefaultSpecifier(node, opts = {}) { + assert("ExportDefaultSpecifier", node, opts); +} + +function assertExportNamespaceSpecifier(node, opts = {}) { + assert("ExportNamespaceSpecifier", node, opts); +} + +function assertPrivateName(node, opts = {}) { + assert("PrivateName", node, opts); +} + +function assertBigIntLiteral(node, opts = {}) { + assert("BigIntLiteral", node, opts); +} + +function assertTSParameterProperty(node, opts = {}) { + assert("TSParameterProperty", node, opts); +} + +function assertTSDeclareFunction(node, opts = {}) { + assert("TSDeclareFunction", node, opts); +} + +function assertTSDeclareMethod(node, opts = {}) { + assert("TSDeclareMethod", node, opts); +} + +function assertTSQualifiedName(node, opts = {}) { + assert("TSQualifiedName", node, opts); +} + +function assertTSCallSignatureDeclaration(node, opts = {}) { + assert("TSCallSignatureDeclaration", node, opts); +} + +function assertTSConstructSignatureDeclaration(node, opts = {}) { + assert("TSConstructSignatureDeclaration", node, opts); +} + +function assertTSPropertySignature(node, opts = {}) { + assert("TSPropertySignature", node, opts); +} + +function assertTSMethodSignature(node, opts = {}) { + assert("TSMethodSignature", node, opts); +} + +function assertTSIndexSignature(node, opts = {}) { + assert("TSIndexSignature", node, opts); +} + +function assertTSAnyKeyword(node, opts = {}) { + assert("TSAnyKeyword", node, opts); +} + +function assertTSUnknownKeyword(node, opts = {}) { + assert("TSUnknownKeyword", node, opts); +} + +function assertTSNumberKeyword(node, opts = {}) { + assert("TSNumberKeyword", node, opts); +} + +function assertTSObjectKeyword(node, opts = {}) { + assert("TSObjectKeyword", node, opts); +} + +function assertTSBooleanKeyword(node, opts = {}) { + assert("TSBooleanKeyword", node, opts); +} + +function assertTSStringKeyword(node, opts = {}) { + assert("TSStringKeyword", node, opts); +} + +function assertTSSymbolKeyword(node, opts = {}) { + assert("TSSymbolKeyword", node, opts); +} + +function assertTSVoidKeyword(node, opts = {}) { + assert("TSVoidKeyword", node, opts); +} + +function assertTSUndefinedKeyword(node, opts = {}) { + assert("TSUndefinedKeyword", node, opts); +} + +function assertTSNullKeyword(node, opts = {}) { + assert("TSNullKeyword", node, opts); +} + +function assertTSNeverKeyword(node, opts = {}) { + assert("TSNeverKeyword", node, opts); +} + +function assertTSThisType(node, opts = {}) { + assert("TSThisType", node, opts); +} + +function assertTSFunctionType(node, opts = {}) { + assert("TSFunctionType", node, opts); +} + +function assertTSConstructorType(node, opts = {}) { + assert("TSConstructorType", node, opts); +} + +function assertTSTypeReference(node, opts = {}) { + assert("TSTypeReference", node, opts); +} + +function assertTSTypePredicate(node, opts = {}) { + assert("TSTypePredicate", node, opts); +} + +function assertTSTypeQuery(node, opts = {}) { + assert("TSTypeQuery", node, opts); +} + +function assertTSTypeLiteral(node, opts = {}) { + assert("TSTypeLiteral", node, opts); +} + +function assertTSArrayType(node, opts = {}) { + assert("TSArrayType", node, opts); +} + +function assertTSTupleType(node, opts = {}) { + assert("TSTupleType", node, opts); +} + +function assertTSOptionalType(node, opts = {}) { + assert("TSOptionalType", node, opts); +} + +function assertTSRestType(node, opts = {}) { + assert("TSRestType", node, opts); +} + +function assertTSUnionType(node, opts = {}) { + assert("TSUnionType", node, opts); +} + +function assertTSIntersectionType(node, opts = {}) { + assert("TSIntersectionType", node, opts); +} + +function assertTSConditionalType(node, opts = {}) { + assert("TSConditionalType", node, opts); +} + +function assertTSInferType(node, opts = {}) { + assert("TSInferType", node, opts); +} + +function assertTSParenthesizedType(node, opts = {}) { + assert("TSParenthesizedType", node, opts); +} + +function assertTSTypeOperator(node, opts = {}) { + assert("TSTypeOperator", node, opts); +} + +function assertTSIndexedAccessType(node, opts = {}) { + assert("TSIndexedAccessType", node, opts); +} + +function assertTSMappedType(node, opts = {}) { + assert("TSMappedType", node, opts); +} + +function assertTSLiteralType(node, opts = {}) { + assert("TSLiteralType", node, opts); +} + +function assertTSExpressionWithTypeArguments(node, opts = {}) { + assert("TSExpressionWithTypeArguments", node, opts); +} + +function assertTSInterfaceDeclaration(node, opts = {}) { + assert("TSInterfaceDeclaration", node, opts); +} + +function assertTSInterfaceBody(node, opts = {}) { + assert("TSInterfaceBody", node, opts); +} + +function assertTSTypeAliasDeclaration(node, opts = {}) { + assert("TSTypeAliasDeclaration", node, opts); +} + +function assertTSAsExpression(node, opts = {}) { + assert("TSAsExpression", node, opts); +} + +function assertTSTypeAssertion(node, opts = {}) { + assert("TSTypeAssertion", node, opts); +} + +function assertTSEnumDeclaration(node, opts = {}) { + assert("TSEnumDeclaration", node, opts); +} + +function assertTSEnumMember(node, opts = {}) { + assert("TSEnumMember", node, opts); +} + +function assertTSModuleDeclaration(node, opts = {}) { + assert("TSModuleDeclaration", node, opts); +} + +function assertTSModuleBlock(node, opts = {}) { + assert("TSModuleBlock", node, opts); +} + +function assertTSImportType(node, opts = {}) { + assert("TSImportType", node, opts); +} + +function assertTSImportEqualsDeclaration(node, opts = {}) { + assert("TSImportEqualsDeclaration", node, opts); +} + +function assertTSExternalModuleReference(node, opts = {}) { + assert("TSExternalModuleReference", node, opts); +} + +function assertTSNonNullExpression(node, opts = {}) { + assert("TSNonNullExpression", node, opts); +} + +function assertTSExportAssignment(node, opts = {}) { + assert("TSExportAssignment", node, opts); +} + +function assertTSNamespaceExportDeclaration(node, opts = {}) { + assert("TSNamespaceExportDeclaration", node, opts); +} + +function assertTSTypeAnnotation(node, opts = {}) { + assert("TSTypeAnnotation", node, opts); +} + +function assertTSTypeParameterInstantiation(node, opts = {}) { + assert("TSTypeParameterInstantiation", node, opts); +} + +function assertTSTypeParameterDeclaration(node, opts = {}) { + assert("TSTypeParameterDeclaration", node, opts); +} + +function assertTSTypeParameter(node, opts = {}) { + assert("TSTypeParameter", node, opts); +} + +function assertExpression(node, opts = {}) { + assert("Expression", node, opts); +} + +function assertBinary(node, opts = {}) { + assert("Binary", node, opts); +} + +function assertScopable(node, opts = {}) { + assert("Scopable", node, opts); +} + +function assertBlockParent(node, opts = {}) { + assert("BlockParent", node, opts); +} + +function assertBlock(node, opts = {}) { + assert("Block", node, opts); +} + +function assertStatement(node, opts = {}) { + assert("Statement", node, opts); +} + +function assertTerminatorless(node, opts = {}) { + assert("Terminatorless", node, opts); +} + +function assertCompletionStatement(node, opts = {}) { + assert("CompletionStatement", node, opts); +} + +function assertConditional(node, opts = {}) { + assert("Conditional", node, opts); +} + +function assertLoop(node, opts = {}) { + assert("Loop", node, opts); +} + +function assertWhile(node, opts = {}) { + assert("While", node, opts); +} + +function assertExpressionWrapper(node, opts = {}) { + assert("ExpressionWrapper", node, opts); +} + +function assertFor(node, opts = {}) { + assert("For", node, opts); +} + +function assertForXStatement(node, opts = {}) { + assert("ForXStatement", node, opts); +} + +function assertFunction(node, opts = {}) { + assert("Function", node, opts); +} + +function assertFunctionParent(node, opts = {}) { + assert("FunctionParent", node, opts); +} + +function assertPureish(node, opts = {}) { + assert("Pureish", node, opts); +} + +function assertDeclaration(node, opts = {}) { + assert("Declaration", node, opts); +} + +function assertPatternLike(node, opts = {}) { + assert("PatternLike", node, opts); +} + +function assertLVal(node, opts = {}) { + assert("LVal", node, opts); +} + +function assertTSEntityName(node, opts = {}) { + assert("TSEntityName", node, opts); +} + +function assertLiteral(node, opts = {}) { + assert("Literal", node, opts); +} + +function assertImmutable(node, opts = {}) { + assert("Immutable", node, opts); +} + +function assertUserWhitespacable(node, opts = {}) { + assert("UserWhitespacable", node, opts); +} + +function assertMethod(node, opts = {}) { + assert("Method", node, opts); +} + +function assertObjectMember(node, opts = {}) { + assert("ObjectMember", node, opts); +} + +function assertProperty(node, opts = {}) { + assert("Property", node, opts); +} + +function assertUnaryLike(node, opts = {}) { + assert("UnaryLike", node, opts); +} + +function assertPattern(node, opts = {}) { + assert("Pattern", node, opts); +} + +function assertClass(node, opts = {}) { + assert("Class", node, opts); +} + +function assertModuleDeclaration(node, opts = {}) { + assert("ModuleDeclaration", node, opts); +} + +function assertExportDeclaration(node, opts = {}) { + assert("ExportDeclaration", node, opts); +} + +function assertModuleSpecifier(node, opts = {}) { + assert("ModuleSpecifier", node, opts); +} + +function assertFlow(node, opts = {}) { + assert("Flow", node, opts); +} + +function assertFlowType(node, opts = {}) { + assert("FlowType", node, opts); +} + +function assertFlowBaseAnnotation(node, opts = {}) { + assert("FlowBaseAnnotation", node, opts); +} + +function assertFlowDeclaration(node, opts = {}) { + assert("FlowDeclaration", node, opts); +} + +function assertFlowPredicate(node, opts = {}) { + assert("FlowPredicate", node, opts); +} + +function assertJSX(node, opts = {}) { + assert("JSX", node, opts); +} + +function assertPrivate(node, opts = {}) { + assert("Private", node, opts); +} + +function assertTSTypeElement(node, opts = {}) { + assert("TSTypeElement", node, opts); +} + +function assertTSType(node, opts = {}) { + assert("TSType", node, opts); +} + +function assertNumberLiteral(node, opts) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + assert("NumberLiteral", node, opts); +} + +function assertRegexLiteral(node, opts) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + assert("RegexLiteral", node, opts); +} + +function assertRestProperty(node, opts) { + console.trace("The node type RestProperty has been renamed to RestElement"); + assert("RestProperty", node, opts); +} + +function assertSpreadProperty(node, opts) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + assert("SpreadProperty", node, opts); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/builders/builder.js b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/builder.js new file mode 100644 index 0000000..b42fac2 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/builder.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = builder; + +function _clone() { + const data = _interopRequireDefault(require("lodash/clone")); + + _clone = function () { + return data; + }; + + return data; +} + +var _definitions = require("../definitions"); + +var _validate = _interopRequireDefault(require("../validators/validate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function builder(type, ...args) { + const keys = _definitions.BUILDER_KEYS[type]; + const countArgs = args.length; + + if (countArgs > keys.length) { + throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`); + } + + const node = { + type + }; + let i = 0; + keys.forEach(key => { + const field = _definitions.NODE_FIELDS[type][key]; + let arg; + if (i < countArgs) arg = args[i]; + if (arg === undefined) arg = (0, _clone().default)(field.default); + node[key] = arg; + i++; + }); + + for (const key of Object.keys(node)) { + (0, _validate.default)(node, key, node[key]); + } + + return node; +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js similarity index 100% rename from node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js diff --git a/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js similarity index 89% rename from node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js index e582d1d..df76b01 100644 --- a/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js @@ -12,7 +12,7 @@ var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function createUnionTypeAnnotation(types) { - var flattened = (0, _removeTypeDuplicates.default)(types); + const flattened = (0, _removeTypeDuplicates.default)(types); if (flattened.length === 1) { return flattened[0]; diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/builders/generated/index.js b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/generated/index.js new file mode 100644 index 0000000..06d0127 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/generated/index.js @@ -0,0 +1,1148 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.arrayExpression = exports.ArrayExpression = ArrayExpression; +exports.assignmentExpression = exports.AssignmentExpression = AssignmentExpression; +exports.binaryExpression = exports.BinaryExpression = BinaryExpression; +exports.interpreterDirective = exports.InterpreterDirective = InterpreterDirective; +exports.directive = exports.Directive = Directive; +exports.directiveLiteral = exports.DirectiveLiteral = DirectiveLiteral; +exports.blockStatement = exports.BlockStatement = BlockStatement; +exports.breakStatement = exports.BreakStatement = BreakStatement; +exports.callExpression = exports.CallExpression = CallExpression; +exports.catchClause = exports.CatchClause = CatchClause; +exports.conditionalExpression = exports.ConditionalExpression = ConditionalExpression; +exports.continueStatement = exports.ContinueStatement = ContinueStatement; +exports.debuggerStatement = exports.DebuggerStatement = DebuggerStatement; +exports.doWhileStatement = exports.DoWhileStatement = DoWhileStatement; +exports.emptyStatement = exports.EmptyStatement = EmptyStatement; +exports.expressionStatement = exports.ExpressionStatement = ExpressionStatement; +exports.file = exports.File = File; +exports.forInStatement = exports.ForInStatement = ForInStatement; +exports.forStatement = exports.ForStatement = ForStatement; +exports.functionDeclaration = exports.FunctionDeclaration = FunctionDeclaration; +exports.functionExpression = exports.FunctionExpression = FunctionExpression; +exports.identifier = exports.Identifier = Identifier; +exports.ifStatement = exports.IfStatement = IfStatement; +exports.labeledStatement = exports.LabeledStatement = LabeledStatement; +exports.stringLiteral = exports.StringLiteral = StringLiteral; +exports.numericLiteral = exports.NumericLiteral = NumericLiteral; +exports.nullLiteral = exports.NullLiteral = NullLiteral; +exports.booleanLiteral = exports.BooleanLiteral = BooleanLiteral; +exports.regExpLiteral = exports.RegExpLiteral = RegExpLiteral; +exports.logicalExpression = exports.LogicalExpression = LogicalExpression; +exports.memberExpression = exports.MemberExpression = MemberExpression; +exports.newExpression = exports.NewExpression = NewExpression; +exports.program = exports.Program = Program; +exports.objectExpression = exports.ObjectExpression = ObjectExpression; +exports.objectMethod = exports.ObjectMethod = ObjectMethod; +exports.objectProperty = exports.ObjectProperty = ObjectProperty; +exports.restElement = exports.RestElement = RestElement; +exports.returnStatement = exports.ReturnStatement = ReturnStatement; +exports.sequenceExpression = exports.SequenceExpression = SequenceExpression; +exports.parenthesizedExpression = exports.ParenthesizedExpression = ParenthesizedExpression; +exports.switchCase = exports.SwitchCase = SwitchCase; +exports.switchStatement = exports.SwitchStatement = SwitchStatement; +exports.thisExpression = exports.ThisExpression = ThisExpression; +exports.throwStatement = exports.ThrowStatement = ThrowStatement; +exports.tryStatement = exports.TryStatement = TryStatement; +exports.unaryExpression = exports.UnaryExpression = UnaryExpression; +exports.updateExpression = exports.UpdateExpression = UpdateExpression; +exports.variableDeclaration = exports.VariableDeclaration = VariableDeclaration; +exports.variableDeclarator = exports.VariableDeclarator = VariableDeclarator; +exports.whileStatement = exports.WhileStatement = WhileStatement; +exports.withStatement = exports.WithStatement = WithStatement; +exports.assignmentPattern = exports.AssignmentPattern = AssignmentPattern; +exports.arrayPattern = exports.ArrayPattern = ArrayPattern; +exports.arrowFunctionExpression = exports.ArrowFunctionExpression = ArrowFunctionExpression; +exports.classBody = exports.ClassBody = ClassBody; +exports.classDeclaration = exports.ClassDeclaration = ClassDeclaration; +exports.classExpression = exports.ClassExpression = ClassExpression; +exports.exportAllDeclaration = exports.ExportAllDeclaration = ExportAllDeclaration; +exports.exportDefaultDeclaration = exports.ExportDefaultDeclaration = ExportDefaultDeclaration; +exports.exportNamedDeclaration = exports.ExportNamedDeclaration = ExportNamedDeclaration; +exports.exportSpecifier = exports.ExportSpecifier = ExportSpecifier; +exports.forOfStatement = exports.ForOfStatement = ForOfStatement; +exports.importDeclaration = exports.ImportDeclaration = ImportDeclaration; +exports.importDefaultSpecifier = exports.ImportDefaultSpecifier = ImportDefaultSpecifier; +exports.importNamespaceSpecifier = exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; +exports.importSpecifier = exports.ImportSpecifier = ImportSpecifier; +exports.metaProperty = exports.MetaProperty = MetaProperty; +exports.classMethod = exports.ClassMethod = ClassMethod; +exports.objectPattern = exports.ObjectPattern = ObjectPattern; +exports.spreadElement = exports.SpreadElement = SpreadElement; +exports.super = exports.Super = Super; +exports.taggedTemplateExpression = exports.TaggedTemplateExpression = TaggedTemplateExpression; +exports.templateElement = exports.TemplateElement = TemplateElement; +exports.templateLiteral = exports.TemplateLiteral = TemplateLiteral; +exports.yieldExpression = exports.YieldExpression = YieldExpression; +exports.anyTypeAnnotation = exports.AnyTypeAnnotation = AnyTypeAnnotation; +exports.arrayTypeAnnotation = exports.ArrayTypeAnnotation = ArrayTypeAnnotation; +exports.booleanTypeAnnotation = exports.BooleanTypeAnnotation = BooleanTypeAnnotation; +exports.booleanLiteralTypeAnnotation = exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; +exports.nullLiteralTypeAnnotation = exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; +exports.classImplements = exports.ClassImplements = ClassImplements; +exports.declareClass = exports.DeclareClass = DeclareClass; +exports.declareFunction = exports.DeclareFunction = DeclareFunction; +exports.declareInterface = exports.DeclareInterface = DeclareInterface; +exports.declareModule = exports.DeclareModule = DeclareModule; +exports.declareModuleExports = exports.DeclareModuleExports = DeclareModuleExports; +exports.declareTypeAlias = exports.DeclareTypeAlias = DeclareTypeAlias; +exports.declareOpaqueType = exports.DeclareOpaqueType = DeclareOpaqueType; +exports.declareVariable = exports.DeclareVariable = DeclareVariable; +exports.declareExportDeclaration = exports.DeclareExportDeclaration = DeclareExportDeclaration; +exports.declareExportAllDeclaration = exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; +exports.declaredPredicate = exports.DeclaredPredicate = DeclaredPredicate; +exports.existsTypeAnnotation = exports.ExistsTypeAnnotation = ExistsTypeAnnotation; +exports.functionTypeAnnotation = exports.FunctionTypeAnnotation = FunctionTypeAnnotation; +exports.functionTypeParam = exports.FunctionTypeParam = FunctionTypeParam; +exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnotation; +exports.inferredPredicate = exports.InferredPredicate = InferredPredicate; +exports.interfaceExtends = exports.InterfaceExtends = InterfaceExtends; +exports.interfaceDeclaration = exports.InterfaceDeclaration = InterfaceDeclaration; +exports.interfaceTypeAnnotation = exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; +exports.intersectionTypeAnnotation = exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; +exports.mixedTypeAnnotation = exports.MixedTypeAnnotation = MixedTypeAnnotation; +exports.emptyTypeAnnotation = exports.EmptyTypeAnnotation = EmptyTypeAnnotation; +exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation; +exports.numberLiteralTypeAnnotation = exports.NumberLiteralTypeAnnotation = NumberLiteralTypeAnnotation; +exports.numberTypeAnnotation = exports.NumberTypeAnnotation = NumberTypeAnnotation; +exports.objectTypeAnnotation = exports.ObjectTypeAnnotation = ObjectTypeAnnotation; +exports.objectTypeInternalSlot = exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; +exports.objectTypeCallProperty = exports.ObjectTypeCallProperty = ObjectTypeCallProperty; +exports.objectTypeIndexer = exports.ObjectTypeIndexer = ObjectTypeIndexer; +exports.objectTypeProperty = exports.ObjectTypeProperty = ObjectTypeProperty; +exports.objectTypeSpreadProperty = exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; +exports.opaqueType = exports.OpaqueType = OpaqueType; +exports.qualifiedTypeIdentifier = exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; +exports.stringLiteralTypeAnnotation = exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation; +exports.stringTypeAnnotation = exports.StringTypeAnnotation = StringTypeAnnotation; +exports.thisTypeAnnotation = exports.ThisTypeAnnotation = ThisTypeAnnotation; +exports.tupleTypeAnnotation = exports.TupleTypeAnnotation = TupleTypeAnnotation; +exports.typeofTypeAnnotation = exports.TypeofTypeAnnotation = TypeofTypeAnnotation; +exports.typeAlias = exports.TypeAlias = TypeAlias; +exports.typeAnnotation = exports.TypeAnnotation = TypeAnnotation; +exports.typeCastExpression = exports.TypeCastExpression = TypeCastExpression; +exports.typeParameter = exports.TypeParameter = TypeParameter; +exports.typeParameterDeclaration = exports.TypeParameterDeclaration = TypeParameterDeclaration; +exports.typeParameterInstantiation = exports.TypeParameterInstantiation = TypeParameterInstantiation; +exports.unionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; +exports.variance = exports.Variance = Variance; +exports.voidTypeAnnotation = exports.VoidTypeAnnotation = VoidTypeAnnotation; +exports.jSXAttribute = exports.jsxAttribute = exports.JSXAttribute = JSXAttribute; +exports.jSXClosingElement = exports.jsxClosingElement = exports.JSXClosingElement = JSXClosingElement; +exports.jSXElement = exports.jsxElement = exports.JSXElement = JSXElement; +exports.jSXEmptyExpression = exports.jsxEmptyExpression = exports.JSXEmptyExpression = JSXEmptyExpression; +exports.jSXExpressionContainer = exports.jsxExpressionContainer = exports.JSXExpressionContainer = JSXExpressionContainer; +exports.jSXSpreadChild = exports.jsxSpreadChild = exports.JSXSpreadChild = JSXSpreadChild; +exports.jSXIdentifier = exports.jsxIdentifier = exports.JSXIdentifier = JSXIdentifier; +exports.jSXMemberExpression = exports.jsxMemberExpression = exports.JSXMemberExpression = JSXMemberExpression; +exports.jSXNamespacedName = exports.jsxNamespacedName = exports.JSXNamespacedName = JSXNamespacedName; +exports.jSXOpeningElement = exports.jsxOpeningElement = exports.JSXOpeningElement = JSXOpeningElement; +exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = exports.JSXSpreadAttribute = JSXSpreadAttribute; +exports.jSXText = exports.jsxText = exports.JSXText = JSXText; +exports.jSXFragment = exports.jsxFragment = exports.JSXFragment = JSXFragment; +exports.jSXOpeningFragment = exports.jsxOpeningFragment = exports.JSXOpeningFragment = JSXOpeningFragment; +exports.jSXClosingFragment = exports.jsxClosingFragment = exports.JSXClosingFragment = JSXClosingFragment; +exports.noop = exports.Noop = Noop; +exports.placeholder = exports.Placeholder = Placeholder; +exports.argumentPlaceholder = exports.ArgumentPlaceholder = ArgumentPlaceholder; +exports.awaitExpression = exports.AwaitExpression = AwaitExpression; +exports.bindExpression = exports.BindExpression = BindExpression; +exports.classProperty = exports.ClassProperty = ClassProperty; +exports.optionalMemberExpression = exports.OptionalMemberExpression = OptionalMemberExpression; +exports.pipelineTopicExpression = exports.PipelineTopicExpression = PipelineTopicExpression; +exports.pipelineBareFunction = exports.PipelineBareFunction = PipelineBareFunction; +exports.pipelinePrimaryTopicReference = exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; +exports.optionalCallExpression = exports.OptionalCallExpression = OptionalCallExpression; +exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty; +exports.classPrivateMethod = exports.ClassPrivateMethod = ClassPrivateMethod; +exports.import = exports.Import = Import; +exports.decorator = exports.Decorator = Decorator; +exports.doExpression = exports.DoExpression = DoExpression; +exports.exportDefaultSpecifier = exports.ExportDefaultSpecifier = ExportDefaultSpecifier; +exports.exportNamespaceSpecifier = exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; +exports.privateName = exports.PrivateName = PrivateName; +exports.bigIntLiteral = exports.BigIntLiteral = BigIntLiteral; +exports.tSParameterProperty = exports.tsParameterProperty = exports.TSParameterProperty = TSParameterProperty; +exports.tSDeclareFunction = exports.tsDeclareFunction = exports.TSDeclareFunction = TSDeclareFunction; +exports.tSDeclareMethod = exports.tsDeclareMethod = exports.TSDeclareMethod = TSDeclareMethod; +exports.tSQualifiedName = exports.tsQualifiedName = exports.TSQualifiedName = TSQualifiedName; +exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; +exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; +exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySignature = TSPropertySignature; +exports.tSMethodSignature = exports.tsMethodSignature = exports.TSMethodSignature = TSMethodSignature; +exports.tSIndexSignature = exports.tsIndexSignature = exports.TSIndexSignature = TSIndexSignature; +exports.tSAnyKeyword = exports.tsAnyKeyword = exports.TSAnyKeyword = TSAnyKeyword; +exports.tSUnknownKeyword = exports.tsUnknownKeyword = exports.TSUnknownKeyword = TSUnknownKeyword; +exports.tSNumberKeyword = exports.tsNumberKeyword = exports.TSNumberKeyword = TSNumberKeyword; +exports.tSObjectKeyword = exports.tsObjectKeyword = exports.TSObjectKeyword = TSObjectKeyword; +exports.tSBooleanKeyword = exports.tsBooleanKeyword = exports.TSBooleanKeyword = TSBooleanKeyword; +exports.tSStringKeyword = exports.tsStringKeyword = exports.TSStringKeyword = TSStringKeyword; +exports.tSSymbolKeyword = exports.tsSymbolKeyword = exports.TSSymbolKeyword = TSSymbolKeyword; +exports.tSVoidKeyword = exports.tsVoidKeyword = exports.TSVoidKeyword = TSVoidKeyword; +exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = exports.TSUndefinedKeyword = TSUndefinedKeyword; +exports.tSNullKeyword = exports.tsNullKeyword = exports.TSNullKeyword = TSNullKeyword; +exports.tSNeverKeyword = exports.tsNeverKeyword = exports.TSNeverKeyword = TSNeverKeyword; +exports.tSThisType = exports.tsThisType = exports.TSThisType = TSThisType; +exports.tSFunctionType = exports.tsFunctionType = exports.TSFunctionType = TSFunctionType; +exports.tSConstructorType = exports.tsConstructorType = exports.TSConstructorType = TSConstructorType; +exports.tSTypeReference = exports.tsTypeReference = exports.TSTypeReference = TSTypeReference; +exports.tSTypePredicate = exports.tsTypePredicate = exports.TSTypePredicate = TSTypePredicate; +exports.tSTypeQuery = exports.tsTypeQuery = exports.TSTypeQuery = TSTypeQuery; +exports.tSTypeLiteral = exports.tsTypeLiteral = exports.TSTypeLiteral = TSTypeLiteral; +exports.tSArrayType = exports.tsArrayType = exports.TSArrayType = TSArrayType; +exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType; +exports.tSOptionalType = exports.tsOptionalType = exports.TSOptionalType = TSOptionalType; +exports.tSRestType = exports.tsRestType = exports.TSRestType = TSRestType; +exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType; +exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType; +exports.tSConditionalType = exports.tsConditionalType = exports.TSConditionalType = TSConditionalType; +exports.tSInferType = exports.tsInferType = exports.TSInferType = TSInferType; +exports.tSParenthesizedType = exports.tsParenthesizedType = exports.TSParenthesizedType = TSParenthesizedType; +exports.tSTypeOperator = exports.tsTypeOperator = exports.TSTypeOperator = TSTypeOperator; +exports.tSIndexedAccessType = exports.tsIndexedAccessType = exports.TSIndexedAccessType = TSIndexedAccessType; +exports.tSMappedType = exports.tsMappedType = exports.TSMappedType = TSMappedType; +exports.tSLiteralType = exports.tsLiteralType = exports.TSLiteralType = TSLiteralType; +exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; +exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = exports.TSInterfaceDeclaration = TSInterfaceDeclaration; +exports.tSInterfaceBody = exports.tsInterfaceBody = exports.TSInterfaceBody = TSInterfaceBody; +exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; +exports.tSAsExpression = exports.tsAsExpression = exports.TSAsExpression = TSAsExpression; +exports.tSTypeAssertion = exports.tsTypeAssertion = exports.TSTypeAssertion = TSTypeAssertion; +exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaration = TSEnumDeclaration; +exports.tSEnumMember = exports.tsEnumMember = exports.TSEnumMember = TSEnumMember; +exports.tSModuleDeclaration = exports.tsModuleDeclaration = exports.TSModuleDeclaration = TSModuleDeclaration; +exports.tSModuleBlock = exports.tsModuleBlock = exports.TSModuleBlock = TSModuleBlock; +exports.tSImportType = exports.tsImportType = exports.TSImportType = TSImportType; +exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; +exports.tSExternalModuleReference = exports.tsExternalModuleReference = exports.TSExternalModuleReference = TSExternalModuleReference; +exports.tSNonNullExpression = exports.tsNonNullExpression = exports.TSNonNullExpression = TSNonNullExpression; +exports.tSExportAssignment = exports.tsExportAssignment = exports.TSExportAssignment = TSExportAssignment; +exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; +exports.tSTypeAnnotation = exports.tsTypeAnnotation = exports.TSTypeAnnotation = TSTypeAnnotation; +exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; +exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = exports.TSTypeParameterDeclaration = TSTypeParameterDeclaration; +exports.tSTypeParameter = exports.tsTypeParameter = exports.TSTypeParameter = TSTypeParameter; +exports.numberLiteral = exports.NumberLiteral = NumberLiteral; +exports.regexLiteral = exports.RegexLiteral = RegexLiteral; +exports.restProperty = exports.RestProperty = RestProperty; +exports.spreadProperty = exports.SpreadProperty = SpreadProperty; + +var _builder = _interopRequireDefault(require("../builder")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function ArrayExpression(...args) { + return (0, _builder.default)("ArrayExpression", ...args); +} + +function AssignmentExpression(...args) { + return (0, _builder.default)("AssignmentExpression", ...args); +} + +function BinaryExpression(...args) { + return (0, _builder.default)("BinaryExpression", ...args); +} + +function InterpreterDirective(...args) { + return (0, _builder.default)("InterpreterDirective", ...args); +} + +function Directive(...args) { + return (0, _builder.default)("Directive", ...args); +} + +function DirectiveLiteral(...args) { + return (0, _builder.default)("DirectiveLiteral", ...args); +} + +function BlockStatement(...args) { + return (0, _builder.default)("BlockStatement", ...args); +} + +function BreakStatement(...args) { + return (0, _builder.default)("BreakStatement", ...args); +} + +function CallExpression(...args) { + return (0, _builder.default)("CallExpression", ...args); +} + +function CatchClause(...args) { + return (0, _builder.default)("CatchClause", ...args); +} + +function ConditionalExpression(...args) { + return (0, _builder.default)("ConditionalExpression", ...args); +} + +function ContinueStatement(...args) { + return (0, _builder.default)("ContinueStatement", ...args); +} + +function DebuggerStatement(...args) { + return (0, _builder.default)("DebuggerStatement", ...args); +} + +function DoWhileStatement(...args) { + return (0, _builder.default)("DoWhileStatement", ...args); +} + +function EmptyStatement(...args) { + return (0, _builder.default)("EmptyStatement", ...args); +} + +function ExpressionStatement(...args) { + return (0, _builder.default)("ExpressionStatement", ...args); +} + +function File(...args) { + return (0, _builder.default)("File", ...args); +} + +function ForInStatement(...args) { + return (0, _builder.default)("ForInStatement", ...args); +} + +function ForStatement(...args) { + return (0, _builder.default)("ForStatement", ...args); +} + +function FunctionDeclaration(...args) { + return (0, _builder.default)("FunctionDeclaration", ...args); +} + +function FunctionExpression(...args) { + return (0, _builder.default)("FunctionExpression", ...args); +} + +function Identifier(...args) { + return (0, _builder.default)("Identifier", ...args); +} + +function IfStatement(...args) { + return (0, _builder.default)("IfStatement", ...args); +} + +function LabeledStatement(...args) { + return (0, _builder.default)("LabeledStatement", ...args); +} + +function StringLiteral(...args) { + return (0, _builder.default)("StringLiteral", ...args); +} + +function NumericLiteral(...args) { + return (0, _builder.default)("NumericLiteral", ...args); +} + +function NullLiteral(...args) { + return (0, _builder.default)("NullLiteral", ...args); +} + +function BooleanLiteral(...args) { + return (0, _builder.default)("BooleanLiteral", ...args); +} + +function RegExpLiteral(...args) { + return (0, _builder.default)("RegExpLiteral", ...args); +} + +function LogicalExpression(...args) { + return (0, _builder.default)("LogicalExpression", ...args); +} + +function MemberExpression(...args) { + return (0, _builder.default)("MemberExpression", ...args); +} + +function NewExpression(...args) { + return (0, _builder.default)("NewExpression", ...args); +} + +function Program(...args) { + return (0, _builder.default)("Program", ...args); +} + +function ObjectExpression(...args) { + return (0, _builder.default)("ObjectExpression", ...args); +} + +function ObjectMethod(...args) { + return (0, _builder.default)("ObjectMethod", ...args); +} + +function ObjectProperty(...args) { + return (0, _builder.default)("ObjectProperty", ...args); +} + +function RestElement(...args) { + return (0, _builder.default)("RestElement", ...args); +} + +function ReturnStatement(...args) { + return (0, _builder.default)("ReturnStatement", ...args); +} + +function SequenceExpression(...args) { + return (0, _builder.default)("SequenceExpression", ...args); +} + +function ParenthesizedExpression(...args) { + return (0, _builder.default)("ParenthesizedExpression", ...args); +} + +function SwitchCase(...args) { + return (0, _builder.default)("SwitchCase", ...args); +} + +function SwitchStatement(...args) { + return (0, _builder.default)("SwitchStatement", ...args); +} + +function ThisExpression(...args) { + return (0, _builder.default)("ThisExpression", ...args); +} + +function ThrowStatement(...args) { + return (0, _builder.default)("ThrowStatement", ...args); +} + +function TryStatement(...args) { + return (0, _builder.default)("TryStatement", ...args); +} + +function UnaryExpression(...args) { + return (0, _builder.default)("UnaryExpression", ...args); +} + +function UpdateExpression(...args) { + return (0, _builder.default)("UpdateExpression", ...args); +} + +function VariableDeclaration(...args) { + return (0, _builder.default)("VariableDeclaration", ...args); +} + +function VariableDeclarator(...args) { + return (0, _builder.default)("VariableDeclarator", ...args); +} + +function WhileStatement(...args) { + return (0, _builder.default)("WhileStatement", ...args); +} + +function WithStatement(...args) { + return (0, _builder.default)("WithStatement", ...args); +} + +function AssignmentPattern(...args) { + return (0, _builder.default)("AssignmentPattern", ...args); +} + +function ArrayPattern(...args) { + return (0, _builder.default)("ArrayPattern", ...args); +} + +function ArrowFunctionExpression(...args) { + return (0, _builder.default)("ArrowFunctionExpression", ...args); +} + +function ClassBody(...args) { + return (0, _builder.default)("ClassBody", ...args); +} + +function ClassDeclaration(...args) { + return (0, _builder.default)("ClassDeclaration", ...args); +} + +function ClassExpression(...args) { + return (0, _builder.default)("ClassExpression", ...args); +} + +function ExportAllDeclaration(...args) { + return (0, _builder.default)("ExportAllDeclaration", ...args); +} + +function ExportDefaultDeclaration(...args) { + return (0, _builder.default)("ExportDefaultDeclaration", ...args); +} + +function ExportNamedDeclaration(...args) { + return (0, _builder.default)("ExportNamedDeclaration", ...args); +} + +function ExportSpecifier(...args) { + return (0, _builder.default)("ExportSpecifier", ...args); +} + +function ForOfStatement(...args) { + return (0, _builder.default)("ForOfStatement", ...args); +} + +function ImportDeclaration(...args) { + return (0, _builder.default)("ImportDeclaration", ...args); +} + +function ImportDefaultSpecifier(...args) { + return (0, _builder.default)("ImportDefaultSpecifier", ...args); +} + +function ImportNamespaceSpecifier(...args) { + return (0, _builder.default)("ImportNamespaceSpecifier", ...args); +} + +function ImportSpecifier(...args) { + return (0, _builder.default)("ImportSpecifier", ...args); +} + +function MetaProperty(...args) { + return (0, _builder.default)("MetaProperty", ...args); +} + +function ClassMethod(...args) { + return (0, _builder.default)("ClassMethod", ...args); +} + +function ObjectPattern(...args) { + return (0, _builder.default)("ObjectPattern", ...args); +} + +function SpreadElement(...args) { + return (0, _builder.default)("SpreadElement", ...args); +} + +function Super(...args) { + return (0, _builder.default)("Super", ...args); +} + +function TaggedTemplateExpression(...args) { + return (0, _builder.default)("TaggedTemplateExpression", ...args); +} + +function TemplateElement(...args) { + return (0, _builder.default)("TemplateElement", ...args); +} + +function TemplateLiteral(...args) { + return (0, _builder.default)("TemplateLiteral", ...args); +} + +function YieldExpression(...args) { + return (0, _builder.default)("YieldExpression", ...args); +} + +function AnyTypeAnnotation(...args) { + return (0, _builder.default)("AnyTypeAnnotation", ...args); +} + +function ArrayTypeAnnotation(...args) { + return (0, _builder.default)("ArrayTypeAnnotation", ...args); +} + +function BooleanTypeAnnotation(...args) { + return (0, _builder.default)("BooleanTypeAnnotation", ...args); +} + +function BooleanLiteralTypeAnnotation(...args) { + return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...args); +} + +function NullLiteralTypeAnnotation(...args) { + return (0, _builder.default)("NullLiteralTypeAnnotation", ...args); +} + +function ClassImplements(...args) { + return (0, _builder.default)("ClassImplements", ...args); +} + +function DeclareClass(...args) { + return (0, _builder.default)("DeclareClass", ...args); +} + +function DeclareFunction(...args) { + return (0, _builder.default)("DeclareFunction", ...args); +} + +function DeclareInterface(...args) { + return (0, _builder.default)("DeclareInterface", ...args); +} + +function DeclareModule(...args) { + return (0, _builder.default)("DeclareModule", ...args); +} + +function DeclareModuleExports(...args) { + return (0, _builder.default)("DeclareModuleExports", ...args); +} + +function DeclareTypeAlias(...args) { + return (0, _builder.default)("DeclareTypeAlias", ...args); +} + +function DeclareOpaqueType(...args) { + return (0, _builder.default)("DeclareOpaqueType", ...args); +} + +function DeclareVariable(...args) { + return (0, _builder.default)("DeclareVariable", ...args); +} + +function DeclareExportDeclaration(...args) { + return (0, _builder.default)("DeclareExportDeclaration", ...args); +} + +function DeclareExportAllDeclaration(...args) { + return (0, _builder.default)("DeclareExportAllDeclaration", ...args); +} + +function DeclaredPredicate(...args) { + return (0, _builder.default)("DeclaredPredicate", ...args); +} + +function ExistsTypeAnnotation(...args) { + return (0, _builder.default)("ExistsTypeAnnotation", ...args); +} + +function FunctionTypeAnnotation(...args) { + return (0, _builder.default)("FunctionTypeAnnotation", ...args); +} + +function FunctionTypeParam(...args) { + return (0, _builder.default)("FunctionTypeParam", ...args); +} + +function GenericTypeAnnotation(...args) { + return (0, _builder.default)("GenericTypeAnnotation", ...args); +} + +function InferredPredicate(...args) { + return (0, _builder.default)("InferredPredicate", ...args); +} + +function InterfaceExtends(...args) { + return (0, _builder.default)("InterfaceExtends", ...args); +} + +function InterfaceDeclaration(...args) { + return (0, _builder.default)("InterfaceDeclaration", ...args); +} + +function InterfaceTypeAnnotation(...args) { + return (0, _builder.default)("InterfaceTypeAnnotation", ...args); +} + +function IntersectionTypeAnnotation(...args) { + return (0, _builder.default)("IntersectionTypeAnnotation", ...args); +} + +function MixedTypeAnnotation(...args) { + return (0, _builder.default)("MixedTypeAnnotation", ...args); +} + +function EmptyTypeAnnotation(...args) { + return (0, _builder.default)("EmptyTypeAnnotation", ...args); +} + +function NullableTypeAnnotation(...args) { + return (0, _builder.default)("NullableTypeAnnotation", ...args); +} + +function NumberLiteralTypeAnnotation(...args) { + return (0, _builder.default)("NumberLiteralTypeAnnotation", ...args); +} + +function NumberTypeAnnotation(...args) { + return (0, _builder.default)("NumberTypeAnnotation", ...args); +} + +function ObjectTypeAnnotation(...args) { + return (0, _builder.default)("ObjectTypeAnnotation", ...args); +} + +function ObjectTypeInternalSlot(...args) { + return (0, _builder.default)("ObjectTypeInternalSlot", ...args); +} + +function ObjectTypeCallProperty(...args) { + return (0, _builder.default)("ObjectTypeCallProperty", ...args); +} + +function ObjectTypeIndexer(...args) { + return (0, _builder.default)("ObjectTypeIndexer", ...args); +} + +function ObjectTypeProperty(...args) { + return (0, _builder.default)("ObjectTypeProperty", ...args); +} + +function ObjectTypeSpreadProperty(...args) { + return (0, _builder.default)("ObjectTypeSpreadProperty", ...args); +} + +function OpaqueType(...args) { + return (0, _builder.default)("OpaqueType", ...args); +} + +function QualifiedTypeIdentifier(...args) { + return (0, _builder.default)("QualifiedTypeIdentifier", ...args); +} + +function StringLiteralTypeAnnotation(...args) { + return (0, _builder.default)("StringLiteralTypeAnnotation", ...args); +} + +function StringTypeAnnotation(...args) { + return (0, _builder.default)("StringTypeAnnotation", ...args); +} + +function ThisTypeAnnotation(...args) { + return (0, _builder.default)("ThisTypeAnnotation", ...args); +} + +function TupleTypeAnnotation(...args) { + return (0, _builder.default)("TupleTypeAnnotation", ...args); +} + +function TypeofTypeAnnotation(...args) { + return (0, _builder.default)("TypeofTypeAnnotation", ...args); +} + +function TypeAlias(...args) { + return (0, _builder.default)("TypeAlias", ...args); +} + +function TypeAnnotation(...args) { + return (0, _builder.default)("TypeAnnotation", ...args); +} + +function TypeCastExpression(...args) { + return (0, _builder.default)("TypeCastExpression", ...args); +} + +function TypeParameter(...args) { + return (0, _builder.default)("TypeParameter", ...args); +} + +function TypeParameterDeclaration(...args) { + return (0, _builder.default)("TypeParameterDeclaration", ...args); +} + +function TypeParameterInstantiation(...args) { + return (0, _builder.default)("TypeParameterInstantiation", ...args); +} + +function UnionTypeAnnotation(...args) { + return (0, _builder.default)("UnionTypeAnnotation", ...args); +} + +function Variance(...args) { + return (0, _builder.default)("Variance", ...args); +} + +function VoidTypeAnnotation(...args) { + return (0, _builder.default)("VoidTypeAnnotation", ...args); +} + +function JSXAttribute(...args) { + return (0, _builder.default)("JSXAttribute", ...args); +} + +function JSXClosingElement(...args) { + return (0, _builder.default)("JSXClosingElement", ...args); +} + +function JSXElement(...args) { + return (0, _builder.default)("JSXElement", ...args); +} + +function JSXEmptyExpression(...args) { + return (0, _builder.default)("JSXEmptyExpression", ...args); +} + +function JSXExpressionContainer(...args) { + return (0, _builder.default)("JSXExpressionContainer", ...args); +} + +function JSXSpreadChild(...args) { + return (0, _builder.default)("JSXSpreadChild", ...args); +} + +function JSXIdentifier(...args) { + return (0, _builder.default)("JSXIdentifier", ...args); +} + +function JSXMemberExpression(...args) { + return (0, _builder.default)("JSXMemberExpression", ...args); +} + +function JSXNamespacedName(...args) { + return (0, _builder.default)("JSXNamespacedName", ...args); +} + +function JSXOpeningElement(...args) { + return (0, _builder.default)("JSXOpeningElement", ...args); +} + +function JSXSpreadAttribute(...args) { + return (0, _builder.default)("JSXSpreadAttribute", ...args); +} + +function JSXText(...args) { + return (0, _builder.default)("JSXText", ...args); +} + +function JSXFragment(...args) { + return (0, _builder.default)("JSXFragment", ...args); +} + +function JSXOpeningFragment(...args) { + return (0, _builder.default)("JSXOpeningFragment", ...args); +} + +function JSXClosingFragment(...args) { + return (0, _builder.default)("JSXClosingFragment", ...args); +} + +function Noop(...args) { + return (0, _builder.default)("Noop", ...args); +} + +function Placeholder(...args) { + return (0, _builder.default)("Placeholder", ...args); +} + +function ArgumentPlaceholder(...args) { + return (0, _builder.default)("ArgumentPlaceholder", ...args); +} + +function AwaitExpression(...args) { + return (0, _builder.default)("AwaitExpression", ...args); +} + +function BindExpression(...args) { + return (0, _builder.default)("BindExpression", ...args); +} + +function ClassProperty(...args) { + return (0, _builder.default)("ClassProperty", ...args); +} + +function OptionalMemberExpression(...args) { + return (0, _builder.default)("OptionalMemberExpression", ...args); +} + +function PipelineTopicExpression(...args) { + return (0, _builder.default)("PipelineTopicExpression", ...args); +} + +function PipelineBareFunction(...args) { + return (0, _builder.default)("PipelineBareFunction", ...args); +} + +function PipelinePrimaryTopicReference(...args) { + return (0, _builder.default)("PipelinePrimaryTopicReference", ...args); +} + +function OptionalCallExpression(...args) { + return (0, _builder.default)("OptionalCallExpression", ...args); +} + +function ClassPrivateProperty(...args) { + return (0, _builder.default)("ClassPrivateProperty", ...args); +} + +function ClassPrivateMethod(...args) { + return (0, _builder.default)("ClassPrivateMethod", ...args); +} + +function Import(...args) { + return (0, _builder.default)("Import", ...args); +} + +function Decorator(...args) { + return (0, _builder.default)("Decorator", ...args); +} + +function DoExpression(...args) { + return (0, _builder.default)("DoExpression", ...args); +} + +function ExportDefaultSpecifier(...args) { + return (0, _builder.default)("ExportDefaultSpecifier", ...args); +} + +function ExportNamespaceSpecifier(...args) { + return (0, _builder.default)("ExportNamespaceSpecifier", ...args); +} + +function PrivateName(...args) { + return (0, _builder.default)("PrivateName", ...args); +} + +function BigIntLiteral(...args) { + return (0, _builder.default)("BigIntLiteral", ...args); +} + +function TSParameterProperty(...args) { + return (0, _builder.default)("TSParameterProperty", ...args); +} + +function TSDeclareFunction(...args) { + return (0, _builder.default)("TSDeclareFunction", ...args); +} + +function TSDeclareMethod(...args) { + return (0, _builder.default)("TSDeclareMethod", ...args); +} + +function TSQualifiedName(...args) { + return (0, _builder.default)("TSQualifiedName", ...args); +} + +function TSCallSignatureDeclaration(...args) { + return (0, _builder.default)("TSCallSignatureDeclaration", ...args); +} + +function TSConstructSignatureDeclaration(...args) { + return (0, _builder.default)("TSConstructSignatureDeclaration", ...args); +} + +function TSPropertySignature(...args) { + return (0, _builder.default)("TSPropertySignature", ...args); +} + +function TSMethodSignature(...args) { + return (0, _builder.default)("TSMethodSignature", ...args); +} + +function TSIndexSignature(...args) { + return (0, _builder.default)("TSIndexSignature", ...args); +} + +function TSAnyKeyword(...args) { + return (0, _builder.default)("TSAnyKeyword", ...args); +} + +function TSUnknownKeyword(...args) { + return (0, _builder.default)("TSUnknownKeyword", ...args); +} + +function TSNumberKeyword(...args) { + return (0, _builder.default)("TSNumberKeyword", ...args); +} + +function TSObjectKeyword(...args) { + return (0, _builder.default)("TSObjectKeyword", ...args); +} + +function TSBooleanKeyword(...args) { + return (0, _builder.default)("TSBooleanKeyword", ...args); +} + +function TSStringKeyword(...args) { + return (0, _builder.default)("TSStringKeyword", ...args); +} + +function TSSymbolKeyword(...args) { + return (0, _builder.default)("TSSymbolKeyword", ...args); +} + +function TSVoidKeyword(...args) { + return (0, _builder.default)("TSVoidKeyword", ...args); +} + +function TSUndefinedKeyword(...args) { + return (0, _builder.default)("TSUndefinedKeyword", ...args); +} + +function TSNullKeyword(...args) { + return (0, _builder.default)("TSNullKeyword", ...args); +} + +function TSNeverKeyword(...args) { + return (0, _builder.default)("TSNeverKeyword", ...args); +} + +function TSThisType(...args) { + return (0, _builder.default)("TSThisType", ...args); +} + +function TSFunctionType(...args) { + return (0, _builder.default)("TSFunctionType", ...args); +} + +function TSConstructorType(...args) { + return (0, _builder.default)("TSConstructorType", ...args); +} + +function TSTypeReference(...args) { + return (0, _builder.default)("TSTypeReference", ...args); +} + +function TSTypePredicate(...args) { + return (0, _builder.default)("TSTypePredicate", ...args); +} + +function TSTypeQuery(...args) { + return (0, _builder.default)("TSTypeQuery", ...args); +} + +function TSTypeLiteral(...args) { + return (0, _builder.default)("TSTypeLiteral", ...args); +} + +function TSArrayType(...args) { + return (0, _builder.default)("TSArrayType", ...args); +} + +function TSTupleType(...args) { + return (0, _builder.default)("TSTupleType", ...args); +} + +function TSOptionalType(...args) { + return (0, _builder.default)("TSOptionalType", ...args); +} + +function TSRestType(...args) { + return (0, _builder.default)("TSRestType", ...args); +} + +function TSUnionType(...args) { + return (0, _builder.default)("TSUnionType", ...args); +} + +function TSIntersectionType(...args) { + return (0, _builder.default)("TSIntersectionType", ...args); +} + +function TSConditionalType(...args) { + return (0, _builder.default)("TSConditionalType", ...args); +} + +function TSInferType(...args) { + return (0, _builder.default)("TSInferType", ...args); +} + +function TSParenthesizedType(...args) { + return (0, _builder.default)("TSParenthesizedType", ...args); +} + +function TSTypeOperator(...args) { + return (0, _builder.default)("TSTypeOperator", ...args); +} + +function TSIndexedAccessType(...args) { + return (0, _builder.default)("TSIndexedAccessType", ...args); +} + +function TSMappedType(...args) { + return (0, _builder.default)("TSMappedType", ...args); +} + +function TSLiteralType(...args) { + return (0, _builder.default)("TSLiteralType", ...args); +} + +function TSExpressionWithTypeArguments(...args) { + return (0, _builder.default)("TSExpressionWithTypeArguments", ...args); +} + +function TSInterfaceDeclaration(...args) { + return (0, _builder.default)("TSInterfaceDeclaration", ...args); +} + +function TSInterfaceBody(...args) { + return (0, _builder.default)("TSInterfaceBody", ...args); +} + +function TSTypeAliasDeclaration(...args) { + return (0, _builder.default)("TSTypeAliasDeclaration", ...args); +} + +function TSAsExpression(...args) { + return (0, _builder.default)("TSAsExpression", ...args); +} + +function TSTypeAssertion(...args) { + return (0, _builder.default)("TSTypeAssertion", ...args); +} + +function TSEnumDeclaration(...args) { + return (0, _builder.default)("TSEnumDeclaration", ...args); +} + +function TSEnumMember(...args) { + return (0, _builder.default)("TSEnumMember", ...args); +} + +function TSModuleDeclaration(...args) { + return (0, _builder.default)("TSModuleDeclaration", ...args); +} + +function TSModuleBlock(...args) { + return (0, _builder.default)("TSModuleBlock", ...args); +} + +function TSImportType(...args) { + return (0, _builder.default)("TSImportType", ...args); +} + +function TSImportEqualsDeclaration(...args) { + return (0, _builder.default)("TSImportEqualsDeclaration", ...args); +} + +function TSExternalModuleReference(...args) { + return (0, _builder.default)("TSExternalModuleReference", ...args); +} + +function TSNonNullExpression(...args) { + return (0, _builder.default)("TSNonNullExpression", ...args); +} + +function TSExportAssignment(...args) { + return (0, _builder.default)("TSExportAssignment", ...args); +} + +function TSNamespaceExportDeclaration(...args) { + return (0, _builder.default)("TSNamespaceExportDeclaration", ...args); +} + +function TSTypeAnnotation(...args) { + return (0, _builder.default)("TSTypeAnnotation", ...args); +} + +function TSTypeParameterInstantiation(...args) { + return (0, _builder.default)("TSTypeParameterInstantiation", ...args); +} + +function TSTypeParameterDeclaration(...args) { + return (0, _builder.default)("TSTypeParameterDeclaration", ...args); +} + +function TSTypeParameter(...args) { + return (0, _builder.default)("TSTypeParameter", ...args); +} + +function NumberLiteral(...args) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + return NumberLiteral("NumberLiteral", ...args); +} + +function RegexLiteral(...args) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + return RegexLiteral("RegexLiteral", ...args); +} + +function RestProperty(...args) { + console.trace("The node type RestProperty has been renamed to RestElement"); + return RestProperty("RestProperty", ...args); +} + +function SpreadProperty(...args) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + return SpreadProperty("SpreadProperty", ...args); +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/react/buildChildren.js b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/react/buildChildren.js similarity index 87% rename from node_modules/@babel/types/lib/builders/react/buildChildren.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/builders/react/buildChildren.js index ff8a44f..91e7cbd 100644 --- a/node_modules/@babel/types/lib/builders/react/buildChildren.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/builders/react/buildChildren.js @@ -12,10 +12,10 @@ var _cleanJSXElementLiteralChild = _interopRequireDefault(require("../../utils/r function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function buildChildren(node) { - var elements = []; + const elements = []; - for (var i = 0; i < node.children.length; i++) { - var child = node.children[i]; + for (let i = 0; i < node.children.length; i++) { + let child = node.children[i]; if ((0, _generated.isJSXText)(child)) { (0, _cleanJSXElementLiteralChild.default)(child, elements); diff --git a/node_modules/@babel/types/lib/clone/clone.js b/node_modules/@babel/core/node_modules/@babel/types/lib/clone/clone.js similarity index 100% rename from node_modules/@babel/types/lib/clone/clone.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/clone/clone.js diff --git a/node_modules/@babel/types/lib/clone/cloneDeep.js b/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeep.js similarity index 100% rename from node_modules/@babel/types/lib/clone/cloneDeep.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeep.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneNode.js b/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneNode.js new file mode 100644 index 0000000..bcccddc --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneNode.js @@ -0,0 +1,78 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cloneNode; + +var _definitions = require("../definitions"); + +const has = Function.call.bind(Object.prototype.hasOwnProperty); + +function cloneIfNode(obj, deep) { + if (obj && typeof obj.type === "string" && obj.type !== "CommentLine" && obj.type !== "CommentBlock") { + return cloneNode(obj, deep); + } + + return obj; +} + +function cloneIfNodeOrArray(obj, deep) { + if (Array.isArray(obj)) { + return obj.map(node => cloneIfNode(node, deep)); + } + + return cloneIfNode(obj, deep); +} + +function cloneNode(node, deep = true) { + if (!node) return node; + const { + type + } = node; + const newNode = { + type + }; + + if (type === "Identifier") { + newNode.name = node.name; + + if (has(node, "optional") && typeof node.optional === "boolean") { + newNode.optional = node.optional; + } + + if (has(node, "typeAnnotation")) { + newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true) : node.typeAnnotation; + } + } else if (!has(_definitions.NODE_FIELDS, type)) { + throw new Error(`Unknown node type: "${type}"`); + } else { + for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { + if (has(node, field)) { + newNode[field] = deep ? cloneIfNodeOrArray(node[field], true) : node[field]; + } + } + } + + if (has(node, "loc")) { + newNode.loc = node.loc; + } + + if (has(node, "leadingComments")) { + newNode.leadingComments = node.leadingComments; + } + + if (has(node, "innerComments")) { + newNode.innerComments = node.innerCmments; + } + + if (has(node, "trailingComments")) { + newNode.trailingComments = node.trailingComments; + } + + if (has(node, "extra")) { + newNode.extra = Object.assign({}, node.extra); + } + + return newNode; +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js similarity index 88% rename from node_modules/@babel/types/lib/clone/cloneWithoutLoc.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js index a8dbb81..5622af7 100644 --- a/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js @@ -10,7 +10,7 @@ var _clone = _interopRequireDefault(require("./clone")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function cloneWithoutLoc(node) { - var newNode = (0, _clone.default)(node); + const newNode = (0, _clone.default)(node); newNode.loc = null; return newNode; } \ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/addComment.js b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComment.js similarity index 100% rename from node_modules/@babel/types/lib/comments/addComment.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComment.js diff --git a/node_modules/@babel/types/lib/comments/addComments.js b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComments.js similarity index 92% rename from node_modules/@babel/types/lib/comments/addComments.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComments.js index 0d86c9a..f3a61df 100644 --- a/node_modules/@babel/types/lib/comments/addComments.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComments.js @@ -7,7 +7,7 @@ exports.default = addComments; function addComments(node, type, comments) { if (!comments || !node) return node; - var key = type + "Comments"; + const key = `${type}Comments`; if (node[key]) { if (type === "leading") { diff --git a/node_modules/@babel/types/lib/comments/inheritInnerComments.js b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritInnerComments.js similarity index 100% rename from node_modules/@babel/types/lib/comments/inheritInnerComments.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritInnerComments.js diff --git a/node_modules/@babel/types/lib/comments/inheritLeadingComments.js b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritLeadingComments.js similarity index 100% rename from node_modules/@babel/types/lib/comments/inheritLeadingComments.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritLeadingComments.js diff --git a/node_modules/@babel/types/lib/comments/inheritTrailingComments.js b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritTrailingComments.js similarity index 100% rename from node_modules/@babel/types/lib/comments/inheritTrailingComments.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritTrailingComments.js diff --git a/node_modules/@babel/types/lib/comments/inheritsComments.js b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritsComments.js similarity index 100% rename from node_modules/@babel/types/lib/comments/inheritsComments.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritsComments.js diff --git a/node_modules/@babel/types/lib/comments/removeComments.js b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/removeComments.js similarity index 81% rename from node_modules/@babel/types/lib/comments/removeComments.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/comments/removeComments.js index 20f90b6..fe34f1a 100644 --- a/node_modules/@babel/types/lib/comments/removeComments.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/comments/removeComments.js @@ -8,7 +8,7 @@ exports.default = removeComments; var _constants = require("../constants"); function removeComments(node) { - _constants.COMMENT_KEYS.forEach(function (key) { + _constants.COMMENT_KEYS.forEach(key => { node[key] = null; }); diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/constants/generated/index.js b/node_modules/@babel/core/node_modules/@babel/types/lib/constants/generated/index.js new file mode 100644 index 0000000..6072495 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/constants/generated/index.js @@ -0,0 +1,93 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0; + +var _definitions = require("../../definitions"); + +const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; +exports.EXPRESSION_TYPES = EXPRESSION_TYPES; +const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; +exports.BINARY_TYPES = BINARY_TYPES; +const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; +exports.SCOPABLE_TYPES = SCOPABLE_TYPES; +const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; +exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; +const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; +exports.BLOCK_TYPES = BLOCK_TYPES; +const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; +exports.STATEMENT_TYPES = STATEMENT_TYPES; +const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; +exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; +const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; +exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; +const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; +exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; +const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; +exports.LOOP_TYPES = LOOP_TYPES; +const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; +exports.WHILE_TYPES = WHILE_TYPES; +const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; +exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; +const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; +exports.FOR_TYPES = FOR_TYPES; +const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; +exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; +const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; +exports.FUNCTION_TYPES = FUNCTION_TYPES; +const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; +exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; +const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; +exports.PUREISH_TYPES = PUREISH_TYPES; +const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; +exports.DECLARATION_TYPES = DECLARATION_TYPES; +const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; +exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; +const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; +exports.LVAL_TYPES = LVAL_TYPES; +const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; +exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; +const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; +exports.LITERAL_TYPES = LITERAL_TYPES; +const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; +exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; +const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; +exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; +const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; +exports.METHOD_TYPES = METHOD_TYPES; +const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; +exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; +const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; +exports.PROPERTY_TYPES = PROPERTY_TYPES; +const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; +exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; +const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; +exports.PATTERN_TYPES = PATTERN_TYPES; +const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; +exports.CLASS_TYPES = CLASS_TYPES; +const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; +exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; +const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; +exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; +const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; +exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; +const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; +exports.FLOW_TYPES = FLOW_TYPES; +const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; +exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; +const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; +exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; +const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; +exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; +const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; +exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; +const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; +exports.JSX_TYPES = JSX_TYPES; +const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; +exports.PRIVATE_TYPES = PRIVATE_TYPES; +const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; +exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; +const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; +exports.TSTYPE_TYPES = TSTYPE_TYPES; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/constants/index.js b/node_modules/@babel/core/node_modules/@babel/types/lib/constants/index.js new file mode 100644 index 0000000..a60b106 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/constants/index.js @@ -0,0 +1,47 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0; +const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; +exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; +const FLATTENABLE_KEYS = ["body", "expressions"]; +exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; +const FOR_INIT_KEYS = ["left", "init"]; +exports.FOR_INIT_KEYS = FOR_INIT_KEYS; +const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; +exports.COMMENT_KEYS = COMMENT_KEYS; +const LOGICAL_OPERATORS = ["||", "&&", "??"]; +exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; +const UPDATE_OPERATORS = ["++", "--"]; +exports.UPDATE_OPERATORS = UPDATE_OPERATORS; +const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; +exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; +const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; +exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; +const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; +exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; +const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; +exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; +const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; +exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; +const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; +exports.BINARY_OPERATORS = BINARY_OPERATORS; +const BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; +exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; +const NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; +exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; +const STRING_UNARY_OPERATORS = ["typeof"]; +exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; +const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; +exports.UNARY_OPERATORS = UNARY_OPERATORS; +const INHERIT_KEYS = { + optional: ["typeAnnotation", "typeParameters", "returnType"], + force: ["start", "loc", "end"] +}; +exports.INHERIT_KEYS = INHERIT_KEYS; +const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); +exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; +const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); +exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/ensureBlock.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/ensureBlock.js similarity index 80% rename from node_modules/@babel/types/lib/converters/ensureBlock.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/converters/ensureBlock.js index d4779d0..2836b36 100644 --- a/node_modules/@babel/types/lib/converters/ensureBlock.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/ensureBlock.js @@ -9,10 +9,6 @@ var _toBlock = _interopRequireDefault(require("./toBlock")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function ensureBlock(node, key) { - if (key === void 0) { - key = "body"; - } - +function ensureBlock(node, key = "body") { return node[key] = (0, _toBlock.default)(node[key], node); } \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js new file mode 100644 index 0000000..fadd0f0 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js @@ -0,0 +1,73 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = gatherSequenceExpressions; + +var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); + +var _generated = require("../validators/generated"); + +var _generated2 = require("../builders/generated"); + +var _cloneNode = _interopRequireDefault(require("../clone/cloneNode")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function gatherSequenceExpressions(nodes, scope, declars) { + const exprs = []; + let ensureLastUndefined = true; + + for (const node of nodes) { + ensureLastUndefined = false; + + if ((0, _generated.isExpression)(node)) { + exprs.push(node); + } else if ((0, _generated.isExpressionStatement)(node)) { + exprs.push(node.expression); + } else if ((0, _generated.isVariableDeclaration)(node)) { + if (node.kind !== "var") return; + + for (const declar of node.declarations) { + const bindings = (0, _getBindingIdentifiers.default)(declar); + + for (const key of Object.keys(bindings)) { + declars.push({ + kind: node.kind, + id: (0, _cloneNode.default)(bindings[key]) + }); + } + + if (declar.init) { + exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); + } + } + + ensureLastUndefined = true; + } else if ((0, _generated.isIfStatement)(node)) { + const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); + const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); + if (!consequent || !alternate) return; + exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); + } else if ((0, _generated.isBlockStatement)(node)) { + const body = gatherSequenceExpressions(node.body, scope, declars); + if (!body) return; + exprs.push(body); + } else if ((0, _generated.isEmptyStatement)(node)) { + ensureLastUndefined = true; + } else { + return; + } + } + + if (ensureLastUndefined) { + exprs.push(scope.buildUndefinedNode()); + } + + if (exprs.length === 1) { + return exprs[0]; + } else { + return (0, _generated2.sequenceExpression)(exprs); + } +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js similarity index 100% rename from node_modules/@babel/types/lib/converters/toBindingIdentifierName.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js diff --git a/node_modules/@babel/types/lib/converters/toBlock.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBlock.js similarity index 96% rename from node_modules/@babel/types/lib/converters/toBlock.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBlock.js index 504fdf5..1988683 100644 --- a/node_modules/@babel/types/lib/converters/toBlock.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBlock.js @@ -14,7 +14,7 @@ function toBlock(node, parent) { return node; } - var blockNodes = []; + let blockNodes = []; if ((0, _generated.isEmptyStatement)(node)) { blockNodes = []; diff --git a/node_modules/@babel/types/lib/converters/toComputedKey.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toComputedKey.js similarity index 76% rename from node_modules/@babel/types/lib/converters/toComputedKey.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/converters/toComputedKey.js index 2dc021c..31e6770 100644 --- a/node_modules/@babel/types/lib/converters/toComputedKey.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toComputedKey.js @@ -9,11 +9,7 @@ var _generated = require("../validators/generated"); var _generated2 = require("../builders/generated"); -function toComputedKey(node, key) { - if (key === void 0) { - key = node.key || node.property; - } - +function toComputedKey(node, key = node.key || node.property) { if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); return key; } \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toExpression.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toExpression.js similarity index 88% rename from node_modules/@babel/types/lib/converters/toExpression.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/converters/toExpression.js index 5ad026d..6e58b0d 100644 --- a/node_modules/@babel/types/lib/converters/toExpression.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toExpression.js @@ -23,7 +23,7 @@ function toExpression(node) { } if (!(0, _generated.isExpression)(node)) { - throw new Error("cannot turn " + node.type + " to an expression"); + throw new Error(`cannot turn ${node.type} to an expression`); } return node; diff --git a/node_modules/@babel/types/lib/converters/toIdentifier.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toIdentifier.js similarity index 96% rename from node_modules/@babel/types/lib/converters/toIdentifier.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/converters/toIdentifier.js index a01ee90..e55db41 100644 --- a/node_modules/@babel/types/lib/converters/toIdentifier.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toIdentifier.js @@ -18,7 +18,7 @@ function toIdentifier(name) { }); if (!(0, _isValidIdentifier.default)(name)) { - name = "_" + name; + name = `_${name}`; } return name || "_"; diff --git a/node_modules/@babel/types/lib/converters/toKeyAlias.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toKeyAlias.js similarity index 86% rename from node_modules/@babel/types/lib/converters/toKeyAlias.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/converters/toKeyAlias.js index c200638..c48fd0e 100644 --- a/node_modules/@babel/types/lib/converters/toKeyAlias.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toKeyAlias.js @@ -13,12 +13,8 @@ var _removePropertiesDeep = _interopRequireDefault(require("../modifications/rem function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function toKeyAlias(node, key) { - if (key === void 0) { - key = node.key; - } - - var alias; +function toKeyAlias(node, key = node.key) { + let alias; if (node.kind === "method") { return toKeyAlias.increment() + ""; @@ -31,11 +27,11 @@ function toKeyAlias(node, key) { } if (node.computed) { - alias = "[" + alias + "]"; + alias = `[${alias}]`; } if (node.static) { - alias = "static:" + alias; + alias = `static:${alias}`; } return alias; diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toSequenceExpression.js new file mode 100644 index 0000000..2e221db --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toSequenceExpression.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toSequenceExpression; + +var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function toSequenceExpression(nodes, scope) { + if (!nodes || !nodes.length) return; + const declars = []; + const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); + if (!result) return; + + for (const declar of declars) { + scope.push(declar); + } + + return result; +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toStatement.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toStatement.js similarity index 87% rename from node_modules/@babel/types/lib/converters/toStatement.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/converters/toStatement.js index 74ebc7d..69b22ae 100644 --- a/node_modules/@babel/types/lib/converters/toStatement.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toStatement.js @@ -14,8 +14,8 @@ function toStatement(node, ignore) { return node; } - var mustHaveId = false; - var newType; + let mustHaveId = false; + let newType; if ((0, _generated.isClass)(node)) { mustHaveId = true; @@ -35,7 +35,7 @@ function toStatement(node, ignore) { if (ignore) { return false; } else { - throw new Error("cannot turn " + node.type + " to a statement"); + throw new Error(`cannot turn ${node.type} to a statement`); } } diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js new file mode 100644 index 0000000..9e19dbf --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js @@ -0,0 +1,104 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = valueToNode; + +function _isPlainObject() { + const data = _interopRequireDefault(require("lodash/isPlainObject")); + + _isPlainObject = function () { + return data; + }; + + return data; +} + +function _isRegExp() { + const data = _interopRequireDefault(require("lodash/isRegExp")); + + _isRegExp = function () { + return data; + }; + + return data; +} + +var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); + +var _generated = require("../builders/generated"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function valueToNode(value) { + if (value === undefined) { + return (0, _generated.identifier)("undefined"); + } + + if (value === true || value === false) { + return (0, _generated.booleanLiteral)(value); + } + + if (value === null) { + return (0, _generated.nullLiteral)(); + } + + if (typeof value === "string") { + return (0, _generated.stringLiteral)(value); + } + + if (typeof value === "number") { + let result; + + if (Number.isFinite(value)) { + result = (0, _generated.numericLiteral)(Math.abs(value)); + } else { + let numerator; + + if (Number.isNaN(value)) { + numerator = (0, _generated.numericLiteral)(0); + } else { + numerator = (0, _generated.numericLiteral)(1); + } + + result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); + } + + if (value < 0 || Object.is(value, -0)) { + result = (0, _generated.unaryExpression)("-", result); + } + + return result; + } + + if ((0, _isRegExp().default)(value)) { + const pattern = value.source; + const flags = value.toString().match(/\/([a-z]+|)$/)[1]; + return (0, _generated.regExpLiteral)(pattern, flags); + } + + if (Array.isArray(value)) { + return (0, _generated.arrayExpression)(value.map(valueToNode)); + } + + if ((0, _isPlainObject().default)(value)) { + const props = []; + + for (const key of Object.keys(value)) { + let nodeKey; + + if ((0, _isValidIdentifier.default)(key)) { + nodeKey = (0, _generated.identifier)(key); + } else { + nodeKey = (0, _generated.stringLiteral)(key); + } + + props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); + } + + return (0, _generated.objectExpression)(props); + } + + throw new Error("don't know how to turn this value into a node"); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/core.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/core.js new file mode 100644 index 0000000..d759890 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/core.js @@ -0,0 +1,725 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0; + +var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); + +var _constants = require("../constants"); + +var _utils = _interopRequireWildcard(require("./utils")); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _utils.default)("ArrayExpression", { + fields: { + elements: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), + default: [] + } + }, + visitor: ["elements"], + aliases: ["Expression"] +}); +(0, _utils.default)("AssignmentExpression", { + fields: { + operator: { + validate: (0, _utils.assertValueType)("string") + }, + left: { + validate: (0, _utils.assertNodeType)("LVal") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Expression"] +}); +(0, _utils.default)("BinaryExpression", { + builder: ["operator", "left", "right"], + fields: { + operator: { + validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) + }, + left: { + validate: (0, _utils.assertNodeType)("Expression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + visitor: ["left", "right"], + aliases: ["Binary", "Expression"] +}); +(0, _utils.default)("InterpreterDirective", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("Directive", { + visitor: ["value"], + fields: { + value: { + validate: (0, _utils.assertNodeType)("DirectiveLiteral") + } + } +}); +(0, _utils.default)("DirectiveLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("BlockStatement", { + builder: ["body", "directives"], + visitor: ["directives", "body"], + fields: { + directives: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "Statement"] +}); +(0, _utils.default)("BreakStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); +(0, _utils.default)("CallExpression", { + visitor: ["callee", "arguments", "typeParameters", "typeArguments"], + builder: ["callee", "arguments"], + aliases: ["Expression"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + }, + optional: { + validate: (0, _utils.assertOneOf)(true, false), + optional: true + }, + typeArguments: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("CatchClause", { + visitor: ["param", "body"], + fields: { + param: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }, + aliases: ["Scopable", "BlockParent"] +}); +(0, _utils.default)("ConditionalExpression", { + visitor: ["test", "consequent", "alternate"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _utils.assertNodeType)("Expression") + }, + alternate: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Expression", "Conditional"] +}); +(0, _utils.default)("ContinueStatement", { + visitor: ["label"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] +}); +(0, _utils.default)("DebuggerStatement", { + aliases: ["Statement"] +}); +(0, _utils.default)("DoWhileStatement", { + visitor: ["test", "body"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + }, + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] +}); +(0, _utils.default)("EmptyStatement", { + aliases: ["Statement"] +}); +(0, _utils.default)("ExpressionStatement", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + }, + aliases: ["Statement", "ExpressionWrapper"] +}); +(0, _utils.default)("File", { + builder: ["program", "comments", "tokens"], + visitor: ["program"], + fields: { + program: { + validate: (0, _utils.assertNodeType)("Program") + } + } +}); +(0, _utils.default)("ForInStatement", { + visitor: ["left", "right", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], + fields: { + left: { + validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("ForStatement", { + visitor: ["init", "test", "update", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], + fields: { + init: { + validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), + optional: true + }, + test: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + update: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +const functionCommon = { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) + }, + generator: { + default: false, + validate: (0, _utils.assertValueType)("boolean") + }, + async: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + } +}; +exports.functionCommon = functionCommon; +const functionTypeAnnotationCommon = { + returnType: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: true + } +}; +exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon; +const functionDeclarationCommon = Object.assign({}, functionCommon, { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + } +}); +exports.functionDeclarationCommon = functionDeclarationCommon; +(0, _utils.default)("FunctionDeclaration", { + builder: ["id", "params", "body", "generator", "async"], + visitor: ["id", "params", "body", "returnType", "typeParameters"], + fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }), + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] +}); +(0, _utils.default)("FunctionExpression", { + inherits: "FunctionDeclaration", + aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], + fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { + id: { + validate: (0, _utils.assertNodeType)("Identifier"), + optional: true + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +const patternLikeCommon = { + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) + } +}; +exports.patternLikeCommon = patternLikeCommon; +(0, _utils.default)("Identifier", { + builder: ["name"], + visitor: ["typeAnnotation", "decorators"], + aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], + fields: Object.assign({}, patternLikeCommon, { + name: { + validate: (0, _utils.chain)(function (node, key, val) { + if (!(0, _isValidIdentifier.default)(val)) {} + }, (0, _utils.assertValueType)("string")) + }, + optional: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }) +}); +(0, _utils.default)("IfStatement", { + visitor: ["test", "consequent", "alternate"], + aliases: ["Statement", "Conditional"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + consequent: { + validate: (0, _utils.assertNodeType)("Statement") + }, + alternate: { + optional: true, + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("LabeledStatement", { + visitor: ["label", "body"], + aliases: ["Statement"], + fields: { + label: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + body: { + validate: (0, _utils.assertNodeType)("Statement") + } + } +}); +(0, _utils.default)("StringLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("NumericLiteral", { + builder: ["value"], + deprecatedAlias: "NumberLiteral", + fields: { + value: { + validate: (0, _utils.assertValueType)("number") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("NullLiteral", { + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("BooleanLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("boolean") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); +(0, _utils.default)("RegExpLiteral", { + builder: ["pattern", "flags"], + deprecatedAlias: "RegexLiteral", + aliases: ["Expression", "Literal"], + fields: { + pattern: { + validate: (0, _utils.assertValueType)("string") + }, + flags: { + validate: (0, _utils.assertValueType)("string"), + default: "" + } + } +}); +(0, _utils.default)("LogicalExpression", { + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Binary", "Expression"], + fields: { + operator: { + validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) + }, + left: { + validate: (0, _utils.assertNodeType)("Expression") + }, + right: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("MemberExpression", { + builder: ["object", "property", "computed", "optional"], + visitor: ["object", "property"], + aliases: ["Expression", "LVal"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + property: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + computed: { + default: false + }, + optional: { + validate: (0, _utils.assertOneOf)(true, false), + optional: true + } + } +}); +(0, _utils.default)("NewExpression", { + inherits: "CallExpression" +}); +(0, _utils.default)("Program", { + visitor: ["directives", "body"], + builder: ["body", "directives", "sourceType", "interpreter"], + fields: { + sourceFile: { + validate: (0, _utils.assertValueType)("string") + }, + sourceType: { + validate: (0, _utils.assertOneOf)("script", "module"), + default: "script" + }, + interpreter: { + validate: (0, _utils.assertNodeType)("InterpreterDirective"), + default: null, + optional: true + }, + directives: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + }, + aliases: ["Scopable", "BlockParent", "Block"] +}); +(0, _utils.default)("ObjectExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) + } + } +}); +(0, _utils.default)("ObjectMethod", { + builder: ["kind", "key", "params", "body", "computed"], + fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { + kind: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("method", "get", "set")), + default: "method" + }, + computed: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + key: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }), + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] +}); +(0, _utils.default)("ObjectProperty", { + builder: ["key", "value", "computed", "shorthand", "decorators"], + fields: { + computed: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + key: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + value: { + validate: (0, _utils.assertNodeType)("Expression", "PatternLike") + }, + shorthand: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + } + }, + visitor: ["key", "value", "decorators"], + aliases: ["UserWhitespacable", "Property", "ObjectMember"] +}); +(0, _utils.default)("RestElement", { + visitor: ["argument", "typeAnnotation"], + builder: ["argument"], + aliases: ["LVal", "PatternLike"], + deprecatedAlias: "RestProperty", + fields: Object.assign({}, patternLikeCommon, { + argument: { + validate: (0, _utils.assertNodeType)("LVal") + } + }) +}); +(0, _utils.default)("ReturnStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + } + } +}); +(0, _utils.default)("SequenceExpression", { + visitor: ["expressions"], + fields: { + expressions: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) + } + }, + aliases: ["Expression"] +}); +(0, _utils.default)("ParenthesizedExpression", { + visitor: ["expression"], + aliases: ["Expression", "ExpressionWrapper"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("SwitchCase", { + visitor: ["test", "consequent"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + consequent: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) + } + } +}); +(0, _utils.default)("SwitchStatement", { + visitor: ["discriminant", "cases"], + aliases: ["Statement", "BlockParent", "Scopable"], + fields: { + discriminant: { + validate: (0, _utils.assertNodeType)("Expression") + }, + cases: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) + } + } +}); +(0, _utils.default)("ThisExpression", { + aliases: ["Expression"] +}); +(0, _utils.default)("ThrowStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("TryStatement", { + visitor: ["block", "handler", "finalizer"], + aliases: ["Statement"], + fields: { + block: { + validate: (0, _utils.assertNodeType)("BlockStatement") + }, + handler: { + optional: true, + validate: (0, _utils.assertNodeType)("CatchClause") + }, + finalizer: { + optional: true, + validate: (0, _utils.assertNodeType)("BlockStatement") + } + } +}); +(0, _utils.default)("UnaryExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: true + }, + argument: { + validate: (0, _utils.assertNodeType)("Expression") + }, + operator: { + validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["UnaryLike", "Expression"] +}); +(0, _utils.default)("UpdateExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { + default: false + }, + argument: { + validate: (0, _utils.assertNodeType)("Expression") + }, + operator: { + validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) + } + }, + visitor: ["argument"], + aliases: ["Expression"] +}); +(0, _utils.default)("VariableDeclaration", { + builder: ["kind", "declarations"], + visitor: ["declarations"], + aliases: ["Statement", "Declaration"], + fields: { + declare: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + kind: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("var", "let", "const")) + }, + declarations: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) + } + } +}); +(0, _utils.default)("VariableDeclarator", { + visitor: ["id", "init"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("LVal") + }, + definite: { + optional: true, + validate: (0, _utils.assertValueType)("boolean") + }, + init: { + optional: true, + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("WhileStatement", { + visitor: ["test", "body"], + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], + fields: { + test: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") + } + } +}); +(0, _utils.default)("WithStatement", { + visitor: ["object", "body"], + aliases: ["Statement"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") + } + } +}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/es2015.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/es2015.js similarity index 87% rename from node_modules/@babel/types/lib/definitions/es2015.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/definitions/es2015.js index 6bee161..b4ce6fa 100644 --- a/node_modules/@babel/types/lib/definitions/es2015.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/es2015.js @@ -11,15 +11,11 @@ var _core = require("./core"); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - (0, _utils.default)("AssignmentPattern", { - visitor: ["left", "right"], + visitor: ["left", "right", "decorators"], builder: ["left", "right"], aliases: ["Pattern", "PatternLike", "LVal"], - fields: _objectSpread({}, _core.patternLikeCommon, { + fields: Object.assign({}, _core.patternLikeCommon, { left: { validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern") }, @@ -35,7 +31,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope visitor: ["elements", "typeAnnotation"], builder: ["elements"], aliases: ["Pattern", "PatternLike", "LVal"], - fields: _objectSpread({}, _core.patternLikeCommon, { + fields: Object.assign({}, _core.patternLikeCommon, { elements: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("PatternLike"))) }, @@ -48,7 +44,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope builder: ["params", "body", "async"], visitor: ["params", "body", "returnType", "typeParameters"], aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: _objectSpread({}, _core.functionCommon, _core.functionTypeAnnotationCommon, { + fields: Object.assign({}, _core.functionCommon, _core.functionTypeAnnotationCommon, { expression: { validate: (0, _utils.assertValueType)("boolean") }, @@ -61,11 +57,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope visitor: ["body"], fields: { body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) } } }); -var classCommon = { +const classCommon = { typeParameters: { validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), optional: true @@ -90,7 +86,7 @@ var classCommon = { builder: ["id", "superClass", "body", "decorators"], visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], - fields: _objectSpread({}, classCommon, { + fields: Object.assign({}, classCommon, { declare: { validate: (0, _utils.assertValueType)("boolean"), optional: true @@ -112,7 +108,7 @@ var classCommon = { (0, _utils.default)("ClassExpression", { inherits: "ClassDeclaration", aliases: ["Scopable", "Class", "Expression", "Pureish"], - fields: _objectSpread({}, classCommon, { + fields: Object.assign({}, classCommon, { id: { optional: true, validate: (0, _utils.assertNodeType)("Identifier") @@ -205,6 +201,10 @@ var classCommon = { }, source: { validate: (0, _utils.assertNodeType)("StringLiteral") + }, + importKind: { + validate: (0, _utils.assertOneOf)("type", "typeof", "value"), + optional: true } } }); @@ -237,7 +237,8 @@ var classCommon = { validate: (0, _utils.assertNodeType)("Identifier") }, importKind: { - validate: (0, _utils.assertOneOf)(null, "type", "typeof") + validate: (0, _utils.assertOneOf)("type", "typeof"), + optional: true } } }); @@ -253,7 +254,7 @@ var classCommon = { } } }); -var classMethodOrPropertyCommon = { +const classMethodOrPropertyCommon = { abstract: { validate: (0, _utils.assertValueType)("boolean"), optional: true @@ -276,18 +277,17 @@ var classMethodOrPropertyCommon = { }, key: { validate: (0, _utils.chain)(function () { - var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - var computed = (0, _utils.assertNodeType)("Expression"); + const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const computed = (0, _utils.assertNodeType)("Expression"); return function (node, key, val) { - var validator = node.computed ? computed : normal; + const validator = node.computed ? computed : normal; validator(node, key, val); }; }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) } }; exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon; - -var classMethodOrDeclareMethodCommon = _objectSpread({}, _core.functionCommon, classMethodOrPropertyCommon, { +const classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, classMethodOrPropertyCommon, { kind: { validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("get", "set", "method", "constructor")), default: "method" @@ -301,23 +301,22 @@ var classMethodOrDeclareMethodCommon = _objectSpread({}, _core.functionCommon, c optional: true } }); - exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; (0, _utils.default)("ClassMethod", { aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], builder: ["kind", "key", "params", "body", "computed", "static"], visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - fields: _objectSpread({}, classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, { + fields: Object.assign({}, classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, { body: { validate: (0, _utils.assertNodeType)("BlockStatement") } }) }); (0, _utils.default)("ObjectPattern", { - visitor: ["properties", "typeAnnotation"], + visitor: ["properties", "typeAnnotation", "decorators"], builder: ["properties"], aliases: ["Pattern", "PatternLike", "LVal"], - fields: _objectSpread({}, _core.patternLikeCommon, { + fields: Object.assign({}, _core.patternLikeCommon, { properties: { validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) } @@ -345,6 +344,10 @@ exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; }, quasi: { validate: (0, _utils.assertNodeType)("TemplateLiteral") + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true } } }); diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/experimental.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/experimental.js new file mode 100644 index 0000000..3332a60 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/experimental.js @@ -0,0 +1,205 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +var _es = require("./es2015"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +(0, _utils.default)("ArgumentPlaceholder", {}); +(0, _utils.default)("AwaitExpression", { + builder: ["argument"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("BindExpression", { + visitor: ["object", "callee"], + aliases: ["Expression"], + fields: {} +}); +(0, _utils.default)("ClassProperty", { + visitor: ["key", "value", "typeAnnotation", "decorators"], + builder: ["key", "value", "typeAnnotation", "decorators", "computed"], + aliases: ["Property"], + fields: Object.assign({}, _es.classMethodOrPropertyCommon, { + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + }, + definite: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true + }, + decorators: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + } + }) +}); +(0, _utils.default)("OptionalMemberExpression", { + builder: ["object", "property", "computed", "optional"], + visitor: ["object", "property"], + aliases: ["Expression"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("Expression") + }, + property: { + validate: function () { + const normal = (0, _utils.assertNodeType)("Identifier"); + const computed = (0, _utils.assertNodeType)("Expression"); + return function (node, key, val) { + const validator = node.computed ? computed : normal; + validator(node, key, val); + }; + }() + }, + computed: { + default: false + }, + optional: { + validate: (0, _utils.assertValueType)("boolean") + } + } +}); +(0, _utils.default)("PipelineTopicExpression", { + builder: ["expression"], + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("PipelineBareFunction", { + builder: ["callee"], + visitor: ["callee"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("PipelinePrimaryTopicReference", { + aliases: ["Expression"] +}); +(0, _utils.default)("OptionalCallExpression", { + visitor: ["callee", "arguments", "typeParameters", "typeArguments"], + builder: ["callee", "arguments", "optional"], + aliases: ["Expression"], + fields: { + callee: { + validate: (0, _utils.assertNodeType)("Expression") + }, + arguments: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName"))) + }, + optional: { + validate: (0, _utils.assertValueType)("boolean") + }, + typeArguments: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("ClassPrivateProperty", { + visitor: ["key", "value"], + builder: ["key", "value"], + aliases: ["Property", "Private"], + fields: { + key: { + validate: (0, _utils.assertNodeType)("PrivateName") + }, + value: { + validate: (0, _utils.assertNodeType)("Expression"), + optional: true + } + } +}); +(0, _utils.default)("ClassPrivateMethod", { + builder: ["kind", "key", "params", "body", "static"], + visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], + aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], + fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, { + key: { + validate: (0, _utils.assertNodeType)("PrivateName") + }, + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + }) +}); +(0, _utils.default)("Import", { + aliases: ["Expression"] +}); +(0, _utils.default)("Decorator", { + visitor: ["expression"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("DoExpression", { + visitor: ["body"], + aliases: ["Expression"], + fields: { + body: { + validate: (0, _utils.assertNodeType)("BlockStatement") + } + } +}); +(0, _utils.default)("ExportDefaultSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("ExportNamespaceSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { + exported: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("PrivateName", { + visitor: ["id"], + aliases: ["Private"], + fields: { + id: { + validate: (0, _utils.assertNodeType)("Identifier") + } + } +}); +(0, _utils.default)("BigIntLiteral", { + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] +}); \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/flow.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/flow.js new file mode 100644 index 0000000..6969237 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/flow.js @@ -0,0 +1,386 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { + (0, _utils.default)(name, { + builder: ["id", "typeParameters", "extends", "body"], + visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)(typeParameterType), + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), + body: (0, _utils.validateType)("ObjectTypeAnnotation") + } + }); +}; + +(0, _utils.default)("AnyTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ArrayTypeAnnotation", { + visitor: ["elementType"], + aliases: ["Flow", "FlowType"], + fields: { + elementType: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("BooleanTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("BooleanLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("NullLiteralTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ClassImplements", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineInterfaceishType("DeclareClass"); +(0, _utils.default)("DeclareFunction", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") + } +}); +defineInterfaceishType("DeclareInterface"); +(0, _utils.default)("DeclareModule", { + builder: ["id", "body", "kind"], + visitor: ["id", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + body: (0, _utils.validateType)("BlockStatement"), + kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) + } +}); +(0, _utils.default)("DeclareModuleExports", { + visitor: ["typeAnnotation"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + typeAnnotation: (0, _utils.validateType)("TypeAnnotation") + } +}); +(0, _utils.default)("DeclareTypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + right: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("DeclareOpaqueType", { + visitor: ["id", "typeParameters", "supertype"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, _utils.validateOptionalType)("FlowType") + } +}); +(0, _utils.default)("DeclareVariable", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +(0, _utils.default)("DeclareExportDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + declaration: (0, _utils.validateOptionalType)("Flow"), + specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), + source: (0, _utils.validateOptionalType)("StringLiteral"), + default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("DeclareExportAllDeclaration", { + visitor: ["source"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + source: (0, _utils.validateType)("StringLiteral"), + exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)(["type", "value"])) + } +}); +(0, _utils.default)("DeclaredPredicate", { + visitor: ["value"], + aliases: ["Flow", "FlowPredicate"], + fields: { + value: (0, _utils.validateType)("Flow") + } +}); +(0, _utils.default)("ExistsTypeAnnotation", { + aliases: ["Flow", "FlowType"] +}); +(0, _utils.default)("FunctionTypeAnnotation", { + visitor: ["typeParameters", "params", "rest", "returnType"], + aliases: ["Flow", "FlowType"], + fields: { + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), + rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), + returnType: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("FunctionTypeParam", { + visitor: ["name", "typeAnnotation"], + aliases: ["Flow"], + fields: { + name: (0, _utils.validateOptionalType)("Identifier"), + typeAnnotation: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("GenericTypeAnnotation", { + visitor: ["id", "typeParameters"], + aliases: ["Flow", "FlowType"], + fields: { + id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +(0, _utils.default)("InferredPredicate", { + aliases: ["Flow", "FlowPredicate"] +}); +(0, _utils.default)("InterfaceExtends", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") + } +}); +defineInterfaceishType("InterfaceDeclaration"); +(0, _utils.default)("InterfaceTypeAnnotation", { + visitor: ["extends", "body"], + aliases: ["Flow", "FlowType"], + fields: { + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), + body: (0, _utils.validateType)("ObjectTypeAnnotation") + } +}); +(0, _utils.default)("IntersectionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("MixedTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("EmptyTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("NullableTypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow", "FlowType"], + fields: { + typeAnnotation: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("NumberLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("number")) + } +}); +(0, _utils.default)("NumberTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ObjectTypeAnnotation", { + visitor: ["properties", "indexers", "callProperties", "internalSlots"], + aliases: ["Flow", "FlowType"], + builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], + fields: { + properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), + indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), + callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), + internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), + exact: { + validate: (0, _utils.assertValueType)("boolean"), + default: false + }, + inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeInternalSlot", { + visitor: ["id", "value", "optional", "static", "method"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + id: (0, _utils.validateType)("Identifier"), + value: (0, _utils.validateType)("FlowType"), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeCallProperty", { + visitor: ["value"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + value: (0, _utils.validateType)("FlowType"), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) + } +}); +(0, _utils.default)("ObjectTypeIndexer", { + visitor: ["id", "key", "value", "variance"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + id: (0, _utils.validateOptionalType)("Identifier"), + key: (0, _utils.validateType)("FlowType"), + value: (0, _utils.validateType)("FlowType"), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("ObjectTypeProperty", { + visitor: ["key", "value", "variance"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + value: (0, _utils.validateType)("FlowType"), + kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), + static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("ObjectTypeSpreadProperty", { + visitor: ["argument"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + argument: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("OpaqueType", { + visitor: ["id", "typeParameters", "supertype", "impltype"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, _utils.validateOptionalType)("FlowType"), + impltype: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("QualifiedTypeIdentifier", { + visitor: ["id", "qualification"], + aliases: ["Flow"], + fields: { + id: (0, _utils.validateType)("Identifier"), + qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) + } +}); +(0, _utils.default)("StringLiteralTypeAnnotation", { + builder: ["value"], + aliases: ["Flow", "FlowType"], + fields: { + value: (0, _utils.validate)((0, _utils.assertValueType)("string")) + } +}); +(0, _utils.default)("StringTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("ThisTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); +(0, _utils.default)("TupleTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("TypeofTypeAnnotation", { + visitor: ["argument"], + aliases: ["Flow", "FlowType"], + fields: { + argument: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: { + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), + right: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeAnnotation", { + aliases: ["Flow"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("FlowType") + } +}); +(0, _utils.default)("TypeCastExpression", { + visitor: ["expression", "typeAnnotation"], + aliases: ["Flow", "ExpressionWrapper", "Expression"], + fields: { + expression: (0, _utils.validateType)("Expression"), + typeAnnotation: (0, _utils.validateType)("TypeAnnotation") + } +}); +(0, _utils.default)("TypeParameter", { + aliases: ["Flow"], + visitor: ["bound", "default", "variance"], + fields: { + name: (0, _utils.validate)((0, _utils.assertValueType)("string")), + bound: (0, _utils.validateOptionalType)("TypeAnnotation"), + default: (0, _utils.validateOptionalType)("FlowType"), + variance: (0, _utils.validateOptionalType)("Variance") + } +}); +(0, _utils.default)("TypeParameterDeclaration", { + aliases: ["Flow"], + visitor: ["params"], + fields: { + params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) + } +}); +(0, _utils.default)("TypeParameterInstantiation", { + aliases: ["Flow"], + visitor: ["params"], + fields: { + params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("UnionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow", "FlowType"], + fields: { + types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) + } +}); +(0, _utils.default)("Variance", { + aliases: ["Flow"], + builder: ["kind"], + fields: { + kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) + } +}); +(0, _utils.default)("VoidTypeAnnotation", { + aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] +}); \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/index.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/index.js new file mode 100644 index 0000000..7f28569 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/index.js @@ -0,0 +1,101 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "VISITOR_KEYS", { + enumerable: true, + get: function () { + return _utils.VISITOR_KEYS; + } +}); +Object.defineProperty(exports, "ALIAS_KEYS", { + enumerable: true, + get: function () { + return _utils.ALIAS_KEYS; + } +}); +Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", { + enumerable: true, + get: function () { + return _utils.FLIPPED_ALIAS_KEYS; + } +}); +Object.defineProperty(exports, "NODE_FIELDS", { + enumerable: true, + get: function () { + return _utils.NODE_FIELDS; + } +}); +Object.defineProperty(exports, "BUILDER_KEYS", { + enumerable: true, + get: function () { + return _utils.BUILDER_KEYS; + } +}); +Object.defineProperty(exports, "DEPRECATED_KEYS", { + enumerable: true, + get: function () { + return _utils.DEPRECATED_KEYS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS_ALIAS; + } +}); +Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", { + enumerable: true, + get: function () { + return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; + } +}); +exports.TYPES = void 0; + +function _toFastProperties() { + const data = _interopRequireDefault(require("to-fast-properties")); + + _toFastProperties = function () { + return data; + }; + + return data; +} + +require("./core"); + +require("./es2015"); + +require("./flow"); + +require("./jsx"); + +require("./misc"); + +require("./experimental"); + +require("./typescript"); + +var _utils = require("./utils"); + +var _placeholders = require("./placeholders"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _toFastProperties().default)(_utils.VISITOR_KEYS); +(0, _toFastProperties().default)(_utils.ALIAS_KEYS); +(0, _toFastProperties().default)(_utils.FLIPPED_ALIAS_KEYS); +(0, _toFastProperties().default)(_utils.NODE_FIELDS); +(0, _toFastProperties().default)(_utils.BUILDER_KEYS); +(0, _toFastProperties().default)(_utils.DEPRECATED_KEYS); +(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_ALIAS); +(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); +const TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS)); +exports.TYPES = TYPES; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/jsx.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/jsx.js new file mode 100644 index 0000000..60d37e9 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/jsx.js @@ -0,0 +1,160 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +(0, _utils.default)("JSXAttribute", { + visitor: ["name", "value"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") + }, + value: { + optional: true, + validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") + } + } +}); +(0, _utils.default)("JSXClosingElement", { + visitor: ["name"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression") + } + } +}); +(0, _utils.default)("JSXElement", { + builder: ["openingElement", "closingElement", "children", "selfClosing"], + visitor: ["openingElement", "children", "closingElement"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingElement: { + validate: (0, _utils.assertNodeType)("JSXOpeningElement") + }, + closingElement: { + optional: true, + validate: (0, _utils.assertNodeType)("JSXClosingElement") + }, + children: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + } + } +}); +(0, _utils.default)("JSXEmptyExpression", { + aliases: ["JSX"] +}); +(0, _utils.default)("JSXExpressionContainer", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") + } + } +}); +(0, _utils.default)("JSXSpreadChild", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { + expression: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("JSXIdentifier", { + builder: ["name"], + aliases: ["JSX"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("JSXMemberExpression", { + visitor: ["object", "property"], + aliases: ["JSX"], + fields: { + object: { + validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") + }, + property: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + } + } +}); +(0, _utils.default)("JSXNamespacedName", { + visitor: ["namespace", "name"], + aliases: ["JSX"], + fields: { + namespace: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + }, + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier") + } + } +}); +(0, _utils.default)("JSXOpeningElement", { + builder: ["name", "attributes", "selfClosing"], + visitor: ["name", "attributes"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression") + }, + selfClosing: { + default: false, + validate: (0, _utils.assertValueType)("boolean") + }, + attributes: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: true + } + } +}); +(0, _utils.default)("JSXSpreadAttribute", { + visitor: ["argument"], + aliases: ["JSX"], + fields: { + argument: { + validate: (0, _utils.assertNodeType)("Expression") + } + } +}); +(0, _utils.default)("JSXText", { + aliases: ["JSX", "Immutable"], + builder: ["value"], + fields: { + value: { + validate: (0, _utils.assertValueType)("string") + } + } +}); +(0, _utils.default)("JSXFragment", { + builder: ["openingFragment", "closingFragment", "children"], + visitor: ["openingFragment", "children", "closingFragment"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingFragment: { + validate: (0, _utils.assertNodeType)("JSXOpeningFragment") + }, + closingFragment: { + validate: (0, _utils.assertNodeType)("JSXClosingFragment") + }, + children: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + } + } +}); +(0, _utils.default)("JSXOpeningFragment", { + aliases: ["JSX", "Immutable"] +}); +(0, _utils.default)("JSXClosingFragment", { + aliases: ["JSX", "Immutable"] +}); \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/misc.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/misc.js new file mode 100644 index 0000000..ecc4db6 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/misc.js @@ -0,0 +1,23 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +var _placeholders = require("./placeholders"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +(0, _utils.default)("Noop", { + visitor: [] +}); +(0, _utils.default)("Placeholder", { + visitor: [], + builder: ["expectedNode", "name"], + fields: { + name: { + validate: (0, _utils.assertNodeType)("Identifier") + }, + expectedNode: { + validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) + } + } +}); \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/placeholders.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/placeholders.js new file mode 100644 index 0000000..0edf7b2 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/placeholders.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0; + +var _utils = require("./utils"); + +const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; +exports.PLACEHOLDERS = PLACEHOLDERS; +const PLACEHOLDERS_ALIAS = { + Declaration: ["Statement"], + Pattern: ["PatternLike", "LVal"] +}; +exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; + +for (const type of PLACEHOLDERS) { + const alias = _utils.ALIAS_KEYS[type]; + if (alias && alias.length) PLACEHOLDERS_ALIAS[type] = alias; +} + +const PLACEHOLDERS_FLIPPED_ALIAS = {}; +exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; +Object.keys(PLACEHOLDERS_ALIAS).forEach(type => { + PLACEHOLDERS_ALIAS[type].forEach(alias => { + if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { + PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; + } + + PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); + }); +}); \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/typescript.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/typescript.js new file mode 100644 index 0000000..6760567 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/typescript.js @@ -0,0 +1,411 @@ +"use strict"; + +var _utils = _interopRequireWildcard(require("./utils")); + +var _core = require("./core"); + +var _es = require("./es2015"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +const bool = (0, _utils.assertValueType)("boolean"); +const tSFunctionTypeAnnotationCommon = { + returnType: { + validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), + optional: true + }, + typeParameters: { + validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), + optional: true + } +}; +(0, _utils.default)("TSParameterProperty", { + aliases: ["LVal"], + visitor: ["parameter"], + fields: { + accessibility: { + validate: (0, _utils.assertOneOf)("public", "private", "protected"), + optional: true + }, + readonly: { + validate: (0, _utils.assertValueType)("boolean"), + optional: true + }, + parameter: { + validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") + } + } +}); +(0, _utils.default)("TSDeclareFunction", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "params", "returnType"], + fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) +}); +(0, _utils.default)("TSDeclareMethod", { + visitor: ["decorators", "key", "typeParameters", "params", "returnType"], + fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) +}); +(0, _utils.default)("TSQualifiedName", { + aliases: ["TSEntityName"], + visitor: ["left", "right"], + fields: { + left: (0, _utils.validateType)("TSEntityName"), + right: (0, _utils.validateType)("Identifier") + } +}); +const signatureDeclarationCommon = { + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") +}; +const callConstructSignatureDeclaration = { + aliases: ["TSTypeElement"], + visitor: ["typeParameters", "parameters", "typeAnnotation"], + fields: signatureDeclarationCommon +}; +(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration); +(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); +const namedTypeElementCommon = { + key: (0, _utils.validateType)("Expression"), + computed: (0, _utils.validate)(bool), + optional: (0, _utils.validateOptional)(bool) +}; +(0, _utils.default)("TSPropertySignature", { + aliases: ["TSTypeElement"], + visitor: ["key", "typeAnnotation", "initializer"], + fields: Object.assign({}, namedTypeElementCommon, { + readonly: (0, _utils.validateOptional)(bool), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), + initializer: (0, _utils.validateOptionalType)("Expression") + }) +}); +(0, _utils.default)("TSMethodSignature", { + aliases: ["TSTypeElement"], + visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], + fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon) +}); +(0, _utils.default)("TSIndexSignature", { + aliases: ["TSTypeElement"], + visitor: ["parameters", "typeAnnotation"], + fields: { + readonly: (0, _utils.validateOptional)(bool), + parameters: (0, _utils.validateArrayOfType)("Identifier"), + typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") + } +}); +const tsKeywordTypes = ["TSAnyKeyword", "TSUnknownKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSVoidKeyword", "TSUndefinedKeyword", "TSNullKeyword", "TSNeverKeyword"]; + +for (const type of tsKeywordTypes) { + (0, _utils.default)(type, { + aliases: ["TSType"], + visitor: [], + fields: {} + }); +} + +(0, _utils.default)("TSThisType", { + aliases: ["TSType"], + visitor: [], + fields: {} +}); +const fnOrCtr = { + aliases: ["TSType"], + visitor: ["typeParameters", "parameters", "typeAnnotation"], + fields: signatureDeclarationCommon +}; +(0, _utils.default)("TSFunctionType", fnOrCtr); +(0, _utils.default)("TSConstructorType", fnOrCtr); +(0, _utils.default)("TSTypeReference", { + aliases: ["TSType"], + visitor: ["typeName", "typeParameters"], + fields: { + typeName: (0, _utils.validateType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSTypePredicate", { + aliases: ["TSType"], + visitor: ["parameterName", "typeAnnotation"], + fields: { + parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), + typeAnnotation: (0, _utils.validateType)("TSTypeAnnotation") + } +}); +(0, _utils.default)("TSTypeQuery", { + aliases: ["TSType"], + visitor: ["exprName"], + fields: { + exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) + } +}); +(0, _utils.default)("TSTypeLiteral", { + aliases: ["TSType"], + visitor: ["members"], + fields: { + members: (0, _utils.validateArrayOfType)("TSTypeElement") + } +}); +(0, _utils.default)("TSArrayType", { + aliases: ["TSType"], + visitor: ["elementType"], + fields: { + elementType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTupleType", { + aliases: ["TSType"], + visitor: ["elementTypes"], + fields: { + elementTypes: (0, _utils.validateArrayOfType)("TSType") + } +}); +(0, _utils.default)("TSOptionalType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSRestType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +const unionOrIntersection = { + aliases: ["TSType"], + visitor: ["types"], + fields: { + types: (0, _utils.validateArrayOfType)("TSType") + } +}; +(0, _utils.default)("TSUnionType", unionOrIntersection); +(0, _utils.default)("TSIntersectionType", unionOrIntersection); +(0, _utils.default)("TSConditionalType", { + aliases: ["TSType"], + visitor: ["checkType", "extendsType", "trueType", "falseType"], + fields: { + checkType: (0, _utils.validateType)("TSType"), + extendsType: (0, _utils.validateType)("TSType"), + trueType: (0, _utils.validateType)("TSType"), + falseType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSInferType", { + aliases: ["TSType"], + visitor: ["typeParameter"], + fields: { + typeParameter: (0, _utils.validateType)("TSTypeParameter") + } +}); +(0, _utils.default)("TSParenthesizedType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTypeOperator", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSIndexedAccessType", { + aliases: ["TSType"], + visitor: ["objectType", "indexType"], + fields: { + objectType: (0, _utils.validateType)("TSType"), + indexType: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSMappedType", { + aliases: ["TSType"], + visitor: ["typeParameter", "typeAnnotation"], + fields: { + readonly: (0, _utils.validateOptional)(bool), + typeParameter: (0, _utils.validateType)("TSTypeParameter"), + optional: (0, _utils.validateOptional)(bool), + typeAnnotation: (0, _utils.validateOptionalType)("TSType") + } +}); +(0, _utils.default)("TSLiteralType", { + aliases: ["TSType"], + visitor: ["literal"], + fields: { + literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"]) + } +}); +(0, _utils.default)("TSExpressionWithTypeArguments", { + aliases: ["TSType"], + visitor: ["expression", "typeParameters"], + fields: { + expression: (0, _utils.validateType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSInterfaceDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "extends", "body"], + fields: { + declare: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), + body: (0, _utils.validateType)("TSInterfaceBody") + } +}); +(0, _utils.default)("TSInterfaceBody", { + visitor: ["body"], + fields: { + body: (0, _utils.validateArrayOfType)("TSTypeElement") + } +}); +(0, _utils.default)("TSTypeAliasDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "typeParameters", "typeAnnotation"], + fields: { + declare: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSAsExpression", { + aliases: ["Expression"], + visitor: ["expression", "typeAnnotation"], + fields: { + expression: (0, _utils.validateType)("Expression"), + typeAnnotation: (0, _utils.validateType)("TSType") + } +}); +(0, _utils.default)("TSTypeAssertion", { + aliases: ["Expression"], + visitor: ["typeAnnotation", "expression"], + fields: { + typeAnnotation: (0, _utils.validateType)("TSType"), + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSEnumDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "members"], + fields: { + declare: (0, _utils.validateOptional)(bool), + const: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)("Identifier"), + members: (0, _utils.validateArrayOfType)("TSEnumMember"), + initializer: (0, _utils.validateOptionalType)("Expression") + } +}); +(0, _utils.default)("TSEnumMember", { + visitor: ["id", "initializer"], + fields: { + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + initializer: (0, _utils.validateOptionalType)("Expression") + } +}); +(0, _utils.default)("TSModuleDeclaration", { + aliases: ["Statement", "Declaration"], + visitor: ["id", "body"], + fields: { + declare: (0, _utils.validateOptional)(bool), + global: (0, _utils.validateOptional)(bool), + id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), + body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) + } +}); +(0, _utils.default)("TSModuleBlock", { + visitor: ["body"], + fields: { + body: (0, _utils.validateArrayOfType)("Statement") + } +}); +(0, _utils.default)("TSImportType", { + aliases: ["TSType"], + visitor: ["argument", "qualifier", "typeParameters"], + fields: { + argument: (0, _utils.validateType)("StringLiteral"), + qualifier: (0, _utils.validateOptionalType)("TSEntityName"), + typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") + } +}); +(0, _utils.default)("TSImportEqualsDeclaration", { + aliases: ["Statement"], + visitor: ["id", "moduleReference"], + fields: { + isExport: (0, _utils.validate)(bool), + id: (0, _utils.validateType)("Identifier"), + moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]) + } +}); +(0, _utils.default)("TSExternalModuleReference", { + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("StringLiteral") + } +}); +(0, _utils.default)("TSNonNullExpression", { + aliases: ["Expression"], + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSExportAssignment", { + aliases: ["Statement"], + visitor: ["expression"], + fields: { + expression: (0, _utils.validateType)("Expression") + } +}); +(0, _utils.default)("TSNamespaceExportDeclaration", { + aliases: ["Statement"], + visitor: ["id"], + fields: { + id: (0, _utils.validateType)("Identifier") + } +}); +(0, _utils.default)("TSTypeAnnotation", { + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: { + validate: (0, _utils.assertNodeType)("TSType") + } + } +}); +(0, _utils.default)("TSTypeParameterInstantiation", { + visitor: ["params"], + fields: { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) + } + } +}); +(0, _utils.default)("TSTypeParameterDeclaration", { + visitor: ["params"], + fields: { + params: { + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) + } + } +}); +(0, _utils.default)("TSTypeParameter", { + visitor: ["constraint", "default"], + fields: { + name: { + validate: (0, _utils.assertValueType)("string") + }, + constraint: { + validate: (0, _utils.assertNodeType)("TSType"), + optional: true + }, + default: { + validate: (0, _utils.assertNodeType)("TSType"), + optional: true + } + } +}); \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/utils.js b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/utils.js new file mode 100644 index 0000000..f049ccc --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/utils.js @@ -0,0 +1,220 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.validate = validate; +exports.typeIs = typeIs; +exports.validateType = validateType; +exports.validateOptional = validateOptional; +exports.validateOptionalType = validateOptionalType; +exports.arrayOf = arrayOf; +exports.arrayOfType = arrayOfType; +exports.validateArrayOfType = validateArrayOfType; +exports.assertEach = assertEach; +exports.assertOneOf = assertOneOf; +exports.assertNodeType = assertNodeType; +exports.assertNodeOrValueType = assertNodeOrValueType; +exports.assertValueType = assertValueType; +exports.chain = chain; +exports.default = defineType; +exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0; + +var _is = _interopRequireDefault(require("../validators/is")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const VISITOR_KEYS = {}; +exports.VISITOR_KEYS = VISITOR_KEYS; +const ALIAS_KEYS = {}; +exports.ALIAS_KEYS = ALIAS_KEYS; +const FLIPPED_ALIAS_KEYS = {}; +exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; +const NODE_FIELDS = {}; +exports.NODE_FIELDS = NODE_FIELDS; +const BUILDER_KEYS = {}; +exports.BUILDER_KEYS = BUILDER_KEYS; +const DEPRECATED_KEYS = {}; +exports.DEPRECATED_KEYS = DEPRECATED_KEYS; + +function getType(val) { + if (Array.isArray(val)) { + return "array"; + } else if (val === null) { + return "null"; + } else if (val === undefined) { + return "undefined"; + } else { + return typeof val; + } +} + +function validate(validate) { + return { + validate + }; +} + +function typeIs(typeName) { + return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); +} + +function validateType(typeName) { + return validate(typeIs(typeName)); +} + +function validateOptional(validate) { + return { + validate, + optional: true + }; +} + +function validateOptionalType(typeName) { + return { + validate: typeIs(typeName), + optional: true + }; +} + +function arrayOf(elementType) { + return chain(assertValueType("array"), assertEach(elementType)); +} + +function arrayOfType(typeName) { + return arrayOf(typeIs(typeName)); +} + +function validateArrayOfType(typeName) { + return validate(arrayOfType(typeName)); +} + +function assertEach(callback) { + function validator(node, key, val) { + if (!Array.isArray(val)) return; + + for (let i = 0; i < val.length; i++) { + callback(node, `${key}[${i}]`, val[i]); + } + } + + validator.each = callback; + return validator; +} + +function assertOneOf(...values) { + function validate(node, key, val) { + if (values.indexOf(val) < 0) { + throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); + } + } + + validate.oneOf = values; + return validate; +} + +function assertNodeType(...types) { + function validate(node, key, val) { + let valid = false; + + for (const type of types) { + if ((0, _is.default)(type, val)) { + valid = true; + break; + } + } + + if (!valid) { + throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} ` + `but instead got ${JSON.stringify(val && val.type)}`); + } + } + + validate.oneOfNodeTypes = types; + return validate; +} + +function assertNodeOrValueType(...types) { + function validate(node, key, val) { + let valid = false; + + for (const type of types) { + if (getType(val) === type || (0, _is.default)(type, val)) { + valid = true; + break; + } + } + + if (!valid) { + throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} ` + `but instead got ${JSON.stringify(val && val.type)}`); + } + } + + validate.oneOfNodeOrValueTypes = types; + return validate; +} + +function assertValueType(type) { + function validate(node, key, val) { + const valid = getType(val) === type; + + if (!valid) { + throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); + } + } + + validate.type = type; + return validate; +} + +function chain(...fns) { + function validate(...args) { + for (const fn of fns) { + fn(...args); + } + } + + validate.chainOf = fns; + return validate; +} + +function defineType(type, opts = {}) { + const inherits = opts.inherits && store[opts.inherits] || {}; + const fields = opts.fields || inherits.fields || {}; + const visitor = opts.visitor || inherits.visitor || []; + const aliases = opts.aliases || inherits.aliases || []; + const builder = opts.builder || inherits.builder || opts.visitor || []; + + if (opts.deprecatedAlias) { + DEPRECATED_KEYS[opts.deprecatedAlias] = type; + } + + for (const key of visitor.concat(builder)) { + fields[key] = fields[key] || {}; + } + + for (const key of Object.keys(fields)) { + const field = fields[key]; + + if (builder.indexOf(key) === -1) { + field.optional = true; + } + + if (field.default === undefined) { + field.default = null; + } else if (!field.validate) { + field.validate = assertValueType(getType(field.default)); + } + } + + VISITOR_KEYS[type] = opts.visitor = visitor; + BUILDER_KEYS[type] = opts.builder = builder; + NODE_FIELDS[type] = opts.fields = fields; + ALIAS_KEYS[type] = opts.aliases = aliases; + aliases.forEach(alias => { + FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; + FLIPPED_ALIAS_KEYS[alias].push(type); + }); + store[type] = opts; +} + +const store = {}; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/index.d.ts b/node_modules/@babel/core/node_modules/@babel/types/lib/index.d.ts new file mode 100644 index 0000000..e1b6d08 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/index.d.ts @@ -0,0 +1,2072 @@ +// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/typescript.js for script used. + +interface BaseComment { + value: string; + start: number; + end: number; + loc: SourceLocation; + type: "CommentBlock" | "CommentLine"; +} + +export interface CommentBlock extends BaseComment { + type: "CommentBlock"; +} + +export interface CommentLine extends BaseComment { + type: "CommentLine"; +} + +export type Comment = CommentBlock | CommentLine; + +export interface SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +interface BaseNode { + leadingComments: ReadonlyArray | null; + innerComments: ReadonlyArray | null; + trailingComments: ReadonlyArray | null; + start: number | null; + end: number | null; + loc: SourceLocation | null; + type: Node["type"]; +} + +export type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | MixedTypeAnnotation | ModuleDeclaration | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Statement | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | TSAnyKeyword | TSArrayType | TSAsExpression | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TryStatement | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression; + +export interface ArrayExpression extends BaseNode { + type: "ArrayExpression"; + elements: Array; +} + +export interface AssignmentExpression extends BaseNode { + type: "AssignmentExpression"; + operator: string; + left: LVal; + right: Expression; +} + +export interface BinaryExpression extends BaseNode { + type: "BinaryExpression"; + operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; + left: Expression; + right: Expression; +} + +export interface InterpreterDirective extends BaseNode { + type: "InterpreterDirective"; + value: string; +} + +export interface Directive extends BaseNode { + type: "Directive"; + value: DirectiveLiteral; +} + +export interface DirectiveLiteral extends BaseNode { + type: "DirectiveLiteral"; + value: string; +} + +export interface BlockStatement extends BaseNode { + type: "BlockStatement"; + body: Array; + directives: Array; +} + +export interface BreakStatement extends BaseNode { + type: "BreakStatement"; + label: Identifier | null; +} + +export interface CallExpression extends BaseNode { + type: "CallExpression"; + callee: Expression; + arguments: Array; + optional: true | false | null; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface CatchClause extends BaseNode { + type: "CatchClause"; + param: Identifier | null; + body: BlockStatement; +} + +export interface ConditionalExpression extends BaseNode { + type: "ConditionalExpression"; + test: Expression; + consequent: Expression; + alternate: Expression; +} + +export interface ContinueStatement extends BaseNode { + type: "ContinueStatement"; + label: Identifier | null; +} + +export interface DebuggerStatement extends BaseNode { + type: "DebuggerStatement"; +} + +export interface DoWhileStatement extends BaseNode { + type: "DoWhileStatement"; + test: Expression; + body: Statement; +} + +export interface EmptyStatement extends BaseNode { + type: "EmptyStatement"; +} + +export interface ExpressionStatement extends BaseNode { + type: "ExpressionStatement"; + expression: Expression; +} + +export interface File extends BaseNode { + type: "File"; + program: Program; + comments: any; + tokens: any; +} + +export interface ForInStatement extends BaseNode { + type: "ForInStatement"; + left: VariableDeclaration | LVal; + right: Expression; + body: Statement; +} + +export interface ForStatement extends BaseNode { + type: "ForStatement"; + init: VariableDeclaration | Expression | null; + test: Expression | null; + update: Expression | null; + body: Statement; +} + +export interface FunctionDeclaration extends BaseNode { + type: "FunctionDeclaration"; + id: Identifier | null; + params: Array; + body: BlockStatement; + generator: boolean; + async: boolean; + declare: boolean | null; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface FunctionExpression extends BaseNode { + type: "FunctionExpression"; + id: Identifier | null; + params: Array; + body: BlockStatement; + generator: boolean; + async: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface Identifier extends BaseNode { + type: "Identifier"; + name: string; + decorators: Array | null; + optional: boolean | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface IfStatement extends BaseNode { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate: Statement | null; +} + +export interface LabeledStatement extends BaseNode { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} + +export interface StringLiteral extends BaseNode { + type: "StringLiteral"; + value: string; +} + +export interface NumericLiteral extends BaseNode { + type: "NumericLiteral"; + value: number; +} + +export interface NullLiteral extends BaseNode { + type: "NullLiteral"; +} + +export interface BooleanLiteral extends BaseNode { + type: "BooleanLiteral"; + value: boolean; +} + +export interface RegExpLiteral extends BaseNode { + type: "RegExpLiteral"; + pattern: string; + flags: string; +} + +export interface LogicalExpression extends BaseNode { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: Expression; + right: Expression; +} + +export interface MemberExpression extends BaseNode { + type: "MemberExpression"; + object: Expression; + property: any; + computed: boolean; + optional: true | false | null; +} + +export interface NewExpression extends BaseNode { + type: "NewExpression"; + callee: Expression; + arguments: Array; + optional: true | false | null; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface Program extends BaseNode { + type: "Program"; + body: Array; + directives: Array; + sourceType: "script" | "module"; + interpreter: InterpreterDirective | null; + sourceFile: string | null; +} + +export interface ObjectExpression extends BaseNode { + type: "ObjectExpression"; + properties: Array; +} + +export interface ObjectMethod extends BaseNode { + type: "ObjectMethod"; + kind: "method" | "get" | "set"; + key: any; + params: Array; + body: BlockStatement; + computed: boolean; + async: boolean; + decorators: Array | null; + generator: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ObjectProperty extends BaseNode { + type: "ObjectProperty"; + key: any; + value: Expression | PatternLike; + computed: boolean; + shorthand: boolean; + decorators: Array | null; +} + +export interface RestElement extends BaseNode { + type: "RestElement"; + argument: LVal; + decorators: Array | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ReturnStatement extends BaseNode { + type: "ReturnStatement"; + argument: Expression | null; +} + +export interface SequenceExpression extends BaseNode { + type: "SequenceExpression"; + expressions: Array; +} + +export interface ParenthesizedExpression extends BaseNode { + type: "ParenthesizedExpression"; + expression: Expression; +} + +export interface SwitchCase extends BaseNode { + type: "SwitchCase"; + test: Expression | null; + consequent: Array; +} + +export interface SwitchStatement extends BaseNode { + type: "SwitchStatement"; + discriminant: Expression; + cases: Array; +} + +export interface ThisExpression extends BaseNode { + type: "ThisExpression"; +} + +export interface ThrowStatement extends BaseNode { + type: "ThrowStatement"; + argument: Expression; +} + +export interface TryStatement extends BaseNode { + type: "TryStatement"; + block: BlockStatement; + handler: CatchClause | null; + finalizer: BlockStatement | null; +} + +export interface UnaryExpression extends BaseNode { + type: "UnaryExpression"; + operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; + argument: Expression; + prefix: boolean; +} + +export interface UpdateExpression extends BaseNode { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: Expression; + prefix: boolean; +} + +export interface VariableDeclaration extends BaseNode { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: Array; + declare: boolean | null; +} + +export interface VariableDeclarator extends BaseNode { + type: "VariableDeclarator"; + id: LVal; + init: Expression | null; + definite: boolean | null; +} + +export interface WhileStatement extends BaseNode { + type: "WhileStatement"; + test: Expression; + body: BlockStatement | Statement; +} + +export interface WithStatement extends BaseNode { + type: "WithStatement"; + object: Expression; + body: BlockStatement | Statement; +} + +export interface AssignmentPattern extends BaseNode { + type: "AssignmentPattern"; + left: Identifier | ObjectPattern | ArrayPattern; + right: Expression; + decorators: Array | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ArrayPattern extends BaseNode { + type: "ArrayPattern"; + elements: Array; + decorators: Array | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface ArrowFunctionExpression extends BaseNode { + type: "ArrowFunctionExpression"; + params: Array; + body: BlockStatement | Expression; + async: boolean; + expression: boolean | null; + generator: boolean; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ClassBody extends BaseNode { + type: "ClassBody"; + body: Array; +} + +export interface ClassDeclaration extends BaseNode { + type: "ClassDeclaration"; + id: Identifier | null; + superClass: Expression | null; + body: ClassBody; + decorators: Array | null; + abstract: boolean | null; + declare: boolean | null; + implements: Array | null; + mixins: any | null; + superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ClassExpression extends BaseNode { + type: "ClassExpression"; + id: Identifier | null; + superClass: Expression | null; + body: ClassBody; + decorators: Array | null; + implements: Array | null; + mixins: any | null; + superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ExportAllDeclaration extends BaseNode { + type: "ExportAllDeclaration"; + source: StringLiteral; +} + +export interface ExportDefaultDeclaration extends BaseNode { + type: "ExportDefaultDeclaration"; + declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression; +} + +export interface ExportNamedDeclaration extends BaseNode { + type: "ExportNamedDeclaration"; + declaration: Declaration | null; + specifiers: Array; + source: StringLiteral | null; +} + +export interface ExportSpecifier extends BaseNode { + type: "ExportSpecifier"; + local: Identifier; + exported: Identifier; +} + +export interface ForOfStatement extends BaseNode { + type: "ForOfStatement"; + left: VariableDeclaration | LVal; + right: Expression; + body: Statement; + await: boolean; +} + +export interface ImportDeclaration extends BaseNode { + type: "ImportDeclaration"; + specifiers: Array; + source: StringLiteral; + importKind: "type" | "typeof" | "value" | null; +} + +export interface ImportDefaultSpecifier extends BaseNode { + type: "ImportDefaultSpecifier"; + local: Identifier; +} + +export interface ImportNamespaceSpecifier extends BaseNode { + type: "ImportNamespaceSpecifier"; + local: Identifier; +} + +export interface ImportSpecifier extends BaseNode { + type: "ImportSpecifier"; + local: Identifier; + imported: Identifier; + importKind: "type" | "typeof" | null; +} + +export interface MetaProperty extends BaseNode { + type: "MetaProperty"; + meta: Identifier; + property: Identifier; +} + +export interface ClassMethod extends BaseNode { + type: "ClassMethod"; + kind: "get" | "set" | "method" | "constructor"; + key: Identifier | StringLiteral | NumericLiteral | Expression; + params: Array; + body: BlockStatement; + computed: boolean; + static: boolean | null; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + async: boolean; + decorators: Array | null; + generator: boolean; + optional: boolean | null; + returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; + typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; +} + +export interface ObjectPattern extends BaseNode { + type: "ObjectPattern"; + properties: Array; + decorators: Array | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; +} + +export interface SpreadElement extends BaseNode { + type: "SpreadElement"; + argument: Expression; +} + +export interface Super extends BaseNode { + type: "Super"; +} + +export interface TaggedTemplateExpression extends BaseNode { + type: "TaggedTemplateExpression"; + tag: Expression; + quasi: TemplateLiteral; + typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; +} + +export interface TemplateElement extends BaseNode { + type: "TemplateElement"; + value: any; + tail: boolean; +} + +export interface TemplateLiteral extends BaseNode { + type: "TemplateLiteral"; + quasis: Array; + expressions: Array; +} + +export interface YieldExpression extends BaseNode { + type: "YieldExpression"; + argument: Expression | null; + delegate: boolean; +} + +export interface AnyTypeAnnotation extends BaseNode { + type: "AnyTypeAnnotation"; +} + +export interface ArrayTypeAnnotation extends BaseNode { + type: "ArrayTypeAnnotation"; + elementType: FlowType; +} + +export interface BooleanTypeAnnotation extends BaseNode { + type: "BooleanTypeAnnotation"; +} + +export interface BooleanLiteralTypeAnnotation extends BaseNode { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; +} + +export interface NullLiteralTypeAnnotation extends BaseNode { + type: "NullLiteralTypeAnnotation"; +} + +export interface ClassImplements extends BaseNode { + type: "ClassImplements"; + id: Identifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface DeclareClass extends BaseNode { + type: "DeclareClass"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array | null; + body: ObjectTypeAnnotation; + implements: Array | null; + mixins: Array | null; +} + +export interface DeclareFunction extends BaseNode { + type: "DeclareFunction"; + id: Identifier; + predicate: DeclaredPredicate | null; +} + +export interface DeclareInterface extends BaseNode { + type: "DeclareInterface"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array | null; + body: ObjectTypeAnnotation; + implements: Array | null; + mixins: Array | null; +} + +export interface DeclareModule extends BaseNode { + type: "DeclareModule"; + id: Identifier | StringLiteral; + body: BlockStatement; + kind: "CommonJS" | "ES" | null; +} + +export interface DeclareModuleExports extends BaseNode { + type: "DeclareModuleExports"; + typeAnnotation: TypeAnnotation; +} + +export interface DeclareTypeAlias extends BaseNode { + type: "DeclareTypeAlias"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + right: FlowType; +} + +export interface DeclareOpaqueType extends BaseNode { + type: "DeclareOpaqueType"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + supertype: FlowType | null; +} + +export interface DeclareVariable extends BaseNode { + type: "DeclareVariable"; + id: Identifier; +} + +export interface DeclareExportDeclaration extends BaseNode { + type: "DeclareExportDeclaration"; + declaration: Flow | null; + specifiers: Array | null; + source: StringLiteral | null; + default: boolean | null; +} + +export interface DeclareExportAllDeclaration extends BaseNode { + type: "DeclareExportAllDeclaration"; + source: StringLiteral; + exportKind: ["type","value"] | null; +} + +export interface DeclaredPredicate extends BaseNode { + type: "DeclaredPredicate"; + value: Flow; +} + +export interface ExistsTypeAnnotation extends BaseNode { + type: "ExistsTypeAnnotation"; +} + +export interface FunctionTypeAnnotation extends BaseNode { + type: "FunctionTypeAnnotation"; + typeParameters: TypeParameterDeclaration | null; + params: Array; + rest: FunctionTypeParam | null; + returnType: FlowType; +} + +export interface FunctionTypeParam extends BaseNode { + type: "FunctionTypeParam"; + name: Identifier | null; + typeAnnotation: FlowType; + optional: boolean | null; +} + +export interface GenericTypeAnnotation extends BaseNode { + type: "GenericTypeAnnotation"; + id: Identifier | QualifiedTypeIdentifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface InferredPredicate extends BaseNode { + type: "InferredPredicate"; +} + +export interface InterfaceExtends extends BaseNode { + type: "InterfaceExtends"; + id: Identifier | QualifiedTypeIdentifier; + typeParameters: TypeParameterInstantiation | null; +} + +export interface InterfaceDeclaration extends BaseNode { + type: "InterfaceDeclaration"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + extends: Array | null; + body: ObjectTypeAnnotation; + implements: Array | null; + mixins: Array | null; +} + +export interface InterfaceTypeAnnotation extends BaseNode { + type: "InterfaceTypeAnnotation"; + extends: Array | null; + body: ObjectTypeAnnotation; +} + +export interface IntersectionTypeAnnotation extends BaseNode { + type: "IntersectionTypeAnnotation"; + types: Array; +} + +export interface MixedTypeAnnotation extends BaseNode { + type: "MixedTypeAnnotation"; +} + +export interface EmptyTypeAnnotation extends BaseNode { + type: "EmptyTypeAnnotation"; +} + +export interface NullableTypeAnnotation extends BaseNode { + type: "NullableTypeAnnotation"; + typeAnnotation: FlowType; +} + +export interface NumberLiteralTypeAnnotation extends BaseNode { + type: "NumberLiteralTypeAnnotation"; + value: number; +} + +export interface NumberTypeAnnotation extends BaseNode { + type: "NumberTypeAnnotation"; +} + +export interface ObjectTypeAnnotation extends BaseNode { + type: "ObjectTypeAnnotation"; + properties: Array; + indexers: Array | null; + callProperties: Array | null; + internalSlots: Array | null; + exact: boolean; + inexact: boolean | null; +} + +export interface ObjectTypeInternalSlot extends BaseNode { + type: "ObjectTypeInternalSlot"; + id: Identifier; + value: FlowType; + optional: boolean; + static: boolean; + method: boolean; +} + +export interface ObjectTypeCallProperty extends BaseNode { + type: "ObjectTypeCallProperty"; + value: FlowType; + static: boolean | null; +} + +export interface ObjectTypeIndexer extends BaseNode { + type: "ObjectTypeIndexer"; + id: Identifier | null; + key: FlowType; + value: FlowType; + variance: Variance | null; + static: boolean | null; +} + +export interface ObjectTypeProperty extends BaseNode { + type: "ObjectTypeProperty"; + key: Identifier | StringLiteral; + value: FlowType; + variance: Variance | null; + kind: "init" | "get" | "set" | null; + optional: boolean | null; + proto: boolean | null; + static: boolean | null; +} + +export interface ObjectTypeSpreadProperty extends BaseNode { + type: "ObjectTypeSpreadProperty"; + argument: FlowType; +} + +export interface OpaqueType extends BaseNode { + type: "OpaqueType"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + supertype: FlowType | null; + impltype: FlowType; +} + +export interface QualifiedTypeIdentifier extends BaseNode { + type: "QualifiedTypeIdentifier"; + id: Identifier; + qualification: Identifier | QualifiedTypeIdentifier; +} + +export interface StringLiteralTypeAnnotation extends BaseNode { + type: "StringLiteralTypeAnnotation"; + value: string; +} + +export interface StringTypeAnnotation extends BaseNode { + type: "StringTypeAnnotation"; +} + +export interface ThisTypeAnnotation extends BaseNode { + type: "ThisTypeAnnotation"; +} + +export interface TupleTypeAnnotation extends BaseNode { + type: "TupleTypeAnnotation"; + types: Array; +} + +export interface TypeofTypeAnnotation extends BaseNode { + type: "TypeofTypeAnnotation"; + argument: FlowType; +} + +export interface TypeAlias extends BaseNode { + type: "TypeAlias"; + id: Identifier; + typeParameters: TypeParameterDeclaration | null; + right: FlowType; +} + +export interface TypeAnnotation extends BaseNode { + type: "TypeAnnotation"; + typeAnnotation: FlowType; +} + +export interface TypeCastExpression extends BaseNode { + type: "TypeCastExpression"; + expression: Expression; + typeAnnotation: TypeAnnotation; +} + +export interface TypeParameter extends BaseNode { + type: "TypeParameter"; + bound: TypeAnnotation | null; + default: FlowType | null; + variance: Variance | null; + name: string | null; +} + +export interface TypeParameterDeclaration extends BaseNode { + type: "TypeParameterDeclaration"; + params: Array; +} + +export interface TypeParameterInstantiation extends BaseNode { + type: "TypeParameterInstantiation"; + params: Array; +} + +export interface UnionTypeAnnotation extends BaseNode { + type: "UnionTypeAnnotation"; + types: Array; +} + +export interface Variance extends BaseNode { + type: "Variance"; + kind: "minus" | "plus"; +} + +export interface VoidTypeAnnotation extends BaseNode { + type: "VoidTypeAnnotation"; +} + +export interface JSXAttribute extends BaseNode { + type: "JSXAttribute"; + name: JSXIdentifier | JSXNamespacedName; + value: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null; +} + +export interface JSXClosingElement extends BaseNode { + type: "JSXClosingElement"; + name: JSXIdentifier | JSXMemberExpression; +} + +export interface JSXElement extends BaseNode { + type: "JSXElement"; + openingElement: JSXOpeningElement; + closingElement: JSXClosingElement | null; + children: Array; + selfClosing: any; +} + +export interface JSXEmptyExpression extends BaseNode { + type: "JSXEmptyExpression"; +} + +export interface JSXExpressionContainer extends BaseNode { + type: "JSXExpressionContainer"; + expression: Expression | JSXEmptyExpression; +} + +export interface JSXSpreadChild extends BaseNode { + type: "JSXSpreadChild"; + expression: Expression; +} + +export interface JSXIdentifier extends BaseNode { + type: "JSXIdentifier"; + name: string; +} + +export interface JSXMemberExpression extends BaseNode { + type: "JSXMemberExpression"; + object: JSXMemberExpression | JSXIdentifier; + property: JSXIdentifier; +} + +export interface JSXNamespacedName extends BaseNode { + type: "JSXNamespacedName"; + namespace: JSXIdentifier; + name: JSXIdentifier; +} + +export interface JSXOpeningElement extends BaseNode { + type: "JSXOpeningElement"; + name: JSXIdentifier | JSXMemberExpression; + attributes: Array; + selfClosing: boolean; + typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; +} + +export interface JSXSpreadAttribute extends BaseNode { + type: "JSXSpreadAttribute"; + argument: Expression; +} + +export interface JSXText extends BaseNode { + type: "JSXText"; + value: string; +} + +export interface JSXFragment extends BaseNode { + type: "JSXFragment"; + openingFragment: JSXOpeningFragment; + closingFragment: JSXClosingFragment; + children: Array; +} + +export interface JSXOpeningFragment extends BaseNode { + type: "JSXOpeningFragment"; +} + +export interface JSXClosingFragment extends BaseNode { + type: "JSXClosingFragment"; +} + +export interface Noop extends BaseNode { + type: "Noop"; +} + +export interface Placeholder extends BaseNode { + type: "Placeholder"; + expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; + name: Identifier; +} + +export interface ArgumentPlaceholder extends BaseNode { + type: "ArgumentPlaceholder"; +} + +export interface AwaitExpression extends BaseNode { + type: "AwaitExpression"; + argument: Expression; +} + +export interface BindExpression extends BaseNode { + type: "BindExpression"; + object: any; + callee: any; +} + +export interface ClassProperty extends BaseNode { + type: "ClassProperty"; + key: Identifier | StringLiteral | NumericLiteral | Expression; + value: Expression | null; + typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; + decorators: Array | null; + computed: boolean; + abstract: boolean | null; + accessibility: "public" | "private" | "protected" | null; + definite: boolean | null; + optional: boolean | null; + readonly: boolean | null; + static: boolean | null; +} + +export interface OptionalMemberExpression extends BaseNode { + type: "OptionalMemberExpression"; + object: Expression; + property: any; + computed: boolean; + optional: boolean; +} + +export interface PipelineTopicExpression extends BaseNode { + type: "PipelineTopicExpression"; + expression: Expression; +} + +export interface PipelineBareFunction extends BaseNode { + type: "PipelineBareFunction"; + callee: Expression; +} + +export interface PipelinePrimaryTopicReference extends BaseNode { + type: "PipelinePrimaryTopicReference"; +} + +export interface OptionalCallExpression extends BaseNode { + type: "OptionalCallExpression"; + callee: Expression; + arguments: Array; + optional: boolean; + typeArguments: TypeParameterInstantiation | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface ClassPrivateProperty extends BaseNode { + type: "ClassPrivateProperty"; + key: PrivateName; + value: Expression | null; +} + +export interface ClassPrivateMethod extends BaseNode { + type: "ClassPrivateMethod"; + kind: "get" | "set" | "method" | "constructor"; + key: PrivateName; + params: Array; + body: BlockStatement; + static: boolean | null; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + async: boolean; + computed: boolean; + decorators: Array | null; + generator: boolean; + optional: boolean | null; + returnType: any | null; + typeParameters: any | null; +} + +export interface Import extends BaseNode { + type: "Import"; +} + +export interface Decorator extends BaseNode { + type: "Decorator"; + expression: Expression; +} + +export interface DoExpression extends BaseNode { + type: "DoExpression"; + body: BlockStatement; +} + +export interface ExportDefaultSpecifier extends BaseNode { + type: "ExportDefaultSpecifier"; + exported: Identifier; +} + +export interface ExportNamespaceSpecifier extends BaseNode { + type: "ExportNamespaceSpecifier"; + exported: Identifier; +} + +export interface PrivateName extends BaseNode { + type: "PrivateName"; + id: Identifier; +} + +export interface BigIntLiteral extends BaseNode { + type: "BigIntLiteral"; + value: string; +} + +export interface TSParameterProperty extends BaseNode { + type: "TSParameterProperty"; + parameter: Identifier | AssignmentPattern; + accessibility: "public" | "private" | "protected" | null; + readonly: boolean | null; +} + +export interface TSDeclareFunction extends BaseNode { + type: "TSDeclareFunction"; + id: Identifier | null; + typeParameters: TSTypeParameterDeclaration | Noop | null; + params: Array; + returnType: TSTypeAnnotation | Noop | null; + async: boolean; + declare: boolean | null; + generator: boolean; +} + +export interface TSDeclareMethod extends BaseNode { + type: "TSDeclareMethod"; + decorators: Array | null; + key: Identifier | StringLiteral | NumericLiteral | Expression; + typeParameters: TSTypeParameterDeclaration | Noop | null; + params: Array; + returnType: TSTypeAnnotation | Noop | null; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + async: boolean; + computed: boolean; + generator: boolean; + kind: "get" | "set" | "method" | "constructor"; + optional: boolean | null; + static: boolean | null; +} + +export interface TSQualifiedName extends BaseNode { + type: "TSQualifiedName"; + left: TSEntityName; + right: Identifier; +} + +export interface TSCallSignatureDeclaration extends BaseNode { + type: "TSCallSignatureDeclaration"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSConstructSignatureDeclaration extends BaseNode { + type: "TSConstructSignatureDeclaration"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSPropertySignature extends BaseNode { + type: "TSPropertySignature"; + key: Expression; + typeAnnotation: TSTypeAnnotation | null; + initializer: Expression | null; + computed: boolean | null; + optional: boolean | null; + readonly: boolean | null; +} + +export interface TSMethodSignature extends BaseNode { + type: "TSMethodSignature"; + key: Expression; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; + computed: boolean | null; + optional: boolean | null; +} + +export interface TSIndexSignature extends BaseNode { + type: "TSIndexSignature"; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; + readonly: boolean | null; +} + +export interface TSAnyKeyword extends BaseNode { + type: "TSAnyKeyword"; +} + +export interface TSUnknownKeyword extends BaseNode { + type: "TSUnknownKeyword"; +} + +export interface TSNumberKeyword extends BaseNode { + type: "TSNumberKeyword"; +} + +export interface TSObjectKeyword extends BaseNode { + type: "TSObjectKeyword"; +} + +export interface TSBooleanKeyword extends BaseNode { + type: "TSBooleanKeyword"; +} + +export interface TSStringKeyword extends BaseNode { + type: "TSStringKeyword"; +} + +export interface TSSymbolKeyword extends BaseNode { + type: "TSSymbolKeyword"; +} + +export interface TSVoidKeyword extends BaseNode { + type: "TSVoidKeyword"; +} + +export interface TSUndefinedKeyword extends BaseNode { + type: "TSUndefinedKeyword"; +} + +export interface TSNullKeyword extends BaseNode { + type: "TSNullKeyword"; +} + +export interface TSNeverKeyword extends BaseNode { + type: "TSNeverKeyword"; +} + +export interface TSThisType extends BaseNode { + type: "TSThisType"; +} + +export interface TSFunctionType extends BaseNode { + type: "TSFunctionType"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSConstructorType extends BaseNode { + type: "TSConstructorType"; + typeParameters: TSTypeParameterDeclaration | null; + parameters: Array; + typeAnnotation: TSTypeAnnotation | null; +} + +export interface TSTypeReference extends BaseNode { + type: "TSTypeReference"; + typeName: TSEntityName; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSTypePredicate extends BaseNode { + type: "TSTypePredicate"; + parameterName: Identifier | TSThisType; + typeAnnotation: TSTypeAnnotation; +} + +export interface TSTypeQuery extends BaseNode { + type: "TSTypeQuery"; + exprName: TSEntityName | TSImportType; +} + +export interface TSTypeLiteral extends BaseNode { + type: "TSTypeLiteral"; + members: Array; +} + +export interface TSArrayType extends BaseNode { + type: "TSArrayType"; + elementType: TSType; +} + +export interface TSTupleType extends BaseNode { + type: "TSTupleType"; + elementTypes: Array; +} + +export interface TSOptionalType extends BaseNode { + type: "TSOptionalType"; + typeAnnotation: TSType; +} + +export interface TSRestType extends BaseNode { + type: "TSRestType"; + typeAnnotation: TSType; +} + +export interface TSUnionType extends BaseNode { + type: "TSUnionType"; + types: Array; +} + +export interface TSIntersectionType extends BaseNode { + type: "TSIntersectionType"; + types: Array; +} + +export interface TSConditionalType extends BaseNode { + type: "TSConditionalType"; + checkType: TSType; + extendsType: TSType; + trueType: TSType; + falseType: TSType; +} + +export interface TSInferType extends BaseNode { + type: "TSInferType"; + typeParameter: TSTypeParameter; +} + +export interface TSParenthesizedType extends BaseNode { + type: "TSParenthesizedType"; + typeAnnotation: TSType; +} + +export interface TSTypeOperator extends BaseNode { + type: "TSTypeOperator"; + typeAnnotation: TSType; + operator: string | null; +} + +export interface TSIndexedAccessType extends BaseNode { + type: "TSIndexedAccessType"; + objectType: TSType; + indexType: TSType; +} + +export interface TSMappedType extends BaseNode { + type: "TSMappedType"; + typeParameter: TSTypeParameter; + typeAnnotation: TSType | null; + optional: boolean | null; + readonly: boolean | null; +} + +export interface TSLiteralType extends BaseNode { + type: "TSLiteralType"; + literal: NumericLiteral | StringLiteral | BooleanLiteral; +} + +export interface TSExpressionWithTypeArguments extends BaseNode { + type: "TSExpressionWithTypeArguments"; + expression: TSEntityName; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSInterfaceDeclaration extends BaseNode { + type: "TSInterfaceDeclaration"; + id: Identifier; + typeParameters: TSTypeParameterDeclaration | null; + extends: Array | null; + body: TSInterfaceBody; + declare: boolean | null; +} + +export interface TSInterfaceBody extends BaseNode { + type: "TSInterfaceBody"; + body: Array; +} + +export interface TSTypeAliasDeclaration extends BaseNode { + type: "TSTypeAliasDeclaration"; + id: Identifier; + typeParameters: TSTypeParameterDeclaration | null; + typeAnnotation: TSType; + declare: boolean | null; +} + +export interface TSAsExpression extends BaseNode { + type: "TSAsExpression"; + expression: Expression; + typeAnnotation: TSType; +} + +export interface TSTypeAssertion extends BaseNode { + type: "TSTypeAssertion"; + typeAnnotation: TSType; + expression: Expression; +} + +export interface TSEnumDeclaration extends BaseNode { + type: "TSEnumDeclaration"; + id: Identifier; + members: Array; + const: boolean | null; + declare: boolean | null; + initializer: Expression | null; +} + +export interface TSEnumMember extends BaseNode { + type: "TSEnumMember"; + id: Identifier | StringLiteral; + initializer: Expression | null; +} + +export interface TSModuleDeclaration extends BaseNode { + type: "TSModuleDeclaration"; + id: Identifier | StringLiteral; + body: TSModuleBlock | TSModuleDeclaration; + declare: boolean | null; + global: boolean | null; +} + +export interface TSModuleBlock extends BaseNode { + type: "TSModuleBlock"; + body: Array; +} + +export interface TSImportType extends BaseNode { + type: "TSImportType"; + argument: StringLiteral; + qualifier: TSEntityName | null; + typeParameters: TSTypeParameterInstantiation | null; +} + +export interface TSImportEqualsDeclaration extends BaseNode { + type: "TSImportEqualsDeclaration"; + id: Identifier; + moduleReference: TSEntityName | TSExternalModuleReference; + isExport: boolean | null; +} + +export interface TSExternalModuleReference extends BaseNode { + type: "TSExternalModuleReference"; + expression: StringLiteral; +} + +export interface TSNonNullExpression extends BaseNode { + type: "TSNonNullExpression"; + expression: Expression; +} + +export interface TSExportAssignment extends BaseNode { + type: "TSExportAssignment"; + expression: Expression; +} + +export interface TSNamespaceExportDeclaration extends BaseNode { + type: "TSNamespaceExportDeclaration"; + id: Identifier; +} + +export interface TSTypeAnnotation extends BaseNode { + type: "TSTypeAnnotation"; + typeAnnotation: TSType; +} + +export interface TSTypeParameterInstantiation extends BaseNode { + type: "TSTypeParameterInstantiation"; + params: Array; +} + +export interface TSTypeParameterDeclaration extends BaseNode { + type: "TSTypeParameterDeclaration"; + params: Array; +} + +export interface TSTypeParameter extends BaseNode { + type: "TSTypeParameter"; + constraint: TSType | null; + default: TSType | null; + name: string | null; +} + +/** + * @deprecated Use `NumericLiteral` + */ +export type NumberLiteral = NumericLiteral; + +/** + * @deprecated Use `RegExpLiteral` + */ +export type RegexLiteral = RegExpLiteral; + +/** + * @deprecated Use `RestElement` + */ +export type RestProperty = RestElement; + +/** + * @deprecated Use `SpreadElement` + */ +export type SpreadProperty = SpreadElement; + +export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | TypeCastExpression | JSXElement | JSXFragment | AwaitExpression | BindExpression | OptionalMemberExpression | PipelinePrimaryTopicReference | OptionalCallExpression | Import | DoExpression | BigIntLiteral | TSAsExpression | TSTypeAssertion | TSNonNullExpression; +export type Binary = BinaryExpression | LogicalExpression; +export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassDeclaration | ClassExpression | ForOfStatement | ClassMethod | ClassPrivateMethod; +export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod; +export type Block = BlockStatement | Program; +export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration; +export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression; +export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement; +export type Conditional = ConditionalExpression | IfStatement; +export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement; +export type While = DoWhileStatement | WhileStatement; +export type ExpressionWrapper = ExpressionStatement | ParenthesizedExpression | TypeCastExpression; +export type For = ForInStatement | ForStatement | ForOfStatement; +export type ForXStatement = ForInStatement | ForOfStatement; +export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; +export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; +export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | ArrowFunctionExpression | ClassDeclaration | ClassExpression | BigIntLiteral; +export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; +export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern; +export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty; +export type TSEntityName = Identifier | TSQualifiedName; +export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral; +export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | BigIntLiteral; +export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty; +export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod; +export type ObjectMember = ObjectMethod | ObjectProperty; +export type Property = ObjectProperty | ClassProperty | ClassPrivateProperty; +export type UnaryLike = UnaryExpression | SpreadElement; +export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern; +export type Class = ClassDeclaration | ClassExpression; +export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration; +export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; +export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier; +export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation; +export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation; +export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation; +export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias; +export type FlowPredicate = DeclaredPredicate | InferredPredicate; +export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment; +export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName; +export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature; +export type TSType = TSAnyKeyword | TSUnknownKeyword | TSNumberKeyword | TSObjectKeyword | TSBooleanKeyword | TSStringKeyword | TSSymbolKeyword | TSVoidKeyword | TSUndefinedKeyword | TSNullKeyword | TSNeverKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType; + +export interface Aliases { + Expression: Expression; + Binary: Binary; + Scopable: Scopable; + BlockParent: BlockParent; + Block: Block; + Statement: Statement; + Terminatorless: Terminatorless; + CompletionStatement: CompletionStatement; + Conditional: Conditional; + Loop: Loop; + While: While; + ExpressionWrapper: ExpressionWrapper; + For: For; + ForXStatement: ForXStatement; + Function: Function; + FunctionParent: FunctionParent; + Pureish: Pureish; + Declaration: Declaration; + PatternLike: PatternLike; + LVal: LVal; + TSEntityName: TSEntityName; + Literal: Literal; + Immutable: Immutable; + UserWhitespacable: UserWhitespacable; + Method: Method; + ObjectMember: ObjectMember; + Property: Property; + UnaryLike: UnaryLike; + Pattern: Pattern; + Class: Class; + ModuleDeclaration: ModuleDeclaration; + ExportDeclaration: ExportDeclaration; + ModuleSpecifier: ModuleSpecifier; + Flow: Flow; + FlowType: FlowType; + FlowBaseAnnotation: FlowBaseAnnotation; + FlowDeclaration: FlowDeclaration; + FlowPredicate: FlowPredicate; + JSX: JSX; + Private: Private; + TSTypeElement: TSTypeElement; + TSType: TSType; +} + +export function arrayExpression(elements?: Array): ArrayExpression; +export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression; +export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression, right: Expression): BinaryExpression; +export function interpreterDirective(value: string): InterpreterDirective; +export function directive(value: DirectiveLiteral): Directive; +export function directiveLiteral(value: string): DirectiveLiteral; +export function blockStatement(body: Array, directives?: Array): BlockStatement; +export function breakStatement(label?: Identifier | null): BreakStatement; +export function callExpression(callee: Expression, _arguments: Array, optional?: true | false | null, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): CallExpression; +export function catchClause(param: Identifier | null | undefined, body: BlockStatement): CatchClause; +export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression; +export function continueStatement(label?: Identifier | null): ContinueStatement; +export function debuggerStatement(): DebuggerStatement; +export function doWhileStatement(test: Expression, body: Statement): DoWhileStatement; +export function emptyStatement(): EmptyStatement; +export function expressionStatement(expression: Expression): ExpressionStatement; +export function file(program: Program, comments: any, tokens: any): File; +export function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement; +export function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement; +export function functionDeclaration(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean, declare?: boolean | null, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): FunctionDeclaration; +export function functionExpression(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): FunctionExpression; +export function identifier(name: string, decorators?: Array | null, optional?: boolean | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): Identifier; +export function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement; +export function labeledStatement(label: Identifier, body: Statement): LabeledStatement; +export function stringLiteral(value: string): StringLiteral; +export function numericLiteral(value: number): NumericLiteral; +export function nullLiteral(): NullLiteral; +export function booleanLiteral(value: boolean): BooleanLiteral; +export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral; +export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; +export function memberExpression(object: Expression, property: any, computed?: boolean, optional?: true | false | null): MemberExpression; +export function newExpression(callee: Expression, _arguments: Array, optional?: true | false | null, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): NewExpression; +export function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null, sourceFile?: string | null): Program; +export function objectExpression(properties: Array): ObjectExpression; +export function objectMethod(kind: "method" | "get" | "set" | undefined, key: any, params: Array, body: BlockStatement, computed?: boolean, async?: boolean, decorators?: Array | null, generator?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ObjectMethod; +export function objectProperty(key: any, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array | null): ObjectProperty; +export function restElement(argument: LVal, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): RestElement; +export function returnStatement(argument?: Expression | null): ReturnStatement; +export function sequenceExpression(expressions: Array): SequenceExpression; +export function parenthesizedExpression(expression: Expression): ParenthesizedExpression; +export function switchCase(test: Expression | null | undefined, consequent: Array): SwitchCase; +export function switchStatement(discriminant: Expression, cases: Array): SwitchStatement; +export function thisExpression(): ThisExpression; +export function throwStatement(argument: Expression): ThrowStatement; +export function tryStatement(block: BlockStatement, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement; +export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression; +export function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression; +export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array, declare?: boolean | null): VariableDeclaration; +export function variableDeclarator(id: LVal, init?: Expression | null, definite?: boolean | null): VariableDeclarator; +export function whileStatement(test: Expression, body: BlockStatement | Statement): WhileStatement; +export function withStatement(object: Expression, body: BlockStatement | Statement): WithStatement; +export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern, right: Expression, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): AssignmentPattern; +export function arrayPattern(elements: Array, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): ArrayPattern; +export function arrowFunctionExpression(params: Array, body: BlockStatement | Expression, async?: boolean, expression?: boolean | null, generator?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ArrowFunctionExpression; +export function classBody(body: Array): ClassBody; +export function classDeclaration(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array | null, abstract?: boolean | null, declare?: boolean | null, _implements?: Array | null, mixins?: any | null, superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassDeclaration; +export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array | null, _implements?: Array | null, mixins?: any | null, superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassExpression; +export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration; +export function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration; +export function exportNamedDeclaration(declaration: Declaration | null | undefined, specifiers: Array, source?: StringLiteral | null): ExportNamedDeclaration; +export function exportSpecifier(local: Identifier, exported: Identifier): ExportSpecifier; +export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement; +export function importDeclaration(specifiers: Array, source: StringLiteral, importKind?: "type" | "typeof" | "value" | null): ImportDeclaration; +export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier; +export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier; +export function importSpecifier(local: Identifier, imported: Identifier, importKind?: "type" | "typeof" | null): ImportSpecifier; +export function metaProperty(meta: Identifier, property: Identifier): MetaProperty; +export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array, body: BlockStatement, computed?: boolean, _static?: boolean | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, decorators?: Array | null, generator?: boolean, optional?: boolean | null, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassMethod; +export function objectPattern(properties: Array, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): ObjectPattern; +export function spreadElement(argument: Expression): SpreadElement; +export function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): TaggedTemplateExpression; +export function templateElement(value: any, tail?: boolean): TemplateElement; +export function templateLiteral(quasis: Array, expressions: Array): TemplateLiteral; +export function yieldExpression(argument?: Expression | null, delegate?: boolean): YieldExpression; +export function anyTypeAnnotation(): AnyTypeAnnotation; +export function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation; +export function booleanTypeAnnotation(): BooleanTypeAnnotation; +export function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation; +export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation; +export function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements; +export function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): DeclareClass; +export function declareFunction(id: Identifier, predicate?: DeclaredPredicate | null): DeclareFunction; +export function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): DeclareInterface; +export function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule; +export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports; +export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; +export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; +export function declareVariable(id: Identifier): DeclareVariable; +export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array | null, source?: StringLiteral | null, _default?: boolean | null): DeclareExportDeclaration; +export function declareExportAllDeclaration(source: StringLiteral, exportKind?: ["type","value"] | null): DeclareExportAllDeclaration; +export function declaredPredicate(value: Flow): DeclaredPredicate; +export function existsTypeAnnotation(): ExistsTypeAnnotation; +export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; +export function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType, optional?: boolean | null): FunctionTypeParam; +export function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation; +export function inferredPredicate(): InferredPredicate; +export function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends; +export function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): InterfaceDeclaration; +export function interfaceTypeAnnotation(_extends: Array | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation; +export function intersectionTypeAnnotation(types: Array): IntersectionTypeAnnotation; +export function mixedTypeAnnotation(): MixedTypeAnnotation; +export function emptyTypeAnnotation(): EmptyTypeAnnotation; +export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation; +export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation; +export function numberTypeAnnotation(): NumberTypeAnnotation; +export function objectTypeAnnotation(properties: Array, indexers?: Array | null, callProperties?: Array | null, internalSlots?: Array | null, exact?: boolean, inexact?: boolean | null): ObjectTypeAnnotation; +export function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot; +export function objectTypeCallProperty(value: FlowType, _static?: boolean | null): ObjectTypeCallProperty; +export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null, _static?: boolean | null): ObjectTypeIndexer; +export function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null, kind?: "init" | "get" | "set" | null, optional?: boolean | null, proto?: boolean | null, _static?: boolean | null): ObjectTypeProperty; +export function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty; +export function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType; +export function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier; +export function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation; +export function stringTypeAnnotation(): StringTypeAnnotation; +export function thisTypeAnnotation(): ThisTypeAnnotation; +export function tupleTypeAnnotation(types: Array): TupleTypeAnnotation; +export function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation; +export function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias; +export function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation; +export function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression; +export function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null, name?: string | null): TypeParameter; +export function typeParameterDeclaration(params: Array): TypeParameterDeclaration; +export function typeParameterInstantiation(params: Array): TypeParameterInstantiation; +export function unionTypeAnnotation(types: Array): UnionTypeAnnotation; +export function variance(kind: "minus" | "plus"): Variance; +export function voidTypeAnnotation(): VoidTypeAnnotation; +export function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute; +export function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression): JSXClosingElement; +export function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array, selfClosing: any): JSXElement; +export function jsxEmptyExpression(): JSXEmptyExpression; +export function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer; +export function jsxSpreadChild(expression: Expression): JSXSpreadChild; +export function jsxIdentifier(name: string): JSXIdentifier; +export function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression; +export function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName; +export function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression, attributes: Array, selfClosing?: boolean, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): JSXOpeningElement; +export function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute; +export function jsxText(value: string): JSXText; +export function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array): JSXFragment; +export function jsxOpeningFragment(): JSXOpeningFragment; +export function jsxClosingFragment(): JSXClosingFragment; +export function noop(): Noop; +export function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: Identifier): Placeholder; +export function argumentPlaceholder(): ArgumentPlaceholder; +export function awaitExpression(argument: Expression): AwaitExpression; +export function bindExpression(object: any, callee: any): BindExpression; +export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array | null, computed?: boolean, abstract?: boolean | null, accessibility?: "public" | "private" | "protected" | null, definite?: boolean | null, optional?: boolean | null, readonly?: boolean | null, _static?: boolean | null): ClassProperty; +export function optionalMemberExpression(object: Expression, property: any, computed: boolean | undefined, optional: boolean): OptionalMemberExpression; +export function pipelineTopicExpression(expression: Expression): PipelineTopicExpression; +export function pipelineBareFunction(callee: Expression): PipelineBareFunction; +export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference; +export function optionalCallExpression(callee: Expression, _arguments: Array, optional: boolean, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): OptionalCallExpression; +export function classPrivateProperty(key: PrivateName, value?: Expression | null): ClassPrivateProperty; +export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array, body: BlockStatement, _static?: boolean | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, computed?: boolean, decorators?: Array | null, generator?: boolean, optional?: boolean | null, returnType?: any | null, typeParameters?: any | null): ClassPrivateMethod; +export function decorator(expression: Expression): Decorator; +export function doExpression(body: BlockStatement): DoExpression; +export function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier; +export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier; +export function privateName(id: Identifier): PrivateName; +export function bigIntLiteral(value: string): BigIntLiteral; +export function tsParameterProperty(parameter: Identifier | AssignmentPattern, accessibility?: "public" | "private" | "protected" | null, readonly?: boolean | null): TSParameterProperty; +export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null, async?: boolean, declare?: boolean | null, generator?: boolean): TSDeclareFunction; +export function tsDeclareMethod(decorators: Array | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean | null, _static?: boolean | null): TSDeclareMethod; +export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName; +export function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration; +export function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration; +export function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null, computed?: boolean | null, optional?: boolean | null, readonly?: boolean | null): TSPropertySignature; +export function tsMethodSignature(key: Expression, typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null, computed?: boolean | null, optional?: boolean | null): TSMethodSignature; +export function tsIndexSignature(parameters: Array, typeAnnotation?: TSTypeAnnotation | null, readonly?: boolean | null): TSIndexSignature; +export function tsAnyKeyword(): TSAnyKeyword; +export function tsUnknownKeyword(): TSUnknownKeyword; +export function tsNumberKeyword(): TSNumberKeyword; +export function tsObjectKeyword(): TSObjectKeyword; +export function tsBooleanKeyword(): TSBooleanKeyword; +export function tsStringKeyword(): TSStringKeyword; +export function tsSymbolKeyword(): TSSymbolKeyword; +export function tsVoidKeyword(): TSVoidKeyword; +export function tsUndefinedKeyword(): TSUndefinedKeyword; +export function tsNullKeyword(): TSNullKeyword; +export function tsNeverKeyword(): TSNeverKeyword; +export function tsThisType(): TSThisType; +export function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSFunctionType; +export function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType; +export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference; +export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation: TSTypeAnnotation): TSTypePredicate; +export function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery; +export function tsTypeLiteral(members: Array): TSTypeLiteral; +export function tsArrayType(elementType: TSType): TSArrayType; +export function tsTupleType(elementTypes: Array): TSTupleType; +export function tsOptionalType(typeAnnotation: TSType): TSOptionalType; +export function tsRestType(typeAnnotation: TSType): TSRestType; +export function tsUnionType(types: Array): TSUnionType; +export function tsIntersectionType(types: Array): TSIntersectionType; +export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType; +export function tsInferType(typeParameter: TSTypeParameter): TSInferType; +export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType; +export function tsTypeOperator(typeAnnotation: TSType, operator?: string | null): TSTypeOperator; +export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType; +export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, optional?: boolean | null, readonly?: boolean | null): TSMappedType; +export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral): TSLiteralType; +export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments; +export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: TSInterfaceBody, declare?: boolean | null): TSInterfaceDeclaration; +export function tsInterfaceBody(body: Array): TSInterfaceBody; +export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType, declare?: boolean | null): TSTypeAliasDeclaration; +export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression; +export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion; +export function tsEnumDeclaration(id: Identifier, members: Array, _const?: boolean | null, declare?: boolean | null, initializer?: Expression | null): TSEnumDeclaration; +export function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember; +export function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration, declare?: boolean | null, global?: boolean | null): TSModuleDeclaration; +export function tsModuleBlock(body: Array): TSModuleBlock; +export function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType; +export function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference, isExport?: boolean | null): TSImportEqualsDeclaration; +export function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference; +export function tsNonNullExpression(expression: Expression): TSNonNullExpression; +export function tsExportAssignment(expression: Expression): TSExportAssignment; +export function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration; +export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation; +export function tsTypeParameterInstantiation(params: Array): TSTypeParameterInstantiation; +export function tsTypeParameterDeclaration(params: Array): TSTypeParameterDeclaration; +export function tsTypeParameter(constraint?: TSType | null, _default?: TSType | null, name?: string | null): TSTypeParameter; +export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation; +export function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder; +export function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression; +export function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern; +export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation; +export function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression; +export function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression; +export function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern; +export function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression; +export function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral; +export function isBinary(node: object | null | undefined, opts?: object | null): node is Binary; +export function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression; +export function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression; +export function isBlock(node: object | null | undefined, opts?: object | null): node is Block; +export function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent; +export function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement; +export function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral; +export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation; +export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation; +export function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement; +export function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression; +export function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause; +export function isClass(node: object | null | undefined, opts?: object | null): node is Class; +export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody; +export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration; +export function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression; +export function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements; +export function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod; +export function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod; +export function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty; +export function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty; +export function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement; +export function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional; +export function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression; +export function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement; +export function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement; +export function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration; +export function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass; +export function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration; +export function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration; +export function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction; +export function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface; +export function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule; +export function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports; +export function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType; +export function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias; +export function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable; +export function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate; +export function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator; +export function isDirective(node: object | null | undefined, opts?: object | null): node is Directive; +export function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral; +export function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression; +export function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement; +export function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement; +export function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation; +export function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation; +export function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration; +export function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration; +export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration; +export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier; +export function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration; +export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier; +export function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier; +export function isExpression(node: object | null | undefined, opts?: object | null): node is Expression; +export function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement; +export function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper; +export function isFile(node: object | null | undefined, opts?: object | null): node is File; +export function isFlow(node: object | null | undefined, opts?: object | null): node is Flow; +export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation; +export function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration; +export function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate; +export function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType; +export function isFor(node: object | null | undefined, opts?: object | null): node is For; +export function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement; +export function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement; +export function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement; +export function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement; +export function isFunction(node: object | null | undefined, opts?: object | null): node is Function; +export function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration; +export function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression; +export function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent; +export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation; +export function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam; +export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation; +export function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier; +export function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement; +export function isImmutable(node: object | null | undefined, opts?: object | null): node is Immutable; +export function isImport(node: object | null | undefined, opts?: object | null): node is Import; +export function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration; +export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier; +export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier; +export function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier; +export function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate; +export function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration; +export function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends; +export function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation; +export function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective; +export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation; +export function isJSX(node: object | null | undefined, opts?: object | null): node is JSX; +export function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute; +export function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement; +export function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment; +export function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement; +export function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression; +export function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer; +export function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment; +export function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier; +export function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression; +export function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName; +export function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement; +export function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment; +export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute; +export function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild; +export function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText; +export function isLVal(node: object | null | undefined, opts?: object | null): node is LVal; +export function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement; +export function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal; +export function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression; +export function isLoop(node: object | null | undefined, opts?: object | null): node is Loop; +export function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression; +export function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty; +export function isMethod(node: object | null | undefined, opts?: object | null): node is Method; +export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation; +export function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration; +export function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier; +export function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression; +export function isNoop(node: object | null | undefined, opts?: object | null): node is Noop; +export function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral; +export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation; +export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation; +export function isNumberLiteral(node: object | null | undefined, opts?: object | null): boolean; +export function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation; +export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation; +export function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral; +export function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression; +export function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember; +export function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod; +export function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern; +export function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty; +export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation; +export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty; +export function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer; +export function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot; +export function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty; +export function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty; +export function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType; +export function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression; +export function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression; +export function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression; +export function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern; +export function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike; +export function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction; +export function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference; +export function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression; +export function isPlaceholder(node: object | null | undefined, opts?: object | null): node is Placeholder; +export function isPrivate(node: object | null | undefined, opts?: object | null): node is Private; +export function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName; +export function isProgram(node: object | null | undefined, opts?: object | null): node is Program; +export function isProperty(node: object | null | undefined, opts?: object | null): node is Property; +export function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish; +export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier; +export function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral; +export function isRegexLiteral(node: object | null | undefined, opts?: object | null): boolean; +export function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement; +export function isRestProperty(node: object | null | undefined, opts?: object | null): boolean; +export function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement; +export function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable; +export function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression; +export function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement; +export function isSpreadProperty(node: object | null | undefined, opts?: object | null): boolean; +export function isStatement(node: object | null | undefined, opts?: object | null): node is Statement; +export function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral; +export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation; +export function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation; +export function isSuper(node: object | null | undefined, opts?: object | null): node is Super; +export function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase; +export function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement; +export function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword; +export function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType; +export function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression; +export function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword; +export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration; +export function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType; +export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration; +export function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType; +export function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction; +export function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod; +export function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName; +export function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration; +export function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember; +export function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment; +export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments; +export function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference; +export function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType; +export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration; +export function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType; +export function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature; +export function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType; +export function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType; +export function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody; +export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration; +export function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType; +export function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType; +export function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType; +export function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature; +export function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock; +export function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration; +export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration; +export function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword; +export function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression; +export function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword; +export function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword; +export function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword; +export function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType; +export function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty; +export function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType; +export function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature; +export function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName; +export function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType; +export function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword; +export function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword; +export function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType; +export function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType; +export function isTSType(node: object | null | undefined, opts?: object | null): node is TSType; +export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration; +export function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation; +export function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion; +export function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement; +export function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral; +export function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator; +export function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter; +export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration; +export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation; +export function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate; +export function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery; +export function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference; +export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword; +export function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType; +export function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword; +export function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword; +export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression; +export function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement; +export function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral; +export function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless; +export function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression; +export function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation; +export function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement; +export function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement; +export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation; +export function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias; +export function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation; +export function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression; +export function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter; +export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration; +export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation; +export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation; +export function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression; +export function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike; +export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation; +export function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression; +export function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable; +export function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration; +export function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator; +export function isVariance(node: object | null | undefined, opts?: object | null): node is Variance; +export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation; +export function isWhile(node: object | null | undefined, opts?: object | null): node is While; +export function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement; +export function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement; +export function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression; +export function validate(n: Node, key: string, value: any): void; +export function clone(n: T): T; +export function cloneDeep(n: T): T; +export function removeProperties( + n: Node, + opts?: { preserveComments: boolean } | null +): void; +export function removePropertiesDeep( + n: T, + opts?: { preserveComments: boolean } | null +): T; +export type TraversalAncestors = ReadonlyArray<{ + node: Node, + key: string, + index?: number, +}>; +export type TraversalHandler = (node: Node, parent: TraversalAncestors, type: T) => void; +export type TraversalHandlers = { + enter?: TraversalHandler, + exit?: TraversalHandler, +}; +export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void; diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/index.js b/node_modules/@babel/core/node_modules/@babel/types/lib/index.js new file mode 100644 index 0000000..f5bb66b --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/index.js @@ -0,0 +1,579 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + react: true, + assertNode: true, + createTypeAnnotationBasedOnTypeof: true, + createUnionTypeAnnotation: true, + cloneNode: true, + clone: true, + cloneDeep: true, + cloneWithoutLoc: true, + addComment: true, + addComments: true, + inheritInnerComments: true, + inheritLeadingComments: true, + inheritsComments: true, + inheritTrailingComments: true, + removeComments: true, + ensureBlock: true, + toBindingIdentifierName: true, + toBlock: true, + toComputedKey: true, + toExpression: true, + toIdentifier: true, + toKeyAlias: true, + toSequenceExpression: true, + toStatement: true, + valueToNode: true, + appendToMemberExpression: true, + inherits: true, + prependToMemberExpression: true, + removeProperties: true, + removePropertiesDeep: true, + removeTypeDuplicates: true, + getBindingIdentifiers: true, + getOuterBindingIdentifiers: true, + traverse: true, + traverseFast: true, + shallowEqual: true, + is: true, + isBinding: true, + isBlockScoped: true, + isImmutable: true, + isLet: true, + isNode: true, + isNodesEquivalent: true, + isPlaceholderType: true, + isReferenced: true, + isScope: true, + isSpecifierDefault: true, + isType: true, + isValidES3Identifier: true, + isValidIdentifier: true, + isVar: true, + matchesPattern: true, + validate: true, + buildMatchMemberExpression: true +}; +Object.defineProperty(exports, "assertNode", { + enumerable: true, + get: function () { + return _assertNode.default; + } +}); +Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { + enumerable: true, + get: function () { + return _createTypeAnnotationBasedOnTypeof.default; + } +}); +Object.defineProperty(exports, "createUnionTypeAnnotation", { + enumerable: true, + get: function () { + return _createUnionTypeAnnotation.default; + } +}); +Object.defineProperty(exports, "cloneNode", { + enumerable: true, + get: function () { + return _cloneNode.default; + } +}); +Object.defineProperty(exports, "clone", { + enumerable: true, + get: function () { + return _clone.default; + } +}); +Object.defineProperty(exports, "cloneDeep", { + enumerable: true, + get: function () { + return _cloneDeep.default; + } +}); +Object.defineProperty(exports, "cloneWithoutLoc", { + enumerable: true, + get: function () { + return _cloneWithoutLoc.default; + } +}); +Object.defineProperty(exports, "addComment", { + enumerable: true, + get: function () { + return _addComment.default; + } +}); +Object.defineProperty(exports, "addComments", { + enumerable: true, + get: function () { + return _addComments.default; + } +}); +Object.defineProperty(exports, "inheritInnerComments", { + enumerable: true, + get: function () { + return _inheritInnerComments.default; + } +}); +Object.defineProperty(exports, "inheritLeadingComments", { + enumerable: true, + get: function () { + return _inheritLeadingComments.default; + } +}); +Object.defineProperty(exports, "inheritsComments", { + enumerable: true, + get: function () { + return _inheritsComments.default; + } +}); +Object.defineProperty(exports, "inheritTrailingComments", { + enumerable: true, + get: function () { + return _inheritTrailingComments.default; + } +}); +Object.defineProperty(exports, "removeComments", { + enumerable: true, + get: function () { + return _removeComments.default; + } +}); +Object.defineProperty(exports, "ensureBlock", { + enumerable: true, + get: function () { + return _ensureBlock.default; + } +}); +Object.defineProperty(exports, "toBindingIdentifierName", { + enumerable: true, + get: function () { + return _toBindingIdentifierName.default; + } +}); +Object.defineProperty(exports, "toBlock", { + enumerable: true, + get: function () { + return _toBlock.default; + } +}); +Object.defineProperty(exports, "toComputedKey", { + enumerable: true, + get: function () { + return _toComputedKey.default; + } +}); +Object.defineProperty(exports, "toExpression", { + enumerable: true, + get: function () { + return _toExpression.default; + } +}); +Object.defineProperty(exports, "toIdentifier", { + enumerable: true, + get: function () { + return _toIdentifier.default; + } +}); +Object.defineProperty(exports, "toKeyAlias", { + enumerable: true, + get: function () { + return _toKeyAlias.default; + } +}); +Object.defineProperty(exports, "toSequenceExpression", { + enumerable: true, + get: function () { + return _toSequenceExpression.default; + } +}); +Object.defineProperty(exports, "toStatement", { + enumerable: true, + get: function () { + return _toStatement.default; + } +}); +Object.defineProperty(exports, "valueToNode", { + enumerable: true, + get: function () { + return _valueToNode.default; + } +}); +Object.defineProperty(exports, "appendToMemberExpression", { + enumerable: true, + get: function () { + return _appendToMemberExpression.default; + } +}); +Object.defineProperty(exports, "inherits", { + enumerable: true, + get: function () { + return _inherits.default; + } +}); +Object.defineProperty(exports, "prependToMemberExpression", { + enumerable: true, + get: function () { + return _prependToMemberExpression.default; + } +}); +Object.defineProperty(exports, "removeProperties", { + enumerable: true, + get: function () { + return _removeProperties.default; + } +}); +Object.defineProperty(exports, "removePropertiesDeep", { + enumerable: true, + get: function () { + return _removePropertiesDeep.default; + } +}); +Object.defineProperty(exports, "removeTypeDuplicates", { + enumerable: true, + get: function () { + return _removeTypeDuplicates.default; + } +}); +Object.defineProperty(exports, "getBindingIdentifiers", { + enumerable: true, + get: function () { + return _getBindingIdentifiers.default; + } +}); +Object.defineProperty(exports, "getOuterBindingIdentifiers", { + enumerable: true, + get: function () { + return _getOuterBindingIdentifiers.default; + } +}); +Object.defineProperty(exports, "traverse", { + enumerable: true, + get: function () { + return _traverse.default; + } +}); +Object.defineProperty(exports, "traverseFast", { + enumerable: true, + get: function () { + return _traverseFast.default; + } +}); +Object.defineProperty(exports, "shallowEqual", { + enumerable: true, + get: function () { + return _shallowEqual.default; + } +}); +Object.defineProperty(exports, "is", { + enumerable: true, + get: function () { + return _is.default; + } +}); +Object.defineProperty(exports, "isBinding", { + enumerable: true, + get: function () { + return _isBinding.default; + } +}); +Object.defineProperty(exports, "isBlockScoped", { + enumerable: true, + get: function () { + return _isBlockScoped.default; + } +}); +Object.defineProperty(exports, "isImmutable", { + enumerable: true, + get: function () { + return _isImmutable.default; + } +}); +Object.defineProperty(exports, "isLet", { + enumerable: true, + get: function () { + return _isLet.default; + } +}); +Object.defineProperty(exports, "isNode", { + enumerable: true, + get: function () { + return _isNode.default; + } +}); +Object.defineProperty(exports, "isNodesEquivalent", { + enumerable: true, + get: function () { + return _isNodesEquivalent.default; + } +}); +Object.defineProperty(exports, "isPlaceholderType", { + enumerable: true, + get: function () { + return _isPlaceholderType.default; + } +}); +Object.defineProperty(exports, "isReferenced", { + enumerable: true, + get: function () { + return _isReferenced.default; + } +}); +Object.defineProperty(exports, "isScope", { + enumerable: true, + get: function () { + return _isScope.default; + } +}); +Object.defineProperty(exports, "isSpecifierDefault", { + enumerable: true, + get: function () { + return _isSpecifierDefault.default; + } +}); +Object.defineProperty(exports, "isType", { + enumerable: true, + get: function () { + return _isType.default; + } +}); +Object.defineProperty(exports, "isValidES3Identifier", { + enumerable: true, + get: function () { + return _isValidES3Identifier.default; + } +}); +Object.defineProperty(exports, "isValidIdentifier", { + enumerable: true, + get: function () { + return _isValidIdentifier.default; + } +}); +Object.defineProperty(exports, "isVar", { + enumerable: true, + get: function () { + return _isVar.default; + } +}); +Object.defineProperty(exports, "matchesPattern", { + enumerable: true, + get: function () { + return _matchesPattern.default; + } +}); +Object.defineProperty(exports, "validate", { + enumerable: true, + get: function () { + return _validate.default; + } +}); +Object.defineProperty(exports, "buildMatchMemberExpression", { + enumerable: true, + get: function () { + return _buildMatchMemberExpression.default; + } +}); +exports.react = void 0; + +var _isReactComponent = _interopRequireDefault(require("./validators/react/isReactComponent")); + +var _isCompatTag = _interopRequireDefault(require("./validators/react/isCompatTag")); + +var _buildChildren = _interopRequireDefault(require("./builders/react/buildChildren")); + +var _assertNode = _interopRequireDefault(require("./asserts/assertNode")); + +var _generated = require("./asserts/generated"); + +Object.keys(_generated).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated[key]; + } + }); +}); + +var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof")); + +var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation")); + +var _generated2 = require("./builders/generated"); + +Object.keys(_generated2).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated2[key]; + } + }); +}); + +var _cloneNode = _interopRequireDefault(require("./clone/cloneNode")); + +var _clone = _interopRequireDefault(require("./clone/clone")); + +var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep")); + +var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc")); + +var _addComment = _interopRequireDefault(require("./comments/addComment")); + +var _addComments = _interopRequireDefault(require("./comments/addComments")); + +var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments")); + +var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments")); + +var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments")); + +var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments")); + +var _removeComments = _interopRequireDefault(require("./comments/removeComments")); + +var _generated3 = require("./constants/generated"); + +Object.keys(_generated3).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated3[key]; + } + }); +}); + +var _constants = require("./constants"); + +Object.keys(_constants).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _constants[key]; + } + }); +}); + +var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock")); + +var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName")); + +var _toBlock = _interopRequireDefault(require("./converters/toBlock")); + +var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey")); + +var _toExpression = _interopRequireDefault(require("./converters/toExpression")); + +var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier")); + +var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias")); + +var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression")); + +var _toStatement = _interopRequireDefault(require("./converters/toStatement")); + +var _valueToNode = _interopRequireDefault(require("./converters/valueToNode")); + +var _definitions = require("./definitions"); + +Object.keys(_definitions).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _definitions[key]; + } + }); +}); + +var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression")); + +var _inherits = _interopRequireDefault(require("./modifications/inherits")); + +var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression")); + +var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties")); + +var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep")); + +var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates")); + +var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers")); + +var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers")); + +var _traverse = _interopRequireDefault(require("./traverse/traverse")); + +var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast")); + +var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual")); + +var _is = _interopRequireDefault(require("./validators/is")); + +var _isBinding = _interopRequireDefault(require("./validators/isBinding")); + +var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped")); + +var _isImmutable = _interopRequireDefault(require("./validators/isImmutable")); + +var _isLet = _interopRequireDefault(require("./validators/isLet")); + +var _isNode = _interopRequireDefault(require("./validators/isNode")); + +var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent")); + +var _isPlaceholderType = _interopRequireDefault(require("./validators/isPlaceholderType")); + +var _isReferenced = _interopRequireDefault(require("./validators/isReferenced")); + +var _isScope = _interopRequireDefault(require("./validators/isScope")); + +var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault")); + +var _isType = _interopRequireDefault(require("./validators/isType")); + +var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier")); + +var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier")); + +var _isVar = _interopRequireDefault(require("./validators/isVar")); + +var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern")); + +var _validate = _interopRequireDefault(require("./validators/validate")); + +var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression")); + +var _generated4 = require("./validators/generated"); + +Object.keys(_generated4).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _generated4[key]; + } + }); +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const react = { + isReactComponent: _isReactComponent.default, + isCompatTag: _isCompatTag.default, + buildChildren: _buildChildren.default +}; +exports.react = react; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/index.js.flow b/node_modules/@babel/core/node_modules/@babel/types/lib/index.js.flow new file mode 100644 index 0000000..b717fab --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/index.js.flow @@ -0,0 +1,1974 @@ +// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/flow.js for script used. + +declare class BabelNodeComment { + value: string; + start: number; + end: number; + loc: BabelNodeSourceLocation; +} + +declare class BabelNodeCommentBlock extends BabelNodeComment { + type: "CommentBlock"; +} + +declare class BabelNodeCommentLine extends BabelNodeComment { + type: "CommentLine"; +} + +declare class BabelNodeSourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +declare class BabelNode { + leadingComments?: Array; + innerComments?: Array; + trailingComments?: Array; + start: ?number; + end: ?number; + loc: ?BabelNodeSourceLocation; +} + +declare class BabelNodeArrayExpression extends BabelNode { + type: "ArrayExpression"; + elements?: Array; +} + +declare class BabelNodeAssignmentExpression extends BabelNode { + type: "AssignmentExpression"; + operator: string; + left: BabelNodeLVal; + right: BabelNodeExpression; +} + +declare class BabelNodeBinaryExpression extends BabelNode { + type: "BinaryExpression"; + operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; + left: BabelNodeExpression; + right: BabelNodeExpression; +} + +declare class BabelNodeInterpreterDirective extends BabelNode { + type: "InterpreterDirective"; + value: string; +} + +declare class BabelNodeDirective extends BabelNode { + type: "Directive"; + value: BabelNodeDirectiveLiteral; +} + +declare class BabelNodeDirectiveLiteral extends BabelNode { + type: "DirectiveLiteral"; + value: string; +} + +declare class BabelNodeBlockStatement extends BabelNode { + type: "BlockStatement"; + body: Array; + directives?: Array; +} + +declare class BabelNodeBreakStatement extends BabelNode { + type: "BreakStatement"; + label?: BabelNodeIdentifier; +} + +declare class BabelNodeCallExpression extends BabelNode { + type: "CallExpression"; + callee: BabelNodeExpression; + arguments: Array; + optional?: true | false; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeCatchClause extends BabelNode { + type: "CatchClause"; + param?: BabelNodeIdentifier; + body: BabelNodeBlockStatement; +} + +declare class BabelNodeConditionalExpression extends BabelNode { + type: "ConditionalExpression"; + test: BabelNodeExpression; + consequent: BabelNodeExpression; + alternate: BabelNodeExpression; +} + +declare class BabelNodeContinueStatement extends BabelNode { + type: "ContinueStatement"; + label?: BabelNodeIdentifier; +} + +declare class BabelNodeDebuggerStatement extends BabelNode { + type: "DebuggerStatement"; +} + +declare class BabelNodeDoWhileStatement extends BabelNode { + type: "DoWhileStatement"; + test: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeEmptyStatement extends BabelNode { + type: "EmptyStatement"; +} + +declare class BabelNodeExpressionStatement extends BabelNode { + type: "ExpressionStatement"; + expression: BabelNodeExpression; +} + +declare class BabelNodeFile extends BabelNode { + type: "File"; + program: BabelNodeProgram; + comments: any; + tokens: any; +} + +declare class BabelNodeForInStatement extends BabelNode { + type: "ForInStatement"; + left: BabelNodeVariableDeclaration | BabelNodeLVal; + right: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeForStatement extends BabelNode { + type: "ForStatement"; + init?: BabelNodeVariableDeclaration | BabelNodeExpression; + test?: BabelNodeExpression; + update?: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeFunctionDeclaration extends BabelNode { + type: "FunctionDeclaration"; + id?: BabelNodeIdentifier; + params: Array; + body: BabelNodeBlockStatement; + generator?: boolean; + async?: boolean; + declare?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeFunctionExpression extends BabelNode { + type: "FunctionExpression"; + id?: BabelNodeIdentifier; + params: Array; + body: BabelNodeBlockStatement; + generator?: boolean; + async?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeIdentifier extends BabelNode { + type: "Identifier"; + name: string; + decorators?: Array; + optional?: boolean; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeIfStatement extends BabelNode { + type: "IfStatement"; + test: BabelNodeExpression; + consequent: BabelNodeStatement; + alternate?: BabelNodeStatement; +} + +declare class BabelNodeLabeledStatement extends BabelNode { + type: "LabeledStatement"; + label: BabelNodeIdentifier; + body: BabelNodeStatement; +} + +declare class BabelNodeStringLiteral extends BabelNode { + type: "StringLiteral"; + value: string; +} + +declare class BabelNodeNumericLiteral extends BabelNode { + type: "NumericLiteral"; + value: number; +} + +declare class BabelNodeNullLiteral extends BabelNode { + type: "NullLiteral"; +} + +declare class BabelNodeBooleanLiteral extends BabelNode { + type: "BooleanLiteral"; + value: boolean; +} + +declare class BabelNodeRegExpLiteral extends BabelNode { + type: "RegExpLiteral"; + pattern: string; + flags?: string; +} + +declare class BabelNodeLogicalExpression extends BabelNode { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: BabelNodeExpression; + right: BabelNodeExpression; +} + +declare class BabelNodeMemberExpression extends BabelNode { + type: "MemberExpression"; + object: BabelNodeExpression; + property: any; + computed?: boolean; + optional?: true | false; +} + +declare class BabelNodeNewExpression extends BabelNode { + type: "NewExpression"; + callee: BabelNodeExpression; + arguments: Array; + optional?: true | false; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeProgram extends BabelNode { + type: "Program"; + body: Array; + directives?: Array; + sourceType?: "script" | "module"; + interpreter?: BabelNodeInterpreterDirective; + sourceFile?: string; +} + +declare class BabelNodeObjectExpression extends BabelNode { + type: "ObjectExpression"; + properties: Array; +} + +declare class BabelNodeObjectMethod extends BabelNode { + type: "ObjectMethod"; + kind?: "method" | "get" | "set"; + key: any; + params: Array; + body: BabelNodeBlockStatement; + computed?: boolean; + async?: boolean; + decorators?: Array; + generator?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeObjectProperty extends BabelNode { + type: "ObjectProperty"; + key: any; + value: BabelNodeExpression | BabelNodePatternLike; + computed?: boolean; + shorthand?: boolean; + decorators?: Array; +} + +declare class BabelNodeRestElement extends BabelNode { + type: "RestElement"; + argument: BabelNodeLVal; + decorators?: Array; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeReturnStatement extends BabelNode { + type: "ReturnStatement"; + argument?: BabelNodeExpression; +} + +declare class BabelNodeSequenceExpression extends BabelNode { + type: "SequenceExpression"; + expressions: Array; +} + +declare class BabelNodeParenthesizedExpression extends BabelNode { + type: "ParenthesizedExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodeSwitchCase extends BabelNode { + type: "SwitchCase"; + test?: BabelNodeExpression; + consequent: Array; +} + +declare class BabelNodeSwitchStatement extends BabelNode { + type: "SwitchStatement"; + discriminant: BabelNodeExpression; + cases: Array; +} + +declare class BabelNodeThisExpression extends BabelNode { + type: "ThisExpression"; +} + +declare class BabelNodeThrowStatement extends BabelNode { + type: "ThrowStatement"; + argument: BabelNodeExpression; +} + +declare class BabelNodeTryStatement extends BabelNode { + type: "TryStatement"; + block: BabelNodeBlockStatement; + handler?: BabelNodeCatchClause; + finalizer?: BabelNodeBlockStatement; +} + +declare class BabelNodeUnaryExpression extends BabelNode { + type: "UnaryExpression"; + operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; + argument: BabelNodeExpression; + prefix?: boolean; +} + +declare class BabelNodeUpdateExpression extends BabelNode { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: BabelNodeExpression; + prefix?: boolean; +} + +declare class BabelNodeVariableDeclaration extends BabelNode { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: Array; + declare?: boolean; +} + +declare class BabelNodeVariableDeclarator extends BabelNode { + type: "VariableDeclarator"; + id: BabelNodeLVal; + init?: BabelNodeExpression; + definite?: boolean; +} + +declare class BabelNodeWhileStatement extends BabelNode { + type: "WhileStatement"; + test: BabelNodeExpression; + body: BabelNodeBlockStatement | BabelNodeStatement; +} + +declare class BabelNodeWithStatement extends BabelNode { + type: "WithStatement"; + object: BabelNodeExpression; + body: BabelNodeBlockStatement | BabelNodeStatement; +} + +declare class BabelNodeAssignmentPattern extends BabelNode { + type: "AssignmentPattern"; + left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern; + right: BabelNodeExpression; + decorators?: Array; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeArrayPattern extends BabelNode { + type: "ArrayPattern"; + elements: Array; + decorators?: Array; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeArrowFunctionExpression extends BabelNode { + type: "ArrowFunctionExpression"; + params: Array; + body: BabelNodeBlockStatement | BabelNodeExpression; + async?: boolean; + expression?: boolean; + generator?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeClassBody extends BabelNode { + type: "ClassBody"; + body: Array; +} + +declare class BabelNodeClassDeclaration extends BabelNode { + type: "ClassDeclaration"; + id?: BabelNodeIdentifier; + superClass?: BabelNodeExpression; + body: BabelNodeClassBody; + decorators?: Array; + abstract?: boolean; + declare?: boolean; + mixins?: any; + superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeClassExpression extends BabelNode { + type: "ClassExpression"; + id?: BabelNodeIdentifier; + superClass?: BabelNodeExpression; + body: BabelNodeClassBody; + decorators?: Array; + mixins?: any; + superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeExportAllDeclaration extends BabelNode { + type: "ExportAllDeclaration"; + source: BabelNodeStringLiteral; +} + +declare class BabelNodeExportDefaultDeclaration extends BabelNode { + type: "ExportDefaultDeclaration"; + declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression; +} + +declare class BabelNodeExportNamedDeclaration extends BabelNode { + type: "ExportNamedDeclaration"; + declaration?: BabelNodeDeclaration; + specifiers: Array; + source?: BabelNodeStringLiteral; +} + +declare class BabelNodeExportSpecifier extends BabelNode { + type: "ExportSpecifier"; + local: BabelNodeIdentifier; + exported: BabelNodeIdentifier; +} + +declare class BabelNodeForOfStatement extends BabelNode { + type: "ForOfStatement"; + left: BabelNodeVariableDeclaration | BabelNodeLVal; + right: BabelNodeExpression; + body: BabelNodeStatement; +} + +declare class BabelNodeImportDeclaration extends BabelNode { + type: "ImportDeclaration"; + specifiers: Array; + source: BabelNodeStringLiteral; + importKind?: "type" | "typeof" | "value"; +} + +declare class BabelNodeImportDefaultSpecifier extends BabelNode { + type: "ImportDefaultSpecifier"; + local: BabelNodeIdentifier; +} + +declare class BabelNodeImportNamespaceSpecifier extends BabelNode { + type: "ImportNamespaceSpecifier"; + local: BabelNodeIdentifier; +} + +declare class BabelNodeImportSpecifier extends BabelNode { + type: "ImportSpecifier"; + local: BabelNodeIdentifier; + imported: BabelNodeIdentifier; + importKind?: "type" | "typeof"; +} + +declare class BabelNodeMetaProperty extends BabelNode { + type: "MetaProperty"; + meta: BabelNodeIdentifier; + property: BabelNodeIdentifier; +} + +declare class BabelNodeClassMethod extends BabelNode { + type: "ClassMethod"; + kind?: "get" | "set" | "method" | "constructor"; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + params: Array; + body: BabelNodeBlockStatement; + computed?: boolean; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + async?: boolean; + decorators?: Array; + generator?: boolean; + optional?: boolean; + returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; +} + +declare class BabelNodeObjectPattern extends BabelNode { + type: "ObjectPattern"; + properties: Array; + decorators?: Array; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; +} + +declare class BabelNodeSpreadElement extends BabelNode { + type: "SpreadElement"; + argument: BabelNodeExpression; +} + +declare class BabelNodeSuper extends BabelNode { + type: "Super"; +} + +declare class BabelNodeTaggedTemplateExpression extends BabelNode { + type: "TaggedTemplateExpression"; + tag: BabelNodeExpression; + quasi: BabelNodeTemplateLiteral; + typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTemplateElement extends BabelNode { + type: "TemplateElement"; + value: any; + tail?: boolean; +} + +declare class BabelNodeTemplateLiteral extends BabelNode { + type: "TemplateLiteral"; + quasis: Array; + expressions: Array; +} + +declare class BabelNodeYieldExpression extends BabelNode { + type: "YieldExpression"; + argument?: BabelNodeExpression; + delegate?: boolean; +} + +declare class BabelNodeAnyTypeAnnotation extends BabelNode { + type: "AnyTypeAnnotation"; +} + +declare class BabelNodeArrayTypeAnnotation extends BabelNode { + type: "ArrayTypeAnnotation"; + elementType: BabelNodeFlowType; +} + +declare class BabelNodeBooleanTypeAnnotation extends BabelNode { + type: "BooleanTypeAnnotation"; +} + +declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; +} + +declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode { + type: "NullLiteralTypeAnnotation"; +} + +declare class BabelNodeClassImplements extends BabelNode { + type: "ClassImplements"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeDeclareClass extends BabelNode { + type: "DeclareClass"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array; +} + +declare class BabelNodeDeclareFunction extends BabelNode { + type: "DeclareFunction"; + id: BabelNodeIdentifier; + predicate?: BabelNodeDeclaredPredicate; +} + +declare class BabelNodeDeclareInterface extends BabelNode { + type: "DeclareInterface"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array; +} + +declare class BabelNodeDeclareModule extends BabelNode { + type: "DeclareModule"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + body: BabelNodeBlockStatement; + kind?: "CommonJS" | "ES"; +} + +declare class BabelNodeDeclareModuleExports extends BabelNode { + type: "DeclareModuleExports"; + typeAnnotation: BabelNodeTypeAnnotation; +} + +declare class BabelNodeDeclareTypeAlias extends BabelNode { + type: "DeclareTypeAlias"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + right: BabelNodeFlowType; +} + +declare class BabelNodeDeclareOpaqueType extends BabelNode { + type: "DeclareOpaqueType"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + supertype?: BabelNodeFlowType; +} + +declare class BabelNodeDeclareVariable extends BabelNode { + type: "DeclareVariable"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeDeclareExportDeclaration extends BabelNode { + type: "DeclareExportDeclaration"; + declaration?: BabelNodeFlow; + specifiers?: Array; + source?: BabelNodeStringLiteral; +} + +declare class BabelNodeDeclareExportAllDeclaration extends BabelNode { + type: "DeclareExportAllDeclaration"; + source: BabelNodeStringLiteral; + exportKind?: ["type","value"]; +} + +declare class BabelNodeDeclaredPredicate extends BabelNode { + type: "DeclaredPredicate"; + value: BabelNodeFlow; +} + +declare class BabelNodeExistsTypeAnnotation extends BabelNode { + type: "ExistsTypeAnnotation"; +} + +declare class BabelNodeFunctionTypeAnnotation extends BabelNode { + type: "FunctionTypeAnnotation"; + typeParameters?: BabelNodeTypeParameterDeclaration; + params: Array; + rest?: BabelNodeFunctionTypeParam; + returnType: BabelNodeFlowType; +} + +declare class BabelNodeFunctionTypeParam extends BabelNode { + type: "FunctionTypeParam"; + name?: BabelNodeIdentifier; + typeAnnotation: BabelNodeFlowType; + optional?: boolean; +} + +declare class BabelNodeGenericTypeAnnotation extends BabelNode { + type: "GenericTypeAnnotation"; + id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeInferredPredicate extends BabelNode { + type: "InferredPredicate"; +} + +declare class BabelNodeInterfaceExtends extends BabelNode { + type: "InterfaceExtends"; + id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; + typeParameters?: BabelNodeTypeParameterInstantiation; +} + +declare class BabelNodeInterfaceDeclaration extends BabelNode { + type: "InterfaceDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + body: BabelNodeObjectTypeAnnotation; + mixins?: Array; +} + +declare class BabelNodeInterfaceTypeAnnotation extends BabelNode { + type: "InterfaceTypeAnnotation"; + body: BabelNodeObjectTypeAnnotation; +} + +declare class BabelNodeIntersectionTypeAnnotation extends BabelNode { + type: "IntersectionTypeAnnotation"; + types: Array; +} + +declare class BabelNodeMixedTypeAnnotation extends BabelNode { + type: "MixedTypeAnnotation"; +} + +declare class BabelNodeEmptyTypeAnnotation extends BabelNode { + type: "EmptyTypeAnnotation"; +} + +declare class BabelNodeNullableTypeAnnotation extends BabelNode { + type: "NullableTypeAnnotation"; + typeAnnotation: BabelNodeFlowType; +} + +declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode { + type: "NumberLiteralTypeAnnotation"; + value: number; +} + +declare class BabelNodeNumberTypeAnnotation extends BabelNode { + type: "NumberTypeAnnotation"; +} + +declare class BabelNodeObjectTypeAnnotation extends BabelNode { + type: "ObjectTypeAnnotation"; + properties: Array; + indexers?: Array; + callProperties?: Array; + internalSlots?: Array; + exact?: boolean; + inexact?: boolean; +} + +declare class BabelNodeObjectTypeInternalSlot extends BabelNode { + type: "ObjectTypeInternalSlot"; + id: BabelNodeIdentifier; + value: BabelNodeFlowType; + optional: boolean; + method: boolean; +} + +declare class BabelNodeObjectTypeCallProperty extends BabelNode { + type: "ObjectTypeCallProperty"; + value: BabelNodeFlowType; +} + +declare class BabelNodeObjectTypeIndexer extends BabelNode { + type: "ObjectTypeIndexer"; + id?: BabelNodeIdentifier; + key: BabelNodeFlowType; + value: BabelNodeFlowType; + variance?: BabelNodeVariance; +} + +declare class BabelNodeObjectTypeProperty extends BabelNode { + type: "ObjectTypeProperty"; + key: BabelNodeIdentifier | BabelNodeStringLiteral; + value: BabelNodeFlowType; + variance?: BabelNodeVariance; + kind?: "init" | "get" | "set"; + optional?: boolean; + proto?: boolean; +} + +declare class BabelNodeObjectTypeSpreadProperty extends BabelNode { + type: "ObjectTypeSpreadProperty"; + argument: BabelNodeFlowType; +} + +declare class BabelNodeOpaqueType extends BabelNode { + type: "OpaqueType"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + supertype?: BabelNodeFlowType; + impltype: BabelNodeFlowType; +} + +declare class BabelNodeQualifiedTypeIdentifier extends BabelNode { + type: "QualifiedTypeIdentifier"; + id: BabelNodeIdentifier; + qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; +} + +declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode { + type: "StringLiteralTypeAnnotation"; + value: string; +} + +declare class BabelNodeStringTypeAnnotation extends BabelNode { + type: "StringTypeAnnotation"; +} + +declare class BabelNodeThisTypeAnnotation extends BabelNode { + type: "ThisTypeAnnotation"; +} + +declare class BabelNodeTupleTypeAnnotation extends BabelNode { + type: "TupleTypeAnnotation"; + types: Array; +} + +declare class BabelNodeTypeofTypeAnnotation extends BabelNode { + type: "TypeofTypeAnnotation"; + argument: BabelNodeFlowType; +} + +declare class BabelNodeTypeAlias extends BabelNode { + type: "TypeAlias"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTypeParameterDeclaration; + right: BabelNodeFlowType; +} + +declare class BabelNodeTypeAnnotation extends BabelNode { + type: "TypeAnnotation"; + typeAnnotation: BabelNodeFlowType; +} + +declare class BabelNodeTypeCastExpression extends BabelNode { + type: "TypeCastExpression"; + expression: BabelNodeExpression; + typeAnnotation: BabelNodeTypeAnnotation; +} + +declare class BabelNodeTypeParameter extends BabelNode { + type: "TypeParameter"; + bound?: BabelNodeTypeAnnotation; + variance?: BabelNodeVariance; + name?: string; +} + +declare class BabelNodeTypeParameterDeclaration extends BabelNode { + type: "TypeParameterDeclaration"; + params: Array; +} + +declare class BabelNodeTypeParameterInstantiation extends BabelNode { + type: "TypeParameterInstantiation"; + params: Array; +} + +declare class BabelNodeUnionTypeAnnotation extends BabelNode { + type: "UnionTypeAnnotation"; + types: Array; +} + +declare class BabelNodeVariance extends BabelNode { + type: "Variance"; + kind: "minus" | "plus"; +} + +declare class BabelNodeVoidTypeAnnotation extends BabelNode { + type: "VoidTypeAnnotation"; +} + +declare class BabelNodeJSXAttribute extends BabelNode { + type: "JSXAttribute"; + name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName; + value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer; +} + +declare class BabelNodeJSXClosingElement extends BabelNode { + type: "JSXClosingElement"; + name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression; +} + +declare class BabelNodeJSXElement extends BabelNode { + type: "JSXElement"; + openingElement: BabelNodeJSXOpeningElement; + closingElement?: BabelNodeJSXClosingElement; + children: Array; + selfClosing: any; +} + +declare class BabelNodeJSXEmptyExpression extends BabelNode { + type: "JSXEmptyExpression"; +} + +declare class BabelNodeJSXExpressionContainer extends BabelNode { + type: "JSXExpressionContainer"; + expression: BabelNodeExpression | BabelNodeJSXEmptyExpression; +} + +declare class BabelNodeJSXSpreadChild extends BabelNode { + type: "JSXSpreadChild"; + expression: BabelNodeExpression; +} + +declare class BabelNodeJSXIdentifier extends BabelNode { + type: "JSXIdentifier"; + name: string; +} + +declare class BabelNodeJSXMemberExpression extends BabelNode { + type: "JSXMemberExpression"; + object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier; + property: BabelNodeJSXIdentifier; +} + +declare class BabelNodeJSXNamespacedName extends BabelNode { + type: "JSXNamespacedName"; + namespace: BabelNodeJSXIdentifier; + name: BabelNodeJSXIdentifier; +} + +declare class BabelNodeJSXOpeningElement extends BabelNode { + type: "JSXOpeningElement"; + name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression; + attributes: Array; + selfClosing?: boolean; + typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeJSXSpreadAttribute extends BabelNode { + type: "JSXSpreadAttribute"; + argument: BabelNodeExpression; +} + +declare class BabelNodeJSXText extends BabelNode { + type: "JSXText"; + value: string; +} + +declare class BabelNodeJSXFragment extends BabelNode { + type: "JSXFragment"; + openingFragment: BabelNodeJSXOpeningFragment; + closingFragment: BabelNodeJSXClosingFragment; + children: Array; +} + +declare class BabelNodeJSXOpeningFragment extends BabelNode { + type: "JSXOpeningFragment"; +} + +declare class BabelNodeJSXClosingFragment extends BabelNode { + type: "JSXClosingFragment"; +} + +declare class BabelNodeNoop extends BabelNode { + type: "Noop"; +} + +declare class BabelNodePlaceholder extends BabelNode { + type: "Placeholder"; + expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; + name: BabelNodeIdentifier; +} + +declare class BabelNodeArgumentPlaceholder extends BabelNode { + type: "ArgumentPlaceholder"; +} + +declare class BabelNodeAwaitExpression extends BabelNode { + type: "AwaitExpression"; + argument: BabelNodeExpression; +} + +declare class BabelNodeBindExpression extends BabelNode { + type: "BindExpression"; + object: any; + callee: any; +} + +declare class BabelNodeClassProperty extends BabelNode { + type: "ClassProperty"; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + value?: BabelNodeExpression; + typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; + decorators?: Array; + computed?: boolean; + abstract?: boolean; + accessibility?: "public" | "private" | "protected"; + definite?: boolean; + optional?: boolean; + readonly?: boolean; +} + +declare class BabelNodeOptionalMemberExpression extends BabelNode { + type: "OptionalMemberExpression"; + object: BabelNodeExpression; + property: any; + computed?: boolean; + optional: boolean; +} + +declare class BabelNodePipelineTopicExpression extends BabelNode { + type: "PipelineTopicExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodePipelineBareFunction extends BabelNode { + type: "PipelineBareFunction"; + callee: BabelNodeExpression; +} + +declare class BabelNodePipelinePrimaryTopicReference extends BabelNode { + type: "PipelinePrimaryTopicReference"; +} + +declare class BabelNodeOptionalCallExpression extends BabelNode { + type: "OptionalCallExpression"; + callee: BabelNodeExpression; + arguments: Array; + optional: boolean; + typeArguments?: BabelNodeTypeParameterInstantiation; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeClassPrivateProperty extends BabelNode { + type: "ClassPrivateProperty"; + key: BabelNodePrivateName; + value?: BabelNodeExpression; +} + +declare class BabelNodeClassPrivateMethod extends BabelNode { + type: "ClassPrivateMethod"; + kind?: "get" | "set" | "method" | "constructor"; + key: BabelNodePrivateName; + params: Array; + body: BabelNodeBlockStatement; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + async?: boolean; + computed?: boolean; + decorators?: Array; + generator?: boolean; + optional?: boolean; + returnType?: any; + typeParameters?: any; +} + +declare class BabelNodeImport extends BabelNode { + type: "Import"; +} + +declare class BabelNodeDecorator extends BabelNode { + type: "Decorator"; + expression: BabelNodeExpression; +} + +declare class BabelNodeDoExpression extends BabelNode { + type: "DoExpression"; + body: BabelNodeBlockStatement; +} + +declare class BabelNodeExportDefaultSpecifier extends BabelNode { + type: "ExportDefaultSpecifier"; + exported: BabelNodeIdentifier; +} + +declare class BabelNodeExportNamespaceSpecifier extends BabelNode { + type: "ExportNamespaceSpecifier"; + exported: BabelNodeIdentifier; +} + +declare class BabelNodePrivateName extends BabelNode { + type: "PrivateName"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeBigIntLiteral extends BabelNode { + type: "BigIntLiteral"; + value: string; +} + +declare class BabelNodeTSParameterProperty extends BabelNode { + type: "TSParameterProperty"; + parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern; + accessibility?: "public" | "private" | "protected"; + readonly?: boolean; +} + +declare class BabelNodeTSDeclareFunction extends BabelNode { + type: "TSDeclareFunction"; + id?: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; + params: Array; + returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; + async?: boolean; + declare?: boolean; + generator?: boolean; +} + +declare class BabelNodeTSDeclareMethod extends BabelNode { + type: "TSDeclareMethod"; + decorators?: Array; + key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; + typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; + params: Array; + returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; + abstract?: boolean; + access?: "public" | "private" | "protected"; + accessibility?: "public" | "private" | "protected"; + async?: boolean; + computed?: boolean; + generator?: boolean; + kind?: "get" | "set" | "method" | "constructor"; + optional?: boolean; +} + +declare class BabelNodeTSQualifiedName extends BabelNode { + type: "TSQualifiedName"; + left: BabelNodeTSEntityName; + right: BabelNodeIdentifier; +} + +declare class BabelNodeTSCallSignatureDeclaration extends BabelNode { + type: "TSCallSignatureDeclaration"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode { + type: "TSConstructSignatureDeclaration"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSPropertySignature extends BabelNode { + type: "TSPropertySignature"; + key: BabelNodeExpression; + typeAnnotation?: BabelNodeTSTypeAnnotation; + initializer?: BabelNodeExpression; + computed?: boolean; + optional?: boolean; + readonly?: boolean; +} + +declare class BabelNodeTSMethodSignature extends BabelNode { + type: "TSMethodSignature"; + key: BabelNodeExpression; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; + computed?: boolean; + optional?: boolean; +} + +declare class BabelNodeTSIndexSignature extends BabelNode { + type: "TSIndexSignature"; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; + readonly?: boolean; +} + +declare class BabelNodeTSAnyKeyword extends BabelNode { + type: "TSAnyKeyword"; +} + +declare class BabelNodeTSUnknownKeyword extends BabelNode { + type: "TSUnknownKeyword"; +} + +declare class BabelNodeTSNumberKeyword extends BabelNode { + type: "TSNumberKeyword"; +} + +declare class BabelNodeTSObjectKeyword extends BabelNode { + type: "TSObjectKeyword"; +} + +declare class BabelNodeTSBooleanKeyword extends BabelNode { + type: "TSBooleanKeyword"; +} + +declare class BabelNodeTSStringKeyword extends BabelNode { + type: "TSStringKeyword"; +} + +declare class BabelNodeTSSymbolKeyword extends BabelNode { + type: "TSSymbolKeyword"; +} + +declare class BabelNodeTSVoidKeyword extends BabelNode { + type: "TSVoidKeyword"; +} + +declare class BabelNodeTSUndefinedKeyword extends BabelNode { + type: "TSUndefinedKeyword"; +} + +declare class BabelNodeTSNullKeyword extends BabelNode { + type: "TSNullKeyword"; +} + +declare class BabelNodeTSNeverKeyword extends BabelNode { + type: "TSNeverKeyword"; +} + +declare class BabelNodeTSThisType extends BabelNode { + type: "TSThisType"; +} + +declare class BabelNodeTSFunctionType extends BabelNode { + type: "TSFunctionType"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSConstructorType extends BabelNode { + type: "TSConstructorType"; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + parameters: Array; + typeAnnotation?: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSTypeReference extends BabelNode { + type: "TSTypeReference"; + typeName: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSTypePredicate extends BabelNode { + type: "TSTypePredicate"; + parameterName: BabelNodeIdentifier | BabelNodeTSThisType; + typeAnnotation: BabelNodeTSTypeAnnotation; +} + +declare class BabelNodeTSTypeQuery extends BabelNode { + type: "TSTypeQuery"; + exprName: BabelNodeTSEntityName | BabelNodeTSImportType; +} + +declare class BabelNodeTSTypeLiteral extends BabelNode { + type: "TSTypeLiteral"; + members: Array; +} + +declare class BabelNodeTSArrayType extends BabelNode { + type: "TSArrayType"; + elementType: BabelNodeTSType; +} + +declare class BabelNodeTSTupleType extends BabelNode { + type: "TSTupleType"; + elementTypes: Array; +} + +declare class BabelNodeTSOptionalType extends BabelNode { + type: "TSOptionalType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSRestType extends BabelNode { + type: "TSRestType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSUnionType extends BabelNode { + type: "TSUnionType"; + types: Array; +} + +declare class BabelNodeTSIntersectionType extends BabelNode { + type: "TSIntersectionType"; + types: Array; +} + +declare class BabelNodeTSConditionalType extends BabelNode { + type: "TSConditionalType"; + checkType: BabelNodeTSType; + extendsType: BabelNodeTSType; + trueType: BabelNodeTSType; + falseType: BabelNodeTSType; +} + +declare class BabelNodeTSInferType extends BabelNode { + type: "TSInferType"; + typeParameter: BabelNodeTSTypeParameter; +} + +declare class BabelNodeTSParenthesizedType extends BabelNode { + type: "TSParenthesizedType"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeOperator extends BabelNode { + type: "TSTypeOperator"; + typeAnnotation: BabelNodeTSType; + operator?: string; +} + +declare class BabelNodeTSIndexedAccessType extends BabelNode { + type: "TSIndexedAccessType"; + objectType: BabelNodeTSType; + indexType: BabelNodeTSType; +} + +declare class BabelNodeTSMappedType extends BabelNode { + type: "TSMappedType"; + typeParameter: BabelNodeTSTypeParameter; + typeAnnotation?: BabelNodeTSType; + optional?: boolean; + readonly?: boolean; +} + +declare class BabelNodeTSLiteralType extends BabelNode { + type: "TSLiteralType"; + literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral; +} + +declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode { + type: "TSExpressionWithTypeArguments"; + expression: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSInterfaceDeclaration extends BabelNode { + type: "TSInterfaceDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + body: BabelNodeTSInterfaceBody; + declare?: boolean; +} + +declare class BabelNodeTSInterfaceBody extends BabelNode { + type: "TSInterfaceBody"; + body: Array; +} + +declare class BabelNodeTSTypeAliasDeclaration extends BabelNode { + type: "TSTypeAliasDeclaration"; + id: BabelNodeIdentifier; + typeParameters?: BabelNodeTSTypeParameterDeclaration; + typeAnnotation: BabelNodeTSType; + declare?: boolean; +} + +declare class BabelNodeTSAsExpression extends BabelNode { + type: "TSAsExpression"; + expression: BabelNodeExpression; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeAssertion extends BabelNode { + type: "TSTypeAssertion"; + typeAnnotation: BabelNodeTSType; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSEnumDeclaration extends BabelNode { + type: "TSEnumDeclaration"; + id: BabelNodeIdentifier; + members: Array; + declare?: boolean; + initializer?: BabelNodeExpression; +} + +declare class BabelNodeTSEnumMember extends BabelNode { + type: "TSEnumMember"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + initializer?: BabelNodeExpression; +} + +declare class BabelNodeTSModuleDeclaration extends BabelNode { + type: "TSModuleDeclaration"; + id: BabelNodeIdentifier | BabelNodeStringLiteral; + body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration; + declare?: boolean; + global?: boolean; +} + +declare class BabelNodeTSModuleBlock extends BabelNode { + type: "TSModuleBlock"; + body: Array; +} + +declare class BabelNodeTSImportType extends BabelNode { + type: "TSImportType"; + argument: BabelNodeStringLiteral; + qualifier?: BabelNodeTSEntityName; + typeParameters?: BabelNodeTSTypeParameterInstantiation; +} + +declare class BabelNodeTSImportEqualsDeclaration extends BabelNode { + type: "TSImportEqualsDeclaration"; + id: BabelNodeIdentifier; + moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference; + isExport?: boolean; +} + +declare class BabelNodeTSExternalModuleReference extends BabelNode { + type: "TSExternalModuleReference"; + expression: BabelNodeStringLiteral; +} + +declare class BabelNodeTSNonNullExpression extends BabelNode { + type: "TSNonNullExpression"; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSExportAssignment extends BabelNode { + type: "TSExportAssignment"; + expression: BabelNodeExpression; +} + +declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode { + type: "TSNamespaceExportDeclaration"; + id: BabelNodeIdentifier; +} + +declare class BabelNodeTSTypeAnnotation extends BabelNode { + type: "TSTypeAnnotation"; + typeAnnotation: BabelNodeTSType; +} + +declare class BabelNodeTSTypeParameterInstantiation extends BabelNode { + type: "TSTypeParameterInstantiation"; + params: Array; +} + +declare class BabelNodeTSTypeParameterDeclaration extends BabelNode { + type: "TSTypeParameterDeclaration"; + params: Array; +} + +declare class BabelNodeTSTypeParameter extends BabelNode { + type: "TSTypeParameter"; + constraint?: BabelNodeTSType; + name?: string; +} + +type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeBigIntLiteral | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression; +type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression; +type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram; +type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration; +type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression; +type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement; +type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement; +type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement; +type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement; +type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression; +type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement; +type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement; +type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeBigIntLiteral; +type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration; +type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; +type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty; +type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName; +type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral; +type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeBigIntLiteral; +type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty; +type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod; +type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty; +type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty; +type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement; +type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; +type BabelNodeClass = BabelNodeClassDeclaration | BabelNodeClassExpression; +type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration; +type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration; +type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier; +type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation; +type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation; +type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation; +type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias; +type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate; +type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment; +type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName; +type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature; +type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSVoidKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSNullKeyword | BabelNodeTSNeverKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType; + +declare module "@babel/types" { + declare function arrayExpression(elements?: Array): BabelNodeArrayExpression; + declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression; + declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression; + declare function interpreterDirective(value: string): BabelNodeInterpreterDirective; + declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective; + declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral; + declare function blockStatement(body: Array, directives?: Array): BabelNodeBlockStatement; + declare function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement; + declare function callExpression(callee: BabelNodeExpression, _arguments: Array, optional?: true | false, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeCallExpression; + declare function catchClause(param?: BabelNodeIdentifier, body: BabelNodeBlockStatement): BabelNodeCatchClause; + declare function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression; + declare function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement; + declare function debuggerStatement(): BabelNodeDebuggerStatement; + declare function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement; + declare function emptyStatement(): BabelNodeEmptyStatement; + declare function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement; + declare function file(program: BabelNodeProgram, comments: any, tokens: any): BabelNodeFile; + declare function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement; + declare function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement; + declare function functionDeclaration(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, declare?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionDeclaration; + declare function functionExpression(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionExpression; + declare function identifier(name: string, decorators?: Array, optional?: boolean, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeIdentifier; + declare function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement; + declare function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement; + declare function stringLiteral(value: string): BabelNodeStringLiteral; + declare function numericLiteral(value: number): BabelNodeNumericLiteral; + declare function nullLiteral(): BabelNodeNullLiteral; + declare function booleanLiteral(value: boolean): BabelNodeBooleanLiteral; + declare function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral; + declare function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression; + declare function memberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional?: true | false): BabelNodeMemberExpression; + declare function newExpression(callee: BabelNodeExpression, _arguments: Array, optional?: true | false, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeNewExpression; + declare function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective, sourceFile?: string): BabelNodeProgram; + declare function objectExpression(properties: Array): BabelNodeObjectExpression; + declare function objectMethod(kind?: "method" | "get" | "set", key: any, params: Array, body: BabelNodeBlockStatement, computed?: boolean, async?: boolean, decorators?: Array, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeObjectMethod; + declare function objectProperty(key: any, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array): BabelNodeObjectProperty; + declare function restElement(argument: BabelNodeLVal, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeRestElement; + declare function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement; + declare function sequenceExpression(expressions: Array): BabelNodeSequenceExpression; + declare function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression; + declare function switchCase(test?: BabelNodeExpression, consequent: Array): BabelNodeSwitchCase; + declare function switchStatement(discriminant: BabelNodeExpression, cases: Array): BabelNodeSwitchStatement; + declare function thisExpression(): BabelNodeThisExpression; + declare function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement; + declare function tryStatement(block: BabelNodeBlockStatement, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement; + declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression; + declare function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression; + declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array, declare?: boolean): BabelNodeVariableDeclaration; + declare function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression, definite?: boolean): BabelNodeVariableDeclarator; + declare function whileStatement(test: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWhileStatement; + declare function withStatement(object: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWithStatement; + declare function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern, right: BabelNodeExpression, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeAssignmentPattern; + declare function arrayPattern(elements: Array, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeArrayPattern; + declare function arrowFunctionExpression(params: Array, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean, expression?: boolean, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeArrowFunctionExpression; + declare function classBody(body: Array): BabelNodeClassBody; + declare function classDeclaration(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array, abstract?: boolean, declare?: boolean, _implements?: Array, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassDeclaration; + declare function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array, _implements?: Array, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassExpression; + declare function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration; + declare function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration; + declare function exportNamedDeclaration(declaration?: BabelNodeDeclaration, specifiers: Array, source?: BabelNodeStringLiteral): BabelNodeExportNamedDeclaration; + declare function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier): BabelNodeExportSpecifier; + declare function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement; + declare function importDeclaration(specifiers: Array, source: BabelNodeStringLiteral, importKind?: "type" | "typeof" | "value"): BabelNodeImportDeclaration; + declare function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier; + declare function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier; + declare function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier, importKind?: "type" | "typeof"): BabelNodeImportSpecifier; + declare function metaProperty(meta: BabelNodeIdentifier, property: BabelNodeIdentifier): BabelNodeMetaProperty; + declare function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, decorators?: Array, generator?: boolean, optional?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassMethod; + declare function objectPattern(properties: Array, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeObjectPattern; + declare function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement; + declare function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeTaggedTemplateExpression; + declare function templateElement(value: any, tail?: boolean): BabelNodeTemplateElement; + declare function templateLiteral(quasis: Array, expressions: Array): BabelNodeTemplateLiteral; + declare function yieldExpression(argument?: BabelNodeExpression, delegate?: boolean): BabelNodeYieldExpression; + declare function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation; + declare function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation; + declare function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation; + declare function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation; + declare function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation; + declare function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements; + declare function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeDeclareClass; + declare function declareFunction(id: BabelNodeIdentifier, predicate?: BabelNodeDeclaredPredicate): BabelNodeDeclareFunction; + declare function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeDeclareInterface; + declare function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule; + declare function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports; + declare function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias; + declare function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType; + declare function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable; + declare function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array, source?: BabelNodeStringLiteral, _default?: boolean): BabelNodeDeclareExportDeclaration; + declare function declareExportAllDeclaration(source: BabelNodeStringLiteral, exportKind?: ["type","value"]): BabelNodeDeclareExportAllDeclaration; + declare function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate; + declare function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation; + declare function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation; + declare function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType, optional?: boolean): BabelNodeFunctionTypeParam; + declare function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation; + declare function inferredPredicate(): BabelNodeInferredPredicate; + declare function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends; + declare function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeInterfaceDeclaration; + declare function interfaceTypeAnnotation(_extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation; + declare function intersectionTypeAnnotation(types: Array): BabelNodeIntersectionTypeAnnotation; + declare function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation; + declare function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation; + declare function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation; + declare function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation; + declare function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation; + declare function objectTypeAnnotation(properties: Array, indexers?: Array, callProperties?: Array, internalSlots?: Array, exact?: boolean, inexact?: boolean): BabelNodeObjectTypeAnnotation; + declare function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot; + declare function objectTypeCallProperty(value: BabelNodeFlowType, _static?: boolean): BabelNodeObjectTypeCallProperty; + declare function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance, _static?: boolean): BabelNodeObjectTypeIndexer; + declare function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance, kind?: "init" | "get" | "set", optional?: boolean, proto?: boolean, _static?: boolean): BabelNodeObjectTypeProperty; + declare function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty; + declare function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType; + declare function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier; + declare function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation; + declare function stringTypeAnnotation(): BabelNodeStringTypeAnnotation; + declare function thisTypeAnnotation(): BabelNodeThisTypeAnnotation; + declare function tupleTypeAnnotation(types: Array): BabelNodeTupleTypeAnnotation; + declare function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation; + declare function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias; + declare function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation; + declare function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression; + declare function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance, name?: string): BabelNodeTypeParameter; + declare function typeParameterDeclaration(params: Array): BabelNodeTypeParameterDeclaration; + declare function typeParameterInstantiation(params: Array): BabelNodeTypeParameterInstantiation; + declare function unionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation; + declare function variance(kind: "minus" | "plus"): BabelNodeVariance; + declare function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation; + declare function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute; + declare function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression): BabelNodeJSXClosingElement; + declare function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array, selfClosing: any): BabelNodeJSXElement; + declare function jsxEmptyExpression(): BabelNodeJSXEmptyExpression; + declare function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer; + declare function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild; + declare function jsxIdentifier(name: string): BabelNodeJSXIdentifier; + declare function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression; + declare function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName; + declare function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression, attributes: Array, selfClosing?: boolean, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeJSXOpeningElement; + declare function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute; + declare function jsxText(value: string): BabelNodeJSXText; + declare function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array): BabelNodeJSXFragment; + declare function jsxOpeningFragment(): BabelNodeJSXOpeningFragment; + declare function jsxClosingFragment(): BabelNodeJSXClosingFragment; + declare function noop(): BabelNodeNoop; + declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder; + declare function argumentPlaceholder(): BabelNodeArgumentPlaceholder; + declare function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression; + declare function bindExpression(object: any, callee: any): BabelNodeBindExpression; + declare function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array, computed?: boolean, abstract?: boolean, accessibility?: "public" | "private" | "protected", definite?: boolean, optional?: boolean, readonly?: boolean, _static?: boolean): BabelNodeClassProperty; + declare function optionalMemberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression; + declare function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression; + declare function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction; + declare function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference; + declare function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array, optional: boolean, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeOptionalCallExpression; + declare function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression): BabelNodeClassPrivateProperty; + declare function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array, body: BabelNodeBlockStatement, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, decorators?: Array, generator?: boolean, optional?: boolean, returnType?: any, typeParameters?: any): BabelNodeClassPrivateMethod; + declare function decorator(expression: BabelNodeExpression): BabelNodeDecorator; + declare function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression; + declare function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier; + declare function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier; + declare function privateName(id: BabelNodeIdentifier): BabelNodePrivateName; + declare function bigIntLiteral(value: string): BabelNodeBigIntLiteral; + declare function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern, accessibility?: "public" | "private" | "protected", readonly?: boolean): BabelNodeTSParameterProperty; + declare function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, async?: boolean, declare?: boolean, generator?: boolean): BabelNodeTSDeclareFunction; + declare function tsDeclareMethod(decorators?: Array, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean, _static?: boolean): BabelNodeTSDeclareMethod; + declare function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName; + declare function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration; + declare function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration; + declare function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression, computed?: boolean, optional?: boolean, readonly?: boolean): BabelNodeTSPropertySignature; + declare function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation, computed?: boolean, optional?: boolean): BabelNodeTSMethodSignature; + declare function tsIndexSignature(parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation, readonly?: boolean): BabelNodeTSIndexSignature; + declare function tsAnyKeyword(): BabelNodeTSAnyKeyword; + declare function tsUnknownKeyword(): BabelNodeTSUnknownKeyword; + declare function tsNumberKeyword(): BabelNodeTSNumberKeyword; + declare function tsObjectKeyword(): BabelNodeTSObjectKeyword; + declare function tsBooleanKeyword(): BabelNodeTSBooleanKeyword; + declare function tsStringKeyword(): BabelNodeTSStringKeyword; + declare function tsSymbolKeyword(): BabelNodeTSSymbolKeyword; + declare function tsVoidKeyword(): BabelNodeTSVoidKeyword; + declare function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword; + declare function tsNullKeyword(): BabelNodeTSNullKeyword; + declare function tsNeverKeyword(): BabelNodeTSNeverKeyword; + declare function tsThisType(): BabelNodeTSThisType; + declare function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType; + declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType; + declare function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference; + declare function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation: BabelNodeTSTypeAnnotation): BabelNodeTSTypePredicate; + declare function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery; + declare function tsTypeLiteral(members: Array): BabelNodeTSTypeLiteral; + declare function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType; + declare function tsTupleType(elementTypes: Array): BabelNodeTSTupleType; + declare function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType; + declare function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType; + declare function tsUnionType(types: Array): BabelNodeTSUnionType; + declare function tsIntersectionType(types: Array): BabelNodeTSIntersectionType; + declare function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType; + declare function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType; + declare function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType; + declare function tsTypeOperator(typeAnnotation: BabelNodeTSType, operator?: string): BabelNodeTSTypeOperator; + declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType; + declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType, optional?: boolean, readonly?: boolean): BabelNodeTSMappedType; + declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType; + declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments; + declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array, body: BabelNodeTSInterfaceBody, declare?: boolean): BabelNodeTSInterfaceDeclaration; + declare function tsInterfaceBody(body: Array): BabelNodeTSInterfaceBody; + declare function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType, declare?: boolean): BabelNodeTSTypeAliasDeclaration; + declare function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression; + declare function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion; + declare function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array, _const?: boolean, declare?: boolean, initializer?: BabelNodeExpression): BabelNodeTSEnumDeclaration; + declare function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember; + declare function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration, declare?: boolean, global?: boolean): BabelNodeTSModuleDeclaration; + declare function tsModuleBlock(body: Array): BabelNodeTSModuleBlock; + declare function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType; + declare function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference, isExport?: boolean): BabelNodeTSImportEqualsDeclaration; + declare function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference; + declare function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression; + declare function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment; + declare function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration; + declare function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation; + declare function tsTypeParameterInstantiation(params: Array): BabelNodeTSTypeParameterInstantiation; + declare function tsTypeParameterDeclaration(params: Array): BabelNodeTSTypeParameterDeclaration; + declare function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name?: string): BabelNodeTSTypeParameter; + declare function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression) + declare function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression) + declare function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression) + declare function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective) + declare function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective) + declare function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral) + declare function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement) + declare function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement) + declare function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression) + declare function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause) + declare function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression) + declare function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement) + declare function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement) + declare function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement) + declare function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement) + declare function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement) + declare function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile) + declare function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement) + declare function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement) + declare function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration) + declare function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression) + declare function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier) + declare function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement) + declare function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement) + declare function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral) + declare function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral) + declare function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral) + declare function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral) + declare function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral) + declare function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression) + declare function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression) + declare function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression) + declare function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram) + declare function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression) + declare function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod) + declare function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty) + declare function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement) + declare function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement) + declare function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression) + declare function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression) + declare function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase) + declare function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement) + declare function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression) + declare function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement) + declare function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement) + declare function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression) + declare function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression) + declare function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration) + declare function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator) + declare function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement) + declare function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement) + declare function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern) + declare function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern) + declare function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression) + declare function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody) + declare function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration) + declare function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression) + declare function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration) + declare function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration) + declare function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration) + declare function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier) + declare function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement) + declare function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration) + declare function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier) + declare function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier) + declare function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier) + declare function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty) + declare function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod) + declare function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern) + declare function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement) + declare function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper) + declare function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression) + declare function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement) + declare function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral) + declare function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression) + declare function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation) + declare function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation) + declare function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation) + declare function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation) + declare function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation) + declare function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements) + declare function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass) + declare function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction) + declare function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface) + declare function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule) + declare function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports) + declare function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias) + declare function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType) + declare function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable) + declare function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration) + declare function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration) + declare function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate) + declare function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation) + declare function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation) + declare function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam) + declare function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation) + declare function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate) + declare function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends) + declare function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration) + declare function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation) + declare function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation) + declare function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation) + declare function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation) + declare function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation) + declare function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation) + declare function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation) + declare function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation) + declare function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot) + declare function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty) + declare function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer) + declare function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty) + declare function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty) + declare function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType) + declare function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier) + declare function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation) + declare function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation) + declare function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation) + declare function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation) + declare function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation) + declare function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias) + declare function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation) + declare function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression) + declare function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter) + declare function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration) + declare function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation) + declare function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation) + declare function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance) + declare function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation) + declare function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute) + declare function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement) + declare function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement) + declare function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression) + declare function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer) + declare function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild) + declare function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier) + declare function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression) + declare function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName) + declare function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement) + declare function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute) + declare function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText) + declare function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment) + declare function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment) + declare function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment) + declare function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop) + declare function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder) + declare function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder) + declare function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression) + declare function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression) + declare function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty) + declare function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression) + declare function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression) + declare function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction) + declare function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference) + declare function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression) + declare function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty) + declare function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod) + declare function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport) + declare function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator) + declare function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression) + declare function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier) + declare function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier) + declare function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName) + declare function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral) + declare function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty) + declare function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction) + declare function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod) + declare function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName) + declare function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration) + declare function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration) + declare function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature) + declare function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature) + declare function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature) + declare function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword) + declare function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword) + declare function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword) + declare function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword) + declare function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword) + declare function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword) + declare function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword) + declare function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword) + declare function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword) + declare function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword) + declare function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword) + declare function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType) + declare function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType) + declare function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType) + declare function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference) + declare function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate) + declare function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery) + declare function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral) + declare function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType) + declare function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType) + declare function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType) + declare function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType) + declare function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType) + declare function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType) + declare function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType) + declare function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType) + declare function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType) + declare function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator) + declare function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType) + declare function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType) + declare function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType) + declare function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments) + declare function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration) + declare function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody) + declare function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration) + declare function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression) + declare function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion) + declare function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration) + declare function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember) + declare function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration) + declare function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock) + declare function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType) + declare function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration) + declare function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference) + declare function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression) + declare function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment) + declare function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration) + declare function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation) + declare function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation) + declare function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration) + declare function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter) + declare function isExpression(node: ?Object, opts?: ?Object): boolean + declare function isBinary(node: ?Object, opts?: ?Object): boolean + declare function isScopable(node: ?Object, opts?: ?Object): boolean + declare function isBlockParent(node: ?Object, opts?: ?Object): boolean + declare function isBlock(node: ?Object, opts?: ?Object): boolean + declare function isStatement(node: ?Object, opts?: ?Object): boolean + declare function isTerminatorless(node: ?Object, opts?: ?Object): boolean + declare function isCompletionStatement(node: ?Object, opts?: ?Object): boolean + declare function isConditional(node: ?Object, opts?: ?Object): boolean + declare function isLoop(node: ?Object, opts?: ?Object): boolean + declare function isWhile(node: ?Object, opts?: ?Object): boolean + declare function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean + declare function isFor(node: ?Object, opts?: ?Object): boolean + declare function isForXStatement(node: ?Object, opts?: ?Object): boolean + declare function isFunction(node: ?Object, opts?: ?Object): boolean + declare function isFunctionParent(node: ?Object, opts?: ?Object): boolean + declare function isPureish(node: ?Object, opts?: ?Object): boolean + declare function isDeclaration(node: ?Object, opts?: ?Object): boolean + declare function isPatternLike(node: ?Object, opts?: ?Object): boolean + declare function isLVal(node: ?Object, opts?: ?Object): boolean + declare function isTSEntityName(node: ?Object, opts?: ?Object): boolean + declare function isLiteral(node: ?Object, opts?: ?Object): boolean + declare function isImmutable(node: ?Object, opts?: ?Object): boolean + declare function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean + declare function isMethod(node: ?Object, opts?: ?Object): boolean + declare function isObjectMember(node: ?Object, opts?: ?Object): boolean + declare function isProperty(node: ?Object, opts?: ?Object): boolean + declare function isUnaryLike(node: ?Object, opts?: ?Object): boolean + declare function isPattern(node: ?Object, opts?: ?Object): boolean + declare function isClass(node: ?Object, opts?: ?Object): boolean + declare function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean + declare function isExportDeclaration(node: ?Object, opts?: ?Object): boolean + declare function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean + declare function isFlow(node: ?Object, opts?: ?Object): boolean + declare function isFlowType(node: ?Object, opts?: ?Object): boolean + declare function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean + declare function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean + declare function isFlowPredicate(node: ?Object, opts?: ?Object): boolean + declare function isJSX(node: ?Object, opts?: ?Object): boolean + declare function isPrivate(node: ?Object, opts?: ?Object): boolean + declare function isTSTypeElement(node: ?Object, opts?: ?Object): boolean + declare function isTSType(node: ?Object, opts?: ?Object): boolean + declare function isNumberLiteral(node: ?Object, opts?: ?Object): boolean + declare function isRegexLiteral(node: ?Object, opts?: ?Object): boolean + declare function isRestProperty(node: ?Object, opts?: ?Object): boolean + declare function isSpreadProperty(node: ?Object, opts?: ?Object): boolean + declare function validate(n: BabelNode, key: string, value: mixed): void; + declare function clone(n: T): T; + declare function cloneDeep(n: T): T; + declare function removeProperties(n: T, opts: ?{}): void; + declare function removePropertiesDeep(n: T, opts: ?{}): T; + declare type TraversalAncestors = Array<{ + node: BabelNode, + key: string, + index?: number, + }>; + declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; + declare type TraversalHandlers = { + enter?: TraversalHandler, + exit?: TraversalHandler, + }; + declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void; +} diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js new file mode 100644 index 0000000..6a0ac93 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = appendToMemberExpression; + +var _generated = require("../builders/generated"); + +function appendToMemberExpression(member, append, computed = false) { + member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); + member.property = append; + member.computed = !!computed; + return member; +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js similarity index 77% rename from node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js index 9d7e8f6..5802683 100644 --- a/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js @@ -8,13 +8,13 @@ exports.default = removeTypeDuplicates; var _generated = require("../../validators/generated"); function removeTypeDuplicates(nodes) { - var generics = {}; - var bases = {}; - var typeGroups = []; - var types = []; + const generics = {}; + const bases = {}; + const typeGroups = []; + const types = []; - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; if (!node) continue; if (types.indexOf(node) >= 0) { @@ -40,10 +40,10 @@ function removeTypeDuplicates(nodes) { } if ((0, _generated.isGenericTypeAnnotation)(node)) { - var name = node.id.name; + const name = node.id.name; if (generics[name]) { - var existing = generics[name]; + let existing = generics[name]; if (existing.typeParameters) { if (node.typeParameters) { @@ -62,12 +62,12 @@ function removeTypeDuplicates(nodes) { types.push(node); } - for (var type in bases) { + for (const type of Object.keys(bases)) { types.push(bases[type]); } - for (var _name in generics) { - types.push(generics[_name]); + for (const name of Object.keys(generics)) { + types.push(generics[name]); } return types; diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/inherits.js b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/inherits.js new file mode 100644 index 0000000..64d72fc --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/inherits.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = inherits; + +var _constants = require("../constants"); + +var _inheritsComments = _interopRequireDefault(require("../comments/inheritsComments")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function inherits(child, parent) { + if (!child || !parent) return child; + + for (const key of _constants.INHERIT_KEYS.optional) { + if (child[key] == null) { + child[key] = parent[key]; + } + } + + for (const key of Object.keys(parent)) { + if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; + } + + for (const key of _constants.INHERIT_KEYS.force) { + child[key] = parent[key]; + } + + (0, _inheritsComments.default)(child, parent); + return child; +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js similarity index 100% rename from node_modules/@babel/types/lib/modifications/prependToMemberExpression.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removeProperties.js b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removeProperties.js new file mode 100644 index 0000000..f9cf8e6 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removeProperties.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = removeProperties; + +var _constants = require("../constants"); + +const CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; + +const CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); + +function removeProperties(node, opts = {}) { + const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; + + for (const key of map) { + if (node[key] != null) node[key] = undefined; + } + + for (const key of Object.keys(node)) { + if (key[0] === "_" && node[key] != null) node[key] = undefined; + } + + const symbols = Object.getOwnPropertySymbols(node); + + for (const sym of symbols) { + node[sym] = null; + } +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js b/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js similarity index 100% rename from node_modules/@babel/types/lib/modifications/removePropertiesDeep.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js diff --git a/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js similarity index 85% rename from node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js index ca046fb..189f4b8 100644 --- a/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js @@ -8,17 +8,17 @@ exports.default = getBindingIdentifiers; var _generated = require("../validators/generated"); function getBindingIdentifiers(node, duplicates, outerOnly) { - var search = [].concat(node); - var ids = Object.create(null); + let search = [].concat(node); + const ids = Object.create(null); while (search.length) { - var id = search.shift(); + const id = search.shift(); if (!id) continue; - var keys = getBindingIdentifiers.keys[id.type]; + const keys = getBindingIdentifiers.keys[id.type]; if ((0, _generated.isIdentifier)(id)) { if (duplicates) { - var _ids = ids[id.name] = ids[id.name] || []; + const _ids = ids[id.name] = ids[id.name] || []; _ids.push(id); } else { @@ -48,8 +48,8 @@ function getBindingIdentifiers(node, duplicates, outerOnly) { } if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; if (id[key]) { search = search.concat(id[key]); @@ -66,6 +66,9 @@ getBindingIdentifiers.keys = { DeclareFunction: ["id"], DeclareModule: ["id"], DeclareVariable: ["id"], + DeclareInterface: ["id"], + DeclareTypeAlias: ["id"], + DeclareOpaqueType: ["id"], InterfaceDeclaration: ["id"], TypeAlias: ["id"], OpaqueType: ["id"], diff --git a/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js similarity index 100% rename from node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js b/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js new file mode 100644 index 0000000..775aed1 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js @@ -0,0 +1,55 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverse; + +var _definitions = require("../definitions"); + +function traverse(node, handlers, state) { + if (typeof handlers === "function") { + handlers = { + enter: handlers + }; + } + + const { + enter, + exit + } = handlers; + traverseSimpleImpl(node, enter, exit, state, []); +} + +function traverseSimpleImpl(node, enter, exit, state, ancestors) { + const keys = _definitions.VISITOR_KEYS[node.type]; + if (!keys) return; + if (enter) enter(node, ancestors, state); + + for (const key of keys) { + const subNode = node[key]; + + if (Array.isArray(subNode)) { + for (let i = 0; i < subNode.length; i++) { + const child = subNode[i]; + if (!child) continue; + ancestors.push({ + node, + key, + index: i + }); + traverseSimpleImpl(child, enter, exit, state, ancestors); + ancestors.pop(); + } + } else if (subNode) { + ancestors.push({ + node, + key + }); + traverseSimpleImpl(subNode, enter, exit, state, ancestors); + ancestors.pop(); + } + } + + if (exit) exit(node, ancestors, state); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverseFast.js b/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverseFast.js new file mode 100644 index 0000000..f038dd8 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverseFast.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = traverseFast; + +var _definitions = require("../definitions"); + +function traverseFast(node, enter, opts) { + if (!node) return; + const keys = _definitions.VISITOR_KEYS[node.type]; + if (!keys) return; + opts = opts || {}; + enter(node, opts); + + for (const key of keys) { + const subNode = node[key]; + + if (Array.isArray(subNode)) { + for (const node of subNode) { + traverseFast(node, enter, opts); + } + } else { + traverseFast(subNode, enter, opts); + } + } +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/inherit.js b/node_modules/@babel/core/node_modules/@babel/types/lib/utils/inherit.js similarity index 82% rename from node_modules/@babel/types/lib/utils/inherit.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/utils/inherit.js index 3670b0b..46b32ef 100644 --- a/node_modules/@babel/types/lib/utils/inherit.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/utils/inherit.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.default = inherit; function _uniq() { - var data = _interopRequireDefault(require("lodash/uniq")); + const data = _interopRequireDefault(require("lodash/uniq")); - _uniq = function _uniq() { + _uniq = function () { return data; }; diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js b/node_modules/@babel/core/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js new file mode 100644 index 0000000..f0ca133 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js @@ -0,0 +1,47 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = cleanJSXElementLiteralChild; + +var _generated = require("../../builders/generated"); + +function cleanJSXElementLiteralChild(child, args) { + const lines = child.value.split(/\r\n|\n|\r/); + let lastNonEmptyLine = 0; + + for (let i = 0; i < lines.length; i++) { + if (lines[i].match(/[^ \t]/)) { + lastNonEmptyLine = i; + } + } + + let str = ""; + + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + const isFirstLine = i === 0; + const isLastLine = i === lines.length - 1; + const isLastNonEmptyLine = i === lastNonEmptyLine; + let trimmedLine = line.replace(/\t/g, " "); + + if (!isFirstLine) { + trimmedLine = trimmedLine.replace(/^[ ]+/, ""); + } + + if (!isLastLine) { + trimmedLine = trimmedLine.replace(/[ ]+$/, ""); + } + + if (trimmedLine) { + if (!isLastNonEmptyLine) { + trimmedLine += " "; + } + + str += trimmedLine; + } + } + + if (str) args.push((0, _generated.stringLiteral)(str)); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/utils/shallowEqual.js b/node_modules/@babel/core/node_modules/@babel/types/lib/utils/shallowEqual.js new file mode 100644 index 0000000..fae259e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/utils/shallowEqual.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = shallowEqual; + +function shallowEqual(actual, expected) { + const keys = Object.keys(expected); + + for (const key of keys) { + if (actual[key] !== expected[key]) { + return false; + } + } + + return true; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js new file mode 100644 index 0000000..0faa29c --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = buildMatchMemberExpression; + +var _matchesPattern = _interopRequireDefault(require("./matchesPattern")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function buildMatchMemberExpression(match, allowPartial) { + const parts = match.split("."); + return member => (0, _matchesPattern.default)(member, parts, allowPartial); +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/generated/index.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/generated/index.js new file mode 100644 index 0000000..e94b2fb --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/generated/index.js @@ -0,0 +1,4317 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isArrayExpression = isArrayExpression; +exports.isAssignmentExpression = isAssignmentExpression; +exports.isBinaryExpression = isBinaryExpression; +exports.isInterpreterDirective = isInterpreterDirective; +exports.isDirective = isDirective; +exports.isDirectiveLiteral = isDirectiveLiteral; +exports.isBlockStatement = isBlockStatement; +exports.isBreakStatement = isBreakStatement; +exports.isCallExpression = isCallExpression; +exports.isCatchClause = isCatchClause; +exports.isConditionalExpression = isConditionalExpression; +exports.isContinueStatement = isContinueStatement; +exports.isDebuggerStatement = isDebuggerStatement; +exports.isDoWhileStatement = isDoWhileStatement; +exports.isEmptyStatement = isEmptyStatement; +exports.isExpressionStatement = isExpressionStatement; +exports.isFile = isFile; +exports.isForInStatement = isForInStatement; +exports.isForStatement = isForStatement; +exports.isFunctionDeclaration = isFunctionDeclaration; +exports.isFunctionExpression = isFunctionExpression; +exports.isIdentifier = isIdentifier; +exports.isIfStatement = isIfStatement; +exports.isLabeledStatement = isLabeledStatement; +exports.isStringLiteral = isStringLiteral; +exports.isNumericLiteral = isNumericLiteral; +exports.isNullLiteral = isNullLiteral; +exports.isBooleanLiteral = isBooleanLiteral; +exports.isRegExpLiteral = isRegExpLiteral; +exports.isLogicalExpression = isLogicalExpression; +exports.isMemberExpression = isMemberExpression; +exports.isNewExpression = isNewExpression; +exports.isProgram = isProgram; +exports.isObjectExpression = isObjectExpression; +exports.isObjectMethod = isObjectMethod; +exports.isObjectProperty = isObjectProperty; +exports.isRestElement = isRestElement; +exports.isReturnStatement = isReturnStatement; +exports.isSequenceExpression = isSequenceExpression; +exports.isParenthesizedExpression = isParenthesizedExpression; +exports.isSwitchCase = isSwitchCase; +exports.isSwitchStatement = isSwitchStatement; +exports.isThisExpression = isThisExpression; +exports.isThrowStatement = isThrowStatement; +exports.isTryStatement = isTryStatement; +exports.isUnaryExpression = isUnaryExpression; +exports.isUpdateExpression = isUpdateExpression; +exports.isVariableDeclaration = isVariableDeclaration; +exports.isVariableDeclarator = isVariableDeclarator; +exports.isWhileStatement = isWhileStatement; +exports.isWithStatement = isWithStatement; +exports.isAssignmentPattern = isAssignmentPattern; +exports.isArrayPattern = isArrayPattern; +exports.isArrowFunctionExpression = isArrowFunctionExpression; +exports.isClassBody = isClassBody; +exports.isClassDeclaration = isClassDeclaration; +exports.isClassExpression = isClassExpression; +exports.isExportAllDeclaration = isExportAllDeclaration; +exports.isExportDefaultDeclaration = isExportDefaultDeclaration; +exports.isExportNamedDeclaration = isExportNamedDeclaration; +exports.isExportSpecifier = isExportSpecifier; +exports.isForOfStatement = isForOfStatement; +exports.isImportDeclaration = isImportDeclaration; +exports.isImportDefaultSpecifier = isImportDefaultSpecifier; +exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier; +exports.isImportSpecifier = isImportSpecifier; +exports.isMetaProperty = isMetaProperty; +exports.isClassMethod = isClassMethod; +exports.isObjectPattern = isObjectPattern; +exports.isSpreadElement = isSpreadElement; +exports.isSuper = isSuper; +exports.isTaggedTemplateExpression = isTaggedTemplateExpression; +exports.isTemplateElement = isTemplateElement; +exports.isTemplateLiteral = isTemplateLiteral; +exports.isYieldExpression = isYieldExpression; +exports.isAnyTypeAnnotation = isAnyTypeAnnotation; +exports.isArrayTypeAnnotation = isArrayTypeAnnotation; +exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation; +exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; +exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; +exports.isClassImplements = isClassImplements; +exports.isDeclareClass = isDeclareClass; +exports.isDeclareFunction = isDeclareFunction; +exports.isDeclareInterface = isDeclareInterface; +exports.isDeclareModule = isDeclareModule; +exports.isDeclareModuleExports = isDeclareModuleExports; +exports.isDeclareTypeAlias = isDeclareTypeAlias; +exports.isDeclareOpaqueType = isDeclareOpaqueType; +exports.isDeclareVariable = isDeclareVariable; +exports.isDeclareExportDeclaration = isDeclareExportDeclaration; +exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; +exports.isDeclaredPredicate = isDeclaredPredicate; +exports.isExistsTypeAnnotation = isExistsTypeAnnotation; +exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation; +exports.isFunctionTypeParam = isFunctionTypeParam; +exports.isGenericTypeAnnotation = isGenericTypeAnnotation; +exports.isInferredPredicate = isInferredPredicate; +exports.isInterfaceExtends = isInterfaceExtends; +exports.isInterfaceDeclaration = isInterfaceDeclaration; +exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; +exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; +exports.isMixedTypeAnnotation = isMixedTypeAnnotation; +exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation; +exports.isNullableTypeAnnotation = isNullableTypeAnnotation; +exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; +exports.isNumberTypeAnnotation = isNumberTypeAnnotation; +exports.isObjectTypeAnnotation = isObjectTypeAnnotation; +exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot; +exports.isObjectTypeCallProperty = isObjectTypeCallProperty; +exports.isObjectTypeIndexer = isObjectTypeIndexer; +exports.isObjectTypeProperty = isObjectTypeProperty; +exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; +exports.isOpaqueType = isOpaqueType; +exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; +exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; +exports.isStringTypeAnnotation = isStringTypeAnnotation; +exports.isThisTypeAnnotation = isThisTypeAnnotation; +exports.isTupleTypeAnnotation = isTupleTypeAnnotation; +exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation; +exports.isTypeAlias = isTypeAlias; +exports.isTypeAnnotation = isTypeAnnotation; +exports.isTypeCastExpression = isTypeCastExpression; +exports.isTypeParameter = isTypeParameter; +exports.isTypeParameterDeclaration = isTypeParameterDeclaration; +exports.isTypeParameterInstantiation = isTypeParameterInstantiation; +exports.isUnionTypeAnnotation = isUnionTypeAnnotation; +exports.isVariance = isVariance; +exports.isVoidTypeAnnotation = isVoidTypeAnnotation; +exports.isJSXAttribute = isJSXAttribute; +exports.isJSXClosingElement = isJSXClosingElement; +exports.isJSXElement = isJSXElement; +exports.isJSXEmptyExpression = isJSXEmptyExpression; +exports.isJSXExpressionContainer = isJSXExpressionContainer; +exports.isJSXSpreadChild = isJSXSpreadChild; +exports.isJSXIdentifier = isJSXIdentifier; +exports.isJSXMemberExpression = isJSXMemberExpression; +exports.isJSXNamespacedName = isJSXNamespacedName; +exports.isJSXOpeningElement = isJSXOpeningElement; +exports.isJSXSpreadAttribute = isJSXSpreadAttribute; +exports.isJSXText = isJSXText; +exports.isJSXFragment = isJSXFragment; +exports.isJSXOpeningFragment = isJSXOpeningFragment; +exports.isJSXClosingFragment = isJSXClosingFragment; +exports.isNoop = isNoop; +exports.isPlaceholder = isPlaceholder; +exports.isArgumentPlaceholder = isArgumentPlaceholder; +exports.isAwaitExpression = isAwaitExpression; +exports.isBindExpression = isBindExpression; +exports.isClassProperty = isClassProperty; +exports.isOptionalMemberExpression = isOptionalMemberExpression; +exports.isPipelineTopicExpression = isPipelineTopicExpression; +exports.isPipelineBareFunction = isPipelineBareFunction; +exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; +exports.isOptionalCallExpression = isOptionalCallExpression; +exports.isClassPrivateProperty = isClassPrivateProperty; +exports.isClassPrivateMethod = isClassPrivateMethod; +exports.isImport = isImport; +exports.isDecorator = isDecorator; +exports.isDoExpression = isDoExpression; +exports.isExportDefaultSpecifier = isExportDefaultSpecifier; +exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier; +exports.isPrivateName = isPrivateName; +exports.isBigIntLiteral = isBigIntLiteral; +exports.isTSParameterProperty = isTSParameterProperty; +exports.isTSDeclareFunction = isTSDeclareFunction; +exports.isTSDeclareMethod = isTSDeclareMethod; +exports.isTSQualifiedName = isTSQualifiedName; +exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; +exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; +exports.isTSPropertySignature = isTSPropertySignature; +exports.isTSMethodSignature = isTSMethodSignature; +exports.isTSIndexSignature = isTSIndexSignature; +exports.isTSAnyKeyword = isTSAnyKeyword; +exports.isTSUnknownKeyword = isTSUnknownKeyword; +exports.isTSNumberKeyword = isTSNumberKeyword; +exports.isTSObjectKeyword = isTSObjectKeyword; +exports.isTSBooleanKeyword = isTSBooleanKeyword; +exports.isTSStringKeyword = isTSStringKeyword; +exports.isTSSymbolKeyword = isTSSymbolKeyword; +exports.isTSVoidKeyword = isTSVoidKeyword; +exports.isTSUndefinedKeyword = isTSUndefinedKeyword; +exports.isTSNullKeyword = isTSNullKeyword; +exports.isTSNeverKeyword = isTSNeverKeyword; +exports.isTSThisType = isTSThisType; +exports.isTSFunctionType = isTSFunctionType; +exports.isTSConstructorType = isTSConstructorType; +exports.isTSTypeReference = isTSTypeReference; +exports.isTSTypePredicate = isTSTypePredicate; +exports.isTSTypeQuery = isTSTypeQuery; +exports.isTSTypeLiteral = isTSTypeLiteral; +exports.isTSArrayType = isTSArrayType; +exports.isTSTupleType = isTSTupleType; +exports.isTSOptionalType = isTSOptionalType; +exports.isTSRestType = isTSRestType; +exports.isTSUnionType = isTSUnionType; +exports.isTSIntersectionType = isTSIntersectionType; +exports.isTSConditionalType = isTSConditionalType; +exports.isTSInferType = isTSInferType; +exports.isTSParenthesizedType = isTSParenthesizedType; +exports.isTSTypeOperator = isTSTypeOperator; +exports.isTSIndexedAccessType = isTSIndexedAccessType; +exports.isTSMappedType = isTSMappedType; +exports.isTSLiteralType = isTSLiteralType; +exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; +exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; +exports.isTSInterfaceBody = isTSInterfaceBody; +exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; +exports.isTSAsExpression = isTSAsExpression; +exports.isTSTypeAssertion = isTSTypeAssertion; +exports.isTSEnumDeclaration = isTSEnumDeclaration; +exports.isTSEnumMember = isTSEnumMember; +exports.isTSModuleDeclaration = isTSModuleDeclaration; +exports.isTSModuleBlock = isTSModuleBlock; +exports.isTSImportType = isTSImportType; +exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; +exports.isTSExternalModuleReference = isTSExternalModuleReference; +exports.isTSNonNullExpression = isTSNonNullExpression; +exports.isTSExportAssignment = isTSExportAssignment; +exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; +exports.isTSTypeAnnotation = isTSTypeAnnotation; +exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; +exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; +exports.isTSTypeParameter = isTSTypeParameter; +exports.isExpression = isExpression; +exports.isBinary = isBinary; +exports.isScopable = isScopable; +exports.isBlockParent = isBlockParent; +exports.isBlock = isBlock; +exports.isStatement = isStatement; +exports.isTerminatorless = isTerminatorless; +exports.isCompletionStatement = isCompletionStatement; +exports.isConditional = isConditional; +exports.isLoop = isLoop; +exports.isWhile = isWhile; +exports.isExpressionWrapper = isExpressionWrapper; +exports.isFor = isFor; +exports.isForXStatement = isForXStatement; +exports.isFunction = isFunction; +exports.isFunctionParent = isFunctionParent; +exports.isPureish = isPureish; +exports.isDeclaration = isDeclaration; +exports.isPatternLike = isPatternLike; +exports.isLVal = isLVal; +exports.isTSEntityName = isTSEntityName; +exports.isLiteral = isLiteral; +exports.isImmutable = isImmutable; +exports.isUserWhitespacable = isUserWhitespacable; +exports.isMethod = isMethod; +exports.isObjectMember = isObjectMember; +exports.isProperty = isProperty; +exports.isUnaryLike = isUnaryLike; +exports.isPattern = isPattern; +exports.isClass = isClass; +exports.isModuleDeclaration = isModuleDeclaration; +exports.isExportDeclaration = isExportDeclaration; +exports.isModuleSpecifier = isModuleSpecifier; +exports.isFlow = isFlow; +exports.isFlowType = isFlowType; +exports.isFlowBaseAnnotation = isFlowBaseAnnotation; +exports.isFlowDeclaration = isFlowDeclaration; +exports.isFlowPredicate = isFlowPredicate; +exports.isJSX = isJSX; +exports.isPrivate = isPrivate; +exports.isTSTypeElement = isTSTypeElement; +exports.isTSType = isTSType; +exports.isNumberLiteral = isNumberLiteral; +exports.isRegexLiteral = isRegexLiteral; +exports.isRestProperty = isRestProperty; +exports.isSpreadProperty = isSpreadProperty; + +var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isArrayExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAssignmentExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AssignmentExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBinaryExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BinaryExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterpreterDirective(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterpreterDirective") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDirective(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Directive") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDirectiveLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DirectiveLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlockStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BlockStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBreakStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BreakStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCallExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "CallExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCatchClause(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "CatchClause") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isConditionalExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ConditionalExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isContinueStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ContinueStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDebuggerStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DebuggerStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDoWhileStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DoWhileStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEmptyStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EmptyStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpressionStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExpressionStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFile(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "File") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForInStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForInStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Identifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIfStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "IfStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLabeledStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "LabeledStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumericLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumericLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRegExpLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RegExpLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLogicalExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "LogicalExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNewExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NewExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isProgram(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Program") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRestElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RestElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isReturnStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ReturnStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSequenceExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SequenceExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isParenthesizedExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ParenthesizedExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSwitchCase(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SwitchCase") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSwitchStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SwitchStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThisExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThisExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThrowStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThrowStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTryStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TryStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnaryExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UnaryExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUpdateExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UpdateExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariableDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VariableDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariableDeclarator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VariableDeclarator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWhileStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "WhileStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWithStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "WithStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAssignmentPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AssignmentPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrayPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrowFunctionExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrowFunctionExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportAllDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportAllDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDefaultDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportDefaultDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportNamedDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportNamedDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForOfStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForOfStatement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportDefaultSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportDefaultSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportNamespaceSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportNamespaceSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImportSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ImportSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMetaProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MetaProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectPattern") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSpreadElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SpreadElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSuper(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Super") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTaggedTemplateExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TaggedTemplateExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTemplateElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TemplateElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTemplateLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TemplateLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isYieldExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "YieldExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAnyTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AnyTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArrayTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArrayTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBooleanLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BooleanLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassImplements(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassImplements") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareClass(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareClass") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareInterface(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareInterface") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareModule(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareModule") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareModuleExports(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareModuleExports") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareTypeAlias(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareTypeAlias") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareOpaqueType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareOpaqueType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareVariable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareVariable") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareExportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclareExportAllDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclareExportAllDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclaredPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DeclaredPredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExistsTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExistsTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionTypeParam(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionTypeParam") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isGenericTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "GenericTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInferredPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InferredPredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceExtends(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceExtends") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isInterfaceTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "InterfaceTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isIntersectionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "IntersectionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMixedTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "MixedTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isEmptyTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "EmptyTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNullableTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NullableTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeInternalSlot(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeInternalSlot") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeCallProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeCallProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeIndexer(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeIndexer") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectTypeSpreadProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectTypeSpreadProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOpaqueType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OpaqueType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isQualifiedTypeIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "QualifiedTypeIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringLiteralTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringLiteralTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStringTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "StringTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isThisTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ThisTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTupleTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TupleTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeofTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeofTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeAlias(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeAlias") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeCastExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeCastExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameter(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameter") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameterDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameterDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTypeParameterInstantiation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TypeParameterInstantiation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnionTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UnionTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVariance(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Variance") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isVoidTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "VoidTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXAttribute(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXClosingElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXClosingElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXEmptyExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXEmptyExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXExpressionContainer(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXExpressionContainer") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXSpreadChild(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXSpreadChild") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXIdentifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXIdentifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXMemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXNamespacedName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXNamespacedName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXOpeningElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXOpeningElement") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXSpreadAttribute(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXSpreadAttribute") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXText(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXText") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXOpeningFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXOpeningFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSXClosingFragment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSXClosingFragment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNoop(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Noop") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPlaceholder(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Placeholder") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isArgumentPlaceholder(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ArgumentPlaceholder") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isAwaitExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "AwaitExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBindExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BindExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalMemberExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OptionalMemberExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelineTopicExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelineTopicExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelineBareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelineBareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPipelinePrimaryTopicReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PipelinePrimaryTopicReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isOptionalCallExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "OptionalCallExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassPrivateProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassPrivateProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClassPrivateMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ClassPrivateMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImport(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Import") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDecorator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Decorator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDoExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "DoExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDefaultSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportDefaultSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportNamespaceSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportNamespaceSpecifier") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPrivateName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PrivateName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBigIntLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BigIntLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSParameterProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSParameterProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSDeclareFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSDeclareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSDeclareMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSDeclareMethod") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSQualifiedName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSQualifiedName") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSCallSignatureDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSCallSignatureDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConstructSignatureDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConstructSignatureDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSPropertySignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSPropertySignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSMethodSignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSMethodSignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIndexSignature(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIndexSignature") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSAnyKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSAnyKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUnknownKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUnknownKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNumberKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNumberKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSObjectKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSObjectKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSBooleanKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSBooleanKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSStringKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSStringKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSSymbolKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSSymbolKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSVoidKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSVoidKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUndefinedKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUndefinedKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNullKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNullKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNeverKeyword(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNeverKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSThisType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSThisType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSFunctionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSFunctionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConstructorType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConstructorType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypePredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypePredicate") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeQuery(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeQuery") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSArrayType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSArrayType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTupleType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTupleType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSOptionalType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSOptionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSRestType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSRestType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSUnionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSUnionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIntersectionType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIntersectionType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSConditionalType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSConditionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInferType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInferType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSParenthesizedType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSParenthesizedType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeOperator(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeOperator") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSIndexedAccessType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSIndexedAccessType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSMappedType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSMappedType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSLiteralType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSLiteralType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExpressionWithTypeArguments(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExpressionWithTypeArguments") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInterfaceDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInterfaceDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSInterfaceBody(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSInterfaceBody") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAliasDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAliasDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSAsExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSAsExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAssertion(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAssertion") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEnumDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSEnumDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEnumMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSEnumMember") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSModuleDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSModuleDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSModuleBlock(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSModuleBlock") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSImportType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSImportType") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSImportEqualsDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSImportEqualsDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExternalModuleReference(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExternalModuleReference") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNonNullExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNonNullExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSExportAssignment(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSExportAssignment") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSNamespaceExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSNamespaceExportDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeAnnotation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameterInstantiation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameterInstantiation") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameterDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameterDeclaration") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeParameter(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeParameter") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpression(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBinary(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isScopable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlockParent(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isBlock(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTerminatorless(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isCompletionStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isConditional(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLoop(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isWhile(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExpressionWrapper(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFor(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isForXStatement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunction(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFunctionParent(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPureish(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPatternLike(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLVal(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSEntityName(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isLiteral(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isImmutable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUserWhitespacable(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isMethod(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isObjectMember(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isProperty(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isUnaryLike(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPattern(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isClass(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Class" || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isExportDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isModuleSpecifier(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlow(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowBaseAnnotation(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowDeclaration(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isFlowPredicate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isJSX(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isPrivate(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSTypeElement(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isTSType(node, opts) { + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isNumberLiteral(node, opts) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "NumberLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRegexLiteral(node, opts) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RegexLiteral") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isRestProperty(node, opts) { + console.trace("The node type RestProperty has been renamed to RestElement"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "RestProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} + +function isSpreadProperty(node, opts) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + if (!node) return false; + const nodeType = node.type; + + if (nodeType === "SpreadProperty") { + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } + } + + return false; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/is.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/is.js new file mode 100644 index 0000000..a68c108 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/is.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = is; + +var _shallowEqual = _interopRequireDefault(require("../utils/shallowEqual")); + +var _isType = _interopRequireDefault(require("./isType")); + +var _isPlaceholderType = _interopRequireDefault(require("./isPlaceholderType")); + +var _definitions = require("../definitions"); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function is(type, node, opts) { + if (!node) return false; + const matches = (0, _isType.default)(node.type, type); + + if (!matches) { + if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { + return (0, _isPlaceholderType.default)(node.expectedNode, type); + } + + return false; + } + + if (typeof opts === "undefined") { + return true; + } else { + return (0, _shallowEqual.default)(node, opts); + } +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBinding.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBinding.js new file mode 100644 index 0000000..e18ad19 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBinding.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBinding; + +var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function isBinding(node, parent, grandparent) { + if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { + return false; + } + + const keys = _getBindingIdentifiers.default.keys[parent.type]; + + if (keys) { + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const val = parent[key]; + + if (Array.isArray(val)) { + if (val.indexOf(node) >= 0) return true; + } else { + if (val === node) return true; + } + } + } + + return false; +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isBlockScoped.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBlockScoped.js similarity index 100% rename from node_modules/@babel/types/lib/validators/isBlockScoped.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBlockScoped.js diff --git a/node_modules/@babel/types/lib/validators/isImmutable.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isImmutable.js similarity index 100% rename from node_modules/@babel/types/lib/validators/isImmutable.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isImmutable.js diff --git a/node_modules/@babel/types/lib/validators/isLet.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isLet.js similarity index 100% rename from node_modules/@babel/types/lib/validators/isLet.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isLet.js diff --git a/node_modules/@babel/types/lib/validators/isNode.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNode.js similarity index 100% rename from node_modules/@babel/types/lib/validators/isNode.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNode.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNodesEquivalent.js new file mode 100644 index 0000000..0c3b8ac --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNodesEquivalent.js @@ -0,0 +1,67 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNodesEquivalent; + +var _definitions = require("../definitions"); + +function isNodesEquivalent(a, b) { + if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { + return a === b; + } + + if (a.type !== b.type) { + return false; + } + + const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); + const visitorKeys = _definitions.VISITOR_KEYS[a.type]; + + for (const field of fields) { + if (typeof a[field] !== typeof b[field]) { + return false; + } + + if (a[field] == null && b[field] == null) { + continue; + } else if (a[field] == null || b[field] == null) { + return false; + } + + if (Array.isArray(a[field])) { + if (!Array.isArray(b[field])) { + return false; + } + + if (a[field].length !== b[field].length) { + return false; + } + + for (let i = 0; i < a[field].length; i++) { + if (!isNodesEquivalent(a[field][i], b[field][i])) { + return false; + } + } + + continue; + } + + if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) { + for (const key of Object.keys(a[field])) { + if (a[field][key] !== b[field][key]) { + return false; + } + } + + continue; + } + + if (!isNodesEquivalent(a[field], b[field])) { + return false; + } + } + + return true; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isPlaceholderType.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isPlaceholderType.js new file mode 100644 index 0000000..e8271de --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isPlaceholderType.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isPlaceholderType; + +var _definitions = require("../definitions"); + +function isPlaceholderType(placeholderType, targetType) { + if (placeholderType === targetType) return true; + const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; + + if (aliases) { + for (const alias of aliases) { + if (targetType === alias) return true; + } + } + + return false; +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isReferenced.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isReferenced.js similarity index 75% rename from node_modules/@babel/types/lib/validators/isReferenced.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isReferenced.js index 827b840..47ede2c 100644 --- a/node_modules/@babel/types/lib/validators/isReferenced.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isReferenced.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = isReferenced; -function isReferenced(node, parent) { +function isReferenced(node, parent, grandparent) { switch (parent.type) { case "MemberExpression": case "JSXMemberExpression": @@ -33,12 +33,17 @@ function isReferenced(node, parent) { case "ClassProperty": case "ClassPrivateProperty": case "ClassMethod": + case "ClassPrivateMethod": case "ObjectMethod": if (parent.key === node) { return !!parent.computed; } - return parent.value === node; + if (parent.value === node) { + return !grandparent || grandparent.type !== "ObjectPattern"; + } + + return true; case "ClassDeclaration": case "ClassExpression": @@ -59,6 +64,10 @@ function isReferenced(node, parent) { case "RestElement": return false; + case "BreakStatement": + case "ContinueStatement": + return false; + case "FunctionDeclaration": case "FunctionExpression": return false; @@ -81,6 +90,19 @@ function isReferenced(node, parent) { case "MetaProperty": return false; + + case "ObjectTypeProperty": + return parent.key !== node; + + case "TSEnumMember": + return parent.id !== node; + + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + + return true; } return true; diff --git a/node_modules/@babel/types/lib/validators/isScope.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isScope.js similarity index 100% rename from node_modules/@babel/types/lib/validators/isScope.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isScope.js diff --git a/node_modules/@babel/types/lib/validators/isSpecifierDefault.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isSpecifierDefault.js similarity index 100% rename from node_modules/@babel/types/lib/validators/isSpecifierDefault.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isSpecifierDefault.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isType.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isType.js new file mode 100644 index 0000000..59d31df --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isType.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isType; + +var _definitions = require("../definitions"); + +function isType(nodeType, targetType) { + if (nodeType === targetType) return true; + if (_definitions.ALIAS_KEYS[targetType]) return false; + const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; + + if (aliases) { + if (aliases[0] === nodeType) return true; + + for (const alias of aliases) { + if (nodeType === alias) return true; + } + } + + return false; +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidES3Identifier.js new file mode 100644 index 0000000..8455cab --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidES3Identifier.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isValidES3Identifier; + +var _isValidIdentifier = _interopRequireDefault(require("./isValidIdentifier")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]); + +function isValidES3Identifier(name) { + return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidIdentifier.js similarity index 85% rename from node_modules/@babel/types/lib/validators/isValidIdentifier.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidIdentifier.js index 544fde5..8c54b7a 100644 --- a/node_modules/@babel/types/lib/validators/isValidIdentifier.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidIdentifier.js @@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { exports.default = isValidIdentifier; function _esutils() { - var data = _interopRequireDefault(require("esutils")); + const data = _interopRequireDefault(require("esutils")); - _esutils = function _esutils() { + _esutils = function () { return data; }; diff --git a/node_modules/@babel/types/lib/validators/isVar.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isVar.js similarity index 100% rename from node_modules/@babel/types/lib/validators/isVar.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/isVar.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/matchesPattern.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/matchesPattern.js new file mode 100644 index 0000000..538e011 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/matchesPattern.js @@ -0,0 +1,40 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = matchesPattern; + +var _generated = require("./generated"); + +function matchesPattern(member, match, allowPartial) { + if (!(0, _generated.isMemberExpression)(member)) return false; + const parts = Array.isArray(match) ? match : match.split("."); + const nodes = []; + let node; + + for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { + nodes.push(node.property); + } + + nodes.push(node); + if (nodes.length < parts.length) return false; + if (!allowPartial && nodes.length > parts.length) return false; + + for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { + const node = nodes[j]; + let value; + + if ((0, _generated.isIdentifier)(node)) { + value = node.name; + } else if ((0, _generated.isStringLiteral)(node)) { + value = node.value; + } else { + return false; + } + + if (parts[i] !== value) return false; + } + + return true; +} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/react/isCompatTag.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isCompatTag.js similarity index 100% rename from node_modules/@babel/types/lib/validators/react/isCompatTag.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isCompatTag.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isReactComponent.js new file mode 100644 index 0000000..33b30d7 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isReactComponent.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _buildMatchMemberExpression = _interopRequireDefault(require("../buildMatchMemberExpression")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); +var _default = isReactComponent; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/validate.js b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js similarity index 80% rename from node_modules/@babel/types/lib/validators/validate.js rename to node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js index f4da72a..1fe1c1c 100644 --- a/node_modules/@babel/types/lib/validators/validate.js +++ b/node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js @@ -9,9 +9,9 @@ var _definitions = require("../definitions"); function validate(node, key, val) { if (!node) return; - var fields = _definitions.NODE_FIELDS[node.type]; + const fields = _definitions.NODE_FIELDS[node.type]; if (!fields) return; - var field = fields[key]; + const field = fields[key]; if (!field || !field.validate) return; if (field.optional && val == null) return; field.validate(node, key, val); diff --git a/node_modules/@babel/core/node_modules/@babel/types/package.json b/node_modules/@babel/core/node_modules/@babel/types/package.json new file mode 100644 index 0000000..92dff73 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/package.json @@ -0,0 +1,60 @@ +{ + "_from": "@babel/types@^7.4.0", + "_id": "@babel/types@7.4.0", + "_inBundle": false, + "_integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", + "_location": "/@babel/core/@babel/types", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/types@^7.4.0", + "name": "@babel/types", + "escapedName": "@babel%2ftypes", + "scope": "@babel", + "rawSpec": "^7.4.0", + "saveSpec": null, + "fetchSpec": "^7.4.0" + }, + "_requiredBy": [ + "/@babel/core", + "/@babel/core/@babel/generator", + "/@babel/core/@babel/helper-function-name", + "/@babel/core/@babel/helper-get-function-arity", + "/@babel/core/@babel/helper-split-export-declaration", + "/@babel/core/@babel/helpers", + "/@babel/core/@babel/template", + "/@babel/core/@babel/traverse" + ], + "_resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", + "_shasum": "670724f77d24cce6cc7d8cf64599d511d164894c", + "_spec": "@babel/types@^7.4.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bundleDependencies": false, + "dependencies": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + }, + "deprecated": false, + "description": "Babel Types is a Lodash-esque utility library for AST nodes", + "devDependencies": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.0" + }, + "gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/types", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-types" + }, + "types": "lib/index.d.ts", + "version": "7.4.0" +} diff --git a/node_modules/@babel/core/node_modules/@babel/types/scripts/generateTypeHelpers.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/generateTypeHelpers.js new file mode 100644 index 0000000..bf0b036 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/scripts/generateTypeHelpers.js @@ -0,0 +1,29 @@ +"use strict"; +const path = require("path"); +const chalk = require("chalk"); +const generateBuilders = require("./generators/generateBuilders"); +const generateValidators = require("./generators/generateValidators"); +const generateAsserts = require("./generators/generateAsserts"); +const generateConstants = require("./generators/generateConstants"); +const format = require("../../../scripts/utils/formatCode"); +const writeFile = require("../../../scripts/utils/writeFileAndMkDir"); + +const baseDir = path.join(__dirname, "../src"); + +console.log("Generating @babel/types dynamic functions"); + +const buildersFile = path.join(baseDir, "builders/generated/index.js"); +writeFile(buildersFile, format(generateBuilders(), buildersFile)); +console.log(` ${chalk.green("✔")} Generated builders`); + +const validatorsFile = path.join(baseDir, "validators/generated/index.js"); +writeFile(validatorsFile, format(generateValidators(), validatorsFile)); +console.log(` ${chalk.green("✔")} Generated validators`); + +const assertsFile = path.join(baseDir, "asserts/generated/index.js"); +writeFile(assertsFile, format(generateAsserts(), assertsFile)); +console.log(` ${chalk.green("✔")} Generated asserts`); + +const constantsFile = path.join(baseDir, "constants/generated/index.js"); +writeFile(constantsFile, format(generateConstants(), constantsFile)); +console.log(` ${chalk.green("✔")} Generated constants`); diff --git a/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/docs.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/docs.js new file mode 100644 index 0000000..3bbb523 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/docs.js @@ -0,0 +1,117 @@ +"use strict"; + +const util = require("util"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); + +const types = require("../../"); + +const readme = [ + `# @babel/types + +> This module contains methods for building ASTs manually and for checking the types of AST nodes. + +## Install + +\`\`\`sh +npm install --save-dev @babel/types +\`\`\` + +## API`, +]; + +const customTypes = { + ClassMethod: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, + Identifier: { + name: "`string`", + }, + MemberExpression: { + property: "if computed then `Expression` else `Identifier`", + }, + ObjectMethod: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, + ObjectProperty: { + key: "if computed then `Expression` else `Identifier | Literal`", + }, +}; +Object.keys(types.BUILDER_KEYS) + .sort() + .forEach(function(key) { + readme.push("### " + key[0].toLowerCase() + key.substr(1)); + readme.push("```javascript"); + readme.push( + "t." + + toFunctionName(key) + + "(" + + types.BUILDER_KEYS[key].join(", ") + + ")" + ); + readme.push("```"); + readme.push(""); + readme.push( + "See also `t.is" + + key + + "(node, opts)` and `t.assert" + + key + + "(node, opts)`." + ); + readme.push(""); + if (types.ALIAS_KEYS[key] && types.ALIAS_KEYS[key].length) { + readme.push( + "Aliases: " + + types.ALIAS_KEYS[key] + .map(function(key) { + return "`" + key + "`"; + }) + .join(", ") + ); + readme.push(""); + } + Object.keys(types.NODE_FIELDS[key]) + .sort(function(fieldA, fieldB) { + const indexA = types.BUILDER_KEYS[key].indexOf(fieldA); + const indexB = types.BUILDER_KEYS[key].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }) + .forEach(function(field) { + const defaultValue = types.NODE_FIELDS[key][field].default; + const fieldDescription = ["`" + field + "`"]; + const validator = types.NODE_FIELDS[key][field].validate; + if (customTypes[key] && customTypes[key][field]) { + fieldDescription.push(`: ${customTypes[key][field]}`); + } else if (validator) { + try { + fieldDescription.push( + ": `" + stringifyValidator(validator, "") + "`" + ); + } catch (ex) { + if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") { + console.log( + "Unrecognised validator type for " + key + "." + field + ); + console.dir(ex.validator, { depth: 10, colors: true }); + } + } + } + if (defaultValue !== null || types.NODE_FIELDS[key][field].optional) { + fieldDescription.push( + " (default: `" + util.inspect(defaultValue) + "`)" + ); + } else { + fieldDescription.push(" (required)"); + } + readme.push(" - " + fieldDescription.join("")); + }); + + readme.push(""); + readme.push("---"); + readme.push(""); + }); + +process.stdout.write(readme.join("\n")); diff --git a/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/flow.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/flow.js new file mode 100644 index 0000000..daab241 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/flow.js @@ -0,0 +1,153 @@ +"use strict"; + +const t = require("../../"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); + +const NODE_PREFIX = "BabelNode"; + +let code = `// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/flow.js for script used. + +declare class ${NODE_PREFIX}Comment { + value: string; + start: number; + end: number; + loc: ${NODE_PREFIX}SourceLocation; +} + +declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment { + type: "CommentBlock"; +} + +declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment { + type: "CommentLine"; +} + +declare class ${NODE_PREFIX}SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +declare class ${NODE_PREFIX} { + leadingComments?: Array<${NODE_PREFIX}Comment>; + innerComments?: Array<${NODE_PREFIX}Comment>; + trailingComments?: Array<${NODE_PREFIX}Comment>; + start: ?number; + end: ?number; + loc: ?${NODE_PREFIX}SourceLocation; +}\n\n`; + +// + +const lines = []; + +for (const type in t.NODE_FIELDS) { + const fields = t.NODE_FIELDS[type]; + + const struct = ['type: "' + type + '";']; + const args = []; + + Object.keys(t.NODE_FIELDS[type]) + .sort((fieldA, fieldB) => { + const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }) + .forEach(fieldName => { + const field = fields[fieldName]; + + let suffix = ""; + if (field.optional || field.default != null) suffix += "?"; + + let typeAnnotation = "any"; + + const validate = field.validate; + if (validate) { + typeAnnotation = stringifyValidator(validate, NODE_PREFIX); + } + + if (typeAnnotation) { + suffix += ": " + typeAnnotation; + } + + args.push(t.toBindingIdentifierName(fieldName) + suffix); + + if (t.isValidIdentifier(fieldName)) { + struct.push(fieldName + suffix + ";"); + } + }); + + code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} { + ${struct.join("\n ").trim()} +}\n\n`; + + // Flow chokes on super() and import() :/ + if (type !== "Super" && type !== "Import") { + lines.push( + `declare function ${toFunctionName(type)}(${args.join( + ", " + )}): ${NODE_PREFIX}${type};` + ); + } +} + +for (let i = 0; i < t.TYPES.length; i++) { + let decl = `declare function is${ + t.TYPES[i] + }(node: ?Object, opts?: ?Object): boolean`; + + if (t.NODE_FIELDS[t.TYPES[i]]) { + decl += ` %checks (node instanceof ${NODE_PREFIX}${t.TYPES[i]})`; + } + + lines.push(decl); +} + +lines.push( + `declare function validate(n: BabelNode, key: string, value: mixed): void;`, + `declare function clone(n: T): T;`, + `declare function cloneDeep(n: T): T;`, + `declare function removeProperties(n: T, opts: ?{}): void;`, + `declare function removePropertiesDeep(n: T, opts: ?{}): T;`, + `declare type TraversalAncestors = Array<{ + node: BabelNode, + key: string, + index?: number, + }>; + declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; + declare type TraversalHandlers = { + enter?: TraversalHandler, + exit?: TraversalHandler, + };`.replace(/(^|\n) {2}/g, "$1"), + // eslint-disable-next-line + `declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void;` +); + +for (const type in t.FLIPPED_ALIAS_KEYS) { + const types = t.FLIPPED_ALIAS_KEYS[type]; + code += `type ${NODE_PREFIX}${type} = ${types + .map(type => `${NODE_PREFIX}${type}`) + .join(" | ")};\n`; +} + +code += `\ndeclare module "@babel/types" { + ${lines + .join("\n") + .replace(/\n/g, "\n ") + .trim()} +}\n`; + +// + +process.stdout.write(code); diff --git a/node_modules/@babel/types/scripts/generators/generateAsserts.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateAsserts.js similarity index 100% rename from node_modules/@babel/types/scripts/generators/generateAsserts.js rename to node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateAsserts.js diff --git a/node_modules/@babel/types/scripts/generators/generateBuilders.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateBuilders.js similarity index 100% rename from node_modules/@babel/types/scripts/generators/generateBuilders.js rename to node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateBuilders.js diff --git a/node_modules/@babel/types/scripts/generators/generateConstants.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateConstants.js similarity index 100% rename from node_modules/@babel/types/scripts/generators/generateConstants.js rename to node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateConstants.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateValidators.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateValidators.js new file mode 100644 index 0000000..1455f99 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateValidators.js @@ -0,0 +1,78 @@ +"use strict"; +const definitions = require("../../lib/definitions"); + +const has = Function.call.bind(Object.prototype.hasOwnProperty); + +function joinComparisons(leftArr, right) { + return ( + leftArr.map(JSON.stringify).join(` === ${right} || `) + ` === ${right}` + ); +} + +function addIsHelper(type, aliasKeys, deprecated) { + const targetType = JSON.stringify(type); + let aliasSource = ""; + if (aliasKeys) { + aliasSource = " || " + joinComparisons(aliasKeys, "nodeType"); + } + + let placeholderSource = ""; + const placeholderTypes = []; + if ( + definitions.PLACEHOLDERS.includes(type) && + has(definitions.FLIPPED_ALIAS_KEYS, type) + ) { + placeholderTypes.push(type); + } + if (has(definitions.PLACEHOLDERS_FLIPPED_ALIAS, type)) { + placeholderTypes.push(...definitions.PLACEHOLDERS_FLIPPED_ALIAS[type]); + } + if (placeholderTypes.length > 0) { + placeholderSource = + ' || nodeType === "Placeholder" && (' + + joinComparisons(placeholderTypes, "node.expectedNode") + + ")"; + } + + return `export function is${type}(node: ?Object, opts?: Object): boolean { + ${deprecated || ""} + if (!node) return false; + + const nodeType = node.type; + if (nodeType === ${targetType}${aliasSource}${placeholderSource}) { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; + } + `; +} + +module.exports = function generateValidators() { + let output = `// @flow +/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +import shallowEqual from "../../utils/shallowEqual";\n\n`; + + Object.keys(definitions.VISITOR_KEYS).forEach(type => { + output += addIsHelper(type); + }); + + Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { + output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]); + }); + + Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { + const newType = definitions.DEPRECATED_KEYS[type]; + const deprecated = `console.trace("The node type ${type} has been renamed to ${newType}");`; + output += addIsHelper(type, null, deprecated); + }); + + return output; +}; diff --git a/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/typescript.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/typescript.js new file mode 100644 index 0000000..b6019ec --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/typescript.js @@ -0,0 +1,200 @@ +"use strict"; + +const t = require("../../"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); + +let code = `// NOTE: This file is autogenerated. Do not modify. +// See packages/babel-types/scripts/generators/typescript.js for script used. + +interface BaseComment { + value: string; + start: number; + end: number; + loc: SourceLocation; + type: "CommentBlock" | "CommentLine"; +} + +export interface CommentBlock extends BaseComment { + type: "CommentBlock"; +} + +export interface CommentLine extends BaseComment { + type: "CommentLine"; +} + +export type Comment = CommentBlock | CommentLine; + +export interface SourceLocation { + start: { + line: number; + column: number; + }; + + end: { + line: number; + column: number; + }; +} + +interface BaseNode { + leadingComments: ReadonlyArray | null; + innerComments: ReadonlyArray | null; + trailingComments: ReadonlyArray | null; + start: number | null; + end: number | null; + loc: SourceLocation | null; + type: Node["type"]; +} + +export type Node = ${t.TYPES.sort().join(" | ")};\n\n`; + +// + +const lines = []; + +for (const type in t.NODE_FIELDS) { + const fields = t.NODE_FIELDS[type]; + const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type); + + const struct = ['type: "' + type + '";']; + const args = []; + + fieldNames.forEach(fieldName => { + const field = fields[fieldName]; + let typeAnnotation = stringifyValidator(field.validate, ""); + + if (isNullable(field) && !hasDefault(field)) { + typeAnnotation += " | null"; + } + + if (areAllRemainingFieldsNullable(fieldName, fieldNames, fields)) { + args.push( + `${t.toBindingIdentifierName(fieldName)}${ + isNullable(field) ? "?:" : ":" + } ${typeAnnotation}` + ); + } else { + args.push( + `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${ + isNullable(field) ? " | undefined" : "" + }` + ); + } + + const alphaNumeric = /^\w+$/; + + if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) { + struct.push(`${fieldName}: ${typeAnnotation};`); + } else { + struct.push(`"${fieldName}": ${typeAnnotation};`); + } + }); + + code += `export interface ${type} extends BaseNode { + ${struct.join("\n ").trim()} +}\n\n`; + + // super and import are reserved words in JavaScript + if (type !== "Super" && type !== "Import") { + lines.push( + `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};` + ); + } +} + +for (let i = 0; i < t.TYPES.length; i++) { + let decl = `export function is${ + t.TYPES[i] + }(node: object | null | undefined, opts?: object | null): `; + + if (t.NODE_FIELDS[t.TYPES[i]]) { + decl += `node is ${t.TYPES[i]};`; + } else if (t.FLIPPED_ALIAS_KEYS[t.TYPES[i]]) { + decl += `node is ${t.TYPES[i]};`; + } else { + decl += `boolean;`; + } + + lines.push(decl); +} + +lines.push( + `export function validate(n: Node, key: string, value: any): void;`, + `export function clone(n: T): T;`, + `export function cloneDeep(n: T): T;`, + `export function removeProperties( + n: Node, + opts?: { preserveComments: boolean } | null +): void;`, + `export function removePropertiesDeep( + n: T, + opts?: { preserveComments: boolean } | null +): T;`, + `export type TraversalAncestors = ReadonlyArray<{ + node: Node, + key: string, + index?: number, + }>; + export type TraversalHandler = (node: Node, parent: TraversalAncestors, type: T) => void; + export type TraversalHandlers = { + enter?: TraversalHandler, + exit?: TraversalHandler, + };`.replace(/(^|\n) {2}/g, "$1"), + // eslint-disable-next-line + `export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void;` +); + +for (const type in t.DEPRECATED_KEYS) { + code += `/** + * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\` + */ +export type ${type} = ${t.DEPRECATED_KEYS[type]};\n +`; +} + +for (const type in t.FLIPPED_ALIAS_KEYS) { + const types = t.FLIPPED_ALIAS_KEYS[type]; + code += `export type ${type} = ${types + .map(type => `${type}`) + .join(" | ")};\n`; +} +code += "\n"; + +code += "export interface Aliases {\n"; +for (const type in t.FLIPPED_ALIAS_KEYS) { + code += ` ${type}: ${type};\n`; +} +code += "}\n\n"; + +code += lines.join("\n") + "\n"; + +// + +process.stdout.write(code); + +// + +function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) { + const index = fieldNames.indexOf(fieldName); + return fieldNames.slice(index).every(_ => isNullable(fields[_])); +} + +function hasDefault(field) { + return field.default != null; +} + +function isNullable(field) { + return field.optional || hasDefault(field); +} + +function sortFieldNames(fields, type) { + return fields.sort((fieldA, fieldB) => { + const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); + const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); + if (indexA === indexB) return fieldA < fieldB ? -1 : 1; + if (indexA === -1) return 1; + if (indexB === -1) return -1; + return indexA - indexB; + }); +} diff --git a/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/formatBuilderName.js similarity index 100% rename from node_modules/@babel/types/scripts/utils/formatBuilderName.js rename to node_modules/@babel/core/node_modules/@babel/types/scripts/utils/formatBuilderName.js diff --git a/node_modules/@babel/types/scripts/utils/lowerFirst.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/lowerFirst.js similarity index 100% rename from node_modules/@babel/types/scripts/utils/lowerFirst.js rename to node_modules/@babel/core/node_modules/@babel/types/scripts/utils/lowerFirst.js diff --git a/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/stringifyValidator.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/stringifyValidator.js new file mode 100644 index 0000000..ff33e8e --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/stringifyValidator.js @@ -0,0 +1,43 @@ +module.exports = function stringifyValidator(validator, nodePrefix) { + if (validator === undefined) { + return "any"; + } + + if (validator.each) { + return `Array<${stringifyValidator(validator.each, nodePrefix)}>`; + } + + if (validator.chainOf) { + return stringifyValidator(validator.chainOf[1], nodePrefix); + } + + if (validator.oneOf) { + return validator.oneOf.map(JSON.stringify).join(" | "); + } + + if (validator.oneOfNodeTypes) { + return validator.oneOfNodeTypes.map(_ => nodePrefix + _).join(" | "); + } + + if (validator.oneOfNodeOrValueTypes) { + return validator.oneOfNodeOrValueTypes + .map(_ => { + return isValueType(_) ? _ : nodePrefix + _; + }) + .join(" | "); + } + + if (validator.type) { + return validator.type; + } + + return ["any"]; +}; + +/** + * Heuristic to decide whether or not the given type is a value type (eg. "null") + * or a Node type (eg. "Expression"). + */ +function isValueType(type) { + return type.charAt(0).toLowerCase() === type.charAt(0); +} diff --git a/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/toFunctionName.js b/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/toFunctionName.js new file mode 100644 index 0000000..627c9a7 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/toFunctionName.js @@ -0,0 +1,4 @@ +module.exports = function toFunctionName(typeName) { + const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx"); + return _.slice(0, 1).toLowerCase() + _.slice(1); +}; diff --git a/node_modules/@babel/highlight/node_modules/ansi-styles/index.js b/node_modules/@babel/core/node_modules/ansi-styles/index.js similarity index 100% rename from node_modules/@babel/highlight/node_modules/ansi-styles/index.js rename to node_modules/@babel/core/node_modules/ansi-styles/index.js diff --git a/node_modules/@babel/highlight/node_modules/ansi-styles/license b/node_modules/@babel/core/node_modules/ansi-styles/license similarity index 100% rename from node_modules/@babel/highlight/node_modules/ansi-styles/license rename to node_modules/@babel/core/node_modules/ansi-styles/license diff --git a/node_modules/@babel/core/node_modules/ansi-styles/package.json b/node_modules/@babel/core/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..9c33679 --- /dev/null +++ b/node_modules/@babel/core/node_modules/ansi-styles/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + "ansi-styles@3.2.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "ansi-styles@^3.2.1", + "_id": "ansi-styles@3.2.1", + "_inBundle": false, + "_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "_location": "/@babel/core/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-styles@^3.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "^3.2.1", + "saveSpec": null, + "fetchSpec": "^3.2.1" + }, + "_requiredBy": [ + "/@babel/core/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "_shasum": "41fbb20243e50b12be0f04b8dedbf07520ce841d", + "_spec": "ansi-styles@^3.2.1", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "ava": { + "require": "babel-polyfill" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "bundleDependencies": false, + "dependencies": { + "color-convert": "^1.9.0" + }, + "deprecated": false, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "ava": "*", + "babel-polyfill": "^6.23.0", + "svg-term-cli": "^2.1.1", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", + "test": "xo && ava" + }, + "version": "3.2.1" +} diff --git a/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md b/node_modules/@babel/core/node_modules/ansi-styles/readme.md similarity index 100% rename from node_modules/@babel/highlight/node_modules/ansi-styles/readme.md rename to node_modules/@babel/core/node_modules/ansi-styles/readme.md diff --git a/node_modules/@babel/core/node_modules/babylon/CHANGELOG.md b/node_modules/@babel/core/node_modules/babylon/CHANGELOG.md deleted file mode 100644 index 1e2bbac..0000000 --- a/node_modules/@babel/core/node_modules/babylon/CHANGELOG.md +++ /dev/null @@ -1,1073 +0,0 @@ -# Changelog - -> **Tags:** -> - :boom: [Breaking Change] -> - :eyeglasses: [Spec Compliancy] -> - :rocket: [New Feature] -> - :bug: [Bug Fix] -> - :memo: [Documentation] -> - :house: [Internal] -> - :nail_care: [Polish] - -> Semver Policy: https://github.com/babel/babylon#semver - -_Note: Gaps between patch versions are faulty, broken or test releases._ - -See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog. - -## 6.17.1 (2017-05-10) - -### :bug: Bug Fix - * Fix typo in flow spread operator error (Brian Ng) - * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) - * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) - * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) - * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) - * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) - * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) - -## 6.17.0 (2017-04-20) - -### :bug: Bug Fix - * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) - * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) - * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) - * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) - * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) - * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) - -## 7.0.0-beta.8 (2017-04-04) - -### New Feature -* Add support for flow type spread (#418) (Conrad Buck) -* Allow statics in flow interfaces (#427) (Brian Ng) - -### Bug Fix -* Fix predicate attachment to match flow parser (#428) (Brian Ng) -* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray) -* Fix rest parameters with array and objects (#424) (Brian Ng) -* Fix number parser (#433) (Alex Kuzmenko) - -### Docs -* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko) - -### Internal -* Use babel-register script when running babel smoke tests (#442) (Brian Ng) - -## 7.0.0-beta.7 (2017-03-22) - -### Spec Compliancy -* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu) - -### Bug Fix - -* Fix push-pop logic in flow (#405) (Daniel Tschinder) - -## 7.0.0-beta.6 (2017-03-21) - -### New Feature -* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons) - -### Polish -* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal) - -### Docs - -* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning) - -## 7.0.0-beta.5 (2017-03-21) - -### Bug Fix -* Throw error if new.target is used outside of a function (#402) (Brian Ng) -* Fix parsing of class properties (#351) (Kevin Gibbons) - -### Other - * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy) - * Optimize travis builds (#419) (Daniel Tschinder) - * Update codecov to 2.0 (#412) (Daniel Tschinder) - * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy) - * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning) - * Upgrade flow to 0.41 (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * Update yarn lock (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot]) - * Add estree test for correct order of directives (Daniel Tschinder) - * Add DoExpression to spec (#364) (Alex Kuzmenko) - * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde) - * Explain how to run only one test (#389) [skip ci] (Aaron Ang) - - ## 7.0.0-beta.4 (2017-03-01) - -* Don't consume async when checking for async func decl (#377) (Brian Ng) -* add `ranges` option [skip ci] (Henry Zhu) -* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine) - -## 7.0.0-beta.3 (2017-02-28) - -- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384) -- Merge changes from 6.x - -## 7.0.0-beta.2 (2017-02-20) - -- estree: correctly change literals in all cases (#368) (Daniel Tschinder) - -## 7.0.0-beta.1 (2017-02-20) - -- Fix negative number literal typeannotations (#366) (Daniel Tschinder) -- Update contributing with more test info [skip ci] (#355) (Brian Ng) - -## 7.0.0-beta.0 (2017-02-15) - -- Reintroduce Variance node (#333) (Daniel Tschinder) -- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick) -- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail) -- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot]) -- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot]) -- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder) -- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi) -- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder) -- Remove classConstructorCall plugin (#291) (Brian Ng) -- Update yarn.lock (Daniel Tschinder) -- Update cross-env to 3.x (Daniel Tschinder) -- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov) -- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens) - -## 6.16.1 (2017-02-23) - -### :bug: Regression - -- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375)) - -Need to modify Babel for this AST node change, so moving to 7.0. - -- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376)) - -[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted. - -## 6.16.0 (2017-02-23) - -### :rocket: New Feature - -***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) - -We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) - -We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. - -To enable `estree` mode simply add the plugin in the config: -```json -{ - "plugins": [ "estree" ] -} -``` - -If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. - -Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) - -Babylon exports a new function to parse a single expression - -```js -import { parseExpression } from 'babylon'; - -const ast = parseExpression('x || y && z', options); -``` - -The returned AST will only consist of the expression. The options are the same as for `parse()` - -Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) - -A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`. -Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... - -Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) - -Added support for function predicates which flow introduced in version 0.33.0 - -```js -declare function is_number(x: mixed): boolean %checks(typeof x === "number"); -``` - -Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) - -Added support for imports within module declarations which flow introduced in version 0.37.0 - -```js -declare module "C" { - import type { DT } from "D"; - declare export type CT = { D: DT }; -} -``` - -### :eyeglasses: Spec Compliancy - -Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) - -This example now correctly throws an error when there is a semicolon after the decorator: - -```js -class A { -@a; -foo(){} -} -``` - -Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) - -Using keywords in imports is not allowed anymore: - -```js -import { default } from "foo"; -import { a as debugger } from "foo"; -``` - -Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) - -In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. - -Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) - -The following code now correctly throws an error - -```js -import type { type a } from "foo"; -``` - -Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) - -Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. - -If you enable the flow plugin you can only define the type of the class properties, but not initialize them. - -Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) - -Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. - -```js -export default async function bar() {}; -``` - -### :nail_care: Polish - -Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) - -### :bug: Bug Fix - -Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) - -Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) - -ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) - -Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) - -Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) - -Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) - -Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) - -Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) - - -### :house: Internal - -Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) - -Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) - -Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) - -chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) - -Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) - -Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) - -Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) - -devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) - -Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) - -Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) - -### :memo: Documentation - -Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) - -Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) - -Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) - -AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) - -## 6.15.0 (2017-01-10) - -### :eyeglasses: Spec Compliancy - -Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) - -This change implements flows new shorthand import syntax -and where previously you had to write this code: - -```js -import {someValue} from "blah"; -import type {someType} from "blah"; -import typeof {someOtherValue} from "blah"; -``` - -you can now write it like this: - -```js -import { - someValue, - type someType, - typeof someOtherValue, -} from "blah"; -``` - -For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. - -flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) - -This change now allows a leading pipe everywhere types can be used: -```js -var f = (x): | 1 | 2 => 1; -``` - -Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) - -Previously babylon parsed the following exports, although they are not valid: -```js -export typeof foo; -export new Foo(); -export function() {}; -export for (;;); -export while(foo); -``` - -### :bug: Bug Fix - -Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) - -This fixes parsing of this case: - -```js -const map = { - [age <= 17] : 'Too young' -}; -``` - -Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) - -The following case produced an invalid AST -```js -
{/* foo */}
-``` - -Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) - -When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. - -Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) - -Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) - -### :house: Internal - -User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) - -Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) - -Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) - -Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) - -Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) - -Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) - -Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) - -chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) - -chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) - -## 6.14.1 (2016-11-17) - -### :bug: Bug Fix - -Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) - -```js -{ - "plugins": ["*"] -} -``` - -Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. - -## 6.14.0 (2016-11-16) - -### :eyeglasses: Spec Compliancy - -Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) - -[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) - -Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). - -``` -class enum {} // throws -class await {} // throws in strict mode (module) -``` - -Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) - -So where you used to have to write - -```js -type A = (x: string, y: boolean) => number; -type B = (z: string) => number; -type C = { [key: string]: number }; -``` - -you can now write (with flow 0.34.0) - -```js -type A = (string, boolean) => number; -type B = string => number; -type C = { [string]: number }; -``` - -Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) - -Supports these form now of specifying array types: - -```js -var a: number[][][][]; -var b: string[][]; -``` - -### :bug: Bug Fix - -Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) - -``` -declare module "foo" { declare module.exports: number } -declare module "foo" { declare module.exports: number; } // also allowed now -``` - -### :house: Internal - - * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) - * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) - * Add node 7 (Daniel Tschinder) - * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) - -## v6.13.1 (2016-10-26) - -### :nail_care: Polish - -- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) - -```js -const babylon = require('babylon'); -const ast = babylon.parse('var foo = "lol";'); -``` - -With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. - -**Without bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) - -**With bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) - -- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) -- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) - -## v6.13.0 (2016-10-21) - -### :eyeglasses: Spec Compliancy - -Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) - -> See https://flowtype.org/docs/variance.html for more information - -```js -type T = { +p: T }; -interface T { -p: T }; -declare class T { +[k:K]: V }; -class T { -[k:K]: V }; -class C2 { +p: T = e }; -``` - -Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) - -```js -({ __proto__: 1, __proto__: 2 }) // Throws an error now -``` - -### :bug: Bug Fix - -Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) - -```js -declare class A { - static: T; -} -``` - -Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) - -```js -var foo = { async, bar }; -``` - -### :nail_care: Polish - -Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) - -> This improves the performance slightly (because of hidden classes) - -### :house: Internal - -Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) - -Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) - -Readd missin .eslinignore for IDEs (Daniel Tschinder) - -Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) - -Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) - -Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) - -## v6.12.0 (2016-10-14) - -### :eyeglasses: Spec Compliancy - -Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) - -#### Dynamic Import - -- Proposal Repo: https://github.com/domenic/proposal-dynamic-import -- Championed by [@domenic](https://github.com/domenic) -- stage-2 -- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) - -> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript - -```js -import(`./section-modules/${link.dataset.entryModule}.js`) -.then(module => { - module.loadPageInto(main); -}) -``` - -Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) - -#### EmptyTypeAnnotation - -Just wasn't covered before. - -```js -type T = empty; -``` - -### :bug: Bug Fix - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing due to sparse array -export const { foo: [ ,, qux7 ] } = bar; -``` - -Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) - -```js -declare class X { - foobar(): void; - static foobar(): void; -} -``` - -Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) - -```js -class Foo { - delete(item: T): T { - return item; - } -} -``` - -Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) - -```js -function *foo() { - const x = (yield 5: any); -} -``` - -### :nail_care: Polish - -Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) - -```js -// Unexpected token, expected ; (1:6) -{ set 1 } -``` - -### :house: Internal - -Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) - -Also run flow, linting, babel tests on seperate instances (add back node 0.10) - -## v6.11.6 (2016-10-12) - -### :bug: Bug Fix/Regression - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing with `Cannot read property 'type' of null` because of null identifiers -export const { foo: [ ,, qux7 ] } = bar; -``` - -## v6.11.5 (2016-10-12) - -### :eyeglasses: Spec Compliancy - -Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:20) -export function foo() {}; -export const { a: [{foo}] } = bar; -``` - -Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:22) -export const foo = 1; -export const [bar, ...foo] = baz; -``` - -### :bug: Bug Fix - -Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) - -```js -// this is ok now -const test = ({async = true}) => {}; -``` - -### :nail_care: Polish - -Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) - -```bash -# So in the case of a missing ending curly (`}`) -Module build failed: SyntaxError: Unexpected token, expected } (30:0) - 28 | } - 29 | -> 30 | - | ^ -``` - -## v6.11.4 (2016-10-03) - -Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) - -## v6.11.3 (2016-10-01) - -### :eyeglasses: Spec Compliancy - -Add static errors for object rest (#149) ([@danez](https://github.com/danez)) - -> https://github.com/sebmarkbage/ecmascript-rest-spread - -Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. - -```js -let { x, y, ...z } = { x: 1, y: 2, z: 3 }; -// x = 1 -// y = 2 -// z = { z: 3 } -``` - -#### New Syntax Errors: - -**SyntaxError**: The rest element has to be the last element when destructuring (1:10) -```bash -> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = { x: 1, y: 2, z: 3 } -# y = 2 -# z = 3 -``` - -Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. - -**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) - -```bash -> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = 1 -# y = { y: 2, z: 3 } -# z = { y: 2, z: 3 } -``` - -Before y and z would just be the same value anyway so there is no reason to need to have both. - -**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) - -```js -let { x, y, ...z, } = obj; -``` - -The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. - ---- - -get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) - -```js -// valid -function something({ set = null, get = null }) {} -``` - -## v6.11.2 (2016-09-23) - -### Bug Fix - -- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo - -```js -// regression with duplicate export check -SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) - 20 | - 21 | export const { rhythm } = typography; -> 22 | export const { TypographyStyle } = typography -``` - -Bail out for now, and make a change to account for destructuring in the next release. - -## 6.11.1 (2016-09-22) - -### Bug Fix -- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez - -```javascript -export toString from './toString'; -``` - -```bash -`toString` has already been exported. Exported identifiers must be unique. (1:7) -> 1 | export toString from './toString'; - | ^ - 2 | -``` - -## 6.11.0 (2016-09-22) - -### Spec Compliancy (will break CI) - -- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo - -```js -// Only one default export allowed per module. (2:9) -export default function() {}; -export { foo as default }; - -// Only one default export allowed per module. (2:0) -export default {}; -export default function() {}; - -// `Foo` has already been exported. Exported identifiers must be unique. (2:0) -export { Foo }; -export class Foo {}; -``` - -### New Feature (Syntax) - -- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 - -```js -// AST -interface ClassProperty <: Node { - type: "ClassProperty"; - key: Identifier; - value: Expression; - computed: boolean; // added -} -``` - -```js -// with "plugins": ["classProperties"] -class Foo { - [x] - ['y'] -} - -class Bar { - [p] - [m] () {} -} - ``` - -### Bug Fix - -- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper - -```js -declare class X { - a: number; - static b: number; // static - c: number; // this was being marked as static in the AST as well -} -``` - -### Polish - -- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 - -```js -// Used to error with: -// SyntaxError: Assigning to rvalue (1:0) - -// Now: -// Invalid left-hand side in assignment expression (1:0) -3 = 4 - -// Invalid left-hand side in for-in statement (1:5) -for (+i in {}); -``` - -### Internal - -- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez -- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo - -## 6.10.0 (2016-09-19) - -> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue. - -### Spec Compliancy - -* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) - -> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors - -More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) - -For example: - -```js -// this errors because it uses destructuring and default parameters -// in a function with a "use strict" directive -function a([ option1, option2 ] = []) { - "use strict"; -} - ``` - -The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. - -### New Feature - -* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) - -Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 - -Looks like: - -```js -var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; -``` - -### Bug Fixes - -* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) -* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) -* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) - -### Misc - -* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) -* Fix Contributing guidelines [skip ci] (Daniel Tschinder) - -## 6.9.2 (2016-09-09) - -The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. - -## 6.9.1 (2016-08-23) - -This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. - -### Bug Fixes - -- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez -- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez -- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper -- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez -- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez - -## 6.9.0 (2016-08-16) - -### New syntax support - -- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer - -(Be aware that React is not going to support this syntax) - -```js -
- {...todos.map(todo => )} -
-``` - -- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez - -```js -declare module "foo" { - declare module.exports: {} -} -``` - -### New Features - -- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain -- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens - -### Bug Fixes - -- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez -- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez -- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi -- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez -- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi -- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez -- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez - -### Internal - -- Add codecoverage to tests @danez -- Fix tests to not save expected output if we expect the test to fail @danez -- Make a shallow clone of babel for testing @danez -- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot -- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot -- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot -- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot - -## 6.8.4 (2016-07-06) - -### Bug Fixes - -- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez - -## 6.8.3 (2016-07-02) - -### Bug Fixes - -- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez - -## 6.8.2 (2016-06-24) - -### Bug Fixes - -- Fix parse error with yielding jsx elements in generators `function* it() { yield
; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal -- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez -- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez -- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez -- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez -- Support negative numeric type literals @kittens -- Remove line terminator restriction after await keyword @kittens -- Remove grouped type arrow restriction as it seems flow no longer has it @kittens -- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin -- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi - -### Documentation - -- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene -- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo - -### Internal - -- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez -- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez -- Upgrade test runner ava @kittens -- Add missing generate-identifier-regex script @kittens -- Rename parser context types @kittens -- Add node v6 to travis testing @hzoo -- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens - -## 6.8.1 (2016-06-06) - -### New Feature - -- Parse type parameter declarations with defaults like `type Foo = T` - -### Bug Fixes -- Type parameter declarations need 1 or more type parameters. -- The existential type `*` is not a valid type parameter. -- The existential type `*` is a primary type - -### Spec Compliancy -- The param list for type parameter declarations now consists of `TypeParameter` nodes -- New `TypeParameter` AST Node (replaces using the `Identifier` node before) - -``` -interface TypeParameter <: Node { - bound: TypeAnnotation; - default: TypeAnnotation; - name: string; - variance: "plus" | "minus"; -} -``` - -## 6.8.0 (2016-05-02) - -#### New Feature - -##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) - -> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). - -Examples: - -```js -class Foo { - constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} -} - -export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} - -var obj = { - method(@foo() x, @bar({ a: 123 }) @baz() y) {} -}; -``` - -##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) - -There is also a new node type, `ForAwaitStatement`. - -> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). - -Example: - -```js -async function f() { - for await (let x of y); -} -``` diff --git a/node_modules/@babel/core/node_modules/babylon/README.md b/node_modules/@babel/core/node_modules/babylon/README.md deleted file mode 100644 index c710218..0000000 --- a/node_modules/@babel/core/node_modules/babylon/README.md +++ /dev/null @@ -1,167 +0,0 @@ -

- babylon -

- -

- Babylon is a JavaScript parser used in Babel. -

- - - The latest ECMAScript version enabled by default (ES2017). - - Comment attachment. - - Support for JSX, Flow, Typescript. - - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)). - -## Credits - -Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx), -thanks to the awesome work of [@RReverser](https://github.com/RReverser) and [@marijnh](https://github.com/marijnh). - -## API - -### `babylon.parse(code, [options])` - -### `babylon.parseExpression(code, [options])` - -`parse()` parses the provided `code` as an entire ECMAScript program, while -`parseExpression()` tries to parse a single Expression with performance in -mind. When in doubt, use `.parse()`. - -### Options - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowAwaitOutsideFunction**: By default, `await` use is not allowed - outside of an async function. Set this to `true` to accept such - code. - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowSuperOutsideMethod**: TODO - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - one of `"script"`, `"module"`, or `"unambiguous"`. Defaults to `"script"`. `"unambiguous"` will make Babylon attempt to _guess_, based on the presence of ES6 `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`. - -- **sourceFilename**: Correlate output AST nodes with their source filename. Useful when generating code and source maps from the ASTs of multiple input files. - -- **startLine**: By default, the first line of code parsed is treated as line 1. You can provide a line number to alternatively start with. Useful for integration with other source tools. - -- **plugins**: Array containing the plugins that you want to enable. - -- **strictMode**: TODO - -- **ranges**: Adds a `ranges` property to each node: `[node.start, node.end]` - -- **tokens**: Adds all parsed tokens to a `tokens` property on the `File` node - -### Output - -Babylon generates AST according to [Babel AST format][]. -It is based on [ESTree spec][] with the following deviations: - -> There is now an `estree` plugin which reverts these deviations - -- [Literal][] token is replaced with [StringLiteral][], [NumericLiteral][], [BooleanLiteral][], [NullLiteral][], [RegExpLiteral][] -- [Property][] token is replaced with [ObjectProperty][] and [ObjectMethod][] -- [MethodDefinition][] is replaced with [ClassMethod][] -- [Program][] and [BlockStatement][] contain additional `directives` field with [Directive][] and [DirectiveLiteral][] -- [ClassMethod][], [ObjectProperty][], and [ObjectMethod][] value property's properties in [FunctionExpression][] is coerced/brought into the main method node. - -AST for JSX code is based on [Facebook JSX AST][]. - -[Babel AST format]: https://github.com/babel/babylon/blob/master/ast/spec.md -[ESTree spec]: https://github.com/estree/estree - -[Literal]: https://github.com/estree/estree/blob/master/es5.md#literal -[Property]: https://github.com/estree/estree/blob/master/es5.md#property -[MethodDefinition]: https://github.com/estree/estree/blob/master/es2015.md#methoddefinition - -[StringLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#stringliteral -[NumericLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#numericliteral -[BooleanLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#booleanliteral -[NullLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#nullliteral -[RegExpLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#regexpliteral -[ObjectProperty]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#objectproperty -[ObjectMethod]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#objectmethod -[ClassMethod]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#classmethod -[Program]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#programs -[BlockStatement]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#blockstatement -[Directive]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#directive -[DirectiveLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#directiveliteral -[FunctionExpression]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#functionexpression - -[Facebook JSX AST]: https://github.com/facebook/jsx/blob/master/AST.md - -### Semver - -Babylon follows semver in most situations. The only thing to note is that some spec-compliancy bug fixes may be released under patch versions. - -For example: We push a fix to early error on something like [#107](https://github.com/babel/babylon/pull/107) - multiple default exports per file. That would be considered a bug fix even though it would cause a build to fail. - -### Example - -```javascript -require("babylon").parse("code", { - // parse in strict mode and allow module declarations - sourceType: "module", - - plugins: [ - // enable jsx and flow syntax - "jsx", - "flow" - ] -}); -``` - -### Plugins - -| Name | Code Example | -|------|--------------| -| `estree` ([repo](https://github.com/estree/estree)) | n/a | -| `jsx` ([repo](https://facebook.github.io/jsx/)) | `{s}` | -| `flow` ([repo](https://github.com/facebook/flow)) | `var a: string = "";` | -| `flowComments` ([docs](https://flow.org/en/docs/types/comments/)) | `/*:: type Foo = {...}; */` | -| `typescript` ([repo](https://github.com/Microsoft/TypeScript)) | `var a: string = "";` | -| `doExpressions` | `var a = do { if (true) { 'hi'; } };` | -| `objectRestSpread` ([proposal](https://github.com/tc39/proposal-object-rest-spread)) | `var a = { b, ...c };` | -| `decorators` (Stage 1) and `decorators2` (Stage 2 [proposal](https://github.com/tc39/proposal-decorators)) | `@a class A {}` | -| `classProperties` ([proposal](https://github.com/tc39/proposal-class-public-fields)) | `class A { b = 1; }` | -| `classPrivateProperties` ([proposal](https://github.com/tc39/proposal-private-fields)) | `class A { #b = 1; }` | -| `classPrivateMethods` ([proposal](https://github.com/tc39/proposal-private-methods)) | `class A { #c() {} }` | -| `exportDefaultFrom` ([proposal](https://github.com/leebyron/ecmascript-export-default-from)) | `export v from "mod"` | -| `exportNamespaceFrom` ([proposal](https://github.com/leebyron/ecmascript-export-ns-from)) | `export * as ns from "mod"` | -| `asyncGenerators` ([proposal](https://github.com/tc39/proposal-async-iteration)) | `async function*() {}`, `for await (let a of b) {}` | -| `functionBind` ([proposal](https://github.com/zenparsing/es-function-bind)) | `a::b`, `::console.log` | -| `functionSent` | `function.sent` | -| `dynamicImport` ([proposal](https://github.com/tc39/proposal-dynamic-import)) | `import('./guy').then(a)` | -| `numericSeparator` ([proposal](https://github.com/samuelgoto/proposal-numeric-separator)) | `1_000_000` | -| `optionalChaining` ([proposal](https://github.com/tc39/proposal-optional-chaining)) | `a?.b` | -| `importMeta` ([proposal](https://github.com/tc39/proposal-import-meta)) | `import.meta.url` | -| `bigInt` ([proposal](https://github.com/tc39/proposal-bigint)) | `100n` | -| `optionalCatchBinding` ([proposal](https://github.com/babel/proposals/issues/7)) | `try {throw 0;} catch{do();}` | -| `throwExpressions` ([proposal](https://github.com/babel/proposals/issues/23)) | `() => throw new Error("")` | -| `pipelineOperator` ([proposal](https://github.com/babel/proposals/issues/29)) | `a \|> b` | -| `nullishCoalescingOperator` ([proposal](https://github.com/babel/proposals/issues/14)) | `a ?? b` | - -### FAQ - -#### Will Babylon support a plugin system? - -Previous issues: [#1351](https://github.com/babel/babel/issues/1351), [#6694](https://github.com/babel/babel/issues/6694). - -We currently aren't willing to commit to supporting the API for plugins or the resulting ecosystem (there is already enough work maintaining Babel's own plugin system). It's not clear how to make that API effective, and it would limit out ability to refactor and optimize the codebase. - -Our current recommendation for those that want to create their own custom syntax is for users to fork Babylon. - -To consume your custom parser, you can add to your `.babelrc` via its npm package name or require it if using JavaScript, - -```json -{ - "parserOpts": { - "parser": "custom-fork-of-babylon-on-npm-here" - } -} -``` diff --git a/node_modules/@babel/core/node_modules/babylon/bin/babylon.js b/node_modules/@babel/core/node_modules/babylon/bin/babylon.js deleted file mode 100755 index 440eef3..0000000 --- a/node_modules/@babel/core/node_modules/babylon/bin/babylon.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node -/* eslint no-var: 0 */ - -var babylon = require(".."); -var fs = require("fs"); - -var filename = process.argv[2]; -if (!filename) { - console.error("no filename specified"); - process.exit(0); -} - -var file = fs.readFileSync(filename, "utf8"); -var ast = babylon.parse(file); - -console.log(JSON.stringify(ast, null, " ")); diff --git a/node_modules/@babel/core/node_modules/babylon/lib/index.js b/node_modules/@babel/core/node_modules/babylon/lib/index.js deleted file mode 100644 index 50f49cf..0000000 --- a/node_modules/@babel/core/node_modules/babylon/lib/index.js +++ /dev/null @@ -1,10116 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _AwaitValue(value) { - this.wrapped = value; -} - -function _AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - var wrappedAwait = value instanceof _AwaitValue; - Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { - if (wrappedAwait) { - resume("next", arg); - return; - } - - settle(result.done ? "return" : "normal", arg); - }, function (err) { - resume("throw", err); - }); - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } -} - -if (typeof Symbol === "function" && Symbol.asyncIterator) { - _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; -} - -_AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); -}; - -_AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); -}; - -_AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); -}; - -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; -} - -var defaultOptions = { - sourceType: "script", - sourceFilename: undefined, - startLine: 1, - allowAwaitOutsideFunction: false, - allowReturnOutsideFunction: false, - allowImportExportEverywhere: false, - allowSuperOutsideMethod: false, - plugins: [], - strictMode: null, - ranges: false, - tokens: false -}; -function getOptions(opts) { - var options = {}; - - for (var key in defaultOptions) { - options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; - } - - return options; -} - -var beforeExpr = true; -var startsExpr = true; -var isLoop = true; -var isAssign = true; -var prefix = true; -var postfix = true; -var TokenType = function TokenType(label, conf) { - if (conf === void 0) { - conf = {}; - } - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop === 0 ? 0 : conf.binop || null; - this.updateContext = null; -}; - -var KeywordTokenType = function (_TokenType) { - _inheritsLoose(KeywordTokenType, _TokenType); - - function KeywordTokenType(name, options) { - if (options === void 0) { - options = {}; - } - - options.keyword = name; - return _TokenType.call(this, name, options) || this; - } - - return KeywordTokenType; -}(TokenType); - -var BinopTokenType = function (_TokenType2) { - _inheritsLoose(BinopTokenType, _TokenType2); - - function BinopTokenType(name, prec) { - return _TokenType2.call(this, name, { - beforeExpr: beforeExpr, - binop: prec - }) || this; - } - - return BinopTokenType; -}(TokenType); -var types = { - num: new TokenType("num", { - startsExpr: startsExpr - }), - bigint: new TokenType("bigint", { - startsExpr: startsExpr - }), - regexp: new TokenType("regexp", { - startsExpr: startsExpr - }), - string: new TokenType("string", { - startsExpr: startsExpr - }), - name: new TokenType("name", { - startsExpr: startsExpr - }), - eof: new TokenType("eof"), - bracketL: new TokenType("[", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - braceBarL: new TokenType("{|", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - braceR: new TokenType("}"), - braceBarR: new TokenType("|}"), - parenL: new TokenType("(", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - parenR: new TokenType(")"), - comma: new TokenType(",", { - beforeExpr: beforeExpr - }), - semi: new TokenType(";", { - beforeExpr: beforeExpr - }), - colon: new TokenType(":", { - beforeExpr: beforeExpr - }), - doubleColon: new TokenType("::", { - beforeExpr: beforeExpr - }), - dot: new TokenType("."), - question: new TokenType("?", { - beforeExpr: beforeExpr - }), - questionDot: new TokenType("?."), - arrow: new TokenType("=>", { - beforeExpr: beforeExpr - }), - template: new TokenType("template"), - ellipsis: new TokenType("...", { - beforeExpr: beforeExpr - }), - backQuote: new TokenType("`", { - startsExpr: startsExpr - }), - dollarBraceL: new TokenType("${", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - at: new TokenType("@"), - hash: new TokenType("#"), - eq: new TokenType("=", { - beforeExpr: beforeExpr, - isAssign: isAssign - }), - assign: new TokenType("_=", { - beforeExpr: beforeExpr, - isAssign: isAssign - }), - incDec: new TokenType("++/--", { - prefix: prefix, - postfix: postfix, - startsExpr: startsExpr - }), - bang: new TokenType("!", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - tilde: new TokenType("~", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - pipeline: new BinopTokenType("|>", 0), - nullishCoalescing: new BinopTokenType("??", 1), - logicalOR: new BinopTokenType("||", 1), - logicalAND: new BinopTokenType("&&", 2), - bitwiseOR: new BinopTokenType("|", 3), - bitwiseXOR: new BinopTokenType("^", 4), - bitwiseAND: new BinopTokenType("&", 5), - equality: new BinopTokenType("==/!=", 6), - relational: new BinopTokenType("", 7), - bitShift: new BinopTokenType("<>", 8), - plusMin: new TokenType("+/-", { - beforeExpr: beforeExpr, - binop: 9, - prefix: prefix, - startsExpr: startsExpr - }), - modulo: new BinopTokenType("%", 10), - star: new BinopTokenType("*", 10), - slash: new BinopTokenType("/", 10), - exponent: new TokenType("**", { - beforeExpr: beforeExpr, - binop: 11, - rightAssociative: true - }) -}; -var keywords = { - break: new KeywordTokenType("break"), - case: new KeywordTokenType("case", { - beforeExpr: beforeExpr - }), - catch: new KeywordTokenType("catch"), - continue: new KeywordTokenType("continue"), - debugger: new KeywordTokenType("debugger"), - default: new KeywordTokenType("default", { - beforeExpr: beforeExpr - }), - do: new KeywordTokenType("do", { - isLoop: isLoop, - beforeExpr: beforeExpr - }), - else: new KeywordTokenType("else", { - beforeExpr: beforeExpr - }), - finally: new KeywordTokenType("finally"), - for: new KeywordTokenType("for", { - isLoop: isLoop - }), - function: new KeywordTokenType("function", { - startsExpr: startsExpr - }), - if: new KeywordTokenType("if"), - return: new KeywordTokenType("return", { - beforeExpr: beforeExpr - }), - switch: new KeywordTokenType("switch"), - throw: new KeywordTokenType("throw", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - try: new KeywordTokenType("try"), - var: new KeywordTokenType("var"), - let: new KeywordTokenType("let"), - const: new KeywordTokenType("const"), - while: new KeywordTokenType("while", { - isLoop: isLoop - }), - with: new KeywordTokenType("with"), - new: new KeywordTokenType("new", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - this: new KeywordTokenType("this", { - startsExpr: startsExpr - }), - super: new KeywordTokenType("super", { - startsExpr: startsExpr - }), - class: new KeywordTokenType("class"), - extends: new KeywordTokenType("extends", { - beforeExpr: beforeExpr - }), - export: new KeywordTokenType("export"), - import: new KeywordTokenType("import", { - startsExpr: startsExpr - }), - yield: new KeywordTokenType("yield", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - null: new KeywordTokenType("null", { - startsExpr: startsExpr - }), - true: new KeywordTokenType("true", { - startsExpr: startsExpr - }), - false: new KeywordTokenType("false", { - startsExpr: startsExpr - }), - in: new KeywordTokenType("in", { - beforeExpr: beforeExpr, - binop: 7 - }), - instanceof: new KeywordTokenType("instanceof", { - beforeExpr: beforeExpr, - binop: 7 - }), - typeof: new KeywordTokenType("typeof", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - void: new KeywordTokenType("void", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - delete: new KeywordTokenType("delete", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }) -}; -Object.keys(keywords).forEach(function (name) { - types["_" + name] = keywords[name]; -}); - -function makePredicate(words) { - var wordsArr = words.split(" "); - return function (str) { - return wordsArr.indexOf(str) >= 0; - }; -} - -var reservedWords = { - "6": makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; -var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"); -var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; -var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 257, 0, 11, 39, 8, 0, 22, 0, 12, 39, 3, 3, 55, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 698, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 1, 31, 6124, 20, 754, 9486, 286, 82, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541]; -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 280, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 19719, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239]; - -function isInAstralSet(code, set) { - var pos = 0x10000; - - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } - - return false; -} - -function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes); -} -function isIteratorStart(current, next) { - return current === 64 && next === 64; -} -function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); -function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; -} -var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; -}; -var types$1 = { - braceStatement: new TokContext("{", false), - braceExpression: new TokContext("{", true), - templateQuasi: new TokContext("${", true), - parenStatement: new TokContext("(", false), - parenExpression: new TokContext("(", true), - template: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - functionExpression: new TokContext("function", true) -}; - -types.parenR.updateContext = types.braceR.updateContext = function () { - if (this.state.context.length === 1) { - this.state.exprAllowed = true; - return; - } - - var out = this.state.context.pop(); - - if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) { - this.state.context.pop(); - this.state.exprAllowed = false; - } else if (out === types$1.templateQuasi) { - this.state.exprAllowed = true; - } else { - this.state.exprAllowed = !out.isExpr; - } -}; - -types.name.updateContext = function (prevType) { - if (this.state.value === "of" && this.curContext() === types$1.parenStatement) { - this.state.exprAllowed = !prevType.beforeExpr; - return; - } - - this.state.exprAllowed = false; - - if (prevType === types._let || prevType === types._const || prevType === types._var) { - if (lineBreak.test(this.input.slice(this.state.end))) { - this.state.exprAllowed = true; - } - } - - if (this.state.isIterator) { - this.state.isIterator = false; - } -}; - -types.braceL.updateContext = function (prevType) { - this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); - this.state.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function () { - this.state.context.push(types$1.templateQuasi); - this.state.exprAllowed = true; -}; - -types.parenL.updateContext = function (prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); - this.state.exprAllowed = true; -}; - -types.incDec.updateContext = function () {}; - -types._function.updateContext = function (prevType) { - if (this.state.exprAllowed && !this.braceIsBlock(prevType)) { - this.state.context.push(types$1.functionExpression); - } - - this.state.exprAllowed = false; -}; - -types.backQuote.updateContext = function () { - if (this.curContext() === types$1.template) { - this.state.context.pop(); - } else { - this.state.context.push(types$1.template); - } - - this.state.exprAllowed = false; -}; - -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; -var SourceLocation = function SourceLocation(start, end) { - this.start = start; - this.end = end; -}; -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } - - throw new Error("Unreachable"); -} - -var BaseParser = function () { - function BaseParser() { - this.sawUnambiguousESM = false; - } - - var _proto = BaseParser.prototype; - - _proto.isReservedWord = function isReservedWord(word) { - if (word === "await") { - return this.inModule; - } else { - return reservedWords[6](word); - } - }; - - _proto.hasPlugin = function hasPlugin(name) { - return !!this.plugins[name]; - }; - - return BaseParser; -}(); - -function last(stack) { - return stack[stack.length - 1]; -} - -var CommentsParser = function (_BaseParser) { - _inheritsLoose(CommentsParser, _BaseParser); - - function CommentsParser() { - return _BaseParser.apply(this, arguments) || this; - } - - var _proto = CommentsParser.prototype; - - _proto.addComment = function addComment(comment) { - if (this.filename) comment.loc.filename = this.filename; - this.state.trailingComments.push(comment); - this.state.leadingComments.push(comment); - }; - - _proto.processComment = function processComment(node) { - if (node.type === "Program" && node.body.length > 0) return; - var stack = this.state.commentStack; - var firstChild, lastChild, trailingComments, i, j; - - if (this.state.trailingComments.length > 0) { - if (this.state.trailingComments[0].start >= node.end) { - trailingComments = this.state.trailingComments; - this.state.trailingComments = []; - } else { - this.state.trailingComments.length = 0; - } - } else if (stack.length > 0) { - var lastInStack = last(stack); - - if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) { - trailingComments = lastInStack.trailingComments; - delete lastInStack.trailingComments; - } - } - - if (stack.length > 0 && last(stack).start >= node.start) { - firstChild = stack.pop(); - } - - while (stack.length > 0 && last(stack).start >= node.start) { - lastChild = stack.pop(); - } - - if (!lastChild && firstChild) lastChild = firstChild; - - if (firstChild && this.state.leadingComments.length > 0) { - var lastComment = last(this.state.leadingComments); - - if (firstChild.type === "ObjectProperty") { - if (lastComment.start >= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - - if (this.state.leadingComments.length > 0) { - firstChild.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) { - var lastArg = last(node.arguments); - - if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) { - if (this.state.commentPreviousNode) { - if (this.state.leadingComments.length > 0) { - lastArg.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } - } - - if (lastChild) { - if (lastChild.leadingComments) { - if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) { - node.leadingComments = lastChild.leadingComments; - delete lastChild.leadingComments; - } else { - for (i = lastChild.leadingComments.length - 2; i >= 0; --i) { - if (lastChild.leadingComments[i].end <= node.start) { - node.leadingComments = lastChild.leadingComments.splice(0, i + 1); - break; - } - } - } - } - } else if (this.state.leadingComments.length > 0) { - if (last(this.state.leadingComments).end <= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - } - - if (this.state.leadingComments.length > 0) { - node.leadingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } else { - for (i = 0; i < this.state.leadingComments.length; i++) { - if (this.state.leadingComments[i].end > node.start) { - break; - } - } - - var leadingComments = this.state.leadingComments.slice(0, i); - - if (leadingComments.length) { - node.leadingComments = leadingComments; - } - - trailingComments = this.state.leadingComments.slice(i); - - if (trailingComments.length === 0) { - trailingComments = null; - } - } - } - - this.state.commentPreviousNode = node; - - if (trailingComments) { - if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) { - node.innerComments = trailingComments; - } else { - node.trailingComments = trailingComments; - } - } - - stack.push(node); - }; - - return CommentsParser; -}(BaseParser); - -var LocationParser = function (_CommentsParser) { - _inheritsLoose(LocationParser, _CommentsParser); - - function LocationParser() { - return _CommentsParser.apply(this, arguments) || this; - } - - var _proto = LocationParser.prototype; - - _proto.raise = function raise(pos, message, _temp) { - var _ref = _temp === void 0 ? {} : _temp, - missingPluginNames = _ref.missingPluginNames, - code = _ref.code; - - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; - err.loc = loc; - - if (missingPluginNames) { - err.missingPlugin = missingPluginNames; - } - - if (code !== undefined) { - err.code = code; - } - - throw err; - }; - - return LocationParser; -}(CommentsParser); - -var State = function () { - function State() {} - - var _proto = State.prototype; - - _proto.init = function init(options, input) { - this.strict = options.strictMode === false ? false : options.sourceType === "module"; - this.input = input; - this.potentialArrowAt = -1; - this.noArrowAt = []; - this.noArrowParamsConversionAt = []; - this.inMethod = false; - this.inFunction = false; - this.inParameters = false; - this.maybeInArrowParameters = false; - this.inGenerator = false; - this.inAsync = false; - this.inPropertyName = false; - this.inType = false; - this.inClassProperty = false; - this.noAnonFunctionType = false; - this.hasFlowComment = false; - this.isIterator = false; - this.classLevel = 0; - this.labels = []; - this.decoratorStack = [[]]; - this.yieldInPossibleArrowParameters = null; - this.tokens = []; - this.comments = []; - this.trailingComments = []; - this.leadingComments = []; - this.commentStack = []; - this.commentPreviousNode = null; - this.pos = this.lineStart = 0; - this.curLine = options.startLine; - this.type = types.eof; - this.value = null; - this.start = this.end = this.pos; - this.startLoc = this.endLoc = this.curPosition(); - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - this.context = [types$1.braceStatement]; - this.exprAllowed = true; - this.containsEsc = this.containsOctal = false; - this.octalPosition = null; - this.invalidTemplateEscapePosition = null; - this.exportedIdentifiers = []; - }; - - _proto.curPosition = function curPosition() { - return new Position(this.curLine, this.pos - this.lineStart); - }; - - _proto.clone = function clone(skipArrays) { - var _this = this; - - var state = new State(); - Object.keys(this).forEach(function (key) { - var val = _this[key]; - - if ((!skipArrays || key === "context") && Array.isArray(val)) { - val = val.slice(); - } - - state[key] = val; - }); - return state; - }; - - return State; -}(); - -var _isDigit = function isDigit(code) { - return code >= 48 && code <= 57; -}; - -var VALID_REGEX_FLAGS = "gmsiyu"; -var forbiddenNumericSeparatorSiblings = { - decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], - hex: [46, 88, 95, 120] -}; -var allowedNumericSeparatorSiblings = {}; -allowedNumericSeparatorSiblings.bin = [48, 49]; -allowedNumericSeparatorSiblings.oct = allowedNumericSeparatorSiblings.bin.concat([50, 51, 52, 53, 54, 55]); -allowedNumericSeparatorSiblings.dec = allowedNumericSeparatorSiblings.oct.concat([56, 57]); -allowedNumericSeparatorSiblings.hex = allowedNumericSeparatorSiblings.dec.concat([65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]); -var Token = function Token(state) { - this.type = state.type; - this.value = state.value; - this.start = state.start; - this.end = state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); -}; - -function codePointToString(code) { - if (code <= 0xffff) { - return String.fromCharCode(code); - } else { - return String.fromCharCode((code - 0x10000 >> 10) + 0xd800, (code - 0x10000 & 1023) + 0xdc00); - } -} - -var Tokenizer = function (_LocationParser) { - _inheritsLoose(Tokenizer, _LocationParser); - - function Tokenizer(options, input) { - var _this; - - _this = _LocationParser.call(this) || this; - _this.state = new State(); - - _this.state.init(options, input); - - _this.isLookahead = false; - return _this; - } - - var _proto = Tokenizer.prototype; - - _proto.next = function next() { - if (this.options.tokens && !this.isLookahead) { - this.state.tokens.push(new Token(this.state)); - } - - this.state.lastTokEnd = this.state.end; - this.state.lastTokStart = this.state.start; - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - }; - - _proto.eat = function eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - }; - - _proto.match = function match(type) { - return this.state.type === type; - }; - - _proto.isKeyword = function isKeyword$$1(word) { - return isKeyword(word); - }; - - _proto.lookahead = function lookahead() { - var old = this.state; - this.state = old.clone(true); - this.isLookahead = true; - this.next(); - this.isLookahead = false; - var curr = this.state; - this.state = old; - return curr; - }; - - _proto.setStrict = function setStrict(strict) { - this.state.strict = strict; - if (!this.match(types.num) && !this.match(types.string)) return; - this.state.pos = this.state.start; - - while (this.state.pos < this.state.lineStart) { - this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; - --this.state.curLine; - } - - this.nextToken(); - }; - - _proto.curContext = function curContext() { - return this.state.context[this.state.context.length - 1]; - }; - - _proto.nextToken = function nextToken() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - this.state.containsOctal = false; - this.state.octalPosition = null; - this.state.start = this.state.pos; - this.state.startLoc = this.state.curPosition(); - - if (this.state.pos >= this.input.length) { - this.finishToken(types.eof); - return; - } - - if (curContext.override) { - curContext.override(this); - } else { - this.readToken(this.fullCharCodeAtPos()); - } - }; - - _proto.readToken = function readToken(code) { - if (isIdentifierStart(code) || code === 92) { - this.readWord(); - } else { - this.getTokenFromCode(code); - } - }; - - _proto.fullCharCodeAtPos = function fullCharCodeAtPos() { - var code = this.input.charCodeAt(this.state.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; - var next = this.input.charCodeAt(this.state.pos + 1); - return (code << 10) + next - 0x35fdc00; - }; - - _proto.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "CommentBlock" : "CommentLine", - value: text, - start: start, - end: end, - loc: new SourceLocation(startLoc, endLoc) - }; - - if (!this.isLookahead) { - if (this.options.tokens) this.state.tokens.push(comment); - this.state.comments.push(comment); - this.addComment(comment); - } - }; - - _proto.skipBlockComment = function skipBlockComment() { - var startLoc = this.state.curPosition(); - var start = this.state.pos; - var end = this.input.indexOf("*/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 2; - lineBreakG.lastIndex = start; - var match; - - while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { - ++this.state.curLine; - this.state.lineStart = match.index + match[0].length; - } - - this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - _proto.skipLineComment = function skipLineComment(startSkip) { - var start = this.state.pos; - var startLoc = this.state.curPosition(); - var ch = this.input.charCodeAt(this.state.pos += startSkip); - - if (this.state.pos < this.input.length) { - while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.input.length) { - ch = this.input.charCodeAt(this.state.pos); - } - } - - this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - _proto.skipSpace = function skipSpace() { - loop: while (this.state.pos < this.input.length) { - var ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 32: - case 160: - ++this.state.pos; - break; - - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - - case 10: - case 8232: - case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - - case 47: - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - this.skipBlockComment(); - break; - - case 47: - this.skipLineComment(2); - break; - - default: - break loop; - } - - break; - - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.state.pos; - } else { - break loop; - } - - } - } - }; - - _proto.finishToken = function finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - var prevType = this.state.type; - this.state.type = type; - this.state.value = val; - this.updateContext(prevType); - }; - - _proto.readToken_dot = function readToken_dot() { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next >= 48 && next <= 57) { - this.readNumber(true); - return; - } - - var next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 46 && next2 === 46) { - this.state.pos += 3; - this.finishToken(types.ellipsis); - } else { - ++this.state.pos; - this.finishToken(types.dot); - } - }; - - _proto.readToken_slash = function readToken_slash() { - if (this.state.exprAllowed) { - ++this.state.pos; - this.readRegexp(); - return; - } - - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.slash, 1); - } - }; - - _proto.readToken_mult_modulo = function readToken_mult_modulo(code) { - var type = code === 42 ? types.star : types.modulo; - var width = 1; - var next = this.input.charCodeAt(this.state.pos + 1); - var exprAllowed = this.state.exprAllowed; - - if (code === 42 && next === 42) { - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = types.exponent; - } - - if (next === 61 && !exprAllowed) { - width++; - type = types.assign; - } - - this.finishOp(type, width); - }; - - _proto.readToken_pipe_amp = function readToken_pipe_amp(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (this.input.charCodeAt(this.state.pos + 2) === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); - } - - return; - } - - if (code === 124) { - if (next === 62) { - this.finishOp(types.pipeline, 2); - return; - } else if (next === 125 && this.hasPlugin("flow")) { - this.finishOp(types.braceBarR, 2); - return; - } - } - - if (next === 61) { - this.finishOp(types.assign, 2); - return; - } - - this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); - }; - - _proto.readToken_caret = function readToken_caret() { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.bitwiseXOR, 1); - } - }; - - _proto.readToken_plus_min = function readToken_plus_min(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) { - this.skipLineComment(3); - this.skipSpace(); - this.nextToken(); - return; - } - - this.finishOp(types.incDec, 2); - return; - } - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.plusMin, 1); - } - }; - - _proto.readToken_lt_gt = function readToken_lt_gt(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - var size = 1; - - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; - - if (this.input.charCodeAt(this.state.pos + size) === 61) { - this.finishOp(types.assign, size + 1); - return; - } - - this.finishOp(types.bitShift, size); - return; - } - - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { - this.skipLineComment(4); - this.skipSpace(); - this.nextToken(); - return; - } - - if (next === 61) { - size = 2; - } - - this.finishOp(types.relational, size); - }; - - _proto.readToken_eq_excl = function readToken_eq_excl(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); - return; - } - - if (code === 61 && next === 62) { - this.state.pos += 2; - this.finishToken(types.arrow); - return; - } - - this.finishOp(code === 61 ? types.eq : types.bang, 1); - }; - - _proto.readToken_question = function readToken_question() { - var next = this.input.charCodeAt(this.state.pos + 1); - var next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 63) { - if (next2 === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(types.nullishCoalescing, 2); - } - } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { - this.state.pos += 2; - this.finishToken(types.questionDot); - } else { - ++this.state.pos; - this.finishToken(types.question); - } - }; - - _proto.getTokenFromCode = function getTokenFromCode(code) { - switch (code) { - case 35: - if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) { - ++this.state.pos; - this.finishToken(types.hash); - return; - } else { - this.raise(this.state.pos, "Unexpected character '" + codePointToString(code) + "'"); - } - - case 46: - this.readToken_dot(); - return; - - case 40: - ++this.state.pos; - this.finishToken(types.parenL); - return; - - case 41: - ++this.state.pos; - this.finishToken(types.parenR); - return; - - case 59: - ++this.state.pos; - this.finishToken(types.semi); - return; - - case 44: - ++this.state.pos; - this.finishToken(types.comma); - return; - - case 91: - ++this.state.pos; - this.finishToken(types.bracketL); - return; - - case 93: - ++this.state.pos; - this.finishToken(types.bracketR); - return; - - case 123: - if (this.hasPlugin("flow") && this.input.charCodeAt(this.state.pos + 1) === 124) { - this.finishOp(types.braceBarL, 2); - } else { - ++this.state.pos; - this.finishToken(types.braceL); - } - - return; - - case 125: - ++this.state.pos; - this.finishToken(types.braceR); - return; - - case 58: - if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { - this.finishOp(types.doubleColon, 2); - } else { - ++this.state.pos; - this.finishToken(types.colon); - } - - return; - - case 63: - this.readToken_question(); - return; - - case 64: - ++this.state.pos; - this.finishToken(types.at); - return; - - case 96: - ++this.state.pos; - this.finishToken(types.backQuote); - return; - - case 48: - { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 120 || next === 88) { - this.readRadixNumber(16); - return; - } - - if (next === 111 || next === 79) { - this.readRadixNumber(8); - return; - } - - if (next === 98 || next === 66) { - this.readRadixNumber(2); - return; - } - } - - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - this.readNumber(false); - return; - - case 34: - case 39: - this.readString(code); - return; - - case 47: - this.readToken_slash(); - return; - - case 37: - case 42: - this.readToken_mult_modulo(code); - return; - - case 124: - case 38: - this.readToken_pipe_amp(code); - return; - - case 94: - this.readToken_caret(); - return; - - case 43: - case 45: - this.readToken_plus_min(code); - return; - - case 60: - case 62: - this.readToken_lt_gt(code); - return; - - case 61: - case 33: - this.readToken_eq_excl(code); - return; - - case 126: - this.finishOp(types.tilde, 1); - return; - } - - this.raise(this.state.pos, "Unexpected character '" + codePointToString(code) + "'"); - }; - - _proto.finishOp = function finishOp(type, size) { - var str = this.input.slice(this.state.pos, this.state.pos + size); - this.state.pos += size; - this.finishToken(type, str); - }; - - _proto.readRegexp = function readRegexp() { - var start = this.state.pos; - var escaped, inClass; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(start, "Unterminated regular expression"); - } - - var ch = this.input.charAt(this.state.pos); - - if (lineBreak.test(ch)) { - this.raise(start, "Unterminated regular expression"); - } - - if (escaped) { - escaped = false; - } else { - if (ch === "[") { - inClass = true; - } else if (ch === "]" && inClass) { - inClass = false; - } else if (ch === "/" && !inClass) { - break; - } - - escaped = ch === "\\"; - } - - ++this.state.pos; - } - - var content = this.input.slice(start, this.state.pos); - ++this.state.pos; - var mods = ""; - - while (this.state.pos < this.input.length) { - var char = this.input[this.state.pos]; - var charCode = this.fullCharCodeAtPos(); - - if (VALID_REGEX_FLAGS.indexOf(char) > -1) { - if (mods.indexOf(char) > -1) { - this.raise(this.state.pos + 1, "Duplicate regular expression flag"); - } - - ++this.state.pos; - mods += char; - } else if (isIdentifierChar(charCode) || charCode === 92) { - this.raise(this.state.pos + 1, "Invalid regular expression flag"); - } else { - break; - } - } - - this.finishToken(types.regexp, { - pattern: content, - flags: mods - }); - }; - - _proto.readInt = function readInt(radix, len) { - var start = this.state.pos; - var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - var allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; - var total = 0; - - for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { - var code = this.input.charCodeAt(this.state.pos); - var val = void 0; - - if (this.hasPlugin("numericSeparator")) { - var prev = this.input.charCodeAt(this.state.pos - 1); - var next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 95) { - if (allowedSiblings.indexOf(next) === -1) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - ++this.state.pos; - continue; - } - } - - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - - if (val >= radix) break; - ++this.state.pos; - total = total * radix + val; - } - - if (this.state.pos === start || len != null && this.state.pos - start !== len) { - return null; - } - - return total; - }; - - _proto.readRadixNumber = function readRadixNumber(radix) { - var start = this.state.pos; - var isBigInt = false; - this.state.pos += 2; - var val = this.readInt(radix); - - if (val == null) { - this.raise(this.state.start + 2, "Expected number in radix " + radix); - } - - if (this.hasPlugin("bigInt")) { - if (this.input.charCodeAt(this.state.pos) === 110) { - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - if (isBigInt) { - var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - this.finishToken(types.bigint, str); - return; - } - - this.finishToken(types.num, val); - }; - - _proto.readNumber = function readNumber(startsWithDot) { - var start = this.state.pos; - var octal = this.input.charCodeAt(start) === 48; - var isFloat = false; - var isBigInt = false; - - if (!startsWithDot && this.readInt(10) === null) { - this.raise(start, "Invalid number"); - } - - if (octal && this.state.pos == start + 1) octal = false; - var next = this.input.charCodeAt(this.state.pos); - - if (next === 46 && !octal) { - ++this.state.pos; - this.readInt(10); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if ((next === 69 || next === 101) && !octal) { - next = this.input.charCodeAt(++this.state.pos); - - if (next === 43 || next === 45) { - ++this.state.pos; - } - - if (this.readInt(10) === null) this.raise(start, "Invalid number"); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if (this.hasPlugin("bigInt")) { - if (next === 110) { - if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral"); - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - - if (isBigInt) { - this.finishToken(types.bigint, str); - return; - } - - var val; - - if (isFloat) { - val = parseFloat(str); - } else if (!octal || str.length === 1) { - val = parseInt(str, 10); - } else if (this.state.strict) { - this.raise(start, "Invalid number"); - } else if (/[89]/.test(str)) { - val = parseInt(str, 10); - } else { - val = parseInt(str, 8); - } - - this.finishToken(types.num, val); - }; - - _proto.readCodePoint = function readCodePoint(throwOnInvalid) { - var ch = this.input.charCodeAt(this.state.pos); - var code; - - if (ch === 123) { - var codePos = ++this.state.pos; - code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid); - ++this.state.pos; - - if (code === null) { - --this.state.invalidTemplateEscapePosition; - } else if (code > 0x10ffff) { - if (throwOnInvalid) { - this.raise(codePos, "Code point out of bounds"); - } else { - this.state.invalidTemplateEscapePosition = codePos - 2; - return null; - } - } - } else { - code = this.readHexChar(4, throwOnInvalid); - } - - return code; - }; - - _proto.readString = function readString(quote) { - var out = "", - chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - var ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.readEscapedChar(false); - chunkStart = this.state.pos; - } else { - if (isNewLine(ch)) { - this.raise(this.state.start, "Unterminated string constant"); - } - - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - this.finishToken(types.string, out); - }; - - _proto.readTmplToken = function readTmplToken() { - var out = "", - chunkStart = this.state.pos, - containsInvalid = false; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated template"); - } - - var ch = this.input.charCodeAt(this.state.pos); - - if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { - if (this.state.pos === this.state.start && this.match(types.template)) { - if (ch === 36) { - this.state.pos += 2; - this.finishToken(types.dollarBraceL); - return; - } else { - ++this.state.pos; - this.finishToken(types.backQuote); - return; - } - } - - out += this.input.slice(chunkStart, this.state.pos); - this.finishToken(types.template, containsInvalid ? null : out); - return; - } - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - var escaped = this.readEscapedChar(true); - - if (escaped === null) { - containsInvalid = true; - } else { - out += escaped; - } - - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - ++this.state.pos; - - switch (ch) { - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - out += "\n"; - break; - - default: - out += String.fromCharCode(ch); - break; - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - }; - - _proto.readEscapedChar = function readEscapedChar(inTemplate) { - var throwOnInvalid = !inTemplate; - var ch = this.input.charCodeAt(++this.state.pos); - ++this.state.pos; - - switch (ch) { - case 110: - return "\n"; - - case 114: - return "\r"; - - case 120: - { - var code = this.readHexChar(2, throwOnInvalid); - return code === null ? null : String.fromCharCode(code); - } - - case 117: - { - var _code = this.readCodePoint(throwOnInvalid); - - return _code === null ? null : codePointToString(_code); - } - - case 116: - return "\t"; - - case 98: - return "\b"; - - case 118: - return "\x0B"; - - case 102: - return "\f"; - - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - this.state.lineStart = this.state.pos; - ++this.state.curLine; - return ""; - - default: - if (ch >= 48 && ch <= 55) { - var codePos = this.state.pos - 1; - var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; - var octal = parseInt(octalStr, 8); - - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - - if (octal > 0) { - if (inTemplate) { - this.state.invalidTemplateEscapePosition = codePos; - return null; - } else if (this.state.strict) { - this.raise(codePos, "Octal literal in strict mode"); - } else if (!this.state.containsOctal) { - this.state.containsOctal = true; - this.state.octalPosition = codePos; - } - } - - this.state.pos += octalStr.length - 1; - return String.fromCharCode(octal); - } - - return String.fromCharCode(ch); - } - }; - - _proto.readHexChar = function readHexChar(len, throwOnInvalid) { - var codePos = this.state.pos; - var n = this.readInt(16, len); - - if (n === null) { - if (throwOnInvalid) { - this.raise(codePos, "Bad character escape sequence"); - } else { - this.state.pos = codePos - 1; - this.state.invalidTemplateEscapePosition = codePos - 1; - } - } - - return n; - }; - - _proto.readWord1 = function readWord1() { - this.state.containsEsc = false; - var word = "", - first = true, - chunkStart = this.state.pos; - - while (this.state.pos < this.input.length) { - var ch = this.fullCharCodeAtPos(); - - if (isIdentifierChar(ch)) { - this.state.pos += ch <= 0xffff ? 1 : 2; - } else if (this.state.isIterator && ch === 64) { - this.state.pos += 1; - } else if (ch === 92) { - this.state.containsEsc = true; - word += this.input.slice(chunkStart, this.state.pos); - var escStart = this.state.pos; - - if (this.input.charCodeAt(++this.state.pos) !== 117) { - this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX"); - } - - ++this.state.pos; - var esc = this.readCodePoint(true); - - if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) { - this.raise(escStart, "Invalid Unicode escape"); - } - - word += codePointToString(esc); - chunkStart = this.state.pos; - } else { - break; - } - - first = false; - } - - return word + this.input.slice(chunkStart, this.state.pos); - }; - - _proto.isIterator = function isIterator(word) { - return word === "@@iterator" || word === "@@asyncIterator"; - }; - - _proto.readWord = function readWord() { - var word = this.readWord1(); - var type = types.name; - - if (this.isKeyword(word)) { - if (this.state.containsEsc) { - this.raise(this.state.pos, "Escape sequence in keyword " + word); - } - - type = keywords[word]; - } - - if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) { - this.raise(this.state.pos, "Invalid identifier " + word); - } - - this.finishToken(type, word); - }; - - _proto.braceIsBlock = function braceIsBlock(prevType) { - if (prevType === types.colon) { - var parent = this.curContext(); - - if (parent === types$1.braceStatement || parent === types$1.braceExpression) { - return !parent.isExpr; - } - } - - if (prevType === types._return) { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - } - - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR) { - return true; - } - - if (prevType === types.braceL) { - return this.curContext() === types$1.braceStatement; - } - - if (prevType === types.relational) { - return true; - } - - return !this.state.exprAllowed; - }; - - _proto.updateContext = function updateContext(prevType) { - var type = this.state.type; - var update; - - if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) { - this.state.exprAllowed = false; - } else if (update = type.updateContext) { - update.call(this, prevType); - } else { - this.state.exprAllowed = type.beforeExpr; - } - }; - - return Tokenizer; -}(LocationParser); - -var UtilParser = function (_Tokenizer) { - _inheritsLoose(UtilParser, _Tokenizer); - - function UtilParser() { - return _Tokenizer.apply(this, arguments) || this; - } - - var _proto = UtilParser.prototype; - - _proto.addExtra = function addExtra(node, key, val) { - if (!node) return; - var extra = node.extra = node.extra || {}; - extra[key] = val; - }; - - _proto.isRelational = function isRelational(op) { - return this.match(types.relational) && this.state.value === op; - }; - - _proto.expectRelational = function expectRelational(op) { - if (this.isRelational(op)) { - this.next(); - } else { - this.unexpected(null, types.relational); - } - }; - - _proto.eatRelational = function eatRelational(op) { - if (this.isRelational(op)) { - this.next(); - return true; - } - - return false; - }; - - _proto.isContextual = function isContextual(name) { - return this.match(types.name) && this.state.value === name && !this.state.containsEsc; - }; - - _proto.isLookaheadContextual = function isLookaheadContextual(name) { - var l = this.lookahead(); - return l.type === types.name && l.value === name; - }; - - _proto.eatContextual = function eatContextual(name) { - return this.isContextual(name) && this.eat(types.name); - }; - - _proto.expectContextual = function expectContextual(name, message) { - if (!this.eatContextual(name)) this.unexpected(null, message); - }; - - _proto.canInsertSemicolon = function canInsertSemicolon() { - return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak(); - }; - - _proto.hasPrecedingLineBreak = function hasPrecedingLineBreak() { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - }; - - _proto.isLineTerminator = function isLineTerminator() { - return this.eat(types.semi) || this.canInsertSemicolon(); - }; - - _proto.semicolon = function semicolon() { - if (!this.isLineTerminator()) this.unexpected(null, types.semi); - }; - - _proto.expect = function expect(type, pos) { - this.eat(type) || this.unexpected(pos, type); - }; - - _proto.unexpected = function unexpected(pos, messageOrType) { - if (messageOrType === void 0) { - messageOrType = "Unexpected token"; - } - - if (typeof messageOrType !== "string") { - messageOrType = "Unexpected token, expected \"" + messageOrType.label + "\""; - } - - throw this.raise(pos != null ? pos : this.state.start, messageOrType); - }; - - _proto.expectPlugin = function expectPlugin(name, pos) { - if (!this.hasPlugin(name)) { - throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling the parser plugin: '" + name + "'", { - missingPluginNames: [name] - }); - } - - return true; - }; - - _proto.expectOnePlugin = function expectOnePlugin(names, pos) { - var _this = this; - - if (!names.some(function (n) { - return _this.hasPlugin(n); - })) { - throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling one of the following parser plugin(s): '" + names.join(", ") + "'", { - missingPluginNames: names - }); - } - }; - - return UtilParser; -}(Tokenizer); - -var commentKeys = ["leadingComments", "trailingComments", "innerComments"]; - -var Node = function () { - function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - this.loc = new SourceLocation(loc); - if (parser && parser.options.ranges) this.range = [pos, 0]; - if (parser && parser.filename) this.loc.filename = parser.filename; - } - - var _proto = Node.prototype; - - _proto.__clone = function __clone() { - var _this = this; - - var node2 = new Node(); - Object.keys(this).forEach(function (key) { - if (commentKeys.indexOf(key) < 0) { - node2[key] = _this[key]; - } - }); - return node2; - }; - - return Node; -}(); - -var NodeUtils = function (_UtilParser) { - _inheritsLoose(NodeUtils, _UtilParser); - - function NodeUtils() { - return _UtilParser.apply(this, arguments) || this; - } - - var _proto2 = NodeUtils.prototype; - - _proto2.startNode = function startNode() { - return new Node(this, this.state.start, this.state.startLoc); - }; - - _proto2.startNodeAt = function startNodeAt(pos, loc) { - return new Node(this, pos, loc); - }; - - _proto2.startNodeAtNode = function startNodeAtNode(type) { - return this.startNodeAt(type.start, type.loc.start); - }; - - _proto2.finishNode = function finishNode(node, type) { - return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); - }; - - _proto2.finishNodeAt = function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - this.processComment(node); - return node; - }; - - _proto2.resetStartLocationFromNode = function resetStartLocationFromNode(node, locationNode) { - node.start = locationNode.start; - node.loc.start = locationNode.loc.start; - if (this.options.ranges) node.range[0] = locationNode.range[0]; - }; - - return NodeUtils; -}(UtilParser); - -var LValParser = function (_NodeUtils) { - _inheritsLoose(LValParser, _NodeUtils); - - function LValParser() { - return _NodeUtils.apply(this, arguments) || this; - } - - var _proto = LValParser.prototype; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - - for (var index = 0; index < node.properties.length; index++) { - var prop = node.properties[index]; - var isLast = index === node.properties.length - 1; - this.toAssignableObjectExpressionProp(prop, isBinding, isLast); - } - - break; - - case "ObjectProperty": - this.toAssignable(node.value, isBinding, contextDescription); - break; - - case "SpreadElement": - { - this.checkToRestConversion(node); - node.type = "RestElement"; - var arg = node.argument; - this.toAssignable(arg, isBinding, contextDescription); - break; - } - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding, contextDescription); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - { - var message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(node.start, message); - } - } - } - - return node; - }; - - _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.type === "ObjectMethod") { - var error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods"; - this.raise(prop.key.start, error); - } else if (prop.type === "SpreadElement" && !isLast) { - this.raise(prop.start, "The rest element has to be the last element when destructuring"); - } else { - this.toAssignable(prop, isBinding, "object destructuring pattern"); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - var end = exprList.length; - - if (end) { - var last = exprList[end - 1]; - - if (last && last.type === "RestElement") { - --end; - } else if (last && last.type === "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding, contextDescription); - - if (["Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"].indexOf(arg.type) === -1) { - this.unexpected(arg.start); - } - - --end; - } - } - - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - - if (elt && elt.type === "SpreadElement") { - this.raise(elt.start, "The rest element has to be the last element when destructuring"); - } - - if (elt) this.toAssignable(elt, isBinding, contextDescription); - } - - return exprList; - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - return exprList; - }; - - _proto.parseSpread = function parseSpread(refShorthandDefaultPos, refNeedsArrowPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos); - return this.finishNode(node, "SpreadElement"); - }; - - _proto.parseRest = function parseRest() { - var node = this.startNode(); - this.next(); - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); - }; - - _proto.shouldAllowYieldIdentifier = function shouldAllowYieldIdentifier() { - return this.match(types._yield) && !this.state.strict && !this.state.inGenerator; - }; - - _proto.parseBindingIdentifier = function parseBindingIdentifier() { - return this.parseIdentifier(this.shouldAllowYieldIdentifier()); - }; - - _proto.parseBindingAtom = function parseBindingAtom() { - switch (this.state.type) { - case types._yield: - case types.name: - return this.parseBindingIdentifier(); - - case types.bracketL: - { - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true); - return this.finishNode(node, "ArrayPattern"); - } - - case types.braceL: - return this.parseObj(true); - - default: - throw this.unexpected(); - } - }; - - _proto.parseBindingList = function parseBindingList(close, allowEmpty, allowModifiers) { - var elts = []; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - } - - if (allowEmpty && this.match(types.comma)) { - elts.push(null); - } else if (this.eat(close)) { - break; - } else if (this.match(types.ellipsis)) { - elts.push(this.parseAssignableListItemTypes(this.parseRest())); - this.expect(close); - break; - } else { - var decorators = []; - - if (this.match(types.at) && this.hasPlugin("decorators2")) { - this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters"); - } - - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - - elts.push(this.parseAssignableListItem(allowModifiers, decorators)); - } - } - - return elts; - }; - - _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) { - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - var elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - return param; - }; - - _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) { - startLoc = startLoc || this.state.startLoc; - startPos = startPos || this.state.start; - left = left || this.parseBindingAtom(); - if (!this.eat(types.eq)) return left; - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - switch (expr.type) { - case "Identifier": - this.checkReservedWord(expr.name, expr.start, false, true); - - if (checkClashes) { - var _key = "_" + expr.name; - - if (checkClashes[_key]) { - this.raise(expr.start, "Argument name clash in strict mode"); - } else { - checkClashes[_key] = true; - } - } - - break; - - case "MemberExpression": - if (isBinding) this.raise(expr.start, "Binding member expression"); - break; - - case "ObjectPattern": - for (var _i2 = 0, _expr$properties2 = expr.properties; _i2 < _expr$properties2.length; _i2++) { - var prop = _expr$properties2[_i2]; - if (prop.type === "ObjectProperty") prop = prop.value; - this.checkLVal(prop, isBinding, checkClashes, "object destructuring pattern"); - } - - break; - - case "ArrayPattern": - for (var _i4 = 0, _expr$elements2 = expr.elements; _i4 < _expr$elements2.length; _i4++) { - var elem = _expr$elements2[_i4]; - - if (elem) { - this.checkLVal(elem, isBinding, checkClashes, "array destructuring pattern"); - } - } - - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes, "assignment pattern"); - break; - - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes, "rest element"); - break; - - default: - { - var message = (isBinding ? "Binding invalid" : "Invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(expr.start, message); - } - } - }; - - _proto.checkToRestConversion = function checkToRestConversion(node) { - var validArgumentTypes = ["Identifier", "MemberExpression"]; - - if (validArgumentTypes.indexOf(node.argument.type) !== -1) { - return; - } - - this.raise(node.argument.start, "Invalid rest operator's argument"); - }; - - return LValParser; -}(NodeUtils); - -var ExpressionParser = function (_LValParser) { - _inheritsLoose(ExpressionParser, _LValParser); - - function ExpressionParser() { - return _LValParser.apply(this, arguments) || this; - } - - var _proto = ExpressionParser.prototype; - - _proto.checkPropClash = function checkPropClash(prop, propHash) { - if (prop.computed || prop.kind) return; - var key = prop.key; - var name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - }; - - _proto.getExpression = function getExpression() { - this.nextToken(); - var expr = this.parseExpression(); - - if (!this.match(types.eof)) { - this.unexpected(); - } - - expr.comments = this.state.comments; - return expr; - }; - - _proto.parseExpression = function parseExpression(noIn, refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - - if (this.match(types.comma)) { - var _node = this.startNodeAt(startPos, startLoc); - - _node.expressions = [expr]; - - while (this.eat(types.comma)) { - _node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - } - - this.toReferencedList(_node.expressions); - return this.finishNode(_node, "SequenceExpression"); - } - - return expr; - }; - - _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - - if (this.match(types._yield) && this.state.inGenerator) { - var _left = this.parseYield(); - - if (afterLeftParse) { - _left = afterLeftParse.call(this, _left, startPos, startLoc); - } - - return _left; - } - - var failOnShorthandAssign; - - if (refShorthandDefaultPos) { - failOnShorthandAssign = false; - } else { - refShorthandDefaultPos = { - start: 0 - }; - failOnShorthandAssign = true; - } - - if (this.match(types.parenL) || this.match(types.name) || this.match(types._yield)) { - this.state.potentialArrowAt = this.state.start; - } - - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos); - - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); - } - - if (this.state.type.isAssign) { - var _node2 = this.startNodeAt(startPos, startLoc); - - var operator = this.state.value; - _node2.operator = operator; - - if (operator === "??=") { - this.expectPlugin("nullishCoalescingOperator"); - this.expectPlugin("logicalAssignment"); - } - - if (operator === "||=" || operator === "&&=") { - this.expectPlugin("logicalAssignment"); - } - - _node2.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left; - refShorthandDefaultPos.start = 0; - this.checkLVal(left, undefined, undefined, "assignment expression"); - - if (left.extra && left.extra.parenthesized) { - var errorMsg; - - if (left.type === "ObjectPattern") { - errorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (left.type === "ArrayPattern") { - errorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - - if (errorMsg) { - this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg); - } - } - - this.next(); - _node2.right = this.parseMaybeAssign(noIn); - return this.finishNode(_node2, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - return left; - }; - - _proto.parseMaybeConditional = function parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (this.eat(types.question)) { - var _node3 = this.startNodeAt(startPos, startLoc); - - _node3.test = expr; - _node3.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - _node3.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(_node3, "ConditionalExpression"); - } - - return expr; - }; - - _proto.parseExprOps = function parseExprOps(noIn, refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); - }; - - _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.state.type.binop; - - if (prec != null && (!noIn || !this.match(types._in))) { - if (prec > minPrec) { - var _node4 = this.startNodeAt(leftStartPos, leftStartLoc); - - var operator = this.state.value; - _node4.left = left; - _node4.operator = operator; - - if (operator === "**" && left.type === "UnaryExpression" && left.extra && !left.extra.parenthesizedArgument && !left.extra.parenthesized) { - this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses."); - } - - var op = this.state.type; - - if (op === types.nullishCoalescing) { - this.expectPlugin("nullishCoalescingOperator"); - } else if (op === types.pipeline) { - this.expectPlugin("pipelineOperator"); - } - - this.next(); - var startPos = this.state.start; - var startLoc = this.state.startLoc; - - if (op === types.pipeline) { - this.state.potentialArrowAt = startPos; - } - - _node4.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn); - this.finishNode(_node4, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(_node4, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - - return left; - }; - - _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) { - if (this.state.type.prefix) { - var _node5 = this.startNode(); - - var update = this.match(types.incDec); - _node5.operator = this.state.value; - _node5.prefix = true; - - if (_node5.operator === "throw") { - this.expectPlugin("throwExpressions"); - } - - this.next(); - var argType = this.state.type; - _node5.argument = this.parseMaybeUnary(); - this.addExtra(_node5, "parenthesizedArgument", argType === types.parenL && (!_node5.argument.extra || !_node5.argument.extra.parenthesized)); - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (update) { - this.checkLVal(_node5.argument, undefined, undefined, "prefix operation"); - } else if (this.state.strict && _node5.operator === "delete") { - var arg = _node5.argument; - - if (arg.type === "Identifier") { - this.raise(_node5.start, "Deleting local variable in strict mode"); - } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") { - this.raise(_node5.start, "Deleting a private field is not allowed"); - } - } - - return this.finishNode(_node5, update ? "UpdateExpression" : "UnaryExpression"); - } - - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - - while (this.state.type.postfix && !this.canInsertSemicolon()) { - var _node6 = this.startNodeAt(startPos, startLoc); - - _node6.operator = this.state.value; - _node6.prefix = false; - _node6.argument = expr; - this.checkLVal(expr, undefined, undefined, "postfix operation"); - this.next(); - expr = this.finishNode(_node6, "UpdateExpression"); - } - - return expr; - }; - - _proto.parseExprSubscripts = function parseExprSubscripts(refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseExprAtom(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseSubscripts(expr, startPos, startLoc); - }; - - _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) { - var state = { - optionalChainMember: false, - stop: false - }; - - do { - base = this.parseSubscript(base, startPos, startLoc, noCalls, state); - } while (!state.stop); - - return base; - }; - - _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) { - if (!noCalls && this.eat(types.doubleColon)) { - var _node7 = this.startNodeAt(startPos, startLoc); - - _node7.object = base; - _node7.callee = this.parseNoCallExpr(); - state.stop = true; - return this.parseSubscripts(this.finishNode(_node7, "BindExpression"), startPos, startLoc, noCalls); - } else if (this.match(types.questionDot)) { - this.expectPlugin("optionalChaining"); - state.optionalChainMember = true; - - if (noCalls && this.lookahead().type == types.parenL) { - state.stop = true; - return base; - } - - this.next(); - - var _node8 = this.startNodeAt(startPos, startLoc); - - if (this.eat(types.bracketL)) { - _node8.object = base; - _node8.property = this.parseExpression(); - _node8.computed = true; - _node8.optional = true; - this.expect(types.bracketR); - return this.finishNode(_node8, "OptionalMemberExpression"); - } else if (this.eat(types.parenL)) { - var possibleAsync = this.atPossibleAsync(base); - _node8.callee = base; - _node8.arguments = this.parseCallExpressionArguments(types.parenR, possibleAsync); - _node8.optional = true; - return this.finishNode(_node8, "OptionalCallExpression"); - } else { - _node8.object = base; - _node8.property = this.parseIdentifier(true); - _node8.computed = false; - _node8.optional = true; - return this.finishNode(_node8, "OptionalMemberExpression"); - } - } else if (this.eat(types.dot)) { - var _node9 = this.startNodeAt(startPos, startLoc); - - _node9.object = base; - _node9.property = this.parseMaybePrivateName(); - _node9.computed = false; - - if (state.optionalChainMember) { - _node9.optional = false; - return this.finishNode(_node9, "OptionalMemberExpression"); - } - - return this.finishNode(_node9, "MemberExpression"); - } else if (this.eat(types.bracketL)) { - var _node10 = this.startNodeAt(startPos, startLoc); - - _node10.object = base; - _node10.property = this.parseExpression(); - _node10.computed = true; - this.expect(types.bracketR); - - if (state.optionalChainMember) { - _node10.optional = false; - return this.finishNode(_node10, "OptionalMemberExpression"); - } - - return this.finishNode(_node10, "MemberExpression"); - } else if (!noCalls && this.match(types.parenL)) { - var _possibleAsync = this.atPossibleAsync(base); - - this.next(); - - var _node11 = this.startNodeAt(startPos, startLoc); - - _node11.callee = base; - var refTrailingCommaPos = { - start: -1 - }; - _node11.arguments = this.parseCallExpressionArguments(types.parenR, _possibleAsync, refTrailingCommaPos); - - if (!state.optionalChainMember) { - this.finishCallExpression(_node11); - } else { - this.finishOptionalCallExpression(_node11); - } - - if (_possibleAsync && this.shouldParseAsyncArrow()) { - state.stop = true; - - if (refTrailingCommaPos.start > -1) { - this.raise(refTrailingCommaPos.start, "A trailing comma is not permitted after the rest element"); - } - - return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node11); - } else { - this.toReferencedList(_node11.arguments); - } - - return _node11; - } else if (this.match(types.backQuote)) { - var _node12 = this.startNodeAt(startPos, startLoc); - - _node12.tag = base; - _node12.quasi = this.parseTemplate(true); - - if (state.optionalChainMember) { - this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain"); - } - - return this.finishNode(_node12, "TaggedTemplateExpression"); - } else { - state.stop = true; - return base; - } - }; - - _proto.atPossibleAsync = function atPossibleAsync(base) { - return !this.state.containsEsc && this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon(); - }; - - _proto.finishCallExpression = function finishCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - var importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "CallExpression"); - }; - - _proto.finishOptionalCallExpression = function finishOptionalCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - var importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "OptionalCallExpression"); - }; - - _proto.parseCallExpressionArguments = function parseCallExpressionArguments(close, possibleAsyncArrow, refTrailingCommaPos) { - var elts = []; - var innerParenStart; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(close)) break; - } - - if (this.match(types.parenL) && !innerParenStart) { - innerParenStart = this.state.start; - } - - elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { - start: 0 - } : undefined, possibleAsyncArrow ? { - start: 0 - } : undefined, possibleAsyncArrow ? refTrailingCommaPos : undefined)); - } - - if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) { - this.unexpected(); - } - - return elts; - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.arrow); - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - this.expect(types.arrow); - this.parseArrowExpression(node, call.arguments, true); - this.state.yieldInPossibleArrowParameters = oldYield; - return node; - }; - - _proto.parseNoCallExpr = function parseNoCallExpr() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - }; - - _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) { - var canBeArrow = this.state.potentialArrowAt === this.state.start; - var node; - - switch (this.state.type) { - case types._super: - if (!this.state.inMethod && !this.state.inClassProperty && !this.options.allowSuperOutsideMethod) { - this.raise(this.state.start, "super is only allowed in object methods and classes"); - } - - node = this.startNode(); - this.next(); - - if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) { - this.unexpected(); - } - - if (this.match(types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) { - this.raise(node.start, "super() is only valid inside a class constructor. " + "Make sure the method name is spelled exactly as 'constructor'."); - } - - return this.finishNode(node, "Super"); - - case types._import: - if (this.lookahead().type === types.dot) { - return this.parseImportMetaProperty(); - } - - this.expectPlugin("dynamicImport"); - node = this.startNode(); - this.next(); - - if (!this.match(types.parenL)) { - this.unexpected(null, types.parenL); - } - - return this.finishNode(node, "Import"); - - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); - - case types._yield: - if (this.state.inGenerator) this.unexpected(); - - case types.name: - { - node = this.startNode(); - var allowAwait = this.state.value === "await" && (this.state.inAsync || !this.state.inFunction && this.options.allowAwaitOutsideFunction); - var containsEsc = this.state.containsEsc; - var allowYield = this.shouldAllowYieldIdentifier(); - var id = this.parseIdentifier(allowAwait || allowYield); - - if (id.name === "await") { - if (this.state.inAsync || this.inModule || !this.state.inFunction && this.options.allowAwaitOutsideFunction) { - return this.parseAwait(node); - } - } else if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, false, false, true); - } else if (canBeArrow && id.name === "async" && this.match(types.name)) { - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - var params = [this.parseIdentifier()]; - this.expect(types.arrow); - this.parseArrowExpression(node, params, true); - this.state.yieldInPossibleArrowParameters = oldYield; - return node; - } - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - var _oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - this.parseArrowExpression(node, [id]); - this.state.yieldInPossibleArrowParameters = _oldYield; - return node; - } - - return id; - } - - case types._do: - { - this.expectPlugin("doExpressions"); - - var _node13 = this.startNode(); - - this.next(); - var oldInFunction = this.state.inFunction; - var oldLabels = this.state.labels; - this.state.labels = []; - this.state.inFunction = false; - _node13.body = this.parseBlock(false); - this.state.inFunction = oldInFunction; - this.state.labels = oldLabels; - return this.finishNode(_node13, "DoExpression"); - } - - case types.regexp: - { - var value = this.state.value; - node = this.parseLiteral(value.value, "RegExpLiteral"); - node.pattern = value.pattern; - node.flags = value.flags; - return node; - } - - case types.num: - return this.parseLiteral(this.state.value, "NumericLiteral"); - - case types.bigint: - return this.parseLiteral(this.state.value, "BigIntLiteral"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteral"); - - case types._null: - node = this.startNode(); - this.next(); - return this.finishNode(node, "NullLiteral"); - - case types._true: - case types._false: - return this.parseBooleanLiteral(); - - case types.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos); - this.toReferencedList(node.elements); - return this.finishNode(node, "ArrayExpression"); - - case types.braceL: - return this.parseObj(false, refShorthandDefaultPos); - - case types._function: - return this.parseFunctionExpression(); - - case types.at: - this.parseDecorators(); - - case types._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); - - case types._new: - return this.parseNew(); - - case types.backQuote: - return this.parseTemplate(false); - - case types.doubleColon: - { - node = this.startNode(); - this.next(); - node.object = null; - var callee = node.callee = this.parseNoCallExpr(); - - if (callee.type === "MemberExpression") { - return this.finishNode(node, "BindExpression"); - } else { - throw this.raise(callee.start, "Binding should be performed on object property."); - } - } - - default: - throw this.unexpected(); - } - }; - - _proto.parseBooleanLiteral = function parseBooleanLiteral() { - var node = this.startNode(); - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteral"); - }; - - _proto.parseMaybePrivateName = function parseMaybePrivateName() { - var isPrivate = this.match(types.hash); - - if (isPrivate) { - this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); - - var _node14 = this.startNode(); - - this.next(); - _node14.id = this.parseIdentifier(true); - return this.finishNode(_node14, "PrivateName"); - } else { - return this.parseIdentifier(true); - } - }; - - _proto.parseFunctionExpression = function parseFunctionExpression() { - var node = this.startNode(); - var meta = this.parseIdentifier(true); - - if (this.state.inGenerator && this.eat(types.dot)) { - return this.parseMetaProperty(node, meta, "sent"); - } - - return this.parseFunction(node, false); - }; - - _proto.parseMetaProperty = function parseMetaProperty(node, meta, propertyName) { - node.meta = meta; - - if (meta.name === "function" && propertyName === "sent") { - if (this.isContextual(propertyName)) { - this.expectPlugin("functionSent"); - } else if (!this.hasPlugin("functionSent")) { - this.unexpected(); - } - } - - var containsEsc = this.state.containsEsc; - node.property = this.parseIdentifier(true); - - if (node.property.name !== propertyName || containsEsc) { - this.raise(node.property.start, "The only valid meta property for " + meta.name + " is " + meta.name + "." + propertyName); - } - - return this.finishNode(node, "MetaProperty"); - }; - - _proto.parseImportMetaProperty = function parseImportMetaProperty() { - var node = this.startNode(); - var id = this.parseIdentifier(true); - this.expect(types.dot); - - if (id.name === "import") { - if (this.isContextual("meta")) { - this.expectPlugin("importMeta"); - } else if (!this.hasPlugin("importMeta")) { - this.raise(id.start, "Dynamic imports require a parameter: import('a.js').then"); - } - } - - if (!this.inModule) { - this.raise(id.start, "import.meta may appear only with 'sourceType: \"module\"'", { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - - this.sawUnambiguousESM = true; - return this.parseMetaProperty(node, id, "meta"); - }; - - _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - var node = this.startNodeAt(startPos, startLoc); - this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(startPos, this.state.end)); - node.value = value; - this.next(); - return this.finishNode(node, type); - }; - - _proto.parseParenExpression = function parseParenExpression() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val; - }; - - _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var val; - this.expect(types.parenL); - var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.maybeInArrowParameters = true; - this.state.yieldInPossibleArrowParameters = null; - var innerStartPos = this.state.start; - var innerStartLoc = this.state.startLoc; - var exprList = []; - var refShorthandDefaultPos = { - start: 0 - }; - var refNeedsArrowPos = { - start: 0 - }; - var first = true; - var spreadStart; - var optionalCommaStart; - - while (!this.match(types.parenR)) { - if (first) { - first = false; - } else { - this.expect(types.comma, refNeedsArrowPos.start || null); - - if (this.match(types.parenR)) { - optionalCommaStart = this.state.start; - break; - } - } - - if (this.match(types.ellipsis)) { - var spreadNodeStartPos = this.state.start; - var spreadNodeStartLoc = this.state.startLoc; - spreadStart = this.state.start; - exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartPos, spreadNodeStartLoc)); - - if (this.match(types.comma) && this.lookahead().type === types.parenR) { - this.raise(this.state.start, "A trailing comma is not permitted after the rest element"); - } - - break; - } else { - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos)); - } - } - - var innerEndPos = this.state.start; - var innerEndLoc = this.state.startLoc; - this.expect(types.parenR); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - var arrowNode = this.startNodeAt(startPos, startLoc); - - if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) { - for (var _i2 = 0; _i2 < exprList.length; _i2++) { - var param = exprList[_i2]; - - if (param.extra && param.extra.parenthesized) { - this.unexpected(param.extra.parenStart); - } - } - - this.parseArrowExpression(arrowNode, exprList); - this.state.yieldInPossibleArrowParameters = oldYield; - return arrowNode; - } - - this.state.yieldInPossibleArrowParameters = oldYield; - - if (!exprList.length) { - this.unexpected(this.state.lastTokStart); - } - - if (optionalCommaStart) this.unexpected(optionalCommaStart); - if (spreadStart) this.unexpected(spreadStart); - - if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.toReferencedList(val.expressions); - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - - this.addExtra(val, "parenthesized", true); - this.addExtra(val, "parenStart", startPos); - return val; - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return !this.canInsertSemicolon(); - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.eat(types.arrow)) { - return node; - } - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - return node; - }; - - _proto.parseNew = function parseNew() { - var node = this.startNode(); - var meta = this.parseIdentifier(true); - - if (this.eat(types.dot)) { - var metaProp = this.parseMetaProperty(node, meta, "target"); - - if (!this.state.inFunction && !this.state.inClassProperty) { - var error = "new.target can only be used in functions"; - - if (this.hasPlugin("classProperties")) { - error += " or class properties"; - } - - this.raise(metaProp.start, error); - } - - return metaProp; - } - - node.callee = this.parseNoCallExpr(); - - if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") { - this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed"); - } - - if (this.eat(types.questionDot)) { - this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed"); - } - - this.parseNewArguments(node); - return this.finishNode(node, "NewExpression"); - }; - - _proto.parseNewArguments = function parseNewArguments(node) { - if (this.eat(types.parenL)) { - var args = this.parseExprList(types.parenR); - this.toReferencedList(args); - node.arguments = args; - } else { - node.arguments = []; - } - }; - - _proto.parseTemplateElement = function parseTemplateElement(isTagged) { - var elem = this.startNode(); - - if (this.state.value === null) { - if (!isTagged) { - this.raise(this.state.invalidTemplateEscapePosition || 0, "Invalid escape sequence in template"); - } else { - this.state.invalidTemplateEscapePosition = null; - } - } - - elem.value = { - raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), - cooked: this.state.value - }; - this.next(); - elem.tail = this.match(types.backQuote); - return this.finishNode(elem, "TemplateElement"); - }; - - _proto.parseTemplate = function parseTemplate(isTagged) { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(isTagged); - node.quasis = [curElt]; - - while (!curElt.tail) { - this.expect(types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types.braceR); - node.quasis.push(curElt = this.parseTemplateElement(isTagged)); - } - - this.next(); - return this.finishNode(node, "TemplateLiteral"); - }; - - _proto.parseObj = function parseObj(isPattern, refShorthandDefaultPos) { - var decorators = []; - var propHash = Object.create(null); - var first = true; - var node = this.startNode(); - node.properties = []; - this.next(); - var firstRestLocation = null; - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - if (this.match(types.at)) { - if (this.hasPlugin("decorators2")) { - this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators"); - } else { - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - } - } - - var prop = this.startNode(), - isGenerator = false, - _isAsync = false, - startPos = void 0, - startLoc = void 0; - - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - - if (this.match(types.ellipsis)) { - this.expectPlugin("objectRestSpread"); - prop = this.parseSpread(isPattern ? { - start: 0 - } : undefined); - - if (isPattern) { - this.toAssignable(prop, true, "object pattern"); - } - - node.properties.push(prop); - - if (isPattern) { - var position = this.state.start; - - if (firstRestLocation !== null) { - this.unexpected(firstRestLocation, "Cannot have multiple rest elements when destructuring"); - } else if (this.eat(types.braceR)) { - break; - } else if (this.match(types.comma) && this.lookahead().type === types.braceR) { - this.unexpected(position, "A trailing comma is not permitted after the rest element"); - } else { - firstRestLocation = position; - continue; - } - } else { - continue; - } - } - - prop.method = false; - - if (isPattern || refShorthandDefaultPos) { - startPos = this.state.start; - startLoc = this.state.startLoc; - } - - if (!isPattern) { - isGenerator = this.eat(types.star); - } - - var containsEsc = this.state.containsEsc; - - if (!isPattern && this.isContextual("async")) { - if (isGenerator) this.unexpected(); - var asyncId = this.parseIdentifier(); - - if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) { - prop.key = asyncId; - prop.computed = false; - } else { - _isAsync = true; - - if (this.match(types.star)) { - this.expectPlugin("asyncGenerators"); - this.next(); - isGenerator = true; - } - - this.parsePropertyName(prop); - } - } else { - this.parsePropertyName(prop); - } - - this.parseObjPropValue(prop, startPos, startLoc, isGenerator, _isAsync, isPattern, refShorthandDefaultPos, containsEsc); - this.checkPropClash(prop, propHash); - - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); - } - - node.properties.push(prop); - } - - if (firstRestLocation !== null) { - this.unexpected(firstRestLocation, "The rest element has to be the last element when destructuring"); - } - - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no property"); - } - - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); - }; - - _proto.isGetterOrSetterMethod = function isGetterOrSetterMethod(prop, isPattern) { - return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword); - }; - - _proto.checkGetterSetterParams = function checkGetterSetterParams(method) { - var paramCount = method.kind === "get" ? 0 : 1; - var start = method.start; - - if (method.params.length !== paramCount) { - if (method.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (method.kind === "set" && method.params[0].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - if (isAsync || isGenerator || this.match(types.parenL)) { - if (isPattern) this.unexpected(); - prop.kind = "method"; - prop.method = true; - return this.parseMethod(prop, isGenerator, isAsync, false, "ObjectMethod"); - } - - if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) { - if (isGenerator || isAsync) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - this.parseMethod(prop, false, false, false, "ObjectMethod"); - this.checkGetterSetterParams(prop); - return prop; - } - }; - - _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - prop.shorthand = false; - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - return this.finishNode(prop, "ObjectProperty"); - } - - if (!prop.computed && prop.key.type === "Identifier") { - this.checkReservedWord(prop.key.name, prop.key.start, true, true); - - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else if (this.match(types.eq) && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) { - refShorthandDefaultPos.start = this.state.start; - } - - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else { - prop.value = prop.key.__clone(); - } - - prop.shorthand = true; - return this.finishNode(prop, "ObjectProperty"); - } - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - if (!node) this.unexpected(); - return node; - }; - - _proto.parsePropertyName = function parsePropertyName(prop) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - } else { - var oldInPropertyName = this.state.inPropertyName; - this.state.inPropertyName = true; - prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName(); - - if (prop.key.type !== "PrivateName") { - prop.computed = false; - } - - this.state.inPropertyName = oldInPropertyName; - } - - return prop.key; - }; - - _proto.initFunction = function initFunction(node, isAsync) { - node.id = null; - node.generator = false; - node.async = !!isAsync; - }; - - _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) { - var oldInFunc = this.state.inFunction; - var oldInMethod = this.state.inMethod; - var oldInGenerator = this.state.inGenerator; - this.state.inFunction = true; - this.state.inMethod = node.kind || true; - this.state.inGenerator = isGenerator; - this.initFunction(node, isAsync); - node.generator = !!isGenerator; - var allowModifiers = isConstructor; - this.parseFunctionParams(node, allowModifiers); - this.parseFunctionBodyAndFinish(node, type); - this.state.inFunction = oldInFunc; - this.state.inMethod = oldInMethod; - this.state.inGenerator = oldInGenerator; - return node; - }; - - _proto.parseArrowExpression = function parseArrowExpression(node, params, isAsync) { - if (this.state.yieldInPossibleArrowParameters) { - this.raise(this.state.yieldInPossibleArrowParameters.start, "yield is not allowed in the parameters of an arrow function" + " inside a generator"); - } - - var oldInFunc = this.state.inFunction; - this.state.inFunction = true; - this.initFunction(node, isAsync); - if (params) this.setArrowFunctionParameters(node, params); - var oldInGenerator = this.state.inGenerator; - var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - this.state.inGenerator = false; - this.state.maybeInArrowParameters = false; - this.parseFunctionBody(node, true); - this.state.inGenerator = oldInGenerator; - this.state.inFunction = oldInFunc; - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return this.finishNode(node, "ArrowFunctionExpression"); - }; - - _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) { - node.params = this.toAssignableList(params, true, "arrow function parameters"); - }; - - _proto.isStrictBody = function isStrictBody(node) { - var isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.directives.length) { - for (var _i4 = 0, _node$body$directives2 = node.body.directives; _i4 < _node$body$directives2.length; _i4++) { - var directive = _node$body$directives2[_i4]; - - if (directive.value.value === "use strict") { - return true; - } - } - } - - return false; - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - this.parseFunctionBody(node, allowExpressionBody); - this.finishNode(node, type); - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) { - var isExpression = allowExpression && !this.match(types.braceL); - var oldInParameters = this.state.inParameters; - var oldInAsync = this.state.inAsync; - this.state.inParameters = false; - this.state.inAsync = node.async; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - } else { - var oldInGen = this.state.inGenerator; - var oldInFunc = this.state.inFunction; - var oldLabels = this.state.labels; - this.state.inGenerator = node.generator; - this.state.inFunction = true; - this.state.labels = []; - node.body = this.parseBlock(true); - this.state.inFunction = oldInFunc; - this.state.inGenerator = oldInGen; - this.state.labels = oldLabels; - } - - this.state.inAsync = oldInAsync; - this.checkFunctionNameAndParams(node, allowExpression); - this.state.inParameters = oldInParameters; - }; - - _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) { - var isStrict = this.isStrictBody(node); - var checkLVal = this.state.strict || isStrict || isArrowFunction; - var oldStrict = this.state.strict; - if (isStrict) this.state.strict = isStrict; - - if (checkLVal) { - var nameHash = Object.create(null); - - if (node.id) { - this.checkLVal(node.id, true, undefined, "function name"); - } - - for (var _i6 = 0, _node$params2 = node.params; _i6 < _node$params2.length; _i6++) { - var param = _node$params2[_i6]; - - if (isStrict && param.type !== "Identifier") { - this.raise(param.start, "Non-simple parameter in strict mode"); - } - - this.checkLVal(param, true, nameHash, "function parameter list"); - } - } - - this.state.strict = oldStrict; - }; - - _proto.parseExprList = function parseExprList(close, allowEmpty, refShorthandDefaultPos) { - var elts = []; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(close)) break; - } - - elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos)); - } - - return elts; - }; - - _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, refTrailingCommaPos) { - var elt; - - if (allowEmpty && this.match(types.comma)) { - elt = null; - } else if (this.match(types.ellipsis)) { - var spreadNodeStartPos = this.state.start; - var spreadNodeStartLoc = this.state.startLoc; - elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc); - - if (refTrailingCommaPos && this.match(types.comma)) { - refTrailingCommaPos.start = this.state.start; - } - } else { - elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos); - } - - return elt; - }; - - _proto.parseIdentifier = function parseIdentifier(liberal) { - var node = this.startNode(); - var name = this.parseIdentifierName(node.start, liberal); - node.name = name; - node.loc.identifierName = name; - return this.finishNode(node, "Identifier"); - }; - - _proto.parseIdentifierName = function parseIdentifierName(pos, liberal) { - if (!liberal) { - this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, false); - } - - var name; - - if (this.match(types.name)) { - name = this.state.value; - } else if (this.state.type.keyword) { - name = this.state.type.keyword; - } else { - throw this.unexpected(); - } - - if (!liberal && name === "await" && this.state.inAsync) { - this.raise(pos, "invalid use of await inside of an async function"); - } - - this.next(); - return name; - }; - - _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (this.state.strict && (reservedWords.strict(word) || isBinding && reservedWords.strictBind(word))) { - this.raise(startLoc, word + " is a reserved word in strict mode"); - } - - if (this.state.inGenerator && word === "yield") { - this.raise(startLoc, "yield is a reserved word inside generator functions"); - } - - if (this.state.inClassProperty && word === "arguments") { - this.raise(startLoc, "'arguments' is not allowed in class field initializer"); - } - - if (this.isReservedWord(word) || checkKeywords && this.isKeyword(word)) { - this.raise(startLoc, word + " is a reserved word"); - } - }; - - _proto.parseAwait = function parseAwait(node) { - if (!this.state.inAsync && (this.state.inFunction || !this.options.allowAwaitOutsideFunction)) { - this.unexpected(); - } - - if (this.match(types.star)) { - this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead."); - } - - node.argument = this.parseMaybeUnary(); - return this.finishNode(node, "AwaitExpression"); - }; - - _proto.parseYield = function parseYield() { - var node = this.startNode(); - - if (this.state.inParameters) { - this.raise(node.start, "yield is not allowed in generator parameters"); - } - - if (this.state.maybeInArrowParameters && !this.state.yieldInPossibleArrowParameters) { - this.state.yieldInPossibleArrowParameters = node; - } - - this.next(); - - if (this.match(types.semi) || this.canInsertSemicolon() || !this.match(types.star) && !this.state.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(); - } - - return this.finishNode(node, "YieldExpression"); - }; - - return ExpressionParser; -}(LValParser); - -var empty = []; -var loopLabel = { - kind: "loop" -}; -var switchLabel = { - kind: "switch" -}; - -var StatementParser = function (_ExpressionParser) { - _inheritsLoose(StatementParser, _ExpressionParser); - - function StatementParser() { - return _ExpressionParser.apply(this, arguments) || this; - } - - var _proto = StatementParser.prototype; - - _proto.parseTopLevel = function parseTopLevel(file, program) { - program.sourceType = this.options.sourceType; - this.parseBlockBody(program, true, true, types.eof); - file.program = this.finishNode(program, "Program"); - file.comments = this.state.comments; - if (this.options.tokens) file.tokens = this.state.tokens; - return this.finishNode(file, "File"); - }; - - _proto.stmtToDirective = function stmtToDirective(stmt) { - var expr = stmt.expression; - var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); - var directive = this.startNodeAt(stmt.start, stmt.loc.start); - var raw = this.input.slice(expr.start, expr.end); - var val = directiveLiteral.value = raw.slice(1, -1); - this.addExtra(directiveLiteral, "raw", raw); - this.addExtra(directiveLiteral, "rawValue", val); - directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end); - return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end); - }; - - _proto.parseStatement = function parseStatement(declaration, topLevel) { - if (this.match(types.at)) { - this.parseDecorators(true); - } - - return this.parseStatementContent(declaration, topLevel); - }; - - _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) { - var starttype = this.state.type; - var node = this.startNode(); - - switch (starttype) { - case types._break: - case types._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - - case types._debugger: - return this.parseDebuggerStatement(node); - - case types._do: - return this.parseDoStatement(node); - - case types._for: - return this.parseForStatement(node); - - case types._function: - if (this.lookahead().type === types.dot) break; - if (!declaration) this.unexpected(); - return this.parseFunctionStatement(node); - - case types._class: - if (!declaration) this.unexpected(); - return this.parseClass(node, true); - - case types._if: - return this.parseIfStatement(node); - - case types._return: - return this.parseReturnStatement(node); - - case types._switch: - return this.parseSwitchStatement(node); - - case types._throw: - return this.parseThrowStatement(node); - - case types._try: - return this.parseTryStatement(node); - - case types._let: - case types._const: - if (!declaration) this.unexpected(); - - case types._var: - return this.parseVarStatement(node, starttype); - - case types._while: - return this.parseWhileStatement(node); - - case types._with: - return this.parseWithStatement(node); - - case types.braceL: - return this.parseBlock(); - - case types.semi: - return this.parseEmptyStatement(node); - - case types._export: - case types._import: - { - var nextToken = this.lookahead(); - - if (nextToken.type === types.parenL || nextToken.type === types.dot) { - break; - } - - if (!this.options.allowImportExportEverywhere && !topLevel) { - this.raise(this.state.start, "'import' and 'export' may only appear at the top level"); - } - - this.next(); - var result; - - if (starttype == types._import) { - result = this.parseImport(node); - - if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { - this.sawUnambiguousESM = true; - } - } else { - result = this.parseExport(node); - - if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { - this.sawUnambiguousESM = true; - } - } - - this.assertModuleNodeAllowed(node); - return result; - } - - case types.name: - if (this.isContextual("async")) { - var state = this.state.clone(); - this.next(); - - if (this.match(types._function) && !this.canInsertSemicolon()) { - this.expect(types._function); - return this.parseFunction(node, true, false, true); - } else { - this.state = state; - } - } - - } - - var maybeName = this.state.value; - var expr = this.parseExpression(); - - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) { - return this.parseLabeledStatement(node, maybeName, expr); - } else { - return this.parseExpressionStatement(node, expr); - } - }; - - _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) { - if (!this.options.allowImportExportEverywhere && !this.inModule) { - this.raise(node.start, "'import' and 'export' may appear only with 'sourceType: \"module\"'", { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - }; - - _proto.takeDecorators = function takeDecorators(node) { - var decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (decorators.length) { - node.decorators = decorators; - this.resetStartLocationFromNode(node, decorators[0]); - this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; - } - }; - - _proto.parseDecorators = function parseDecorators(allowExport) { - if (this.hasPlugin("decorators2")) { - allowExport = false; - } - - var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - while (this.match(types.at)) { - var decorator = this.parseDecorator(); - currentContextDecorators.push(decorator); - } - - if (this.match(types._export)) { - if (allowExport) { - return; - } else { - this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead"); - } - } - - if (!this.match(types._class)) { - this.raise(this.state.start, "Leading decorators must be attached to a class declaration"); - } - }; - - _proto.parseDecorator = function parseDecorator() { - this.expectOnePlugin(["decorators", "decorators2"]); - var node = this.startNode(); - this.next(); - - if (this.hasPlugin("decorators2")) { - this.state.decoratorStack.push([]); - - if (this.eat(types.parenL)) { - node.callee = this.parseExpression(); - this.expect(types.parenR); - } else { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseIdentifier(false); - - while (this.eat(types.dot)) { - var _node = this.startNodeAt(startPos, startLoc); - - _node.object = expr; - _node.property = this.parseIdentifier(true); - _node.computed = false; - expr = this.finishNode(_node, "MemberExpression"); - } - - node.callee = expr; - } - - if (this.eat(types.parenL)) { - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - this.toReferencedList(node.arguments); - } - - this.state.decoratorStack.pop(); - } else { - node.callee = this.parseMaybeAssign(); - } - - return this.finishNode(node, "Decorator"); - }; - - _proto.parseBreakContinueStatement = function parseBreakContinueStatement(node, keyword) { - var isBreak = keyword === "break"; - this.next(); - - if (this.isLineTerminator()) { - node.label = null; - } else if (!this.match(types.name)) { - this.unexpected(); - } else { - node.label = this.parseIdentifier(); - this.semicolon(); - } - - var i; - - for (i = 0; i < this.state.labels.length; ++i) { - var lab = this.state.labels[i]; - - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - - if (i === this.state.labels.length) { - this.raise(node.start, "Unsyntactic " + keyword); - } - - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - }; - - _proto.parseDebuggerStatement = function parseDebuggerStatement(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - }; - - _proto.parseDoStatement = function parseDoStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.state.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - this.eat(types.semi); - return this.finishNode(node, "DoWhileStatement"); - }; - - _proto.parseForStatement = function parseForStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - var forAwait = false; - - if (this.state.inAsync && this.isContextual("await")) { - this.expectPlugin("asyncGenerators"); - forAwait = true; - this.next(); - } - - this.expect(types.parenL); - - if (this.match(types.semi)) { - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, null); - } - - if (this.match(types._var) || this.match(types._let) || this.match(types._const)) { - var _init = this.startNode(); - - var varKind = this.state.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - - if (this.match(types._in) || this.isContextual("of")) { - if (_init.declarations.length === 1) { - var declaration = _init.declarations[0]; - var isForInInitializer = varKind === types._var && declaration.init && declaration.id.type != "ObjectPattern" && declaration.id.type != "ArrayPattern" && !this.isContextual("of"); - - if (this.state.strict && isForInInitializer) { - this.raise(this.state.start, "for-in initializer in strict mode"); - } else if (isForInInitializer || !declaration.init) { - return this.parseForIn(node, _init, forAwait); - } - } - } - - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, _init); - } - - var refShorthandDefaultPos = { - start: 0 - }; - var init = this.parseExpression(true, refShorthandDefaultPos); - - if (this.match(types._in) || this.isContextual("of")) { - var description = this.isContextual("of") ? "for-of statement" : "for-in statement"; - this.toAssignable(init, undefined, description); - this.checkLVal(init, undefined, undefined, description); - return this.parseForIn(node, init, forAwait); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, init); - }; - - _proto.parseFunctionStatement = function parseFunctionStatement(node) { - this.next(); - return this.parseFunction(node, true); - }; - - _proto.parseIfStatement = function parseIfStatement(node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(types._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); - }; - - _proto.parseReturnStatement = function parseReturnStatement(node) { - if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) { - this.raise(this.state.start, "'return' outside of function"); - } - - this.next(); - - if (this.isLineTerminator()) { - node.argument = null; - } else { - node.argument = this.parseExpression(); - this.semicolon(); - } - - return this.finishNode(node, "ReturnStatement"); - }; - - _proto.parseSwitchStatement = function parseSwitchStatement(node) { - this.next(); - node.discriminant = this.parseParenExpression(); - var cases = node.cases = []; - this.expect(types.braceL); - this.state.labels.push(switchLabel); - var cur; - - for (var sawDefault; !this.match(types.braceR);) { - if (this.match(types._case) || this.match(types._default)) { - var isCase = this.match(types._case); - if (cur) this.finishNode(cur, "SwitchCase"); - cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { - this.raise(this.state.lastTokStart, "Multiple default clauses"); - } - - sawDefault = true; - cur.test = null; - } - - this.expect(types.colon); - } else { - if (cur) { - cur.consequent.push(this.parseStatement(true)); - } else { - this.unexpected(); - } - } - } - - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); - this.state.labels.pop(); - return this.finishNode(node, "SwitchStatement"); - }; - - _proto.parseThrowStatement = function parseThrowStatement(node) { - this.next(); - - if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) { - this.raise(this.state.lastTokEnd, "Illegal newline after throw"); - } - - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); - }; - - _proto.parseTryStatement = function parseTryStatement(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - - if (this.match(types._catch)) { - var clause = this.startNode(); - this.next(); - - if (this.match(types.parenL)) { - this.expect(types.parenL); - clause.param = this.parseBindingAtom(); - var clashes = Object.create(null); - this.checkLVal(clause.param, true, clashes, "catch clause"); - this.expect(types.parenR); - } else { - this.expectPlugin("optionalCatchBinding"); - clause.param = null; - } - - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - - node.guardedHandlers = empty; - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - - if (!node.handler && !node.finalizer) { - this.raise(node.start, "Missing catch or finally clause"); - } - - return this.finishNode(node, "TryStatement"); - }; - - _proto.parseVarStatement = function parseVarStatement(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); - }; - - _proto.parseWhileStatement = function parseWhileStatement(node) { - this.next(); - node.test = this.parseParenExpression(); - this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, "WhileStatement"); - }; - - _proto.parseWithStatement = function parseWithStatement(node) { - if (this.state.strict) { - this.raise(this.state.start, "'with' in strict mode"); - } - - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); - }; - - _proto.parseEmptyStatement = function parseEmptyStatement(node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); - }; - - _proto.parseLabeledStatement = function parseLabeledStatement(node, maybeName, expr) { - for (var _i2 = 0, _state$labels2 = this.state.labels; _i2 < _state$labels2.length; _i2++) { - var label = _state$labels2[_i2]; - - if (label.name === maybeName) { - this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } - } - - var kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null; - - for (var i = this.state.labels.length - 1; i >= 0; i--) { - var _label = this.state.labels[i]; - - if (_label.statementStart === node.start) { - _label.statementStart = this.state.start; - _label.kind = kind; - } else { - break; - } - } - - this.state.labels.push({ - name: maybeName, - kind: kind, - statementStart: this.state.start - }); - node.body = this.parseStatement(true); - - if (node.body.type == "ClassDeclaration" || node.body.type == "VariableDeclaration" && node.body.kind !== "var" || node.body.type == "FunctionDeclaration" && (this.state.strict || node.body.generator || node.body.async)) { - this.raise(node.body.start, "Invalid labeled declaration"); - } - - this.state.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); - }; - - _proto.parseBlock = function parseBlock(allowDirectives) { - var node = this.startNode(); - this.expect(types.braceL); - this.parseBlockBody(node, allowDirectives, false, types.braceR); - return this.finishNode(node, "BlockStatement"); - }; - - _proto.isValidDirective = function isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; - }; - - _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) { - var body = node.body = []; - var directives = node.directives = []; - this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end); - }; - - _proto.parseBlockOrModuleBlockBody = function parseBlockOrModuleBlockBody(body, directives, topLevel, end) { - var parsedNonDirective = false; - var oldStrict; - var octalPosition; - - while (!this.eat(end)) { - if (!parsedNonDirective && this.state.containsOctal && !octalPosition) { - octalPosition = this.state.octalPosition; - } - - var stmt = this.parseStatement(true, topLevel); - - if (directives && !parsedNonDirective && this.isValidDirective(stmt)) { - var directive = this.stmtToDirective(stmt); - directives.push(directive); - - if (oldStrict === undefined && directive.value.value === "use strict") { - oldStrict = this.state.strict; - this.setStrict(true); - - if (octalPosition) { - this.raise(octalPosition, "Octal literal in strict mode"); - } - } - - continue; - } - - parsedNonDirective = true; - body.push(stmt); - } - - if (oldStrict === false) { - this.setStrict(false); - } - }; - - _proto.parseFor = function parseFor(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.match(types.semi) ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.match(types.parenR) ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, "ForStatement"); - }; - - _proto.parseForIn = function parseForIn(node, init, forAwait) { - var type = this.match(types._in) ? "ForInStatement" : "ForOfStatement"; - - if (forAwait) { - this.eatContextual("of"); - } else { - this.next(); - } - - if (type === "ForOfStatement") { - node.await = !!forAwait; - } - - node.left = init; - node.right = this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, type); - }; - - _proto.parseVar = function parseVar(node, isFor, kind) { - var declarations = node.declarations = []; - node.kind = kind.keyword; - - for (;;) { - var decl = this.startNode(); - this.parseVarHead(decl); - - if (this.eat(types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else { - if (kind === types._const && !(this.match(types._in) || this.isContextual("of"))) { - if (!this.hasPlugin("typescript")) { - this.unexpected(); - } - } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) { - this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value"); - } - - decl.init = null; - } - - declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types.comma)) break; - } - - return node; - }; - - _proto.parseVarHead = function parseVarHead(decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true, undefined, "variable declaration"); - }; - - _proto.parseFunction = function parseFunction(node, isStatement, allowExpressionBody, isAsync, optionalId) { - var oldInFunc = this.state.inFunction; - var oldInMethod = this.state.inMethod; - var oldInGenerator = this.state.inGenerator; - var oldInClassProperty = this.state.inClassProperty; - this.state.inFunction = true; - this.state.inMethod = false; - this.state.inClassProperty = false; - this.initFunction(node, isAsync); - - if (this.match(types.star)) { - if (node.async) { - this.expectPlugin("asyncGenerators"); - } - - node.generator = true; - this.next(); - } - - if (isStatement && !optionalId && !this.match(types.name) && !this.match(types._yield)) { - this.unexpected(); - } - - if (!isStatement) this.state.inGenerator = node.generator; - - if (this.match(types.name) || this.match(types._yield)) { - node.id = this.parseBindingIdentifier(); - } - - if (isStatement) this.state.inGenerator = node.generator; - this.parseFunctionParams(node); - this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression", allowExpressionBody); - this.state.inFunction = oldInFunc; - this.state.inMethod = oldInMethod; - this.state.inGenerator = oldInGenerator; - this.state.inClassProperty = oldInClassProperty; - return node; - }; - - _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { - var oldInParameters = this.state.inParameters; - this.state.inParameters = true; - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, allowModifiers); - this.state.inParameters = oldInParameters; - }; - - _proto.parseClass = function parseClass(node, isStatement, optionalId) { - this.next(); - this.takeDecorators(node); - this.parseClassId(node, isStatement, optionalId); - this.parseClassSuper(node); - this.parseClassBody(node); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR); - }; - - _proto.isClassMethod = function isClassMethod() { - return this.match(types.parenL); - }; - - _proto.isNonstaticConstructor = function isNonstaticConstructor(method) { - return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); - }; - - _proto.parseClassBody = function parseClassBody(node) { - var oldStrict = this.state.strict; - this.state.strict = true; - this.state.classLevel++; - var state = { - hadConstructor: false - }; - var decorators = []; - var classBody = this.startNode(); - classBody.body = []; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (this.eat(types.semi)) { - if (decorators.length > 0) { - this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon"); - } - - continue; - } - - if (this.match(types.at)) { - decorators.push(this.parseDecorator()); - continue; - } - - var member = this.startNode(); - - if (decorators.length) { - member.decorators = decorators; - this.resetStartLocationFromNode(member, decorators[0]); - decorators = []; - } - - this.parseClassMember(classBody, member, state); - - if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { - this.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?"); - } - } - - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no method"); - } - - node.body = this.finishNode(classBody, "ClassBody"); - this.state.classLevel--; - this.state.strict = oldStrict; - }; - - _proto.parseClassMember = function parseClassMember(classBody, member, state) { - var isStatic = false; - var containsEsc = this.state.containsEsc; - - if (this.match(types.name) && this.state.value === "static") { - var key = this.parseIdentifier(true); - - if (this.isClassMethod()) { - var method = member; - method.kind = "method"; - method.computed = false; - method.key = key; - method.static = false; - this.pushClassMethod(classBody, method, false, false, false); - return; - } else if (this.isClassProperty()) { - var prop = member; - prop.computed = false; - prop.key = key; - prop.static = false; - classBody.body.push(this.parseClassProperty(prop)); - return; - } else if (containsEsc) { - throw this.unexpected(); - } - - isStatic = true; - } - - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); - }; - - _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - var publicMethod = member; - var privateMethod = member; - var publicProp = member; - var privateProp = member; - var method = publicMethod; - var publicMember = publicMethod; - member.static = isStatic; - - if (this.eat(types.star)) { - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, true, false); - return; - } - - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be a generator"); - } - - this.pushClassMethod(classBody, publicMethod, true, false, false); - return; - } - - var key = this.parseClassPropertyName(member); - var isPrivate = key.type === "PrivateName"; - var isSimple = key.type === "Identifier"; - this.parsePostMemberNameModifiers(publicMember); - - if (this.isClassMethod()) { - method.kind = "method"; - - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - return; - } - - var isConstructor = this.isNonstaticConstructor(publicMethod); - - if (isConstructor) { - publicMethod.kind = "constructor"; - - if (publicMethod.decorators) { - this.raise(publicMethod.start, "You can't attach decorators to a class constructor"); - } - - if (state.hadConstructor && !this.hasPlugin("typescript")) { - this.raise(key.start, "Duplicate constructor in the same class"); - } - - state.hadConstructor = true; - } - - this.pushClassMethod(classBody, publicMethod, false, false, isConstructor); - } else if (this.isClassProperty()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else if (isSimple && key.name === "async" && !this.isLineTerminator()) { - var isGenerator = this.match(types.star); - - if (isGenerator) { - this.expectPlugin("asyncGenerators"); - this.next(); - } - - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be an async function"); - } - - this.pushClassMethod(classBody, publicMethod, isGenerator, true, false); - } - } else if (isSimple && (key.name === "get" || key.name === "set") && !(this.isLineTerminator() && this.match(types.star))) { - method.kind = key.name; - this.parseClassPropertyName(publicMethod); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't have get/set modifier"); - } - - this.pushClassMethod(classBody, publicMethod, false, false, false); - } - - this.checkGetterSetterParams(publicMethod); - } else if (this.isLineTerminator()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else { - this.unexpected(); - } - }; - - _proto.parseClassPropertyName = function parseClassPropertyName(member) { - var key = this.parsePropertyName(member); - - if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) { - this.raise(key.start, "Classes may not have static property named prototype"); - } - - if (key.type === "PrivateName" && key.id.name === "constructor") { - this.raise(key.start, "Classes may not have a private field named '#constructor'"); - } - - return key; - }; - - _proto.pushClassProperty = function pushClassProperty(classBody, prop) { - if (this.isNonstaticConstructor(prop)) { - this.raise(prop.key.start, "Classes may not have a non-static field named 'constructor'"); - } - - classBody.body.push(this.parseClassProperty(prop)); - }; - - _proto.pushClassPrivateProperty = function pushClassPrivateProperty(classBody, prop) { - this.expectPlugin("classPrivateProperties", prop.key.start); - classBody.body.push(this.parseClassPrivateProperty(prop)); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, "ClassMethod")); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - this.expectPlugin("classPrivateMethods", method.key.start); - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, "ClassPrivateMethod")); - }; - - _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {}; - - _proto.parseAccessModifier = function parseAccessModifier() { - return undefined; - }; - - _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) { - var oldInMethod = this.state.inMethod; - this.state.inMethod = false; - this.state.inClassProperty = true; - node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null; - this.semicolon(); - this.state.inClassProperty = false; - this.state.inMethod = oldInMethod; - return this.finishNode(node, "ClassPrivateProperty"); - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (!node.typeAnnotation) { - this.expectPlugin("classProperties"); - } - - var oldInMethod = this.state.inMethod; - this.state.inMethod = false; - this.state.inClassProperty = true; - - if (this.match(types.eq)) { - this.expectPlugin("classProperties"); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; - } - - this.semicolon(); - this.state.inClassProperty = false; - this.state.inMethod = oldInMethod; - return this.finishNode(node, "ClassProperty"); - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - if (this.match(types.name)) { - node.id = this.parseIdentifier(); - } else { - if (optionalId || !isStatement) { - node.id = null; - } else { - this.unexpected(null, "A class name is required"); - } - } - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; - }; - - _proto.parseExport = function parseExport(node) { - if (this.shouldParseExportStar()) { - this.parseExportStar(node); - if (node.type === "ExportAllDeclaration") return node; - } else if (this.isExportDefaultSpecifier()) { - this.expectPlugin("exportDefaultFrom"); - var specifier = this.startNode(); - specifier.exported = this.parseIdentifier(true); - var specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - node.specifiers = specifiers; - - if (this.match(types.comma) && this.lookahead().type === types.star) { - this.expect(types.comma); - - var _specifier = this.startNode(); - - this.expect(types.star); - this.expectContextual("as"); - _specifier.exported = this.parseIdentifier(); - specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); - } else { - this.parseExportSpecifiersMaybe(node); - } - - this.parseExportFrom(node, true); - } else if (this.eat(types._default)) { - node.declaration = this.parseExportDefaultExpression(); - this.checkExport(node, true, true); - return this.finishNode(node, "ExportDefaultDeclaration"); - } else if (this.shouldParseExportDeclaration()) { - if (this.isContextual("async")) { - var next = this.lookahead(); - - if (next.type !== types._function) { - this.unexpected(next.start, "Unexpected token, expected \"function\""); - } - } - - node.specifiers = []; - node.source = null; - node.declaration = this.parseExportDeclaration(node); - } else { - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - } - - this.checkExport(node, true); - return this.finishNode(node, "ExportNamedDeclaration"); - }; - - _proto.parseExportDefaultExpression = function parseExportDefaultExpression() { - var expr = this.startNode(); - - if (this.eat(types._function)) { - return this.parseFunction(expr, true, false, false, true); - } else if (this.isContextual("async") && this.lookahead().type === types._function) { - this.eatContextual("async"); - this.eat(types._function); - return this.parseFunction(expr, true, false, true, true); - } else if (this.match(types._class)) { - return this.parseClass(expr, true, true); - } else if (this.match(types.at)) { - this.parseDecorators(false); - return this.parseClass(expr, true, true); - } else if (this.match(types._let) || this.match(types._const) || this.match(types._var)) { - return this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export."); - } else { - var res = this.parseMaybeAssign(); - this.semicolon(); - return res; - } - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - return this.parseStatement(true); - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.match(types.name)) { - return this.state.value !== "async"; - } - - if (!this.match(types._default)) { - return false; - } - - var lookahead = this.lookahead(); - return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from"; - }; - - _proto.parseExportSpecifiersMaybe = function parseExportSpecifiersMaybe(node) { - if (this.eat(types.comma)) { - node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); - } - }; - - _proto.parseExportFrom = function parseExportFrom(node, expect) { - if (this.eatContextual("from")) { - node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected(); - this.checkExport(node); - } else { - if (expect) { - this.unexpected(); - } else { - node.source = null; - } - } - - this.semicolon(); - }; - - _proto.shouldParseExportStar = function shouldParseExportStar() { - return this.match(types.star); - }; - - _proto.parseExportStar = function parseExportStar(node) { - this.expect(types.star); - - if (this.isContextual("as")) { - this.parseExportNamespace(node); - } else { - this.parseExportFrom(node, true); - this.finishNode(node, "ExportAllDeclaration"); - } - }; - - _proto.parseExportNamespace = function parseExportNamespace(node) { - this.expectPlugin("exportNamespaceFrom"); - var specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); - this.next(); - specifier.exported = this.parseIdentifier(true); - node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; - this.parseExportSpecifiersMaybe(node); - this.parseExportFrom(node, true); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "let" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isContextual("async") || this.match(types.at) && this.expectPlugin("decorators2"); - }; - - _proto.checkExport = function checkExport(node, checkNames, isDefault) { - if (checkNames) { - if (isDefault) { - this.checkDuplicateExports(node, "default"); - } else if (node.specifiers && node.specifiers.length) { - for (var _i4 = 0, _node$specifiers2 = node.specifiers; _i4 < _node$specifiers2.length; _i4++) { - var specifier = _node$specifiers2[_i4]; - this.checkDuplicateExports(specifier, specifier.exported.name); - } - } else if (node.declaration) { - if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { - var id = node.declaration.id; - if (!id) throw new Error("Assertion failure"); - this.checkDuplicateExports(node, id.name); - } else if (node.declaration.type === "VariableDeclaration") { - for (var _i6 = 0, _node$declaration$dec2 = node.declaration.declarations; _i6 < _node$declaration$dec2.length; _i6++) { - var declaration = _node$declaration$dec2[_i6]; - this.checkDeclaration(declaration.id); - } - } - } - } - - var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (currentContextDecorators.length) { - var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - - if (!node.declaration || !isClass) { - throw this.raise(node.start, "You can only use decorators on an export when exporting a class"); - } - - this.takeDecorators(node.declaration); - } - }; - - _proto.checkDeclaration = function checkDeclaration(node) { - if (node.type === "ObjectPattern") { - for (var _i8 = 0, _node$properties2 = node.properties; _i8 < _node$properties2.length; _i8++) { - var prop = _node$properties2[_i8]; - this.checkDeclaration(prop); - } - } else if (node.type === "ArrayPattern") { - for (var _i10 = 0, _node$elements2 = node.elements; _i10 < _node$elements2.length; _i10++) { - var elem = _node$elements2[_i10]; - - if (elem) { - this.checkDeclaration(elem); - } - } - } else if (node.type === "ObjectProperty") { - this.checkDeclaration(node.value); - } else if (node.type === "RestElement") { - this.checkDeclaration(node.argument); - } else if (node.type === "Identifier") { - this.checkDuplicateExports(node, node.name); - } - }; - - _proto.checkDuplicateExports = function checkDuplicateExports(node, name) { - if (this.state.exportedIdentifiers.indexOf(name) > -1) { - this.raiseDuplicateExportError(node, name); - } - - this.state.exportedIdentifiers.push(name); - }; - - _proto.raiseDuplicateExportError = function raiseDuplicateExportError(node, name) { - throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : "`" + name + "` has already been exported. Exported identifiers must be unique."); - }; - - _proto.parseExportSpecifiers = function parseExportSpecifiers() { - var nodes = []; - var first = true; - var needsFrom; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - var isDefault = this.match(types._default); - if (isDefault && !needsFrom) needsFrom = true; - var node = this.startNode(); - node.local = this.parseIdentifier(isDefault); - node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - - if (needsFrom && !this.isContextual("from")) { - this.unexpected(); - } - - return nodes; - }; - - _proto.parseImport = function parseImport(node) { - if (this.match(types.string)) { - node.specifiers = []; - node.source = this.parseExprAtom(); - } else { - node.specifiers = []; - this.parseImportSpecifiers(node); - this.expectContextual("from"); - node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected(); - } - - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - }; - - _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) { - return this.match(types.name); - }; - - _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = this.parseIdentifier(); - this.checkLVal(specifier.local, true, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - }; - - _proto.parseImportSpecifiers = function parseImportSpecifiers(node) { - var first = true; - - if (this.shouldParseDefaultImport(node)) { - this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); - if (!this.eat(types.comma)) return; - } - - if (this.match(types.star)) { - var specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); - return; - } - - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - if (this.eat(types.colon)) { - this.unexpected(null, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import."); - } - - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - this.parseImportSpecifier(node); - } - }; - - _proto.parseImportSpecifier = function parseImportSpecifier(node) { - var specifier = this.startNode(); - specifier.imported = this.parseIdentifier(true); - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - this.checkReservedWord(specifier.imported.name, specifier.start, true, true); - specifier.local = specifier.imported.__clone(); - } - - this.checkLVal(specifier.local, true, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - }; - - return StatementParser; -}(ExpressionParser); - -var plugins = {}; - -var Parser = function (_StatementParser) { - _inheritsLoose(Parser, _StatementParser); - - function Parser(options, input) { - var _this; - - options = getOptions(options); - _this = _StatementParser.call(this, options, input) || this; - _this.options = options; - _this.inModule = _this.options.sourceType === "module"; - _this.input = input; - _this.plugins = pluginsMap(_this.options.plugins); - _this.filename = options.sourceFilename; - - if (_this.state.pos === 0 && _this.input[0] === "#" && _this.input[1] === "!") { - _this.skipLineComment(2); - } - - return _this; - } - - var _proto = Parser.prototype; - - _proto.parse = function parse() { - var file = this.startNode(); - var program = this.startNode(); - this.nextToken(); - return this.parseTopLevel(file, program); - }; - - return Parser; -}(StatementParser); - -function pluginsMap(pluginList) { - var pluginMap = {}; - - for (var _i2 = 0; _i2 < pluginList.length; _i2++) { - var _name = pluginList[_i2]; - pluginMap[_name] = true; - } - - return pluginMap; -} - -function isSimpleProperty(node) { - return node != null && node.type === "Property" && node.kind === "init" && node.method === false; -} - -var estreePlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.estreeParseRegExpLiteral = function estreeParseRegExpLiteral(_ref) { - var pattern = _ref.pattern, - flags = _ref.flags; - var regex = null; - - try { - regex = new RegExp(pattern, flags); - } catch (e) {} - - var node = this.estreeParseLiteral(regex); - node.regex = { - pattern: pattern, - flags: flags - }; - return node; - }; - - _proto.estreeParseLiteral = function estreeParseLiteral(value) { - return this.parseLiteral(value, "Literal"); - }; - - _proto.directiveToStmt = function directiveToStmt(directive) { - var directiveLiteral = directive.value; - var stmt = this.startNodeAt(directive.start, directive.loc.start); - var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); - expression.value = directiveLiteral.value; - expression.raw = directiveLiteral.extra.raw; - stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end); - stmt.directive = directiveLiteral.extra.raw.slice(1, -1); - return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end); - }; - - _proto.initFunction = function initFunction(node, isAsync) { - _superClass.prototype.initFunction.call(this, node, isAsync); - - node.expression = false; - }; - - _proto.checkDeclaration = function checkDeclaration(node) { - if (isSimpleProperty(node)) { - this.checkDeclaration(node.value); - } else { - _superClass.prototype.checkDeclaration.call(this, node); - } - }; - - _proto.checkGetterSetterParams = function checkGetterSetterParams(method) { - var prop = method; - var paramCount = prop.kind === "get" ? 0 : 1; - var start = prop.start; - - if (prop.value.params.length !== paramCount) { - if (prop.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - var _this = this; - - switch (expr.type) { - case "ObjectPattern": - expr.properties.forEach(function (prop) { - _this.checkLVal(prop.type === "Property" ? prop.value : prop, isBinding, checkClashes, "object destructuring pattern"); - }); - break; - - default: - _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - - } - }; - - _proto.checkPropClash = function checkPropClash(prop, propHash) { - if (prop.computed || !isSimpleProperty(prop)) return; - var key = prop.key; - var name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - }; - - _proto.isStrictBody = function isStrictBody(node) { - var isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.body.length > 0) { - for (var _i2 = 0, _node$body$body2 = node.body.body; _i2 < _node$body$body2.length; _i2++) { - var directive = _node$body$body2[_i2]; - - if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") { - if (directive.expression.value === "use strict") return true; - } else { - break; - } - } - } - - return false; - }; - - _proto.isValidDirective = function isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized); - }; - - _proto.stmtToDirective = function stmtToDirective(stmt) { - var directive = _superClass.prototype.stmtToDirective.call(this, stmt); - - var value = stmt.expression.value; - directive.value.value = value; - return directive; - }; - - _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) { - var _this2 = this; - - _superClass.prototype.parseBlockBody.call(this, node, allowDirectives, topLevel, end); - - var directiveStatements = node.directives.map(function (d) { - return _this2.directiveToStmt(d); - }); - node.body = directiveStatements.concat(node.body); - delete node.directives; - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - this.parseMethod(method, isGenerator, isAsync, isConstructor, "MethodDefinition"); - - if (method.typeParameters) { - method.value.typeParameters = method.typeParameters; - delete method.typeParameters; - } - - classBody.body.push(method); - }; - - _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) { - switch (this.state.type) { - case types.regexp: - return this.estreeParseRegExpLiteral(this.state.value); - - case types.num: - case types.string: - return this.estreeParseLiteral(this.state.value); - - case types._null: - return this.estreeParseLiteral(null); - - case types._true: - return this.estreeParseLiteral(true); - - case types._false: - return this.estreeParseLiteral(false); - - default: - return _superClass.prototype.parseExprAtom.call(this, refShorthandDefaultPos); - } - }; - - _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) { - var node = _superClass.prototype.parseLiteral.call(this, value, type, startPos, startLoc); - - node.raw = node.extra.raw; - delete node.extra; - return node; - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) { - _superClass.prototype.parseFunctionBody.call(this, node, allowExpression); - - node.expression = node.body.type !== "BlockStatement"; - }; - - _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) { - var funcNode = this.startNode(); - funcNode.kind = node.kind; - funcNode = _superClass.prototype.parseMethod.call(this, funcNode, isGenerator, isAsync, isConstructor, "FunctionExpression"); - delete funcNode.kind; - node.value = funcNode; - return this.finishNode(node, type); - }; - - _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - var node = _superClass.prototype.parseObjectMethod.call(this, prop, isGenerator, isAsync, isPattern, containsEsc); - - if (node) { - node.type = "Property"; - if (node.kind === "method") node.kind = "init"; - node.shorthand = false; - } - - return node; - }; - - _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - var node = _superClass.prototype.parseObjectProperty.call(this, prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - - if (node) { - node.kind = "init"; - node.type = "Property"; - } - - return node; - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (isSimpleProperty(node)) { - this.toAssignable(node.value, isBinding, contextDescription); - return node; - } - - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - }; - - _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.kind === "get" || prop.kind === "set") { - this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - } else if (prop.method) { - this.raise(prop.key.start, "Object pattern can't contain methods"); - } else { - _superClass.prototype.toAssignableObjectExpressionProp.call(this, prop, isBinding, isLast); - } - }; - - return _class; - }(superClass); -}); - -var primitiveTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]; - -function isEsModuleType(bodyElement) { - return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); -} - -function hasTypeImportKind(node) { - return node.importKind === "type" || node.importKind === "typeof"; -} - -function isMaybeDefaultImport(state) { - return (state.type === types.name || !!state.type.keyword) && state.value !== "from"; -} - -var exportSuggestions = { - const: "declare export var", - let: "declare export var", - type: "export type", - interface: "export interface" -}; - -function partition(list, test) { - var list1 = []; - var list2 = []; - - for (var i = 0; i < list.length; i++) { - (test(list[i], i, list) ? list1 : list2).push(list[i]); - } - - return [list1, list2]; -} - -var flowPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.flowParseTypeInitialiser = function flowParseTypeInitialiser(tok) { - var oldInType = this.state.inType; - this.state.inType = true; - this.expect(tok || types.colon); - var type = this.flowParseType(); - this.state.inType = oldInType; - return type; - }; - - _proto.flowParsePredicate = function flowParsePredicate() { - var node = this.startNode(); - var moduloLoc = this.state.startLoc; - var moduloPos = this.state.start; - this.expect(types.modulo); - var checksLoc = this.state.startLoc; - this.expectContextual("checks"); - - if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) { - this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here."); - } - - if (this.eat(types.parenL)) { - node.value = this.parseExpression(); - this.expect(types.parenR); - return this.finishNode(node, "DeclaredPredicate"); - } else { - return this.finishNode(node, "InferredPredicate"); - } - }; - - _proto.flowParseTypeAndPredicateInitialiser = function flowParseTypeAndPredicateInitialiser() { - var oldInType = this.state.inType; - this.state.inType = true; - this.expect(types.colon); - var type = null; - var predicate = null; - - if (this.match(types.modulo)) { - this.state.inType = oldInType; - predicate = this.flowParsePredicate(); - } else { - type = this.flowParseType(); - this.state.inType = oldInType; - - if (this.match(types.modulo)) { - predicate = this.flowParsePredicate(); - } - } - - return [type, predicate]; - }; - - _proto.flowParseDeclareClass = function flowParseDeclareClass(node) { - this.next(); - this.flowParseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); - }; - - _proto.flowParseDeclareFunction = function flowParseDeclareFunction(node) { - this.next(); - var id = node.id = this.parseIdentifier(); - var typeNode = this.startNode(); - var typeContainer = this.startNode(); - - if (this.isRelational("<")) { - typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } - - this.expect(types.parenL); - var tmp = this.flowParseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - this.expect(types.parenR); - - var _flowParseTypeAndPred = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.returnType = _flowParseTypeAndPred[0]; - node.predicate = _flowParseTypeAndPred[1]; - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); - this.finishNode(id, id.type); - this.semicolon(); - return this.finishNode(node, "DeclareFunction"); - }; - - _proto.flowParseDeclare = function flowParseDeclare(node, insideModule) { - if (this.match(types._class)) { - return this.flowParseDeclareClass(node); - } else if (this.match(types._function)) { - return this.flowParseDeclareFunction(node); - } else if (this.match(types._var)) { - return this.flowParseDeclareVariable(node); - } else if (this.isContextual("module")) { - if (this.lookahead().type === types.dot) { - return this.flowParseDeclareModuleExports(node); - } else { - if (insideModule) { - this.unexpected(null, "`declare module` cannot be used inside another `declare module`"); - } - - return this.flowParseDeclareModule(node); - } - } else if (this.isContextual("type")) { - return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual("opaque")) { - return this.flowParseDeclareOpaqueType(node); - } else if (this.isContextual("interface")) { - return this.flowParseDeclareInterface(node); - } else if (this.match(types._export)) { - return this.flowParseDeclareExportDeclaration(node, insideModule); - } else { - throw this.unexpected(); - } - }; - - _proto.flowParseDeclareVariable = function flowParseDeclareVariable(node) { - this.next(); - node.id = this.flowParseTypeAnnotatableIdentifier(true); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); - }; - - _proto.flowParseDeclareModule = function flowParseDeclareModule(node) { - var _this = this; - - this.next(); - - if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - node.id = this.parseIdentifier(); - } - - var bodyNode = node.body = this.startNode(); - var body = bodyNode.body = []; - this.expect(types.braceL); - - while (!this.match(types.braceR)) { - var _bodyNode = this.startNode(); - - if (this.match(types._import)) { - var lookahead = this.lookahead(); - - if (lookahead.value !== "type" && lookahead.value !== "typeof") { - this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`"); - } - - this.next(); - this.parseImport(_bodyNode); - } else { - this.expectContextual("declare", "Only declares and type imports are allowed inside declare module"); - _bodyNode = this.flowParseDeclare(_bodyNode, true); - } - - body.push(_bodyNode); - } - - this.expect(types.braceR); - this.finishNode(bodyNode, "BlockStatement"); - var kind = null; - var hasModuleExport = false; - var errorMessage = "Found both `declare module.exports` and `declare export` in the same module. " + "Modules can only have 1 since they are either an ES module or they are a CommonJS module"; - body.forEach(function (bodyElement) { - if (isEsModuleType(bodyElement)) { - if (kind === "CommonJS") { - _this.unexpected(bodyElement.start, errorMessage); - } - - kind = "ES"; - } else if (bodyElement.type === "DeclareModuleExports") { - if (hasModuleExport) { - _this.unexpected(bodyElement.start, "Duplicate `declare module.exports` statement"); - } - - if (kind === "ES") _this.unexpected(bodyElement.start, errorMessage); - kind = "CommonJS"; - hasModuleExport = true; - } - }); - node.kind = kind || "CommonJS"; - return this.finishNode(node, "DeclareModule"); - }; - - _proto.flowParseDeclareExportDeclaration = function flowParseDeclareExportDeclaration(node, insideModule) { - this.expect(types._export); - - if (this.eat(types._default)) { - if (this.match(types._function) || this.match(types._class)) { - node.declaration = this.flowParseDeclare(this.startNode()); - } else { - node.declaration = this.flowParseType(); - this.semicolon(); - } - - node.default = true; - return this.finishNode(node, "DeclareExportDeclaration"); - } else { - if (this.match(types._const) || this.match(types._let) || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) { - var label = this.state.value; - var suggestion = exportSuggestions[label]; - this.unexpected(this.state.start, "`declare export " + label + "` is not supported. Use `" + suggestion + "` instead"); - } - - if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) { - node.declaration = this.flowParseDeclare(this.startNode()); - node.default = false; - return this.finishNode(node, "DeclareExportDeclaration"); - } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) { - node = this.parseExport(node); - - if (node.type === "ExportNamedDeclaration") { - node.type = "ExportDeclaration"; - node.default = false; - delete node.exportKind; - } - - node.type = "Declare" + node.type; - return node; - } - } - - throw this.unexpected(); - }; - - _proto.flowParseDeclareModuleExports = function flowParseDeclareModuleExports(node) { - this.expectContextual("module"); - this.expect(types.dot); - this.expectContextual("exports"); - node.typeAnnotation = this.flowParseTypeAnnotation(); - this.semicolon(); - return this.finishNode(node, "DeclareModuleExports"); - }; - - _proto.flowParseDeclareTypeAlias = function flowParseDeclareTypeAlias(node) { - this.next(); - this.flowParseTypeAlias(node); - return this.finishNode(node, "DeclareTypeAlias"); - }; - - _proto.flowParseDeclareOpaqueType = function flowParseDeclareOpaqueType(node) { - this.next(); - this.flowParseOpaqueType(node, true); - return this.finishNode(node, "DeclareOpaqueType"); - }; - - _proto.flowParseDeclareInterface = function flowParseDeclareInterface(node) { - this.next(); - this.flowParseInterfaceish(node); - return this.finishNode(node, "DeclareInterface"); - }; - - _proto.flowParseInterfaceish = function flowParseInterfaceish(node, isClass) { - node.id = this.flowParseRestrictedIdentifier(!isClass); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.extends = []; - node.implements = []; - node.mixins = []; - - if (this.eat(types._extends)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (!isClass && this.eat(types.comma)); - } - - if (this.isContextual("mixins")) { - this.next(); - - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - if (this.isContextual("implements")) { - this.next(); - - do { - node.implements.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - node.body = this.flowParseObjectType(true, false, false); - }; - - _proto.flowParseInterfaceExtends = function flowParseInterfaceExtends() { - var node = this.startNode(); - node.id = this.flowParseQualifiedTypeIdentifier(); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - - return this.finishNode(node, "InterfaceExtends"); - }; - - _proto.flowParseInterface = function flowParseInterface(node) { - this.flowParseInterfaceish(node); - return this.finishNode(node, "InterfaceDeclaration"); - }; - - _proto.checkReservedType = function checkReservedType(word, startLoc) { - if (primitiveTypes.indexOf(word) > -1) { - this.raise(startLoc, "Cannot overwrite primitive type " + word); - } - }; - - _proto.flowParseRestrictedIdentifier = function flowParseRestrictedIdentifier(liberal) { - this.checkReservedType(this.state.value, this.state.start); - return this.parseIdentifier(liberal); - }; - - _proto.flowParseTypeAlias = function flowParseTypeAlias(node) { - node.id = this.flowParseRestrictedIdentifier(); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.right = this.flowParseTypeInitialiser(types.eq); - this.semicolon(); - return this.finishNode(node, "TypeAlias"); - }; - - _proto.flowParseOpaqueType = function flowParseOpaqueType(node, declare) { - this.expectContextual("type"); - node.id = this.flowParseRestrictedIdentifier(true); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.supertype = null; - - if (this.match(types.colon)) { - node.supertype = this.flowParseTypeInitialiser(types.colon); - } - - node.impltype = null; - - if (!declare) { - node.impltype = this.flowParseTypeInitialiser(types.eq); - } - - this.semicolon(); - return this.finishNode(node, "OpaqueType"); - }; - - _proto.flowParseTypeParameter = function flowParseTypeParameter() { - var node = this.startNode(); - var variance = this.flowParseVariance(); - var ident = this.flowParseTypeAnnotatableIdentifier(); - node.name = ident.name; - node.variance = variance; - node.bound = ident.typeAnnotation; - - if (this.match(types.eq)) { - this.eat(types.eq); - node.default = this.flowParseType(); - } - - return this.finishNode(node, "TypeParameter"); - }; - - _proto.flowParseTypeParameterDeclaration = function flowParseTypeParameterDeclaration() { - var oldInType = this.state.inType; - var node = this.startNode(); - node.params = []; - this.state.inType = true; - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - do { - node.params.push(this.flowParseTypeParameter()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } while (!this.isRelational(">")); - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterDeclaration"); - }; - - _proto.flowParseTypeParameterInstantiation = function flowParseTypeParameterInstantiation() { - var node = this.startNode(); - var oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expectRelational("<"); - - while (!this.isRelational(">")) { - node.params.push(this.flowParseType()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - }; - - _proto.flowParseObjectPropertyKey = function flowParseObjectPropertyKey() { - return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); - }; - - _proto.flowParseObjectTypeIndexer = function flowParseObjectTypeIndexer(node, isStatic, variance) { - node.static = isStatic; - this.expect(types.bracketL); - - if (this.lookahead().type === types.colon) { - node.id = this.flowParseObjectPropertyKey(); - node.key = this.flowParseTypeInitialiser(); - } else { - node.id = null; - node.key = this.flowParseType(); - } - - this.expect(types.bracketR); - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - return this.finishNode(node, "ObjectTypeIndexer"); - }; - - _proto.flowParseObjectTypeMethodish = function flowParseObjectTypeMethodish(node) { - node.params = []; - node.rest = null; - node.typeParameters = null; - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - this.expect(types.parenL); - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - node.params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - node.rest = this.flowParseFunctionTypeParam(); - } - - this.expect(types.parenR); - node.returnType = this.flowParseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeAnnotation"); - }; - - _proto.flowParseObjectTypeCallProperty = function flowParseObjectTypeCallProperty(node, isStatic) { - var valueNode = this.startNode(); - node.static = isStatic; - node.value = this.flowParseObjectTypeMethodish(valueNode); - return this.finishNode(node, "ObjectTypeCallProperty"); - }; - - _proto.flowParseObjectType = function flowParseObjectType(allowStatic, allowExact, allowSpread) { - var oldInType = this.state.inType; - this.state.inType = true; - var nodeStart = this.startNode(); - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - var endDelim; - var exact; - - if (allowExact && this.match(types.braceBarL)) { - this.expect(types.braceBarL); - endDelim = types.braceBarR; - exact = true; - } else { - this.expect(types.braceL); - endDelim = types.braceR; - exact = false; - } - - nodeStart.exact = exact; - - while (!this.match(endDelim)) { - var isStatic = false; - var node = this.startNode(); - - if (allowStatic && this.isContextual("static") && this.lookahead().type !== types.colon) { - this.next(); - isStatic = true; - } - - var variance = this.flowParseVariance(); - - if (this.match(types.bracketL)) { - nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); - } else if (this.match(types.parenL) || this.isRelational("<")) { - if (variance) { - this.unexpected(variance.start); - } - - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); - } else { - var kind = "init"; - - if (this.isContextual("get") || this.isContextual("set")) { - var lookahead = this.lookahead(); - - if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) { - kind = this.state.value; - this.next(); - } - } - - nodeStart.properties.push(this.flowParseObjectTypeProperty(node, isStatic, variance, kind, allowSpread)); - } - - this.flowObjectTypeSemicolon(); - } - - this.expect(endDelim); - var out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); - this.state.inType = oldInType; - return out; - }; - - _proto.flowParseObjectTypeProperty = function flowParseObjectTypeProperty(node, isStatic, variance, kind, allowSpread) { - if (this.match(types.ellipsis)) { - if (!allowSpread) { - this.unexpected(null, "Spread operator cannot appear in class or interface definitions"); - } - - if (variance) { - this.unexpected(variance.start, "Spread properties cannot have variance"); - } - - this.expect(types.ellipsis); - node.argument = this.flowParseType(); - return this.finishNode(node, "ObjectTypeSpreadProperty"); - } else { - node.key = this.flowParseObjectPropertyKey(); - node.static = isStatic; - node.kind = kind; - var optional = false; - - if (this.isRelational("<") || this.match(types.parenL)) { - node.method = true; - - if (variance) { - this.unexpected(variance.start); - } - - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); - - if (kind === "get" || kind === "set") { - this.flowCheckGetterSetterParams(node); - } - } else { - if (kind !== "init") this.unexpected(); - node.method = false; - - if (this.eat(types.question)) { - optional = true; - } - - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - } - - node.optional = optional; - return this.finishNode(node, "ObjectTypeProperty"); - } - }; - - _proto.flowCheckGetterSetterParams = function flowCheckGetterSetterParams(property) { - var paramCount = property.kind === "get" ? 0 : 1; - var start = property.start; - var length = property.value.params.length + (property.value.rest ? 1 : 0); - - if (length !== paramCount) { - if (property.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (property.kind === "set" && property.value.rest) { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.flowObjectTypeSemicolon = function flowObjectTypeSemicolon() { - if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) { - this.unexpected(); - } - }; - - _proto.flowParseQualifiedTypeIdentifier = function flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - var node = id || this.parseIdentifier(); - - while (this.eat(types.dot)) { - var node2 = this.startNodeAt(startPos, startLoc); - node2.qualification = node; - node2.id = this.parseIdentifier(); - node = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - - return node; - }; - - _proto.flowParseGenericType = function flowParseGenericType(startPos, startLoc, id) { - var node = this.startNodeAt(startPos, startLoc); - node.typeParameters = null; - node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } - - return this.finishNode(node, "GenericTypeAnnotation"); - }; - - _proto.flowParseTypeofType = function flowParseTypeofType() { - var node = this.startNode(); - this.expect(types._typeof); - node.argument = this.flowParsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - }; - - _proto.flowParseTupleType = function flowParseTupleType() { - var node = this.startNode(); - node.types = []; - this.expect(types.bracketL); - - while (this.state.pos < this.input.length && !this.match(types.bracketR)) { - node.types.push(this.flowParseType()); - if (this.match(types.bracketR)) break; - this.expect(types.comma); - } - - this.expect(types.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); - }; - - _proto.flowParseFunctionTypeParam = function flowParseFunctionTypeParam() { - var name = null; - var optional = false; - var typeAnnotation = null; - var node = this.startNode(); - var lh = this.lookahead(); - - if (lh.type === types.colon || lh.type === types.question) { - name = this.parseIdentifier(); - - if (this.eat(types.question)) { - optional = true; - } - - typeAnnotation = this.flowParseTypeInitialiser(); - } else { - typeAnnotation = this.flowParseType(); - } - - node.name = name; - node.optional = optional; - node.typeAnnotation = typeAnnotation; - return this.finishNode(node, "FunctionTypeParam"); - }; - - _proto.reinterpretTypeAsFunctionTypeParam = function reinterpretTypeAsFunctionTypeParam(type) { - var node = this.startNodeAt(type.start, type.loc.start); - node.name = null; - node.optional = false; - node.typeAnnotation = type; - return this.finishNode(node, "FunctionTypeParam"); - }; - - _proto.flowParseFunctionTypeParams = function flowParseFunctionTypeParams(params) { - if (params === void 0) { - params = []; - } - - var rest = null; - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - rest = this.flowParseFunctionTypeParam(); - } - - return { - params: params, - rest: rest - }; - }; - - _proto.flowIdentToTypeAnnotation = function flowIdentToTypeAnnotation(startPos, startLoc, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); - - case "void": - return this.finishNode(node, "VoidTypeAnnotation"); - - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); - - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); - - case "empty": - return this.finishNode(node, "EmptyTypeAnnotation"); - - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); - - case "string": - return this.finishNode(node, "StringTypeAnnotation"); - - default: - return this.flowParseGenericType(startPos, startLoc, id); - } - }; - - _proto.flowParsePrimaryType = function flowParsePrimaryType() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var node = this.startNode(); - var tmp; - var type; - var isGroupedType = false; - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - - switch (this.state.type) { - case types.name: - return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); - - case types.braceL: - return this.flowParseObjectType(false, false, true); - - case types.braceBarL: - return this.flowParseObjectType(false, true, true); - - case types.bracketL: - return this.flowParseTupleType(); - - case types.relational: - if (this.state.value === "<") { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(types.parenL); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - break; - - case types.parenL: - this.next(); - - if (!this.match(types.parenR) && !this.match(types.ellipsis)) { - if (this.match(types.name)) { - var token = this.lookahead().type; - isGroupedType = token !== types.question && token !== types.colon; - } else { - isGroupedType = true; - } - } - - if (isGroupedType) { - this.state.noAnonFunctionType = false; - type = this.flowParseType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - - if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) { - this.expect(types.parenR); - return type; - } else { - this.eat(types.comma); - } - } - - if (type) { - tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); - } else { - tmp = this.flowParseFunctionTypeParams(); - } - - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); - - case types._true: - case types._false: - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteralTypeAnnotation"); - - case types.plusMin: - if (this.state.value === "-") { - this.next(); - - if (!this.match(types.num)) { - this.unexpected(null, "Unexpected token, expected \"number\""); - } - - return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start); - } - - this.unexpected(); - - case types.num: - return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); - - case types._null: - this.next(); - return this.finishNode(node, "NullLiteralTypeAnnotation"); - - case types._this: - this.next(); - return this.finishNode(node, "ThisTypeAnnotation"); - - case types.star: - this.next(); - return this.finishNode(node, "ExistsTypeAnnotation"); - - default: - if (this.state.type.keyword === "typeof") { - return this.flowParseTypeofType(); - } - - } - - throw this.unexpected(); - }; - - _proto.flowParsePostfixType = function flowParsePostfixType() { - var startPos = this.state.start, - startLoc = this.state.startLoc; - var type = this.flowParsePrimaryType(); - - while (!this.canInsertSemicolon() && this.match(types.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.elementType = type; - this.expect(types.bracketL); - this.expect(types.bracketR); - type = this.finishNode(node, "ArrayTypeAnnotation"); - } - - return type; - }; - - _proto.flowParsePrefixType = function flowParsePrefixType() { - var node = this.startNode(); - - if (this.eat(types.question)) { - node.typeAnnotation = this.flowParsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } else { - return this.flowParsePostfixType(); - } - }; - - _proto.flowParseAnonFunctionWithoutParens = function flowParseAnonFunctionWithoutParens() { - var param = this.flowParsePrefixType(); - - if (!this.state.noAnonFunctionType && this.eat(types.arrow)) { - var node = this.startNodeAt(param.start, param.loc.start); - node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; - node.rest = null; - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - return param; - }; - - _proto.flowParseIntersectionType = function flowParseIntersectionType() { - var node = this.startNode(); - this.eat(types.bitwiseAND); - var type = this.flowParseAnonFunctionWithoutParens(); - node.types = [type]; - - while (this.eat(types.bitwiseAND)) { - node.types.push(this.flowParseAnonFunctionWithoutParens()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); - }; - - _proto.flowParseUnionType = function flowParseUnionType() { - var node = this.startNode(); - this.eat(types.bitwiseOR); - var type = this.flowParseIntersectionType(); - node.types = [type]; - - while (this.eat(types.bitwiseOR)) { - node.types.push(this.flowParseIntersectionType()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); - }; - - _proto.flowParseType = function flowParseType() { - var oldInType = this.state.inType; - this.state.inType = true; - var type = this.flowParseUnionType(); - this.state.inType = oldInType; - this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType; - return type; - }; - - _proto.flowParseTypeAnnotation = function flowParseTypeAnnotation() { - var node = this.startNode(); - node.typeAnnotation = this.flowParseTypeInitialiser(); - return this.finishNode(node, "TypeAnnotation"); - }; - - _proto.flowParseTypeAnnotatableIdentifier = function flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { - var ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); - - if (this.match(types.colon)) { - ident.typeAnnotation = this.flowParseTypeAnnotation(); - this.finishNode(ident, ident.type); - } - - return ident; - }; - - _proto.typeCastToParameter = function typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end); - }; - - _proto.flowParseVariance = function flowParseVariance() { - var variance = null; - - if (this.match(types.plusMin)) { - variance = this.startNode(); - - if (this.state.value === "+") { - variance.kind = "plus"; - } else { - variance.kind = "minus"; - } - - this.next(); - this.finishNode(variance, "Variance"); - } - - return variance; - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpressionBody) { - var _this2 = this; - - if (allowExpressionBody) { - return this.forwardNoArrowParamsConversionAt(node, function () { - return _superClass.prototype.parseFunctionBody.call(_this2, node, true); - }); - } - - return _superClass.prototype.parseFunctionBody.call(this, node, false); - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - if (!allowExpressionBody && this.match(types.colon)) { - var typeNode = this.startNode(); - - var _flowParseTypeAndPred2 = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.typeAnnotation = _flowParseTypeAndPred2[0]; - node.predicate = _flowParseTypeAndPred2[1]; - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } - - _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody); - }; - - _proto.parseStatement = function parseStatement(declaration, topLevel) { - if (this.state.strict && this.match(types.name) && this.state.value === "interface") { - var node = this.startNode(); - this.next(); - return this.flowParseInterface(node); - } else { - return _superClass.prototype.parseStatement.call(this, declaration, topLevel); - } - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) { - return this.flowParseDeclare(node); - } - } else if (this.match(types.name)) { - if (expr.name === "interface") { - return this.flowParseInterface(node); - } else if (expr.name === "type") { - return this.flowParseTypeAlias(node); - } else if (expr.name === "opaque") { - return this.flowParseOpaqueType(node, false); - } - } - } - - return _superClass.prototype.parseExpressionStatement.call(this, node, expr); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || _superClass.prototype.shouldParseExportDeclaration.call(this); - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value == "opaque")) { - return false; - } - - return _superClass.prototype.isExportDefaultSpecifier.call(this); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - var _this3 = this; - - if (!this.match(types.question)) return expr; - - if (refNeedsArrowPos) { - var _state = this.state.clone(); - - try { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = _state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } else { - throw err; - } - } - } - - this.expect(types.question); - var state = this.state.clone(); - var originalNoArrowAt = this.state.noArrowAt; - var node = this.startNodeAt(startPos, startLoc); - - var _tryParseConditionalC = this.tryParseConditionalConsequent(), - consequent = _tryParseConditionalC.consequent, - failed = _tryParseConditionalC.failed; - - var _getArrowLikeExpressi = this.getArrowLikeExpressions(consequent), - valid = _getArrowLikeExpressi[0], - invalid = _getArrowLikeExpressi[1]; - - if (failed || invalid.length > 0) { - var noArrowAt = originalNoArrowAt.concat(); - - if (invalid.length > 0) { - this.state = state; - this.state.noArrowAt = noArrowAt; - - for (var i = 0; i < invalid.length; i++) { - noArrowAt.push(invalid[i].start); - } - - var _tryParseConditionalC2 = this.tryParseConditionalConsequent(); - - consequent = _tryParseConditionalC2.consequent; - failed = _tryParseConditionalC2.failed; - - var _getArrowLikeExpressi2 = this.getArrowLikeExpressions(consequent); - - valid = _getArrowLikeExpressi2[0]; - invalid = _getArrowLikeExpressi2[1]; - } - - if (failed && valid.length > 1) { - this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."); - } - - if (failed && valid.length === 1) { - this.state = state; - this.state.noArrowAt = noArrowAt.concat(valid[0].start); - - var _tryParseConditionalC3 = this.tryParseConditionalConsequent(); - - consequent = _tryParseConditionalC3.consequent; - failed = _tryParseConditionalC3.failed; - } - - this.getArrowLikeExpressions(consequent, true); - } - - this.state.noArrowAt = originalNoArrowAt; - this.expect(types.colon); - node.test = expr; - node.consequent = consequent; - node.alternate = this.forwardNoArrowParamsConversionAt(node, function () { - return _this3.parseMaybeAssign(noIn, undefined, undefined, undefined); - }); - return this.finishNode(node, "ConditionalExpression"); - }; - - _proto.tryParseConditionalConsequent = function tryParseConditionalConsequent() { - this.state.noArrowParamsConversionAt.push(this.state.start); - var consequent = this.parseMaybeAssign(); - var failed = !this.match(types.colon); - this.state.noArrowParamsConversionAt.pop(); - return { - consequent: consequent, - failed: failed - }; - }; - - _proto.getArrowLikeExpressions = function getArrowLikeExpressions(node, disallowInvalid) { - var _this4 = this; - - var stack = [node]; - var arrows = []; - - while (stack.length !== 0) { - var _node = stack.pop(); - - if (_node.type === "ArrowFunctionExpression") { - if (_node.typeParameters || !_node.returnType) { - this.toAssignableList(_node.params, true, "arrow function parameters"); - - _superClass.prototype.checkFunctionNameAndParams.call(this, _node, true); - } else { - arrows.push(_node); - } - - stack.push(_node.body); - } else if (_node.type === "ConditionalExpression") { - stack.push(_node.consequent); - stack.push(_node.alternate); - } - } - - if (disallowInvalid) { - for (var i = 0; i < arrows.length; i++) { - this.toAssignableList(node.params, true, "arrow function parameters"); - } - - return [arrows, []]; - } - - return partition(arrows, function (node) { - try { - _this4.toAssignableList(node.params, true, "arrow function parameters"); - - return true; - } catch (err) { - return false; - } - }); - }; - - _proto.forwardNoArrowParamsConversionAt = function forwardNoArrowParamsConversionAt(node, parse) { - var result; - - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - this.state.noArrowParamsConversionAt.push(this.state.start); - result = parse(); - this.state.noArrowParamsConversionAt.pop(); - } else { - result = parse(); - } - - return result; - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - } - - if (this.match(types.colon)) { - var typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } - - return node; - }; - - _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) { - if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { - return; - } - - _superClass.prototype.assertModuleNodeAllowed.call(this, node); - }; - - _proto.parseExport = function parseExport(node) { - node = _superClass.prototype.parseExport.call(this, node); - - if (node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") { - node.exportKind = node.exportKind || "value"; - } - - return node; - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - if (this.isContextual("type")) { - node.exportKind = "type"; - var declarationNode = this.startNode(); - this.next(); - - if (this.match(types.braceL)) { - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - return null; - } else { - return this.flowParseTypeAlias(declarationNode); - } - } else if (this.isContextual("opaque")) { - node.exportKind = "type"; - - var _declarationNode = this.startNode(); - - this.next(); - return this.flowParseOpaqueType(_declarationNode, false); - } else if (this.isContextual("interface")) { - node.exportKind = "type"; - - var _declarationNode2 = this.startNode(); - - this.next(); - return this.flowParseInterface(_declarationNode2); - } else { - return _superClass.prototype.parseExportDeclaration.call(this, node); - } - }; - - _proto.shouldParseExportStar = function shouldParseExportStar() { - return _superClass.prototype.shouldParseExportStar.call(this) || this.isContextual("type") && this.lookahead().type === types.star; - }; - - _proto.parseExportStar = function parseExportStar(node) { - if (this.eatContextual("type")) { - node.exportKind = "type"; - } - - return _superClass.prototype.parseExportStar.call(this, node); - }; - - _proto.parseExportNamespace = function parseExportNamespace(node) { - if (node.exportKind === "type") { - this.unexpected(); - } - - return _superClass.prototype.parseExportNamespace.call(this, node); - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - }; - - _proto.isKeyword = function isKeyword$$1(name) { - if (this.state.inType && name === "void") { - return false; - } else { - return _superClass.prototype.isKeyword.call(this, name); - } - }; - - _proto.readToken = function readToken(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else if (isIteratorStart(code, next)) { - this.state.isIterator = true; - return _superClass.prototype.readWord.call(this); - } else { - return _superClass.prototype.readToken.call(this, code); - } - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (node.type === "TypeCastExpression") { - return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription); - } else { - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr.type === "TypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - - return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription); - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr._exprListItem && expr.type === "TypeCastExpression") { - this.raise(expr.start, "Unexpected type cast"); - } - } - - return exprList; - }; - - _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos) { - var container = this.startNode(); - - var node = _superClass.prototype.parseExprListItem.call(this, allowEmpty, refShorthandDefaultPos, refNeedsArrowPos); - - if (this.match(types.colon)) { - container._exprListItem = true; - container.expression = node; - container.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(container, "TypeCastExpression"); - } else { - return node; - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - if (expr.type !== "TypeCastExpression") { - return _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - } - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (this.match(types.colon)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - - return _superClass.prototype.parseClassProperty.call(this, node); - }; - - _proto.isClassMethod = function isClassMethod() { - return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.colon) || _superClass.prototype.isClassProperty.call(this); - }; - - _proto.isNonstaticConstructor = function isNonstaticConstructor(method) { - return !this.match(types.colon) && _superClass.prototype.isNonstaticConstructor.call(this, method); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync); - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - _superClass.prototype.parseClassSuper.call(this, node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.flowParseTypeParameterInstantiation(); - } - - if (this.isContextual("implements")) { - this.next(); - var implemented = node.implements = []; - - do { - var _node2 = this.startNode(); - - _node2.id = this.flowParseRestrictedIdentifier(true); - - if (this.isRelational("<")) { - _node2.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - _node2.typeParameters = null; - } - - implemented.push(this.finishNode(_node2, "ClassImplements")); - } while (this.eat(types.comma)); - } - }; - - _proto.parsePropertyName = function parsePropertyName(node) { - var variance = this.flowParseVariance(); - - var key = _superClass.prototype.parsePropertyName.call(this, node); - - node.variance = variance; - return key; - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - if (prop.variance) { - this.unexpected(prop.variance.start); - } - - delete prop.variance; - var typeParameters; - - if (this.isRelational("<")) { - typeParameters = this.flowParseTypeParameterDeclaration(); - if (!this.match(types.parenL)) this.unexpected(); - } - - _superClass.prototype.parseObjPropValue.call(this, prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); - - if (typeParameters) { - (prop.value || prop).typeParameters = typeParameters; - } - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - if (this.match(types.colon)) { - param.typeAnnotation = this.flowParseTypeAnnotation(); - } - - this.finishNode(param, param.type); - return param; - }; - - _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) { - var node = _superClass.prototype.parseMaybeDefault.call(this, startPos, startLoc, left); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - }; - - _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) { - if (!hasTypeImportKind(node)) { - return _superClass.prototype.shouldParseDefaultImport.call(this, node); - } - - return isMaybeDefaultImport(this.state); - }; - - _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier(); - this.checkLVal(specifier.local, true, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - }; - - _proto.parseImportSpecifiers = function parseImportSpecifiers(node) { - node.importKind = "value"; - var kind = null; - - if (this.match(types._typeof)) { - kind = "typeof"; - } else if (this.isContextual("type")) { - kind = "type"; - } - - if (kind) { - var lh = this.lookahead(); - - if (kind === "type" && lh.type === types.star) { - this.unexpected(lh.start); - } - - if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) { - this.next(); - node.importKind = kind; - } - } - - _superClass.prototype.parseImportSpecifiers.call(this, node); - }; - - _proto.parseImportSpecifier = function parseImportSpecifier(node) { - var specifier = this.startNode(); - var firstIdentLoc = this.state.start; - var firstIdent = this.parseIdentifier(true); - var specifierTypeKind = null; - - if (firstIdent.name === "type") { - specifierTypeKind = "type"; - } else if (firstIdent.name === "typeof") { - specifierTypeKind = "typeof"; - } - - var isBinding = false; - - if (this.isContextual("as") && !this.isLookaheadContextual("as")) { - var as_ident = this.parseIdentifier(true); - - if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) { - specifier.imported = as_ident; - specifier.importKind = specifierTypeKind; - specifier.local = as_ident.__clone(); - } else { - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = this.parseIdentifier(); - } - } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) { - specifier.imported = this.parseIdentifier(true); - specifier.importKind = specifierTypeKind; - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - isBinding = true; - specifier.local = specifier.imported.__clone(); - } - } else { - isBinding = true; - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = specifier.imported.__clone(); - } - - var nodeIsTypeImport = hasTypeImportKind(node); - var specifierIsTypeImport = hasTypeImportKind(specifier); - - if (nodeIsTypeImport && specifierIsTypeImport) { - this.raise(firstIdentLoc, "The `type` and `typeof` keywords on named imports can only be used on regular " + "`import` statements. It cannot be used with `import type` or `import typeof` statements"); - } - - if (nodeIsTypeImport || specifierIsTypeImport) { - this.checkReservedType(specifier.local.name, specifier.local.start); - } - - if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) { - this.checkReservedWord(specifier.local.name, specifier.start, true, true); - } - - this.checkLVal(specifier.local, true, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - }; - - _proto.parseFunctionParams = function parseFunctionParams(node) { - var kind = node.kind; - - if (kind !== "get" && kind !== "set" && this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.parseFunctionParams.call(this, node); - }; - - _proto.parseVarHead = function parseVarHead(decl) { - _superClass.prototype.parseVarHead.call(this, decl); - - if (this.match(types.colon)) { - decl.id.typeAnnotation = this.flowParseTypeAnnotation(); - this.finishNode(decl.id, decl.id.type); - } - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - node.returnType = this.flowParseTypeAnnotation(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - } - - return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call); - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this); - }; - - _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - var _this5 = this; - - var jsxError = null; - - if (types.jsxTagStart && this.match(types.jsxTagStart)) { - var state = this.state.clone(); - - try { - return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - this.state.context.length -= 2; - jsxError = err; - } else { - throw err; - } - } - } - - if (jsxError != null || this.isRelational("<")) { - var arrowExpression; - var typeParameters; - - try { - typeParameters = this.flowParseTypeParameterDeclaration(); - arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, function () { - return _superClass.prototype.parseMaybeAssign.call(_this5, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - }); - arrowExpression.typeParameters = typeParameters; - this.resetStartLocationFromNode(arrowExpression, typeParameters); - } catch (err) { - throw jsxError || err; - } - - if (arrowExpression.type === "ArrowFunctionExpression") { - return arrowExpression; - } else if (jsxError != null) { - throw jsxError; - } else { - this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration"); - } - } - - return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.match(types.colon)) { - var state = this.state.clone(); - - try { - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - var typeNode = this.startNode(); - - var _flowParseTypeAndPred3 = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.typeAnnotation = _flowParseTypeAndPred3[0]; - node.predicate = _flowParseTypeAndPred3[1]; - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(types.arrow)) this.unexpected(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return _superClass.prototype.parseArrow.call(this, node); - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this); - }; - - _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) { - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - node.params = params; - } else { - _superClass.prototype.setArrowFunctionParameters.call(this, node, params); - } - }; - - _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) { - if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - return; - } - - return _superClass.prototype.checkFunctionNameAndParams.call(this, node, isArrowFunction); - }; - - _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) { - return _superClass.prototype.parseParenAndDistinguishExpression.call(this, canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); - }; - - _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { - this.next(); - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) { - var state = this.state.clone(); - var error; - - try { - var _node3 = this.parseAsyncArrowWithTypeParameters(startPos, startLoc); - - if (_node3) return _node3; - } catch (e) { - error = e; - } - - this.state = state; - - try { - return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls); - } catch (e) { - throw error || e; - } - } - - return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls); - }; - - _proto.parseAsyncArrowWithTypeParameters = function parseAsyncArrowWithTypeParameters(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - this.parseFunctionParams(node); - if (!this.parseArrow(node)) return; - return this.parseArrowExpression(node, undefined, true); - }; - - _proto.readToken_mult_modulo = function readToken_mult_modulo(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 42 && next === 47 && this.state.hasFlowComment) { - this.state.hasFlowComment = false; - this.state.pos += 2; - this.nextToken(); - return; - } - - _superClass.prototype.readToken_mult_modulo.call(this, code); - }; - - _proto.skipBlockComment = function skipBlockComment() { - if (this.hasPlugin("flow") && this.hasPlugin("flowComments") && this.skipFlowComment()) { - this.hasFlowCommentCompletion(); - this.state.pos += this.skipFlowComment(); - this.state.hasFlowComment = true; - return; - } - - var end; - - if (this.hasPlugin("flow") && this.state.hasFlowComment) { - end = this.input.indexOf("*-/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 3; - return; - } - - _superClass.prototype.skipBlockComment.call(this); - }; - - _proto.skipFlowComment = function skipFlowComment() { - var ch2 = this.input.charCodeAt(this.state.pos + 2); - var ch3 = this.input.charCodeAt(this.state.pos + 3); - - if (ch2 === 58 && ch3 === 58) { - return 4; - } - - if (this.input.slice(this.state.pos + 2, 14) === "flow-include") { - return 14; - } - - if (ch2 === 58 && ch3 !== 58 && 2) { - return 2; - } - - return false; - }; - - _proto.hasFlowCommentCompletion = function hasFlowCommentCompletion() { - var end = this.input.indexOf("*/", this.state.pos); - - if (end === -1) { - this.raise(this.state.pos, "Unterminated comment"); - } - }; - - return _class; - }(superClass); -}); - -var entities = { - quot: "\"", - amp: "&", - apos: "'", - lt: "<", - gt: ">", - nbsp: "\xA0", - iexcl: "\xA1", - cent: "\xA2", - pound: "\xA3", - curren: "\xA4", - yen: "\xA5", - brvbar: "\xA6", - sect: "\xA7", - uml: "\xA8", - copy: "\xA9", - ordf: "\xAA", - laquo: "\xAB", - not: "\xAC", - shy: "\xAD", - reg: "\xAE", - macr: "\xAF", - deg: "\xB0", - plusmn: "\xB1", - sup2: "\xB2", - sup3: "\xB3", - acute: "\xB4", - micro: "\xB5", - para: "\xB6", - middot: "\xB7", - cedil: "\xB8", - sup1: "\xB9", - ordm: "\xBA", - raquo: "\xBB", - frac14: "\xBC", - frac12: "\xBD", - frac34: "\xBE", - iquest: "\xBF", - Agrave: "\xC0", - Aacute: "\xC1", - Acirc: "\xC2", - Atilde: "\xC3", - Auml: "\xC4", - Aring: "\xC5", - AElig: "\xC6", - Ccedil: "\xC7", - Egrave: "\xC8", - Eacute: "\xC9", - Ecirc: "\xCA", - Euml: "\xCB", - Igrave: "\xCC", - Iacute: "\xCD", - Icirc: "\xCE", - Iuml: "\xCF", - ETH: "\xD0", - Ntilde: "\xD1", - Ograve: "\xD2", - Oacute: "\xD3", - Ocirc: "\xD4", - Otilde: "\xD5", - Ouml: "\xD6", - times: "\xD7", - Oslash: "\xD8", - Ugrave: "\xD9", - Uacute: "\xDA", - Ucirc: "\xDB", - Uuml: "\xDC", - Yacute: "\xDD", - THORN: "\xDE", - szlig: "\xDF", - agrave: "\xE0", - aacute: "\xE1", - acirc: "\xE2", - atilde: "\xE3", - auml: "\xE4", - aring: "\xE5", - aelig: "\xE6", - ccedil: "\xE7", - egrave: "\xE8", - eacute: "\xE9", - ecirc: "\xEA", - euml: "\xEB", - igrave: "\xEC", - iacute: "\xED", - icirc: "\xEE", - iuml: "\xEF", - eth: "\xF0", - ntilde: "\xF1", - ograve: "\xF2", - oacute: "\xF3", - ocirc: "\xF4", - otilde: "\xF5", - ouml: "\xF6", - divide: "\xF7", - oslash: "\xF8", - ugrave: "\xF9", - uacute: "\xFA", - ucirc: "\xFB", - uuml: "\xFC", - yacute: "\xFD", - thorn: "\xFE", - yuml: "\xFF", - OElig: "\u0152", - oelig: "\u0153", - Scaron: "\u0160", - scaron: "\u0161", - Yuml: "\u0178", - fnof: "\u0192", - circ: "\u02C6", - tilde: "\u02DC", - Alpha: "\u0391", - Beta: "\u0392", - Gamma: "\u0393", - Delta: "\u0394", - Epsilon: "\u0395", - Zeta: "\u0396", - Eta: "\u0397", - Theta: "\u0398", - Iota: "\u0399", - Kappa: "\u039A", - Lambda: "\u039B", - Mu: "\u039C", - Nu: "\u039D", - Xi: "\u039E", - Omicron: "\u039F", - Pi: "\u03A0", - Rho: "\u03A1", - Sigma: "\u03A3", - Tau: "\u03A4", - Upsilon: "\u03A5", - Phi: "\u03A6", - Chi: "\u03A7", - Psi: "\u03A8", - Omega: "\u03A9", - alpha: "\u03B1", - beta: "\u03B2", - gamma: "\u03B3", - delta: "\u03B4", - epsilon: "\u03B5", - zeta: "\u03B6", - eta: "\u03B7", - theta: "\u03B8", - iota: "\u03B9", - kappa: "\u03BA", - lambda: "\u03BB", - mu: "\u03BC", - nu: "\u03BD", - xi: "\u03BE", - omicron: "\u03BF", - pi: "\u03C0", - rho: "\u03C1", - sigmaf: "\u03C2", - sigma: "\u03C3", - tau: "\u03C4", - upsilon: "\u03C5", - phi: "\u03C6", - chi: "\u03C7", - psi: "\u03C8", - omega: "\u03C9", - thetasym: "\u03D1", - upsih: "\u03D2", - piv: "\u03D6", - ensp: "\u2002", - emsp: "\u2003", - thinsp: "\u2009", - zwnj: "\u200C", - zwj: "\u200D", - lrm: "\u200E", - rlm: "\u200F", - ndash: "\u2013", - mdash: "\u2014", - lsquo: "\u2018", - rsquo: "\u2019", - sbquo: "\u201A", - ldquo: "\u201C", - rdquo: "\u201D", - bdquo: "\u201E", - dagger: "\u2020", - Dagger: "\u2021", - bull: "\u2022", - hellip: "\u2026", - permil: "\u2030", - prime: "\u2032", - Prime: "\u2033", - lsaquo: "\u2039", - rsaquo: "\u203A", - oline: "\u203E", - frasl: "\u2044", - euro: "\u20AC", - image: "\u2111", - weierp: "\u2118", - real: "\u211C", - trade: "\u2122", - alefsym: "\u2135", - larr: "\u2190", - uarr: "\u2191", - rarr: "\u2192", - darr: "\u2193", - harr: "\u2194", - crarr: "\u21B5", - lArr: "\u21D0", - uArr: "\u21D1", - rArr: "\u21D2", - dArr: "\u21D3", - hArr: "\u21D4", - forall: "\u2200", - part: "\u2202", - exist: "\u2203", - empty: "\u2205", - nabla: "\u2207", - isin: "\u2208", - notin: "\u2209", - ni: "\u220B", - prod: "\u220F", - sum: "\u2211", - minus: "\u2212", - lowast: "\u2217", - radic: "\u221A", - prop: "\u221D", - infin: "\u221E", - ang: "\u2220", - and: "\u2227", - or: "\u2228", - cap: "\u2229", - cup: "\u222A", - int: "\u222B", - there4: "\u2234", - sim: "\u223C", - cong: "\u2245", - asymp: "\u2248", - ne: "\u2260", - equiv: "\u2261", - le: "\u2264", - ge: "\u2265", - sub: "\u2282", - sup: "\u2283", - nsub: "\u2284", - sube: "\u2286", - supe: "\u2287", - oplus: "\u2295", - otimes: "\u2297", - perp: "\u22A5", - sdot: "\u22C5", - lceil: "\u2308", - rceil: "\u2309", - lfloor: "\u230A", - rfloor: "\u230B", - lang: "\u2329", - rang: "\u232A", - loz: "\u25CA", - spades: "\u2660", - clubs: "\u2663", - hearts: "\u2665", - diams: "\u2666" -}; - -var HEX_NUMBER = /^[\da-fA-F]+$/; -var DECIMAL_NUMBER = /^\d+$/; -types$1.j_oTag = new TokContext("...", true, true); -types.jsxName = new TokenType("jsxName"); -types.jsxText = new TokenType("jsxText", { - beforeExpr: true -}); -types.jsxTagStart = new TokenType("jsxTagStart", { - startsExpr: true -}); -types.jsxTagEnd = new TokenType("jsxTagEnd"); - -types.jsxTagStart.updateContext = function () { - this.state.context.push(types$1.j_expr); - this.state.context.push(types$1.j_oTag); - this.state.exprAllowed = false; -}; - -types.jsxTagEnd.updateContext = function (prevType) { - var out = this.state.context.pop(); - - if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) { - this.state.context.pop(); - this.state.exprAllowed = this.curContext() === types$1.j_expr; - } else { - this.state.exprAllowed = true; - } -}; - -function isFragment(object) { - return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; -} - -function getQualifiedJSXName(object) { - if (object.type === "JSXIdentifier") { - return object.name; - } - - if (object.type === "JSXNamespacedName") { - return object.namespace.name + ":" + object.name.name; - } - - if (object.type === "JSXMemberExpression") { - return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); - } - - throw new Error("Node had unexpected type: " + object.type); -} - -var jsxPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.jsxReadToken = function jsxReadToken() { - var out = ""; - var chunkStart = this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated JSX contents"); - } - - var ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 60: - case 123: - if (this.state.pos === this.state.start) { - if (ch === 60 && this.state.exprAllowed) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return this.getTokenFromCode(ch); - } - - out += this.input.slice(chunkStart, this.state.pos); - return this.finishToken(types.jsxText, out); - - case 38: - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - break; - - default: - if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(true); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - - } - } - }; - - _proto.jsxReadNewLine = function jsxReadNewLine(normalizeCRLF) { - var ch = this.input.charCodeAt(this.state.pos); - var out; - ++this.state.pos; - - if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - out = normalizeCRLF ? "\n" : "\r\n"; - } else { - out = String.fromCharCode(ch); - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - return out; - }; - - _proto.jsxReadString = function jsxReadString(quote) { - var out = ""; - var chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - var ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 38) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(false); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - return this.finishToken(types.string, out); - }; - - _proto.jsxReadEntity = function jsxReadEntity() { - var str = ""; - var count = 0; - var entity; - var ch = this.input[this.state.pos]; - var startPos = ++this.state.pos; - - while (this.state.pos < this.input.length && count++ < 10) { - ch = this.input[this.state.pos++]; - - if (ch === ";") { - if (str[0] === "#") { - if (str[1] === "x") { - str = str.substr(2); - - if (HEX_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 16)); - } - } else { - str = str.substr(1); - - if (DECIMAL_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 10)); - } - } - } else { - entity = entities[str]; - } - - break; - } - - str += ch; - } - - if (!entity) { - this.state.pos = startPos; - return "&"; - } - - return entity; - }; - - _proto.jsxReadWord = function jsxReadWord() { - var ch; - var start = this.state.pos; - - do { - ch = this.input.charCodeAt(++this.state.pos); - } while (isIdentifierChar(ch) || ch === 45); - - return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos)); - }; - - _proto.jsxParseIdentifier = function jsxParseIdentifier() { - var node = this.startNode(); - - if (this.match(types.jsxName)) { - node.name = this.state.value; - } else if (this.state.type.keyword) { - node.name = this.state.type.keyword; - } else { - this.unexpected(); - } - - this.next(); - return this.finishNode(node, "JSXIdentifier"); - }; - - _proto.jsxParseNamespacedName = function jsxParseNamespacedName() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var name = this.jsxParseIdentifier(); - if (!this.eat(types.colon)) return name; - var node = this.startNodeAt(startPos, startLoc); - node.namespace = name; - node.name = this.jsxParseIdentifier(); - return this.finishNode(node, "JSXNamespacedName"); - }; - - _proto.jsxParseElementName = function jsxParseElementName() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var node = this.jsxParseNamespacedName(); - - while (this.eat(types.dot)) { - var newNode = this.startNodeAt(startPos, startLoc); - newNode.object = node; - newNode.property = this.jsxParseIdentifier(); - node = this.finishNode(newNode, "JSXMemberExpression"); - } - - return node; - }; - - _proto.jsxParseAttributeValue = function jsxParseAttributeValue() { - var node; - - switch (this.state.type) { - case types.braceL: - node = this.jsxParseExpressionContainer(); - - if (node.expression.type === "JSXEmptyExpression") { - throw this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); - } else { - return node; - } - - case types.jsxTagStart: - case types.string: - return this.parseExprAtom(); - - default: - throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text"); - } - }; - - _proto.jsxParseEmptyExpression = function jsxParseEmptyExpression() { - var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); - return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc); - }; - - _proto.jsxParseSpreadChild = function jsxParseSpreadChild() { - var node = this.startNode(); - this.expect(types.braceL); - this.expect(types.ellipsis); - node.expression = this.parseExpression(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadChild"); - }; - - _proto.jsxParseExpressionContainer = function jsxParseExpressionContainer() { - var node = this.startNode(); - this.next(); - - if (this.match(types.braceR)) { - node.expression = this.jsxParseEmptyExpression(); - } else { - node.expression = this.parseExpression(); - } - - this.expect(types.braceR); - return this.finishNode(node, "JSXExpressionContainer"); - }; - - _proto.jsxParseAttribute = function jsxParseAttribute() { - var node = this.startNode(); - - if (this.eat(types.braceL)) { - this.expect(types.ellipsis); - node.argument = this.parseMaybeAssign(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadAttribute"); - } - - node.name = this.jsxParseNamespacedName(); - node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null; - return this.finishNode(node, "JSXAttribute"); - }; - - _proto.jsxParseOpeningElementAt = function jsxParseOpeningElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningFragment"); - } - - node.attributes = []; - node.name = this.jsxParseElementName(); - - while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) { - node.attributes.push(this.jsxParseAttribute()); - } - - node.selfClosing = this.eat(types.slash); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningElement"); - }; - - _proto.jsxParseClosingElementAt = function jsxParseClosingElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingFragment"); - } - - node.name = this.jsxParseElementName(); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingElement"); - }; - - _proto.jsxParseElementAt = function jsxParseElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - var children = []; - var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); - var closingElement = null; - - if (!openingElement.selfClosing) { - contents: for (;;) { - switch (this.state.type) { - case types.jsxTagStart: - startPos = this.state.start; - startLoc = this.state.startLoc; - this.next(); - - if (this.eat(types.slash)) { - closingElement = this.jsxParseClosingElementAt(startPos, startLoc); - break contents; - } - - children.push(this.jsxParseElementAt(startPos, startLoc)); - break; - - case types.jsxText: - children.push(this.parseExprAtom()); - break; - - case types.braceL: - if (this.lookahead().type === types.ellipsis) { - children.push(this.jsxParseSpreadChild()); - } else { - children.push(this.jsxParseExpressionContainer()); - } - - break; - - default: - throw this.unexpected(); - } - } - - if (isFragment(openingElement) && !isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>"); - } else if (!isFragment(openingElement) && isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } else if (!isFragment(openingElement) && !isFragment(closingElement)) { - if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } - } - } - - if (isFragment(openingElement)) { - node.openingFragment = openingElement; - node.closingFragment = closingElement; - } else { - node.openingElement = openingElement; - node.closingElement = closingElement; - } - - node.children = children; - - if (this.match(types.relational) && this.state.value === "<") { - this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...?"); - } - - return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); - }; - - _proto.jsxParseElement = function jsxParseElement() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - this.next(); - return this.jsxParseElementAt(startPos, startLoc); - }; - - _proto.parseExprAtom = function parseExprAtom(refShortHandDefaultPos) { - if (this.match(types.jsxText)) { - return this.parseLiteral(this.state.value, "JSXText"); - } else if (this.match(types.jsxTagStart)) { - return this.jsxParseElement(); - } else { - return _superClass.prototype.parseExprAtom.call(this, refShortHandDefaultPos); - } - }; - - _proto.readToken = function readToken(code) { - if (this.state.inPropertyName) return _superClass.prototype.readToken.call(this, code); - var context = this.curContext(); - - if (context === types$1.j_expr) { - return this.jsxReadToken(); - } - - if (context === types$1.j_oTag || context === types$1.j_cTag) { - if (isIdentifierStart(code)) { - return this.jsxReadWord(); - } - - if (code === 62) { - ++this.state.pos; - return this.finishToken(types.jsxTagEnd); - } - - if ((code === 34 || code === 39) && context === types$1.j_oTag) { - return this.jsxReadString(code); - } - } - - if (code === 60 && this.state.exprAllowed) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return _superClass.prototype.readToken.call(this, code); - }; - - _proto.updateContext = function updateContext(prevType) { - if (this.match(types.braceL)) { - var curContext = this.curContext(); - - if (curContext === types$1.j_oTag) { - this.state.context.push(types$1.braceExpression); - } else if (curContext === types$1.j_expr) { - this.state.context.push(types$1.templateQuasi); - } else { - _superClass.prototype.updateContext.call(this, prevType); - } - - this.state.exprAllowed = true; - } else if (this.match(types.slash) && prevType === types.jsxTagStart) { - this.state.context.length -= 2; - this.state.context.push(types$1.j_cTag); - this.state.exprAllowed = false; - } else { - return _superClass.prototype.updateContext.call(this, prevType); - } - }; - - return _class; - }(superClass); -}); - -function nonNull(x) { - if (x == null) { - throw new Error("Unexpected " + x + " value."); - } - - return x; -} - -function assert(x) { - if (!x) { - throw new Error("Assert fail"); - } -} - -function keywordTypeFromName(value) { - switch (value) { - case "any": - return "TSAnyKeyword"; - - case "boolean": - return "TSBooleanKeyword"; - - case "never": - return "TSNeverKeyword"; - - case "number": - return "TSNumberKeyword"; - - case "object": - return "TSObjectKeyword"; - - case "string": - return "TSStringKeyword"; - - case "symbol": - return "TSSymbolKeyword"; - - case "undefined": - return "TSUndefinedKeyword"; - - default: - return undefined; - } -} - -var typescriptPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.tsIsIdentifier = function tsIsIdentifier() { - return this.match(types.name); - }; - - _proto.tsNextTokenCanFollowModifier = function tsNextTokenCanFollowModifier() { - this.next(); - return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question); - }; - - _proto.tsParseModifier = function tsParseModifier(allowedModifiers) { - if (!this.match(types.name)) { - return undefined; - } - - var modifier = this.state.value; - - if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { - return modifier; - } - - return undefined; - }; - - _proto.tsIsListTerminator = function tsIsListTerminator(kind) { - switch (kind) { - case "EnumMembers": - case "TypeMembers": - return this.match(types.braceR); - - case "HeritageClauseElement": - return this.match(types.braceL); - - case "TupleElementTypes": - return this.match(types.bracketR); - - case "TypeParametersOrArguments": - return this.isRelational(">"); - } - - throw new Error("Unreachable"); - }; - - _proto.tsParseList = function tsParseList(kind, parseElement) { - var result = []; - - while (!this.tsIsListTerminator(kind)) { - result.push(parseElement()); - } - - return result; - }; - - _proto.tsParseDelimitedList = function tsParseDelimitedList(kind, parseElement) { - return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true)); - }; - - _proto.tsTryParseDelimitedList = function tsTryParseDelimitedList(kind, parseElement) { - return this.tsParseDelimitedListWorker(kind, parseElement, false); - }; - - _proto.tsParseDelimitedListWorker = function tsParseDelimitedListWorker(kind, parseElement, expectSuccess) { - var result = []; - - while (true) { - if (this.tsIsListTerminator(kind)) { - break; - } - - var element = parseElement(); - - if (element == null) { - return undefined; - } - - result.push(element); - - if (this.eat(types.comma)) { - continue; - } - - if (this.tsIsListTerminator(kind)) { - break; - } - - if (expectSuccess) { - this.expect(types.comma); - } - - return undefined; - } - - return result; - }; - - _proto.tsParseBracketedList = function tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) { - if (!skipFirstToken) { - if (bracket) { - this.expect(types.bracketL); - } else { - this.expectRelational("<"); - } - } - - var result = this.tsParseDelimitedList(kind, parseElement); - - if (bracket) { - this.expect(types.bracketR); - } else { - this.expectRelational(">"); - } - - return result; - }; - - _proto.tsParseEntityName = function tsParseEntityName(allowReservedWords) { - var entity = this.parseIdentifier(); - - while (this.eat(types.dot)) { - var node = this.startNodeAtNode(entity); - node.left = entity; - node.right = this.parseIdentifier(allowReservedWords); - entity = this.finishNode(node, "TSQualifiedName"); - } - - return entity; - }; - - _proto.tsParseTypeReference = function tsParseTypeReference() { - var node = this.startNode(); - node.typeName = this.tsParseEntityName(false); - - if (!this.hasPrecedingLineBreak() && this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSTypeReference"); - }; - - _proto.tsParseThisTypePredicate = function tsParseThisTypePredicate(lhs) { - this.next(); - var node = this.startNode(); - node.parameterName = lhs; - node.typeAnnotation = this.tsParseTypeAnnotation(false); - return this.finishNode(node, "TSTypePredicate"); - }; - - _proto.tsParseThisTypeNode = function tsParseThisTypeNode() { - var node = this.startNode(); - this.next(); - return this.finishNode(node, "TSThisType"); - }; - - _proto.tsParseTypeQuery = function tsParseTypeQuery() { - var node = this.startNode(); - this.expect(types._typeof); - node.exprName = this.tsParseEntityName(true); - return this.finishNode(node, "TSTypeQuery"); - }; - - _proto.tsParseTypeParameter = function tsParseTypeParameter() { - var node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsEatThenParseType(types._extends); - node.default = this.tsEatThenParseType(types.eq); - return this.finishNode(node, "TSTypeParameter"); - }; - - _proto.tsTryParseTypeParameters = function tsTryParseTypeParameters() { - if (this.isRelational("<")) { - return this.tsParseTypeParameters(); - } - }; - - _proto.tsParseTypeParameters = function tsParseTypeParameters() { - var node = this.startNode(); - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true); - return this.finishNode(node, "TSTypeParameterDeclaration"); - }; - - _proto.tsFillSignature = function tsFillSignature(returnToken, signature) { - var returnTokenRequired = returnToken === types.arrow; - signature.typeParameters = this.tsTryParseTypeParameters(); - this.expect(types.parenL); - signature.parameters = this.tsParseBindingListForSignature(); - - if (returnTokenRequired) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } else if (this.match(returnToken)) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } - }; - - _proto.tsParseBindingListForSignature = function tsParseBindingListForSignature() { - var _this = this; - - return this.parseBindingList(types.parenR).map(function (pattern) { - if (pattern.type !== "Identifier" && pattern.type !== "RestElement") { - throw _this.unexpected(pattern.start, "Name in a signature must be an Identifier."); - } - - return pattern; - }); - }; - - _proto.tsParseTypeMemberSemicolon = function tsParseTypeMemberSemicolon() { - if (!this.eat(types.comma)) { - this.semicolon(); - } - }; - - _proto.tsParseSignatureMember = function tsParseSignatureMember(kind) { - var node = this.startNode(); - - if (kind === "TSConstructSignatureDeclaration") { - this.expect(types._new); - } - - this.tsFillSignature(types.colon, node); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, kind); - }; - - _proto.tsIsUnambiguouslyIndexSignature = function tsIsUnambiguouslyIndexSignature() { - this.next(); - return this.eat(types.name) && this.match(types.colon); - }; - - _proto.tsTryParseIndexSignature = function tsTryParseIndexSignature(node) { - if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { - return undefined; - } - - this.expect(types.bracketL); - var id = this.parseIdentifier(); - this.expect(types.colon); - id.typeAnnotation = this.tsParseTypeAnnotation(false); - this.expect(types.bracketR); - node.parameters = [id]; - var type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, "TSIndexSignature"); - }; - - _proto.tsParsePropertyOrMethodSignature = function tsParsePropertyOrMethodSignature(node, readonly) { - this.parsePropertyName(node); - if (this.eat(types.question)) node.optional = true; - var nodeAny = node; - - if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) { - var method = nodeAny; - this.tsFillSignature(types.colon, method); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(method, "TSMethodSignature"); - } else { - var property = nodeAny; - if (readonly) property.readonly = true; - var type = this.tsTryParseTypeAnnotation(); - if (type) property.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(property, "TSPropertySignature"); - } - }; - - _proto.tsParseTypeMember = function tsParseTypeMember() { - if (this.match(types.parenL) || this.isRelational("<")) { - return this.tsParseSignatureMember("TSCallSignatureDeclaration"); - } - - if (this.match(types._new) && this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this))) { - return this.tsParseSignatureMember("TSConstructSignatureDeclaration"); - } - - var node = this.startNode(); - var readonly = !!this.tsParseModifier(["readonly"]); - var idx = this.tsTryParseIndexSignature(node); - - if (idx) { - if (readonly) node.readonly = true; - return idx; - } - - return this.tsParsePropertyOrMethodSignature(node, readonly); - }; - - _proto.tsIsStartOfConstructSignature = function tsIsStartOfConstructSignature() { - this.next(); - return this.match(types.parenL) || this.isRelational("<"); - }; - - _proto.tsParseTypeLiteral = function tsParseTypeLiteral() { - var node = this.startNode(); - node.members = this.tsParseObjectTypeMembers(); - return this.finishNode(node, "TSTypeLiteral"); - }; - - _proto.tsParseObjectTypeMembers = function tsParseObjectTypeMembers() { - this.expect(types.braceL); - var members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); - this.expect(types.braceR); - return members; - }; - - _proto.tsIsStartOfMappedType = function tsIsStartOfMappedType() { - this.next(); - - if (this.eat(types.plusMin)) { - return this.isContextual("readonly"); - } - - if (this.isContextual("readonly")) { - this.next(); - } - - if (!this.match(types.bracketL)) { - return false; - } - - this.next(); - - if (!this.tsIsIdentifier()) { - return false; - } - - this.next(); - return this.match(types._in); - }; - - _proto.tsParseMappedTypeParameter = function tsParseMappedTypeParameter() { - var node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsExpectThenParseType(types._in); - return this.finishNode(node, "TSTypeParameter"); - }; - - _proto.tsParseMappedType = function tsParseMappedType() { - var node = this.startNode(); - this.expect(types.braceL); - - if (this.match(types.plusMin)) { - node.readonly = this.state.value; - this.next(); - this.expectContextual("readonly"); - } else if (this.eatContextual("readonly")) { - node.readonly = true; - } - - this.expect(types.bracketL); - node.typeParameter = this.tsParseMappedTypeParameter(); - this.expect(types.bracketR); - - if (this.match(types.plusMin)) { - node.optional = this.state.value; - this.next(); - this.expect(types.question); - } else if (this.eat(types.question)) { - node.optional = true; - } - - node.typeAnnotation = this.tsTryParseType(); - this.semicolon(); - this.expect(types.braceR); - return this.finishNode(node, "TSMappedType"); - }; - - _proto.tsParseTupleType = function tsParseTupleType() { - var node = this.startNode(); - node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseType.bind(this), true, false); - return this.finishNode(node, "TSTupleType"); - }; - - _proto.tsParseParenthesizedType = function tsParseParenthesizedType() { - var node = this.startNode(); - this.expect(types.parenL); - node.typeAnnotation = this.tsParseType(); - this.expect(types.parenR); - return this.finishNode(node, "TSParenthesizedType"); - }; - - _proto.tsParseFunctionOrConstructorType = function tsParseFunctionOrConstructorType(type) { - var node = this.startNode(); - - if (type === "TSConstructorType") { - this.expect(types._new); - } - - this.tsFillSignature(types.arrow, node); - return this.finishNode(node, type); - }; - - _proto.tsParseLiteralTypeNode = function tsParseLiteralTypeNode() { - var _this2 = this; - - var node = this.startNode(); - - node.literal = function () { - switch (_this2.state.type) { - case types.num: - return _this2.parseLiteral(_this2.state.value, "NumericLiteral"); - - case types.string: - return _this2.parseLiteral(_this2.state.value, "StringLiteral"); - - case types._true: - case types._false: - return _this2.parseBooleanLiteral(); - - default: - throw _this2.unexpected(); - } - }(); - - return this.finishNode(node, "TSLiteralType"); - }; - - _proto.tsParseNonArrayType = function tsParseNonArrayType() { - switch (this.state.type) { - case types.name: - case types._void: - case types._null: - { - var type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value); - - if (type !== undefined && this.lookahead().type !== types.dot) { - var node = this.startNode(); - this.next(); - return this.finishNode(node, type); - } - - return this.tsParseTypeReference(); - } - - case types.string: - case types.num: - case types._true: - case types._false: - return this.tsParseLiteralTypeNode(); - - case types.plusMin: - if (this.state.value === "-") { - var _node = this.startNode(); - - this.next(); - - if (!this.match(types.num)) { - throw this.unexpected(); - } - - _node.literal = this.parseLiteral(-this.state.value, "NumericLiteral", _node.start, _node.loc.start); - return this.finishNode(_node, "TSLiteralType"); - } - - break; - - case types._this: - { - var thisKeyword = this.tsParseThisTypeNode(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - return this.tsParseThisTypePredicate(thisKeyword); - } else { - return thisKeyword; - } - } - - case types._typeof: - return this.tsParseTypeQuery(); - - case types.braceL: - return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); - - case types.bracketL: - return this.tsParseTupleType(); - - case types.parenL: - return this.tsParseParenthesizedType(); - } - - throw this.unexpected(); - }; - - _proto.tsParseArrayTypeOrHigher = function tsParseArrayTypeOrHigher() { - var type = this.tsParseNonArrayType(); - - while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) { - if (this.match(types.bracketR)) { - var node = this.startNodeAtNode(type); - node.elementType = type; - this.expect(types.bracketR); - type = this.finishNode(node, "TSArrayType"); - } else { - var _node2 = this.startNodeAtNode(type); - - _node2.objectType = type; - _node2.indexType = this.tsParseType(); - this.expect(types.bracketR); - type = this.finishNode(_node2, "TSIndexedAccessType"); - } - } - - return type; - }; - - _proto.tsParseTypeOperator = function tsParseTypeOperator(operator) { - var node = this.startNode(); - this.expectContextual(operator); - node.operator = operator; - node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); - return this.finishNode(node, "TSTypeOperator"); - }; - - _proto.tsParseInferType = function tsParseInferType() { - var node = this.startNode(); - this.expectContextual("infer"); - var typeParameter = this.startNode(); - typeParameter.name = this.parseIdentifierName(typeParameter.start); - node.typeParameter = this.finishNode(typeParameter, "TypeParameter"); - return this.finishNode(node, "TSInferType"); - }; - - _proto.tsParseTypeOperatorOrHigher = function tsParseTypeOperatorOrHigher() { - var _this3 = this; - - var operator = ["keyof", "unique"].find(function (kw) { - return _this3.isContextual(kw); - }); - return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); - }; - - _proto.tsParseUnionOrIntersectionType = function tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { - this.eat(operator); - var type = parseConstituentType(); - - if (this.match(operator)) { - var types$$1 = [type]; - - while (this.eat(operator)) { - types$$1.push(parseConstituentType()); - } - - var node = this.startNodeAtNode(type); - node.types = types$$1; - type = this.finishNode(node, kind); - } - - return type; - }; - - _proto.tsParseIntersectionTypeOrHigher = function tsParseIntersectionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND); - }; - - _proto.tsParseUnionTypeOrHigher = function tsParseUnionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR); - }; - - _proto.tsIsStartOfFunctionType = function tsIsStartOfFunctionType() { - if (this.isRelational("<")) { - return true; - } - - return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); - }; - - _proto.tsSkipParameterStart = function tsSkipParameterStart() { - if (this.match(types.name) || this.match(types._this)) { - this.next(); - return true; - } - - return false; - }; - - _proto.tsIsUnambiguouslyStartOfFunctionType = function tsIsUnambiguouslyStartOfFunctionType() { - this.next(); - - if (this.match(types.parenR) || this.match(types.ellipsis)) { - return true; - } - - if (this.tsSkipParameterStart()) { - if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) { - return true; - } - - if (this.match(types.parenR)) { - this.next(); - - if (this.match(types.arrow)) { - return true; - } - } - } - - return false; - }; - - _proto.tsParseTypeOrTypePredicateAnnotation = function tsParseTypeOrTypePredicateAnnotation(returnToken) { - var _this4 = this; - - return this.tsInType(function () { - var t = _this4.startNode(); - - _this4.expect(returnToken); - - var typePredicateVariable = _this4.tsIsIdentifier() && _this4.tsTryParse(_this4.tsParseTypePredicatePrefix.bind(_this4)); - - if (!typePredicateVariable) { - return _this4.tsParseTypeAnnotation(false, t); - } - - var type = _this4.tsParseTypeAnnotation(false); - - var node = _this4.startNodeAtNode(typePredicateVariable); - - node.parameterName = typePredicateVariable; - node.typeAnnotation = type; - t.typeAnnotation = _this4.finishNode(node, "TSTypePredicate"); - return _this4.finishNode(t, "TSTypeAnnotation"); - }); - }; - - _proto.tsTryParseTypeOrTypePredicateAnnotation = function tsTryParseTypeOrTypePredicateAnnotation() { - return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined; - }; - - _proto.tsTryParseTypeAnnotation = function tsTryParseTypeAnnotation() { - return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined; - }; - - _proto.tsTryParseType = function tsTryParseType() { - return this.tsEatThenParseType(types.colon); - }; - - _proto.tsParseTypePredicatePrefix = function tsParseTypePredicatePrefix() { - var id = this.parseIdentifier(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - this.next(); - return id; - } - }; - - _proto.tsParseTypeAnnotation = function tsParseTypeAnnotation(eatColon, t) { - var _this5 = this; - - if (eatColon === void 0) { - eatColon = true; - } - - if (t === void 0) { - t = this.startNode(); - } - - this.tsInType(function () { - if (eatColon) _this5.expect(types.colon); - t.typeAnnotation = _this5.tsParseType(); - }); - return this.finishNode(t, "TSTypeAnnotation"); - }; - - _proto.tsParseType = function tsParseType() { - assert(this.state.inType); - var type = this.tsParseNonConditionalType(); - - if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) { - return type; - } - - var node = this.startNodeAtNode(type); - node.checkType = type; - node.extendsType = this.tsParseNonConditionalType(); - this.expect(types.question); - node.trueType = this.tsParseType(); - this.expect(types.colon); - node.falseType = this.tsParseType(); - return this.finishNode(node, "TSConditionalType"); - }; - - _proto.tsParseNonConditionalType = function tsParseNonConditionalType() { - if (this.tsIsStartOfFunctionType()) { - return this.tsParseFunctionOrConstructorType("TSFunctionType"); - } - - if (this.match(types._new)) { - return this.tsParseFunctionOrConstructorType("TSConstructorType"); - } - - return this.tsParseUnionTypeOrHigher(); - }; - - _proto.tsParseTypeAssertion = function tsParseTypeAssertion() { - var _this6 = this; - - var node = this.startNode(); - node.typeAnnotation = this.tsInType(function () { - return _this6.tsParseType(); - }); - this.expectRelational(">"); - node.expression = this.parseMaybeUnary(); - return this.finishNode(node, "TSTypeAssertion"); - }; - - _proto.tsTryParseTypeArgumentsInExpression = function tsTryParseTypeArgumentsInExpression() { - var _this7 = this; - - return this.tsTryParseAndCatch(function () { - var res = _this7.tsParseTypeArguments(); - - _this7.expect(types.parenL); - - return res; - }); - }; - - _proto.tsParseHeritageClause = function tsParseHeritageClause() { - return this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); - }; - - _proto.tsParseExpressionWithTypeArguments = function tsParseExpressionWithTypeArguments() { - var node = this.startNode(); - node.expression = this.tsParseEntityName(false); - - if (this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSExpressionWithTypeArguments"); - }; - - _proto.tsParseInterfaceDeclaration = function tsParseInterfaceDeclaration(node) { - node.id = this.parseIdentifier(); - node.typeParameters = this.tsTryParseTypeParameters(); - - if (this.eat(types._extends)) { - node.extends = this.tsParseHeritageClause(); - } - - var body = this.startNode(); - body.body = this.tsParseObjectTypeMembers(); - node.body = this.finishNode(body, "TSInterfaceBody"); - return this.finishNode(node, "TSInterfaceDeclaration"); - }; - - _proto.tsParseTypeAliasDeclaration = function tsParseTypeAliasDeclaration(node) { - node.id = this.parseIdentifier(); - node.typeParameters = this.tsTryParseTypeParameters(); - node.typeAnnotation = this.tsExpectThenParseType(types.eq); - this.semicolon(); - return this.finishNode(node, "TSTypeAliasDeclaration"); - }; - - _proto.tsInType = function tsInType(cb) { - var oldInType = this.state.inType; - this.state.inType = true; - - try { - return cb(); - } finally { - this.state.inType = oldInType; - } - }; - - _proto.tsEatThenParseType = function tsEatThenParseType(token) { - return !this.match(token) ? undefined : this.tsNextThenParseType(); - }; - - _proto.tsExpectThenParseType = function tsExpectThenParseType(token) { - var _this8 = this; - - return this.tsDoThenParseType(function () { - return _this8.expect(token); - }); - }; - - _proto.tsNextThenParseType = function tsNextThenParseType() { - var _this9 = this; - - return this.tsDoThenParseType(function () { - return _this9.next(); - }); - }; - - _proto.tsDoThenParseType = function tsDoThenParseType(cb) { - var _this10 = this; - - return this.tsInType(function () { - cb(); - return _this10.tsParseType(); - }); - }; - - _proto.tsParseEnumMember = function tsParseEnumMember() { - var node = this.startNode(); - node.id = this.match(types.string) ? this.parseLiteral(this.state.value, "StringLiteral") : this.parseIdentifier(true); - - if (this.eat(types.eq)) { - node.initializer = this.parseMaybeAssign(); - } - - return this.finishNode(node, "TSEnumMember"); - }; - - _proto.tsParseEnumDeclaration = function tsParseEnumDeclaration(node, isConst) { - if (isConst) node.const = true; - node.id = this.parseIdentifier(); - this.expect(types.braceL); - node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); - this.expect(types.braceR); - return this.finishNode(node, "TSEnumDeclaration"); - }; - - _proto.tsParseModuleBlock = function tsParseModuleBlock() { - var node = this.startNode(); - this.expect(types.braceL); - this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR); - return this.finishNode(node, "TSModuleBlock"); - }; - - _proto.tsParseModuleOrNamespaceDeclaration = function tsParseModuleOrNamespaceDeclaration(node) { - node.id = this.parseIdentifier(); - - if (this.eat(types.dot)) { - var inner = this.startNode(); - this.tsParseModuleOrNamespaceDeclaration(inner); - node.body = inner; - } else { - node.body = this.tsParseModuleBlock(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - }; - - _proto.tsParseAmbientExternalModuleDeclaration = function tsParseAmbientExternalModuleDeclaration(node) { - if (this.isContextual("global")) { - node.global = true; - node.id = this.parseIdentifier(); - } else if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - this.unexpected(); - } - - if (this.match(types.braceL)) { - node.body = this.tsParseModuleBlock(); - } else { - this.semicolon(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - }; - - _proto.tsParseImportEqualsDeclaration = function tsParseImportEqualsDeclaration(node, isExport) { - node.isExport = isExport || false; - node.id = this.parseIdentifier(); - this.expect(types.eq); - node.moduleReference = this.tsParseModuleReference(); - this.semicolon(); - return this.finishNode(node, "TSImportEqualsDeclaration"); - }; - - _proto.tsIsExternalModuleReference = function tsIsExternalModuleReference() { - return this.isContextual("require") && this.lookahead().type === types.parenL; - }; - - _proto.tsParseModuleReference = function tsParseModuleReference() { - return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); - }; - - _proto.tsParseExternalModuleReference = function tsParseExternalModuleReference() { - var node = this.startNode(); - this.expectContextual("require"); - this.expect(types.parenL); - - if (!this.match(types.string)) { - throw this.unexpected(); - } - - node.expression = this.parseLiteral(this.state.value, "StringLiteral"); - this.expect(types.parenR); - return this.finishNode(node, "TSExternalModuleReference"); - }; - - _proto.tsLookAhead = function tsLookAhead(f) { - var state = this.state.clone(); - var res = f(); - this.state = state; - return res; - }; - - _proto.tsTryParseAndCatch = function tsTryParseAndCatch(f) { - var state = this.state.clone(); - - try { - return f(); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - return undefined; - } - - throw e; - } - }; - - _proto.tsTryParse = function tsTryParse(f) { - var state = this.state.clone(); - var result = f(); - - if (result !== undefined && result !== false) { - return result; - } else { - this.state = state; - return undefined; - } - }; - - _proto.nodeWithSamePosition = function nodeWithSamePosition(original, type) { - var node = this.startNodeAtNode(original); - node.type = type; - node.end = original.end; - node.loc.end = original.loc.end; - - if (original.leadingComments) { - node.leadingComments = original.leadingComments; - } - - if (original.trailingComments) { - node.trailingComments = original.trailingComments; - } - - if (original.innerComments) node.innerComments = original.innerComments; - return node; - }; - - _proto.tsTryParseDeclare = function tsTryParseDeclare(nany) { - switch (this.state.type) { - case types._function: - this.next(); - return this.parseFunction(nany, true); - - case types._class: - return this.parseClass(nany, true, false); - - case types._const: - if (this.match(types._const) && this.isLookaheadContextual("enum")) { - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(nany, true); - } - - case types._var: - case types._let: - return this.parseVarStatement(nany, this.state.type); - - case types.name: - { - var value = this.state.value; - - if (value === "global") { - return this.tsParseAmbientExternalModuleDeclaration(nany); - } else { - return this.tsParseDeclaration(nany, value, true); - } - } - } - }; - - _proto.tsTryParseExportDeclaration = function tsTryParseExportDeclaration() { - return this.tsParseDeclaration(this.startNode(), this.state.value, true); - }; - - _proto.tsParseExpressionStatement = function tsParseExpressionStatement(node, expr) { - switch (expr.name) { - case "declare": - { - var declaration = this.tsTryParseDeclare(node); - - if (declaration) { - declaration.declare = true; - return declaration; - } - - break; - } - - case "global": - if (this.match(types.braceL)) { - var mod = node; - mod.global = true; - mod.id = expr; - mod.body = this.tsParseModuleBlock(); - return this.finishNode(mod, "TSModuleDeclaration"); - } - - break; - - default: - return this.tsParseDeclaration(node, expr.name, false); - } - }; - - _proto.tsParseDeclaration = function tsParseDeclaration(node, value, next) { - switch (value) { - case "abstract": - if (next || this.match(types._class)) { - var cls = node; - cls.abstract = true; - if (next) this.next(); - return this.parseClass(cls, true, false); - } - - break; - - case "enum": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseEnumDeclaration(node, false); - } - - break; - - case "interface": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseInterfaceDeclaration(node); - } - - break; - - case "module": - if (next) this.next(); - - if (this.match(types.string)) { - return this.tsParseAmbientExternalModuleDeclaration(node); - } else if (next || this.match(types.name)) { - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "namespace": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "type": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseTypeAliasDeclaration(node); - } - - break; - } - }; - - _proto.tsTryParseGenericAsyncArrowFunction = function tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { - var _this11 = this; - - var res = this.tsTryParseAndCatch(function () { - var node = _this11.startNodeAt(startPos, startLoc); - - node.typeParameters = _this11.tsParseTypeParameters(); - - _superClass.prototype.parseFunctionParams.call(_this11, node); - - node.returnType = _this11.tsTryParseTypeOrTypePredicateAnnotation(); - - _this11.expect(types.arrow); - - return node; - }); - - if (!res) { - return undefined; - } - - res.id = null; - res.generator = false; - res.expression = true; - res.async = true; - this.parseFunctionBody(res, true); - return this.finishNode(res, "ArrowFunctionExpression"); - }; - - _proto.tsParseTypeArguments = function tsParseTypeArguments() { - var _this12 = this; - - var node = this.startNode(); - node.params = this.tsInType(function () { - _this12.expectRelational("<"); - - return _this12.tsParseDelimitedList("TypeParametersOrArguments", _this12.tsParseType.bind(_this12)); - }); - this.expectRelational(">"); - return this.finishNode(node, "TSTypeParameterInstantiation"); - }; - - _proto.tsIsDeclarationStart = function tsIsDeclarationStart() { - if (this.match(types.name)) { - switch (this.state.value) { - case "abstract": - case "declare": - case "enum": - case "interface": - case "module": - case "namespace": - case "type": - return true; - } - } - - return false; - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.tsIsDeclarationStart()) return false; - return _superClass.prototype.isExportDefaultSpecifier.call(this); - }; - - _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) { - var accessibility; - var readonly = false; - - if (allowModifiers) { - accessibility = this.parseAccessModifier(); - readonly = !!this.tsParseModifier(["readonly"]); - } - - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - var elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (accessibility || readonly) { - var pp = this.startNodeAtNode(elt); - - if (decorators.length) { - pp.decorators = decorators; - } - - if (accessibility) pp.accessibility = accessibility; - if (readonly) pp.readonly = readonly; - - if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { - throw this.raise(pp.start, "A parameter property may not be declared using a binding pattern."); - } - - pp.parameter = elt; - return this.finishNode(pp, "TSParameterProperty"); - } else { - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - } - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - if (!allowExpressionBody && this.match(types.colon)) { - node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - } - - var bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined; - - if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) { - this.finishNode(node, bodilessType); - return; - } - - _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody); - }; - - _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) { - if (!this.hasPrecedingLineBreak() && this.eat(types.bang)) { - var nonNullExpression = this.startNodeAt(startPos, startLoc); - nonNullExpression.expression = base; - return this.finishNode(nonNullExpression, "TSNonNullExpression"); - } - - if (!noCalls && this.isRelational("<")) { - if (this.atPossibleAsync(base)) { - var asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); - - if (asyncArrowFn) { - return asyncArrowFn; - } - } - - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - var typeArguments = this.tsTryParseTypeArgumentsInExpression(); - - if (typeArguments) { - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.typeParameters = typeArguments; - return this.finishCallExpression(node); - } - } - - return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state); - }; - - _proto.parseNewArguments = function parseNewArguments(node) { - var _this13 = this; - - if (this.isRelational("<")) { - var typeParameters = this.tsTryParseAndCatch(function () { - var args = _this13.tsParseTypeArguments(); - - if (!_this13.match(types.parenL)) _this13.unexpected(); - return args; - }); - - if (typeParameters) { - node.typeParameters = typeParameters; - } - } - - _superClass.prototype.parseNewArguments.call(this, node); - }; - - _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) { - var node = this.startNodeAt(leftStartPos, leftStartLoc); - node.expression = left; - node.typeAnnotation = this.tsNextThenParseType(); - this.finishNode(node, "TSAsExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - - return _superClass.prototype.parseExprOp.call(this, left, leftStartPos, leftStartLoc, minPrec, noIn); - }; - - _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {}; - - _proto.checkDuplicateExports = function checkDuplicateExports() {}; - - _proto.parseImport = function parseImport(node) { - if (this.match(types.name) && this.lookahead().type === types.eq) { - return this.tsParseImportEqualsDeclaration(node); - } - - return _superClass.prototype.parseImport.call(this, node); - }; - - _proto.parseExport = function parseExport(node) { - if (this.match(types._import)) { - this.expect(types._import); - return this.tsParseImportEqualsDeclaration(node, true); - } else if (this.eat(types.eq)) { - var assign = node; - assign.expression = this.parseExpression(); - this.semicolon(); - return this.finishNode(assign, "TSExportAssignment"); - } else if (this.eatContextual("as")) { - var decl = node; - this.expectContextual("namespace"); - decl.id = this.parseIdentifier(); - this.semicolon(); - return this.finishNode(decl, "TSNamespaceExportDeclaration"); - } else { - return _superClass.prototype.parseExport.call(this, node); - } - }; - - _proto.parseExportDefaultExpression = function parseExportDefaultExpression() { - if (this.isContextual("abstract") && this.lookahead().type === types._class) { - var cls = this.startNode(); - this.next(); - this.parseClass(cls, true, true); - cls.abstract = true; - return cls; - } - - return _superClass.prototype.parseExportDefaultExpression.call(this); - }; - - _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) { - if (this.state.type === types._const) { - var ahead = this.lookahead(); - - if (ahead.type === types.name && ahead.value === "enum") { - var node = this.startNode(); - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(node, true); - } - } - - return _superClass.prototype.parseStatementContent.call(this, declaration, topLevel); - }; - - _proto.parseAccessModifier = function parseAccessModifier() { - return this.tsParseModifier(["public", "protected", "private"]); - }; - - _proto.parseClassMember = function parseClassMember(classBody, member, state) { - var accessibility = this.parseAccessModifier(); - if (accessibility) member.accessibility = accessibility; - - _superClass.prototype.parseClassMember.call(this, classBody, member, state); - }; - - _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - var methodOrProp = member; - var prop = member; - var propOrIdx = member; - var abstract = false, - readonly = false; - var mod = this.tsParseModifier(["abstract", "readonly"]); - - switch (mod) { - case "readonly": - readonly = true; - abstract = !!this.tsParseModifier(["abstract"]); - break; - - case "abstract": - abstract = true; - readonly = !!this.tsParseModifier(["readonly"]); - break; - } - - if (abstract) methodOrProp.abstract = true; - if (readonly) propOrIdx.readonly = true; - - if (!abstract && !isStatic && !methodOrProp.accessibility) { - var idx = this.tsTryParseIndexSignature(member); - - if (idx) { - classBody.body.push(idx); - return; - } - } - - if (readonly) { - methodOrProp.static = isStatic; - this.parseClassPropertyName(prop); - this.parsePostMemberNameModifiers(methodOrProp); - this.pushClassProperty(classBody, prop); - return; - } - - _superClass.prototype.parseClassMemberWithIsStatic.call(this, classBody, member, state, isStatic); - }; - - _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) { - var optional = this.eat(types.question); - if (optional) methodOrProp.optional = true; - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - var decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined; - return decl || _superClass.prototype.parseExpressionStatement.call(this, node, expr); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - if (this.tsIsDeclarationStart()) return true; - return _superClass.prototype.shouldParseExportDeclaration.call(this); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (!refNeedsArrowPos || !this.match(types.question)) { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc, refNeedsArrowPos); - } - - var state = this.state.clone(); - - try { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - } - - if (this.match(types.colon)) { - var typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TSTypeCastExpression"); - } - - return node; - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - var isDeclare = this.eatContextual("declare"); - var declaration; - - if (this.match(types.name)) { - declaration = this.tsTryParseExportDeclaration(); - } - - if (!declaration) { - declaration = _superClass.prototype.parseExportDeclaration.call(this, node); - } - - if (declaration && isDeclare) { - declaration.declare = true; - } - - return declaration; - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - var _superClass$prototype; - - if ((!isStatement || optionalId) && this.isContextual("implements")) { - return; - } - - (_superClass$prototype = _superClass.prototype.parseClassId).call.apply(_superClass$prototype, [this].concat(Array.prototype.slice.call(arguments))); - - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (!node.optional && this.eat(types.bang)) { - node.definite = true; - } - - var type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - return _superClass.prototype.parseClassProperty.call(this, node); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - - _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - - _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync); - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - _superClass.prototype.parseClassSuper.call(this, node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.tsParseTypeArguments(); - } - - if (this.eatContextual("implements")) { - node.implements = this.tsParseHeritageClause(); - } - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop) { - var _superClass$prototype2; - - if (this.isRelational("<")) { - throw new Error("TODO"); - } - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - (_superClass$prototype2 = _superClass.prototype.parseObjPropValue).call.apply(_superClass$prototype2, [this, prop].concat(args)); - }; - - _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - - _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers); - }; - - _proto.parseVarHead = function parseVarHead(decl) { - _superClass.prototype.parseVarHead.call(this, decl); - - if (decl.id.type === "Identifier" && this.eat(types.bang)) { - decl.definite = true; - } - - var type = this.tsTryParseTypeAnnotation(); - - if (type) { - decl.id.typeAnnotation = type; - this.finishNode(decl.id, decl.id.type); - } - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - node.returnType = this.tsParseTypeAnnotation(); - } - - return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call); - }; - - _proto.parseMaybeAssign = function parseMaybeAssign() { - var jsxError; - - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - if (this.match(types.jsxTagStart)) { - var context = this.curContext(); - assert(context === types$1.j_oTag); - assert(this.state.context[this.state.context.length - 2] === types$1.j_expr); - - var _state = this.state.clone(); - - try { - var _superClass$prototype3; - - return (_superClass$prototype3 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype3, [this].concat(args)); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = _state; - assert(this.curContext() === types$1.j_oTag); - this.state.context.pop(); - assert(this.curContext() === types$1.j_expr); - this.state.context.pop(); - jsxError = err; - } - } - - if (jsxError === undefined && !this.isRelational("<")) { - var _superClass$prototype4; - - return (_superClass$prototype4 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype4, [this].concat(args)); - } - - var arrowExpression; - var typeParameters; - var state = this.state.clone(); - - try { - var _superClass$prototype5; - - typeParameters = this.tsParseTypeParameters(); - arrowExpression = (_superClass$prototype5 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype5, [this].concat(args)); - - if (arrowExpression.type !== "ArrowFunctionExpression") { - this.unexpected(); - } - } catch (err) { - var _superClass$prototype6; - - if (!(err instanceof SyntaxError)) { - throw err; - } - - if (jsxError) { - throw jsxError; - } - - assert(!this.hasPlugin("jsx")); - this.state = state; - return (_superClass$prototype6 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype6, [this].concat(args)); - } - - if (typeParameters && typeParameters.params.length !== 0) { - this.resetStartLocationFromNode(arrowExpression, typeParameters.params[0]); - } - - arrowExpression.typeParameters = typeParameters; - return arrowExpression; - }; - - _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) { - if (!this.hasPlugin("jsx") && this.eatRelational("<")) { - return this.tsParseTypeAssertion(); - } else { - return _superClass.prototype.parseMaybeUnary.call(this, refShorthandDefaultPos); - } - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.match(types.colon)) { - var state = this.state.clone(); - - try { - var returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(types.arrow)) this.unexpected(); - node.returnType = returnType; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return _superClass.prototype.parseArrow.call(this, node); - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - var type = this.tsTryParseTypeAnnotation(); - if (type) param.typeAnnotation = type; - return this.finishNode(param, param.type); - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - switch (node.type) { - case "TSTypeCastExpression": - return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription); - - case "TSParameterProperty": - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - - case "TSAsExpression": - node.expression = this.toAssignable(node.expression, isBinding, contextDescription); - return node; - - default: - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - switch (expr.type) { - case "TSTypeCastExpression": - return; - - case "TSParameterProperty": - this.checkLVal(expr.parameter, isBinding, checkClashes, "parameter property"); - return; - - case "TSAsExpression": - this.checkLVal(expr.expression, isBinding, checkClashes, contextDescription); - return; - - default: - _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - - return; - } - }; - - _proto.parseBindingAtom = function parseBindingAtom() { - switch (this.state.type) { - case types._this: - return this.parseIdentifier(true); - - default: - return _superClass.prototype.parseBindingAtom.call(this); - } - }; - - _proto.isClassMethod = function isClassMethod() { - return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.bang) || this.match(types.colon) || _superClass.prototype.isClassProperty.call(this); - }; - - _proto.parseMaybeDefault = function parseMaybeDefault() { - var _superClass$prototype7; - - for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - var node = (_superClass$prototype7 = _superClass.prototype.parseMaybeDefault).call.apply(_superClass$prototype7, [this].concat(args)); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - }; - - _proto.readToken = function readToken(code) { - if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else { - return _superClass.prototype.readToken.call(this, code); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr.type === "TSTypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - - return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription); - }; - - _proto.typeCastToParameter = function typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end); - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") { - this.raise(expr.start, "Did not expect a type annotation here."); - } - } - - return exprList; - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this); - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this); - }; - - return _class; - }(superClass); -}); - -plugins.estree = estreePlugin; -plugins.flow = flowPlugin; -plugins.jsx = jsxPlugin; -plugins.typescript = typescriptPlugin; -function parse(input, options) { - if (options && options.sourceType === "unambiguous") { - options = Object.assign({}, options); - - try { - options.sourceType = "module"; - var parser = getParser(options, input); - var ast = parser.parse(); - if (!parser.sawUnambiguousESM) ast.program.sourceType = "script"; - return ast; - } catch (moduleError) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (scriptError) {} - - throw moduleError; - } - } else { - return getParser(options, input).parse(); - } -} -function parseExpression(input, options) { - var parser = getParser(options, input); - - if (parser.options.strictMode) { - parser.state.strict = true; - } - - return parser.getExpression(); -} -function getParser(options, input) { - var cls = options && options.plugins ? getParserClass(options.plugins) : Parser; - return new cls(options, input); -} - -var parserClassCache = {}; - -function getParserClass(pluginsFromOptions) { - if (pluginsFromOptions.indexOf("decorators") >= 0 && pluginsFromOptions.indexOf("decorators2") >= 0) { - throw new Error("Cannot use decorators and decorators2 plugin together"); - } - - var pluginList = pluginsFromOptions.filter(function (p) { - return p === "estree" || p === "flow" || p === "jsx" || p === "typescript"; - }); - - if (pluginList.indexOf("flow") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "flow"; - }); - pluginList.push("flow"); - } - - if (pluginList.indexOf("flow") >= 0 && pluginList.indexOf("typescript") >= 0) { - throw new Error("Cannot combine flow and typescript plugins."); - } - - if (pluginList.indexOf("typescript") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "typescript"; - }); - pluginList.push("typescript"); - } - - if (pluginList.indexOf("estree") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "estree"; - }); - pluginList.unshift("estree"); - } - - var key = pluginList.join("/"); - var cls = parserClassCache[key]; - - if (!cls) { - cls = Parser; - - for (var _i2 = 0, _pluginList2 = pluginList; _i2 < _pluginList2.length; _i2++) { - var plugin = _pluginList2[_i2]; - cls = plugins[plugin](cls); - } - - parserClassCache[key] = cls; - } - - return cls; -} - -exports.parse = parse; -exports.parseExpression = parseExpression; -exports.tokTypes = types; diff --git a/node_modules/@babel/core/node_modules/babylon/package.json b/node_modules/@babel/core/node_modules/babylon/package.json deleted file mode 100644 index 5dea28a..0000000 --- a/node_modules/@babel/core/node_modules/babylon/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "babylon@7.0.0-beta.46", - "_id": "babylon@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-WFJlg2WatdkXRFMpk7BN/Uzzkjkcjk+WaqnrSCpay+RYl4ypW9ZetZyT9kNt22IH/BQNst3M6PaaBn9IXsUNrg==", - "_location": "/@babel/core/babylon", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "babylon@7.0.0-beta.46", - "name": "babylon", - "escapedName": "babylon", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.46.tgz", - "_shasum": "b6ddaba81bbb130313932757ff9c195d527088b6", - "_spec": "babylon@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bin": { - "babylon": "./bin/babylon.js" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A JavaScript parser", - "devDependencies": { - "@babel/helper-fixtures": "7.0.0-beta.46", - "charcodes": "0.1.0", - "unicode-10.0.0": "^0.7.4" - }, - "engines": { - "node": ">=6.0.0" - }, - "files": [ - "bin", - "lib" - ], - "homepage": "https://babeljs.io/", - "keywords": [ - "babel", - "javascript", - "parser", - "tc39", - "ecmascript", - "babylon" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "babylon", - "publishConfig": { - "tag": "next" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babylon" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/highlight/node_modules/chalk/index.js b/node_modules/@babel/core/node_modules/chalk/index.js similarity index 100% rename from node_modules/@babel/highlight/node_modules/chalk/index.js rename to node_modules/@babel/core/node_modules/chalk/index.js diff --git a/node_modules/@babel/core/node_modules/chalk/index.js.flow b/node_modules/@babel/core/node_modules/chalk/index.js.flow new file mode 100644 index 0000000..622caaa --- /dev/null +++ b/node_modules/@babel/core/node_modules/chalk/index.js.flow @@ -0,0 +1,93 @@ +// @flow strict + +type TemplateStringsArray = $ReadOnlyArray; + +export type Level = $Values<{ + None: 0, + Basic: 1, + Ansi256: 2, + TrueColor: 3 +}>; + +export type ChalkOptions = {| + enabled?: boolean, + level?: Level +|}; + +export type ColorSupport = {| + level: Level, + hasBasic: boolean, + has256: boolean, + has16m: boolean +|}; + +export interface Chalk { + (...text: string[]): string, + (text: TemplateStringsArray, ...placeholders: string[]): string, + constructor(options?: ChalkOptions): Chalk, + enabled: boolean, + level: Level, + rgb(r: number, g: number, b: number): Chalk, + hsl(h: number, s: number, l: number): Chalk, + hsv(h: number, s: number, v: number): Chalk, + hwb(h: number, w: number, b: number): Chalk, + bgHex(color: string): Chalk, + bgKeyword(color: string): Chalk, + bgRgb(r: number, g: number, b: number): Chalk, + bgHsl(h: number, s: number, l: number): Chalk, + bgHsv(h: number, s: number, v: number): Chalk, + bgHwb(h: number, w: number, b: number): Chalk, + hex(color: string): Chalk, + keyword(color: string): Chalk, + + +reset: Chalk, + +bold: Chalk, + +dim: Chalk, + +italic: Chalk, + +underline: Chalk, + +inverse: Chalk, + +hidden: Chalk, + +strikethrough: Chalk, + + +visible: Chalk, + + +black: Chalk, + +red: Chalk, + +green: Chalk, + +yellow: Chalk, + +blue: Chalk, + +magenta: Chalk, + +cyan: Chalk, + +white: Chalk, + +gray: Chalk, + +grey: Chalk, + +blackBright: Chalk, + +redBright: Chalk, + +greenBright: Chalk, + +yellowBright: Chalk, + +blueBright: Chalk, + +magentaBright: Chalk, + +cyanBright: Chalk, + +whiteBright: Chalk, + + +bgBlack: Chalk, + +bgRed: Chalk, + +bgGreen: Chalk, + +bgYellow: Chalk, + +bgBlue: Chalk, + +bgMagenta: Chalk, + +bgCyan: Chalk, + +bgWhite: Chalk, + +bgBlackBright: Chalk, + +bgRedBright: Chalk, + +bgGreenBright: Chalk, + +bgYellowBright: Chalk, + +bgBlueBright: Chalk, + +bgMagentaBright: Chalk, + +bgCyanBright: Chalk, + +bgWhiteBrigh: Chalk, + + supportsColor: ColorSupport +}; + +declare module.exports: Chalk; diff --git a/node_modules/@babel/highlight/node_modules/chalk/license b/node_modules/@babel/core/node_modules/chalk/license similarity index 100% rename from node_modules/@babel/highlight/node_modules/chalk/license rename to node_modules/@babel/core/node_modules/chalk/license diff --git a/node_modules/@babel/core/node_modules/chalk/package.json b/node_modules/@babel/core/node_modules/chalk/package.json new file mode 100644 index 0000000..86a92c6 --- /dev/null +++ b/node_modules/@babel/core/node_modules/chalk/package.json @@ -0,0 +1,103 @@ +{ + "_from": "chalk@^2.0.0", + "_id": "chalk@2.4.2", + "_inBundle": false, + "_integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "_location": "/@babel/core/chalk", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "chalk@^2.0.0", + "name": "chalk", + "escapedName": "chalk", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@babel/core/@babel/highlight" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "_shasum": "cd42541677a54333cf541a49108c1432b44c9424", + "_spec": "chalk@^2.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\highlight", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "deprecated": false, + "description": "Terminal string styling done right", + "devDependencies": { + "ava": "*", + "coveralls": "^3.0.0", + "execa": "^0.9.0", + "flow-bin": "^0.68.0", + "import-fresh": "^2.0.0", + "matcha": "^0.7.0", + "nyc": "^11.0.2", + "resolve-from": "^4.0.0", + "typescript": "^2.5.3", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "templates.js", + "types/index.d.ts", + "index.js.flow" + ], + "homepage": "https://github.com/chalk/chalk#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "chalk", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" + }, + "scripts": { + "bench": "matcha benchmark.js", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" + }, + "types": "types/index.d.ts", + "version": "2.4.2", + "xo": { + "envs": [ + "node", + "mocha" + ], + "ignores": [ + "test/_flow.js" + ] + } +} diff --git a/node_modules/@babel/highlight/node_modules/chalk/readme.md b/node_modules/@babel/core/node_modules/chalk/readme.md similarity index 100% rename from node_modules/@babel/highlight/node_modules/chalk/readme.md rename to node_modules/@babel/core/node_modules/chalk/readme.md diff --git a/node_modules/@babel/highlight/node_modules/chalk/templates.js b/node_modules/@babel/core/node_modules/chalk/templates.js similarity index 100% rename from node_modules/@babel/highlight/node_modules/chalk/templates.js rename to node_modules/@babel/core/node_modules/chalk/templates.js diff --git a/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts b/node_modules/@babel/core/node_modules/chalk/types/index.d.ts similarity index 100% rename from node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts rename to node_modules/@babel/core/node_modules/chalk/types/index.d.ts diff --git a/node_modules/@babel/core/node_modules/debug/.coveralls.yml b/node_modules/@babel/core/node_modules/debug/.coveralls.yml deleted file mode 100644 index 20a7068..0000000 --- a/node_modules/@babel/core/node_modules/debug/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/node_modules/@babel/core/node_modules/debug/.eslintrc b/node_modules/@babel/core/node_modules/debug/.eslintrc deleted file mode 100644 index 146371e..0000000 --- a/node_modules/@babel/core/node_modules/debug/.eslintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - "globals": { - "chrome": true - }, - "rules": { - "no-console": 0, - "no-empty": [1, { "allowEmptyCatch": true }] - }, - "extends": "eslint:recommended" -} diff --git a/node_modules/@babel/core/node_modules/debug/.npmignore b/node_modules/@babel/core/node_modules/debug/.npmignore deleted file mode 100644 index 5f60eec..0000000 --- a/node_modules/@babel/core/node_modules/debug/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -support -test -examples -example -*.sock -dist -yarn.lock -coverage -bower.json diff --git a/node_modules/@babel/core/node_modules/debug/.travis.yml b/node_modules/@babel/core/node_modules/debug/.travis.yml deleted file mode 100644 index a764300..0000000 --- a/node_modules/@babel/core/node_modules/debug/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - "4" - - "6" - - "8" - -install: - - make install - -script: - - make lint - - make test - -matrix: - include: - - node_js: '8' - env: BROWSER=1 diff --git a/node_modules/@babel/core/node_modules/debug/Makefile b/node_modules/@babel/core/node_modules/debug/Makefile deleted file mode 100644 index 3ddd136..0000000 --- a/node_modules/@babel/core/node_modules/debug/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# Path -PATH := node_modules/.bin:$(PATH) -SHELL := /bin/bash - -# applications -NODE ?= $(shell which node) -YARN ?= $(shell which yarn) -PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -install: node_modules - -browser: dist/debug.js - -node_modules: package.json - @NODE_ENV= $(PKG) install - @touch node_modules - -dist/debug.js: src/*.js node_modules - @mkdir -p dist - @$(BROWSERIFY) \ - --standalone debug \ - . > dist/debug.js - -lint: - @eslint *.js src/*.js - -test-node: - @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js - @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js - -test-browser: - @$(MAKE) browser - @karma start --single-run - -test-all: - @concurrently \ - "make test-node" \ - "make test-browser" - -test: - @if [ "x$(BROWSER)" = "x" ]; then \ - $(MAKE) test-node; \ - else \ - $(MAKE) test-browser; \ - fi - -clean: - rimraf dist coverage - -.PHONY: browser install clean lint test test-all test-node test-browser diff --git a/node_modules/@babel/core/node_modules/debug/README.md b/node_modules/@babel/core/node_modules/debug/README.md index 8e754d1..88dae35 100644 --- a/node_modules/@babel/core/node_modules/debug/README.md +++ b/node_modules/@babel/core/node_modules/debug/README.md @@ -70,7 +70,9 @@ Here are some examples: screen shot 2017-08-08 at 12 53 38 pm screen shot 2017-08-08 at 12 53 25 pm -#### Windows note +#### Windows command prompt notes + +##### CMD On Windows the environment variable is set using the `set` command. @@ -78,14 +80,32 @@ On Windows the environment variable is set using the `set` command. set DEBUG=*,-not_this ``` -Note that PowerShell uses different syntax to set environment variables. +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. ```cmd $env:DEBUG = "*,-not_this" ``` +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + Then, run the program to be debugged as usual. +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` ## Namespace Colors @@ -248,6 +268,73 @@ error('now goes to stdout via console.info'); log('still goes to stdout, but via console.info now'); ``` +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + ## Checking whether a debug target is enabled After you've created a debug instance, you can determine whether or not it is diff --git a/node_modules/@babel/core/node_modules/debug/dist/debug.js b/node_modules/@babel/core/node_modules/debug/dist/debug.js new file mode 100644 index 0000000..89ad0c2 --- /dev/null +++ b/node_modules/@babel/core/node_modules/debug/dist/debug.js @@ -0,0 +1,912 @@ +"use strict"; + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +(function (f) { + if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { + module.exports = f(); + } else if (typeof define === "function" && define.amd) { + define([], f); + } else { + var g; + + if (typeof window !== "undefined") { + g = window; + } else if (typeof global !== "undefined") { + g = global; + } else if (typeof self !== "undefined") { + g = self; + } else { + g = this; + } + + g.debug = f(); + } +})(function () { + var define, module, exports; + return function () { + function r(e, n, t) { + function o(i, f) { + if (!n[i]) { + if (!e[i]) { + var c = "function" == typeof require && require; + if (!f && c) return c(i, !0); + if (u) return u(i, !0); + var a = new Error("Cannot find module '" + i + "'"); + throw a.code = "MODULE_NOT_FOUND", a; + } + + var p = n[i] = { + exports: {} + }; + e[i][0].call(p.exports, function (r) { + var n = e[i][1][r]; + return o(n || r); + }, p, p.exports, r, e, n, t); + } + + return n[i].exports; + } + + for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) { + o(t[i]); + } + + return o; + } + + return r; + }()({ + 1: [function (require, module, exports) { + /** + * Helpers. + */ + var s = 1000; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + module.exports = function (val, options) { + options = options || {}; + + var type = _typeof(val); + + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + + throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); + }; + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + + function parse(str) { + str = String(str); + + if (str.length > 100) { + return; + } + + var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); + + if (!match) { + return; + } + + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + + case 'weeks': + case 'week': + case 'w': + return n * w; + + case 'days': + case 'day': + case 'd': + return n * d; + + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + + default: + return undefined; + } + } + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + + function fmtShort(ms) { + var msAbs = Math.abs(ms); + + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + + return ms + 'ms'; + } + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + + function fmtLong(ms) { + var msAbs = Math.abs(ms); + + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + + return ms + ' ms'; + } + /** + * Pluralization helper. + */ + + + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); + } + }, {}], + 2: [function (require, module, exports) { + // shim for using process in browser + var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it + // don't break things. But we need to wrap it in a try catch in case it is + // wrapped in strict mode code which doesn't define any globals. It's inside a + // function because try/catches deoptimize in certain engines. + + var cachedSetTimeout; + var cachedClearTimeout; + + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + + function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); + } + + (function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + })(); + + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } // if setTimeout wasn't available but was latter defined + + + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + } + + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } // if clearTimeout wasn't available but was latter defined + + + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + } + + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + + draining = false; + + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + + if (queue.length) { + drainQueue(); + } + } + + function drainQueue() { + if (draining) { + return; + } + + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + + while (len) { + currentQueue = queue; + queue = []; + + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + + queueIndex = -1; + len = queue.length; + } + + currentQueue = null; + draining = false; + runClearTimeout(timeout); + } + + process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + + queue.push(new Item(fun, args)); + + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; // v8 likes predictible objects + + + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + process.prependListener = noop; + process.prependOnceListener = noop; + + process.listeners = function (name) { + return []; + }; + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { + return '/'; + }; + + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + + process.umask = function () { + return 0; + }; + }, {}], + 3: [function (require, module, exports) { + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + Object.keys(env).forEach(function (key) { + createDebug[key] = env[key]; + }); + /** + * Active `debug` instances. + */ + + createDebug.instances = []; + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + + createDebug.formatters = {}; + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + + function selectColor(namespace) { + var hash = 0; + + for (var i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + + createDebug.selectColor = selectColor; + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function createDebug(namespace) { + var prevTime; + + function debug() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + // Disabled? + if (!debug.enabled) { + return; + } + + var self = debug; // Set `diff` timestamp + + var curr = Number(new Date()); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } // Apply any `formatters` transformations + + + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + + index++; + var formatter = createDebug.formatters[format]; + + if (typeof formatter === 'function') { + var val = args[index]; + match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` + + args.splice(index, 1); + index--; + } + + return match; + }); // Apply env-specific formatting (colors, etc.) + + createDebug.formatArgs.call(self, args); + var logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + // env-specific initialization logic for debug instances + + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + return debug; + } + + function destroy() { + var index = createDebug.instances.indexOf(this); + + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + + return false; + } + + function extend(namespace, delimiter) { + var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + + + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.names = []; + createDebug.skips = []; + var i; + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + var instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + + + function disable() { + var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) { + return '-' + namespace; + }))).join(','); + createDebug.enable(''); + return namespaces; + } + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + var i; + var len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + + + function toNamespace(regexp) { + return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); + } + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + + + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + + return val; + } + + createDebug.enable(createDebug.load()); + return createDebug; + } + + module.exports = setup; + }, { + "ms": 1 + }], + 4: [function (require, module, exports) { + (function (process) { + /* eslint-env browser */ + + /** + * This is the web browser implementation of `debug()`. + */ + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = localstorage(); + /** + * Colors. + */ + + exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; + /** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + // eslint-disable-next-line complexity + + function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } // Internet Explorer and Edge do not support colors. + + + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + + + return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + /** + * Colorize log arguments if enabled. + * + * @api public + */ + + + function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function (match) { + if (match === '%%') { + return; + } + + index++; + + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + args.splice(lastC, 0, c); + } + /** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + + + function log() { + var _console; + + // This hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); + } + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + + + function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) {// Swallow + // XXX (@Qix-) should we be logging these? + } + } + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + + + function load() { + var r; + + try { + r = exports.storage.getItem('debug'); + } catch (error) {} // Swallow + // XXX (@Qix-) should we be logging these? + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + + + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; + } + /** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + + + function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) {// Swallow + // XXX (@Qix-) should we be logging these? + } + } + + module.exports = require('./common')(exports); + var formatters = module.exports.formatters; + /** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + + formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } + }; + }).call(this, require('_process')); + }, { + "./common": 3, + "_process": 2 + }] + }, {}, [4])(4); +}); diff --git a/node_modules/@babel/core/node_modules/debug/karma.conf.js b/node_modules/@babel/core/node_modules/debug/karma.conf.js deleted file mode 100644 index 103a82d..0000000 --- a/node_modules/@babel/core/node_modules/debug/karma.conf.js +++ /dev/null @@ -1,70 +0,0 @@ -// Karma configuration -// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) - -module.exports = function(config) { - config.set({ - - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '', - - - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha', 'chai', 'sinon'], - - - // list of files / patterns to load in the browser - files: [ - 'dist/debug.js', - 'test/*spec.js' - ], - - - // list of files to exclude - exclude: [ - 'src/node.js' - ], - - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - }, - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], - - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity - }) -} diff --git a/node_modules/@babel/core/node_modules/debug/node.js b/node_modules/@babel/core/node_modules/debug/node.js deleted file mode 100644 index 7fc36fe..0000000 --- a/node_modules/@babel/core/node_modules/debug/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/node_modules/@babel/core/node_modules/debug/package.json b/node_modules/@babel/core/node_modules/debug/package.json index c826f81..ccad265 100644 --- a/node_modules/@babel/core/node_modules/debug/package.json +++ b/node_modules/@babel/core/node_modules/debug/package.json @@ -1,27 +1,28 @@ { - "_from": "debug@^3.1.0", - "_id": "debug@3.1.0", + "_from": "debug@^4.1.0", + "_id": "debug@4.1.1", "_inBundle": false, - "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "_integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "_location": "/@babel/core/debug", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "debug@^3.1.0", + "raw": "debug@^4.1.0", "name": "debug", "escapedName": "debug", - "rawSpec": "^3.1.0", + "rawSpec": "^4.1.0", "saveSpec": null, - "fetchSpec": "^3.1.0" + "fetchSpec": "^4.1.0" }, "_requiredBy": [ - "/@babel/core" + "/@babel/core", + "/@babel/core/@babel/traverse" ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "_shasum": "5bb5a0672628b64149566ba16819e61518c67261", - "_spec": "debug@^3.1.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/core", + "_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "_shasum": "3b72260255109c6b589cee050f1d516139664791", + "_spec": "debug@^4.1.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", "author": { "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" @@ -43,28 +44,34 @@ } ], "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.1" }, "deprecated": false, "description": "small debugging utility", "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", "browserify": "14.4.0", "chai": "^3.5.0", "concurrently": "^3.1.0", - "coveralls": "^2.11.15", - "eslint": "^3.12.1", + "coveralls": "^3.0.2", "istanbul": "^0.4.5", - "karma": "^1.3.0", + "karma": "^3.0.0", "karma-chai": "^0.1.0", "karma-mocha": "^1.3.0", "karma-phantomjs-launcher": "^1.0.2", - "karma-sinon": "^1.0.5", - "mocha": "^3.2.0", + "mocha": "^5.2.0", "mocha-lcov-reporter": "^1.2.0", "rimraf": "^2.5.4", - "sinon": "^1.17.6", - "sinon-chai": "^2.8.0" + "xo": "^0.23.0" }, + "files": [ + "src", + "dist/debug.js", + "LICENSE", + "README.md" + ], "homepage": "https://github.com/visionmedia/debug#readme", "keywords": [ "debug", @@ -78,5 +85,19 @@ "type": "git", "url": "git://github.com/visionmedia/debug.git" }, - "version": "3.1.0" + "scripts": { + "build": "npm run build:debug && npm run build:test", + "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", + "build:test": "babel -d dist test.js", + "clean": "rimraf dist coverage", + "lint": "xo", + "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", + "pretest:browser": "npm run build", + "test": "npm run test:node && npm run test:browser", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls", + "test:node": "istanbul cover _mocha -- test.js" + }, + "unpkg": "./dist/debug.js", + "version": "4.1.1" } diff --git a/node_modules/@babel/core/node_modules/debug/src/browser.js b/node_modules/@babel/core/node_modules/debug/src/browser.js index f5149ff..5f34c0d 100644 --- a/node_modules/@babel/core/node_modules/debug/src/browser.js +++ b/node_modules/@babel/core/node_modules/debug/src/browser.js @@ -1,36 +1,97 @@ +/* eslint-env browser */ + /** * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. */ -exports = module.exports = require('./debug'); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; -exports.storage = 'undefined' != typeof chrome - && 'undefined' != typeof chrome.storage - ? chrome.storage.local - : localstorage(); +exports.storage = localstorage(); /** * Colors. */ exports.colors = [ - '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', - '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', - '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', - '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', - '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', - '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', - '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', - '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', - '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', - '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', - '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33' + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' ]; /** @@ -41,44 +102,32 @@ exports.colors = [ * TODO: add a `localStorage` variable to explicitly enable/disable colors */ +// eslint-disable-next-line complexity function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { - return true; - } + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } - // is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); } -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (err) { - return '[UnexpectedJSONParseError]: ' + err.message; - } -}; - - /** * Colorize log arguments if enabled. * @@ -86,36 +135,38 @@ exports.formatters.j = function(v) { */ function formatArgs(args) { - var useColors = this.useColors; + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); + if (!this.useColors) { + return; + } - if (!useColors) return; + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit') + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); + args.splice(lastC, 0, c); } /** @@ -124,13 +175,12 @@ function formatArgs(args) { * * @api public */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); +function log(...args) { + // This hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return typeof console === 'object' && + console.log && + console.log(...args); } /** @@ -139,15 +189,17 @@ function log() { * @param {String} namespaces * @api private */ - function save(namespaces) { - try { - if (null == namespaces) { - exports.storage.removeItem('debug'); - } else { - exports.storage.debug = namespaces; - } - } catch(e) {} + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } /** @@ -156,27 +208,23 @@ function save(namespaces) { * @return {String} returns the previously persisted debug modes * @api private */ - function load() { - var r; - try { - r = exports.storage.debug; - } catch(e) {} + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } - return r; + return r; } -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); - /** * Localstorage attempts to return the localstorage. * @@ -189,7 +237,28 @@ exports.enable(load()); */ function localstorage() { - try { - return window.localStorage; - } catch (e) {} + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; diff --git a/node_modules/@babel/core/node_modules/debug/src/common.js b/node_modules/@babel/core/node_modules/debug/src/common.js new file mode 100644 index 0000000..2f82b8d --- /dev/null +++ b/node_modules/@babel/core/node_modules/debug/src/common.js @@ -0,0 +1,266 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * Active `debug` instances. + */ + createDebug.instances = []; + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; + // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + + // env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + + return debug; + } + + function destroy() { + const index = createDebug.instances.indexOf(this); + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + return false; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + const instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; diff --git a/node_modules/@babel/core/node_modules/debug/src/debug.js b/node_modules/@babel/core/node_modules/debug/src/debug.js deleted file mode 100644 index 77e6384..0000000 --- a/node_modules/@babel/core/node_modules/debug/src/debug.js +++ /dev/null @@ -1,225 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * Active `debug` instances. - */ -exports.instances = []; - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - -exports.formatters = {}; - -/** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - -function selectColor(namespace) { - var hash = 0, i; - - for (i in namespace) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function createDebug(namespace) { - - var prevTime; - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - exports.instances.push(debug); - - return debug; -} - -function destroy () { - var index = exports.instances.indexOf(this); - if (index !== -1) { - exports.instances.splice(index, 1); - return true; - } else { - return false; - } -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < exports.instances.length; i++) { - var instance = exports.instances[i]; - instance.enabled = exports.enabled(instance.namespace); - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/@babel/core/node_modules/debug/src/index.js b/node_modules/@babel/core/node_modules/debug/src/index.js index cabcbcd..bf4c57f 100644 --- a/node_modules/@babel/core/node_modules/debug/src/index.js +++ b/node_modules/@babel/core/node_modules/debug/src/index.js @@ -1,10 +1,10 @@ /** - * Detect Electron renderer process, which is node, but we should + * Detect Electron renderer / nwjs process, which is node, but we should * treat as a browser. */ -if (typeof process === 'undefined' || process.type === 'renderer') { - module.exports = require('./browser.js'); +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = require('./browser.js'); } else { - module.exports = require('./node.js'); + module.exports = require('./node.js'); } diff --git a/node_modules/@babel/core/node_modules/debug/src/node.js b/node_modules/@babel/core/node_modules/debug/src/node.js index d666fb9..5e1f154 100644 --- a/node_modules/@babel/core/node_modules/debug/src/node.js +++ b/node_modules/@babel/core/node_modules/debug/src/node.js @@ -2,16 +2,13 @@ * Module dependencies. */ -var tty = require('tty'); -var util = require('util'); +const tty = require('tty'); +const util = require('util'); /** * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. */ -exports = module.exports = require('./debug'); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -23,21 +20,95 @@ exports.useColors = useColors; * Colors. */ -exports.colors = [ 6, 2, 3, 4, 5, 1 ]; +exports.colors = [6, 2, 3, 4, 5, 1]; try { - var supportsColor = require('supports-color'); - if (supportsColor && supportsColor.level >= 2) { - exports.colors = [ - 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, - 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, - 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 214, 215, 220, 221 - ]; - } -} catch (err) { - // swallow - we only care if `supports-color` is available; it doesn't have to be. + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. } /** @@ -46,24 +117,31 @@ try { * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // camel-case - var prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); - // coerce string value into JS value - var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true; - else if (/^(no|off|false|disabled)$/i.test(val)) val = false; - else if (val === 'null') val = null; - else val = Number(val); + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } - obj[prop] = val; - return obj; + obj[prop] = val; + return obj; }, {}); /** @@ -71,32 +149,11 @@ exports.inspectOpts = Object.keys(process.env).filter(function (key) { */ function useColors() { - return 'colors' in exports.inspectOpts - ? Boolean(exports.inspectOpts.colors) - : tty.isatty(process.stderr.fd); + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); } -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -exports.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n').map(function(str) { - return str.trim() - }).join(' '); -}; - -/** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - -exports.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - /** * Adds ANSI color escape codes if enabled. * @@ -104,35 +161,33 @@ exports.formatters.O = function(v) { */ function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; + const {namespace: name, useColors} = this; - if (useColors) { - var c = this.color; - var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c); - var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m'; + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } } function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } else { - return new Date().toISOString() + ' '; - } + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; } /** * Invokes `util.format()` with the specified arguments and writes to stderr. */ -function log() { - return process.stderr.write(util.format.apply(util, arguments) + '\n'); +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); } /** @@ -141,15 +196,14 @@ function log() { * @param {String} namespaces * @api private */ - function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } } /** @@ -160,7 +214,7 @@ function save(namespaces) { */ function load() { - return process.env.DEBUG; + return process.env.DEBUG; } /** @@ -170,17 +224,34 @@ function load() { * differently for a particular `debug` instance. */ -function init (debug) { - debug.inspectOpts = {}; +function init(debug) { + debug.inspectOpts = {}; - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } } +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + /** - * Enable namespaces listed in `process.env.DEBUG` initially. + * Map %o to `util.inspect()`, all on a single line. */ -exports.enable(load()); +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .replace(/\s*\n\s*/g, ' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; diff --git a/node_modules/@babel/traverse/node_modules/globals/globals.json b/node_modules/@babel/core/node_modules/globals/globals.json similarity index 93% rename from node_modules/@babel/traverse/node_modules/globals/globals.json rename to node_modules/@babel/core/node_modules/globals/globals.json index a53d525..65a4c7e 100644 --- a/node_modules/@babel/traverse/node_modules/globals/globals.json +++ b/node_modules/@babel/core/node_modules/globals/globals.json @@ -3,6 +3,9 @@ "Array": false, "ArrayBuffer": false, "Atomics": false, + "BigInt": false, + "BigInt64Array": false, + "BigUint64Array": false, "Boolean": false, "constructor": false, "DataView": false, @@ -248,6 +251,9 @@ "AudioParam": false, "AudioProcessingEvent": false, "AudioScheduledSourceNode": false, + "AudioWorkletGlobalScope ": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, "BarProp": false, "BaseAudioContext": false, "BatteryManager": false, @@ -479,7 +485,7 @@ "KeyframeEffectReadOnly": false, "length": false, "localStorage": false, - "location": false, + "location": true, "Location": false, "locationbar": false, "matchMedia": false, @@ -692,9 +698,11 @@ "PushManager": false, "PushSubscription": false, "PushSubscriptionOptions": false, + "queueMicrotask": false, "RadioNodeList": false, "Range": false, "ReadableStream": false, + "registerProcessor": false, "RemotePlayback": false, "removeEventListener": false, "Request": false, @@ -923,6 +931,7 @@ "XSLTProcessor": false }, "worker": { + "addEventListener": false, "applicationCache": false, "atob": false, "Blob": false, @@ -977,6 +986,8 @@ "PerformanceTiming": false, "postMessage": true, "Promise": false, + "queueMicrotask": false, + "removeEventListener": false, "Request": false, "Response": false, "self": true, @@ -989,6 +1000,7 @@ "URLSearchParams": false, "WebSocket": false, "Worker": false, + "WorkerGlobalScope": false, "XMLHttpRequest": false }, "node": { @@ -1004,10 +1016,13 @@ "Intl": false, "module": false, "process": false, + "queueMicrotask": false, "require": false, "setImmediate": false, "setInterval": false, "setTimeout": false, + "TextDecoder": false, + "TextEncoder": false, "URL": false, "URLSearchParams": false }, @@ -1184,7 +1199,8 @@ "jQuery": false }, "yui": { - "Y": false, + "YAHOO": false, + "YAHOO_config": false, "YUI": false, "YUI_config": false }, @@ -1349,25 +1365,99 @@ "Ref": false }, "serviceworker": { + "addEventListener": false, + "applicationCache": false, + "atob": false, + "Blob": false, + "BroadcastChannel": false, + "btoa": false, "Cache": false, "caches": false, "CacheStorage": false, + "clearInterval": false, + "clearTimeout": false, "Client": false, "clients": false, "Clients": false, + "close": true, + "console": false, "ExtendableEvent": false, "ExtendableMessageEvent": false, + "fetch": false, "FetchEvent": false, + "FileReaderSync": false, + "FormData": false, + "Headers": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "ImageData": false, "importScripts": false, + "indexedDB": false, + "location": false, + "MessageChannel": false, + "MessagePort": false, + "name": false, + "navigator": false, + "Notification": false, + "onclose": true, + "onconnect": true, + "onerror": true, + "onfetch": true, + "oninstall": true, + "onlanguagechange": true, + "onmessage": true, + "onmessageerror": true, + "onnotificationclick": true, + "onnotificationclose": true, + "onoffline": true, + "ononline": true, + "onpush": true, + "onpushsubscriptionchange": true, + "onrejectionhandled": true, + "onsync": true, + "onunhandledrejection": true, + "performance": false, + "Performance": false, + "PerformanceEntry": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceResourceTiming": false, + "PerformanceTiming": false, + "postMessage": true, + "Promise": false, + "queueMicrotask": false, "registration": false, + "removeEventListener": false, + "Request": false, + "Response": false, "self": false, "ServiceWorker": false, "ServiceWorkerContainer": false, "ServiceWorkerGlobalScope": false, "ServiceWorkerMessageEvent": false, "ServiceWorkerRegistration": false, + "setInterval": false, + "setTimeout": false, "skipWaiting": false, - "WindowClient": false + "TextDecoder": false, + "TextEncoder": false, + "URL": false, + "URLSearchParams": false, + "WebSocket": false, + "WindowClient": false, + "Worker": false, + "WorkerGlobalScope": false, + "XMLHttpRequest": false }, "atomtest": { "advanceClock": false, @@ -1420,6 +1510,9 @@ "opr": false }, "greasemonkey": { + "cloneInto": false, + "createObjectIn": false, + "exportFunction": false, "GM": false, "GM_addStyle": false, "GM_deleteValue": false, diff --git a/node_modules/@babel/traverse/node_modules/globals/index.js b/node_modules/@babel/core/node_modules/globals/index.js similarity index 100% rename from node_modules/@babel/traverse/node_modules/globals/index.js rename to node_modules/@babel/core/node_modules/globals/index.js diff --git a/node_modules/@babel/highlight/node_modules/supports-color/license b/node_modules/@babel/core/node_modules/globals/license similarity index 100% rename from node_modules/@babel/highlight/node_modules/supports-color/license rename to node_modules/@babel/core/node_modules/globals/license diff --git a/node_modules/@babel/core/node_modules/globals/package.json b/node_modules/@babel/core/node_modules/globals/package.json new file mode 100644 index 0000000..8d34064 --- /dev/null +++ b/node_modules/@babel/core/node_modules/globals/package.json @@ -0,0 +1,73 @@ +{ + "_from": "globals@^11.1.0", + "_id": "globals@11.11.0", + "_inBundle": false, + "_integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", + "_location": "/@babel/core/globals", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "globals@^11.1.0", + "name": "globals", + "escapedName": "globals", + "rawSpec": "^11.1.0", + "saveSpec": null, + "fetchSpec": "^11.1.0" + }, + "_requiredBy": [ + "/@babel/core/@babel/traverse" + ], + "_resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", + "_shasum": "dcf93757fa2de5486fbeed7118538adf789e9c2e", + "_spec": "globals@^11.1.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\traverse", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/globals/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Global identifiers from different JavaScript environments", + "devDependencies": { + "ava": "0.21.0", + "xo": "0.18.0" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "globals.json" + ], + "homepage": "https://github.com/sindresorhus/globals#readme", + "keywords": [ + "globals", + "global", + "identifiers", + "variables", + "vars", + "jshint", + "eslint", + "environments" + ], + "license": "MIT", + "name": "globals", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/globals.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "11.11.0", + "xo": { + "ignores": [ + "get-browser-globals.js" + ] + } +} diff --git a/node_modules/@babel/traverse/node_modules/globals/readme.md b/node_modules/@babel/core/node_modules/globals/readme.md similarity index 100% rename from node_modules/@babel/traverse/node_modules/globals/readme.md rename to node_modules/@babel/core/node_modules/globals/readme.md diff --git a/node_modules/@babel/core/node_modules/js-tokens/CHANGELOG.md b/node_modules/@babel/core/node_modules/js-tokens/CHANGELOG.md new file mode 100644 index 0000000..755e6f6 --- /dev/null +++ b/node_modules/@babel/core/node_modules/js-tokens/CHANGELOG.md @@ -0,0 +1,151 @@ +### Version 4.0.0 (2018-01-28) ### + +- Added: Support for ES2018. The only change needed was recognizing the `s` + regex flag. +- Changed: _All_ tokens returned by the `matchToToken` function now have a + `closed` property. It is set to `undefined` for the tokens where “closed” + doesn’t make sense. This means that all tokens objects have the same shape, + which might improve performance. + +These are the breaking changes: + +- `'/a/s'.match(jsTokens)` no longer returns `['/', 'a', '/', 's']`, but + `['/a/s']`. (There are of course other variations of this.) +- Code that rely on some token objects not having the `closed` property could + now behave differently. + + +### Version 3.0.2 (2017-06-28) ### + +- No code changes. Just updates to the readme. + + +### Version 3.0.1 (2017-01-30) ### + +- Fixed: ES2015 unicode escapes with more than 6 hex digits are now matched + correctly. + + +### Version 3.0.0 (2017-01-11) ### + +This release contains one breaking change, that should [improve performance in +V8][v8-perf]: + +> So how can you, as a JavaScript developer, ensure that your RegExps are fast? +> If you are not interested in hooking into RegExp internals, make sure that +> neither the RegExp instance, nor its prototype is modified in order to get the +> best performance: +> +> ```js +> var re = /./g; +> re.exec(''); // Fast path. +> re.new_property = 'slow'; +> ``` + +This module used to export a single regex, with `.matchToToken` bolted +on, just like in the above example. This release changes the exports of +the module to avoid this issue. + +Before: + +```js +import jsTokens from "js-tokens" +// or: +var jsTokens = require("js-tokens") +var matchToToken = jsTokens.matchToToken +``` + +After: + +```js +import jsTokens, {matchToToken} from "js-tokens" +// or: +var jsTokens = require("js-tokens").default +var matchToToken = require("js-tokens").matchToToken +``` + +[v8-perf]: http://v8project.blogspot.se/2017/01/speeding-up-v8-regular-expressions.html + + +### Version 2.0.0 (2016-06-19) ### + +- Added: Support for ES2016. In other words, support for the `**` exponentiation + operator. + +These are the breaking changes: + +- `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`. +- `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`. + + +### Version 1.0.3 (2016-03-27) ### + +- Improved: Made the regex ever so slightly smaller. +- Updated: The readme. + + +### Version 1.0.2 (2015-10-18) ### + +- Improved: Limited npm package contents for a smaller download. Thanks to + @zertosh! + + +### Version 1.0.1 (2015-06-20) ### + +- Fixed: Declared an undeclared variable. + + +### Version 1.0.0 (2015-02-26) ### + +- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That + type is now equivalent to the Punctuator token in the ECMAScript + specification. (Backwards-incompatible change.) +- Fixed: A `-` followed by a number is now correctly matched as a punctuator + followed by a number. It used to be matched as just a number, but there is no + such thing as negative number literals. (Possibly backwards-incompatible + change.) + + +### Version 0.4.1 (2015-02-21) ### + +- Added: Support for the regex `u` flag. + + +### Version 0.4.0 (2015-02-21) ### + +- Improved: `jsTokens.matchToToken` performance. +- Added: Support for octal and binary number literals. +- Added: Support for template strings. + + +### Version 0.3.1 (2015-01-06) ### + +- Fixed: Support for unicode spaces. They used to be allowed in names (which is + very confusing), and some unicode newlines were wrongly allowed in strings and + regexes. + + +### Version 0.3.0 (2014-12-19) ### + +- Changed: The `jsTokens.names` array has been replaced with the + `jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no + longer part of the public API; instead use said function. See this [gist] for + an example. (Backwards-incompatible change.) +- Changed: The empty string is now considered an “invalid” token, instead an + “empty” token (its own group). (Backwards-incompatible change.) +- Removed: component support. (Backwards-incompatible change.) + +[gist]: https://gist.github.com/lydell/be49dbf80c382c473004 + + +### Version 0.2.0 (2014-06-19) ### + +- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own + category (“functionArrow”), for simplicity. (Backwards-incompatible change.) +- Added: ES6 splats (`...`) are now matched as an operator (instead of three + punctuations). (Backwards-incompatible change.) + + +### Version 0.1.0 (2014-03-08) ### + +- Initial release. diff --git a/node_modules/@babel/core/node_modules/js-tokens/LICENSE b/node_modules/@babel/core/node_modules/js-tokens/LICENSE new file mode 100644 index 0000000..54aef52 --- /dev/null +++ b/node_modules/@babel/core/node_modules/js-tokens/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/js-tokens/README.md b/node_modules/@babel/core/node_modules/js-tokens/README.md new file mode 100644 index 0000000..00cdf16 --- /dev/null +++ b/node_modules/@babel/core/node_modules/js-tokens/README.md @@ -0,0 +1,240 @@ +Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.svg?branch=master)](https://travis-ci.org/lydell/js-tokens) +======== + +A regex that tokenizes JavaScript. + +```js +var jsTokens = require("js-tokens").default + +var jsString = "var foo=opts.foo;\n..." + +jsString.match(jsTokens) +// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...] +``` + + +Installation +============ + +`npm install js-tokens` + +```js +import jsTokens from "js-tokens" +// or: +var jsTokens = require("js-tokens").default +``` + + +Usage +===== + +### `jsTokens` ### + +A regex with the `g` flag that matches JavaScript tokens. + +The regex _always_ matches, even invalid JavaScript and the empty string. + +The next match is always directly after the previous. + +### `var token = matchToToken(match)` ### + +```js +import {matchToToken} from "js-tokens" +// or: +var matchToToken = require("js-tokens").matchToToken +``` + +Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type: +String, value: String}` object. The following types are available: + +- string +- comment +- regex +- number +- name +- punctuator +- whitespace +- invalid + +Multi-line comments and strings also have a `closed` property indicating if the +token was closed or not (see below). + +Comments and strings both come in several flavors. To distinguish them, check if +the token starts with `//`, `/*`, `'`, `"` or `` ` ``. + +Names are ECMAScript IdentifierNames, that is, including both identifiers and +keywords. You may use [is-keyword-js] to tell them apart. + +Whitespace includes both line terminators and other whitespace. + +[is-keyword-js]: https://github.com/crissdev/is-keyword-js + + +ECMAScript support +================== + +The intention is to always support the latest ECMAScript version whose feature +set has been finalized. + +If adding support for a newer version requires changes, a new version with a +major verion bump will be released. + +Currently, ECMAScript 2018 is supported. + + +Invalid code handling +===================== + +Unterminated strings are still matched as strings. JavaScript strings cannot +contain (unescaped) newlines, so unterminated strings simply end at the end of +the line. Unterminated template strings can contain unescaped newlines, though, +so they go on to the end of input. + +Unterminated multi-line comments are also still matched as comments. They +simply go on to the end of the input. + +Unterminated regex literals are likely matched as division and whatever is +inside the regex. + +Invalid ASCII characters have their own capturing group. + +Invalid non-ASCII characters are treated as names, to simplify the matching of +names (except unicode spaces which are treated as whitespace). Note: See also +the [ES2018](#es2018) section. + +Regex literals may contain invalid regex syntax. They are still matched as +regex literals. They may also contain repeated regex flags, to keep the regex +simple. + +Strings may contain invalid escape sequences. + + +Limitations +=========== + +Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be +perfect. But that’s not the point either. + +You may compare jsTokens with [esprima] by using `esprima-compare.js`. +See `npm run esprima-compare`! + +[esprima]: http://esprima.org/ + +### Template string interpolation ### + +Template strings are matched as single tokens, from the starting `` ` `` to the +ending `` ` ``, including interpolations (whose tokens are not matched +individually). + +Matching template string interpolations requires recursive balancing of `{` and +`}`—something that JavaScript regexes cannot do. Only one level of nesting is +supported. + +### Division and regex literals collision ### + +Consider this example: + +```js +var g = 9.82 +var number = bar / 2/g + +var regex = / 2/g +``` + +A human can easily understand that in the `number` line we’re dealing with +division, and in the `regex` line we’re dealing with a regex literal. How come? +Because humans can look at the whole code to put the `/` characters in context. +A JavaScript regex cannot. It only sees forwards. (Well, ES2018 regexes can also +look backwards. See the [ES2018](#es2018) section). + +When the `jsTokens` regex scans throught the above, it will see the following +at the end of both the `number` and `regex` rows: + +```js +/ 2/g +``` + +It is then impossible to know if that is a regex literal, or part of an +expression dealing with division. + +Here is a similar case: + +```js +foo /= 2/g +foo(/= 2/g) +``` + +The first line divides the `foo` variable with `2/g`. The second line calls the +`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only +sees forwards, it cannot tell the two cases apart. + +There are some cases where we _can_ tell division and regex literals apart, +though. + +First off, we have the simple cases where there’s only one slash in the line: + +```js +var foo = 2/g +foo /= 2 +``` + +Regex literals cannot contain newlines, so the above cases are correctly +identified as division. Things are only problematic when there are more than +one non-comment slash in a single line. + +Secondly, not every character is a valid regex flag. + +```js +var number = bar / 2/e +``` + +The above example is also correctly identified as division, because `e` is not a +valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*` +(any letter) as flags, but it is not worth it since it increases the amount of +ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are +allowed. This means that the above example will be identified as division as +long as you don’t rename the `e` variable to some permutation of `gmiyus` 1 to 6 +characters long. + +Lastly, we can look _forward_ for information. + +- If the token following what looks like a regex literal is not valid after a + regex literal, but is valid in a division expression, then the regex literal + is treated as division instead. For example, a flagless regex cannot be + followed by a string, number or name, but all of those three can be the + denominator of a division. +- Generally, if what looks like a regex literal is followed by an operator, the + regex literal is treated as division instead. This is because regexes are + seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division + could likely be part of such an expression. + +Please consult the regex source and the test cases for precise information on +when regex or division is matched (should you need to know). In short, you +could sum it up as: + +If the end of a statement looks like a regex literal (even if it isn’t), it +will be treated as one. Otherwise it should work as expected (if you write sane +code). + +### ES2018 ### + +ES2018 added some nice regex improvements to the language. + +- [Unicode property escapes] should allow telling names and invalid non-ASCII + characters apart without blowing up the regex size. +- [Lookbehind assertions] should allow matching telling division and regex + literals apart in more cases. +- [Named capture groups] might simplify some things. + +These things would be nice to do, but are not critical. They probably have to +wait until the oldest maintained Node.js LTS release supports those features. + +[Unicode property escapes]: http://2ality.com/2017/07/regexp-unicode-property-escapes.html +[Lookbehind assertions]: http://2ality.com/2017/05/regexp-lookbehind-assertions.html +[Named capture groups]: http://2ality.com/2017/05/regexp-named-capture-groups.html + + +License +======= + +[MIT](LICENSE). diff --git a/node_modules/@babel/core/node_modules/js-tokens/index.js b/node_modules/@babel/core/node_modules/js-tokens/index.js new file mode 100644 index 0000000..b23a4a0 --- /dev/null +++ b/node_modules/@babel/core/node_modules/js-tokens/index.js @@ -0,0 +1,23 @@ +// Copyright 2014, 2015, 2016, 2017, 2018 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))|[gmiyus]{1,6}\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], closed: undefined} + 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 +} diff --git a/node_modules/@babel/core/node_modules/js-tokens/package.json b/node_modules/@babel/core/node_modules/js-tokens/package.json new file mode 100644 index 0000000..f68e22f --- /dev/null +++ b/node_modules/@babel/core/node_modules/js-tokens/package.json @@ -0,0 +1,64 @@ +{ + "_from": "js-tokens@^4.0.0", + "_id": "js-tokens@4.0.0", + "_inBundle": false, + "_integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "_location": "/@babel/core/js-tokens", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "js-tokens@^4.0.0", + "name": "js-tokens", + "escapedName": "js-tokens", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/@babel/core/@babel/highlight" + ], + "_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "_shasum": "19203fb59991df98e3a287050d4647cdeaf32499", + "_spec": "js-tokens@^4.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\highlight", + "author": { + "name": "Simon Lydell" + }, + "bugs": { + "url": "https://github.com/lydell/js-tokens/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A regex that tokenizes JavaScript.", + "devDependencies": { + "coffeescript": "2.1.1", + "esprima": "4.0.0", + "everything.js": "1.0.3", + "mocha": "5.0.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/lydell/js-tokens#readme", + "keywords": [ + "JavaScript", + "js", + "token", + "tokenize", + "regex" + ], + "license": "MIT", + "name": "js-tokens", + "repository": { + "type": "git", + "url": "git+https://github.com/lydell/js-tokens.git" + }, + "scripts": { + "build": "node generate-index.js", + "dev": "npm run build && npm test", + "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", + "test": "mocha --ui tdd" + }, + "version": "4.0.0" +} diff --git a/node_modules/@babel/generator/node_modules/jsesc/LICENSE-MIT.txt b/node_modules/@babel/core/node_modules/jsesc/LICENSE-MIT.txt similarity index 100% rename from node_modules/@babel/generator/node_modules/jsesc/LICENSE-MIT.txt rename to node_modules/@babel/core/node_modules/jsesc/LICENSE-MIT.txt diff --git a/node_modules/@babel/generator/node_modules/jsesc/README.md b/node_modules/@babel/core/node_modules/jsesc/README.md similarity index 100% rename from node_modules/@babel/generator/node_modules/jsesc/README.md rename to node_modules/@babel/core/node_modules/jsesc/README.md diff --git a/node_modules/@babel/generator/node_modules/jsesc/bin/jsesc b/node_modules/@babel/core/node_modules/jsesc/bin/jsesc old mode 100755 new mode 100644 similarity index 100% rename from node_modules/@babel/generator/node_modules/jsesc/bin/jsesc rename to node_modules/@babel/core/node_modules/jsesc/bin/jsesc diff --git a/node_modules/@babel/generator/node_modules/jsesc/jsesc.js b/node_modules/@babel/core/node_modules/jsesc/jsesc.js similarity index 99% rename from node_modules/@babel/generator/node_modules/jsesc/jsesc.js rename to node_modules/@babel/core/node_modules/jsesc/jsesc.js index 5052af3..7b8b923 100644 --- a/node_modules/@babel/generator/node_modules/jsesc/jsesc.js +++ b/node_modules/@babel/core/node_modules/jsesc/jsesc.js @@ -71,7 +71,7 @@ const singleEscapes = { const regexSingleEscape = /["'\\\b\f\n\r\t]/; const regexDigit = /[0-9]/; -const regexWhitelist = /[ !#-&\(-\[\]-~]/; +const regexWhitelist = /[ !#-&\(-\[\]-_a-~]/; const jsesc = (argument, options) => { const increaseIndentation = () => { @@ -324,6 +324,6 @@ const jsesc = (argument, options) => { return result; }; -jsesc.version = '2.5.1'; +jsesc.version = '2.5.2'; module.exports = jsesc; diff --git a/node_modules/@babel/generator/node_modules/jsesc/man/jsesc.1 b/node_modules/@babel/core/node_modules/jsesc/man/jsesc.1 similarity index 100% rename from node_modules/@babel/generator/node_modules/jsesc/man/jsesc.1 rename to node_modules/@babel/core/node_modules/jsesc/man/jsesc.1 diff --git a/node_modules/@babel/core/node_modules/jsesc/package.json b/node_modules/@babel/core/node_modules/jsesc/package.json new file mode 100644 index 0000000..8813e74 --- /dev/null +++ b/node_modules/@babel/core/node_modules/jsesc/package.json @@ -0,0 +1,85 @@ +{ + "_from": "jsesc@^2.5.1", + "_id": "jsesc@2.5.2", + "_inBundle": false, + "_integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "_location": "/@babel/core/jsesc", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "jsesc@^2.5.1", + "name": "jsesc", + "escapedName": "jsesc", + "rawSpec": "^2.5.1", + "saveSpec": null, + "fetchSpec": "^2.5.1" + }, + "_requiredBy": [ + "/@babel/core/@babel/generator" + ], + "_resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "_shasum": "80564d2e483dacf6e8ef209650a67df3f0c283a4", + "_spec": "jsesc@^2.5.1", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\generator", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "bin": { + "jsesc": "bin/jsesc" + }, + "bugs": { + "url": "https://github.com/mathiasbynens/jsesc/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.", + "devDependencies": { + "coveralls": "^2.11.6", + "grunt": "^0.4.5", + "grunt-template": "^0.2.3", + "istanbul": "^0.4.2", + "mocha": "*", + "regenerate": "^1.3.0", + "requirejs": "^2.1.22" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "LICENSE-MIT.txt", + "jsesc.js", + "bin/", + "man/" + ], + "homepage": "https://mths.be/jsesc", + "keywords": [ + "buffer", + "escape", + "javascript", + "json", + "map", + "set", + "string", + "stringify", + "tool" + ], + "license": "MIT", + "main": "jsesc.js", + "man": [ + "man/jsesc.1" + ], + "name": "jsesc", + "repository": { + "type": "git", + "url": "git+https://github.com/mathiasbynens/jsesc.git" + }, + "scripts": { + "build": "grunt template", + "cover": "istanbul cover --report 'html' --verbose --dir 'coverage' 'tests/tests.js'", + "coveralls": "istanbul cover --verbose --dir 'coverage' 'tests/tests.js' && coveralls < coverage/lcov.info'", + "test": "mocha tests" + }, + "version": "2.5.2" +} diff --git a/node_modules/@babel/core/node_modules/json5/CHANGELOG.md b/node_modules/@babel/core/node_modules/json5/CHANGELOG.md new file mode 100644 index 0000000..b27fd07 --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/CHANGELOG.md @@ -0,0 +1,315 @@ +### v2.1.0 [[code][c2.1.0], [diff][d2.1.0]] + +[c2.1.0]: https://github.com/json5/json5/tree/v2.1.0 +[d2.1.0]: https://github.com/json5/json5/compare/v2.0.1...v2.1.0 + +- New: The `index.mjs` and `index.min.mjs` browser builds in the `dist` + directory support ES6 modules. ([#187]) + +### v2.0.1 [[code][c2.0.1], [diff][d2.0.1]] + +[c2.0.1]: https://github.com/json5/json5/tree/v2.0.1 +[d2.0.1]: https://github.com/json5/json5/compare/v2.0.0...v2.0.1 + +- Fix: The browser builds in the `dist` directory support ES5. ([#182]) + +### v2.0.0 [[code][c2.0.0], [diff][d2.0.0]] + +[c2.0.0]: https://github.com/json5/json5/tree/v2.0.0 +[d2.0.0]: https://github.com/json5/json5/compare/v1.0.1...v2.0.0 + +- **Major**: JSON5 officially supports Node.js v6 and later. Support for Node.js + v4 has been dropped. Since Node.js v6 supports ES5 features, the code has been + rewritten in native ES5, and the dependence on Babel has been eliminated. + +- New: Support for Unicode 10 has been added. + +- New: The test framework has been migrated from Mocha to Tap. + +- New: The browser build at `dist/index.js` is no longer minified by default. A + minified version is available at `dist/index.min.js`. ([#181]) + +- Fix: The warning has been made clearer when line and paragraph separators are + used in strings. + +- Fix: `package.json5` has been restored, and it is automatically generated and + committed when the version is bumped. A new `build-package` NPM script has + been added to facilitate this. + +### v1.0.1 [[code][c1.0.1], [diff][d1.0.1]] + +[c1.0.1]: https://github.com/json5/json5/tree/v1.0.1 +[d1.0.1]: https://github.com/json5/json5/compare/v1.0.0...v1.0.1 + +This release includes a bug fix and minor change. + +- Fix: `parse` throws on unclosed objects and arrays. + +- New: `package.json5` has been removed until an easier way to keep it in sync + with `package.json` is found. + + +### v1.0.0 [[code][c1.0.0], [diff][d1.0.0]] + +[c1.0.0]: https://github.com/json5/json5/tree/v1.0.0 +[d1.0.0]: https://github.com/json5/json5/compare/v0.5.1...v1.0.0 + +This release includes major internal changes and public API enhancements. + +- **Major**: JSON5 officially supports Node.js v4 and later. Support for Node.js + v0.10 and v0.12 have been dropped. + +- New: Unicode property names and Unicode escapes in property names are + supported. ([#1]) + +- New: `stringify` outputs trailing commas in objects and arrays when a `space` + option is provided. ([#66]) + +- New: JSON5 allows line and paragraph separator characters (U+2028 and U+2029) + in strings in order to be compatible with JSON. However, ES5 does not allow + these characters in strings, so JSON5 gives a warning when they are parsed and + escapes them when they are stringified. ([#70]) + +- New: `stringify` accepts an options object as its second argument. The + supported options are `replacer`, `space`, and a new `quote` option that + specifies the quote character used in strings. ([#71]) + +- New: The CLI supports STDIN and STDOUT and adds `--out-file`, `--space`, and + `--validate` options. See `json5 --help` for more information. ([#72], [#84], + and [#108]) + +- New: In addition to the white space characters space `\t`, `\v`, `\f`, `\n`, + `\r`, and `\xA0`, the additional white space characters `\u2028`, `\u2029`, + and all other characters in the Space Separator Unicode category are allowed. + +- New: In addition to the character escapes `\'`, `\"`, `\\`, `\b`, `\f`, `\n`, + `\r`, and `\t`, the additional character escapes `\v` and `\0`, hexadecimal + escapes like `\x0F`, and unnecessary escapes like `\a` are allowed in string + values and string property names. + +- New: `stringify` outputs strings with single quotes by default but + intelligently uses double quotes if there are more single quotes than double + quotes inside the string. (i.e. `stringify('Stay here.')` outputs + `'Stay here.'` while `stringify('Let\'s go.')` outputs `"Let's go."`) + +- New: When a character is not allowed in a string, `stringify` outputs a + character escape like `\t` when available, a hexadecimal escape like `\x0F` + when the Unicode code point is less than 256, or a Unicode character escape + like `\u01FF`, in that order. + +- New: `stringify` checks for a `toJSON5` method on objects and, if it exists, + stringifies its return value instead of the object. `toJSON5` overrides + `toJSON` if they both exist. + +- New: To `require` or `import` JSON5 files, use `require('json5/lib/register')` + or `import 'json5/lib/register'`. Previous versions used `json5/lib/require`, + which still exists for backward compatibility but is deprecated and will give + a warning. + +- New: To use JSON5 in browsers, use the file at `dist/index.js` or + `https://unpkg.com/json5@^1.0.0`. + +- Fix: `stringify` properly outputs `Infinity` and `NaN`. ([#67]) + +- Fix: `isWord` no longer becomes a property of `JSON5` after calling + `stringify`. ([#68] and [#89]) + +- Fix: `stringify` no longer throws when an object does not have a `prototype`. + ([#154]) + +- Fix: `stringify` properly handles the `key` argument of `toJSON(key)` methods. + `toJSON5(key)` follows this pattern. + +- Fix: `stringify` accepts `Number` and `String` objects as its `space` + argument. + +- Fix: In addition to a function, `stringify` also accepts an array of keys to + include in the output as its `replacer` argument. Numbers, `Number` objects, + and `String` objects will be converted to a string if they are given as array + values. + + +### v0.5.1 [[code][c0.5.1], [diff][d0.5.1]] + +[c0.5.1]: https://github.com/json5/json5/tree/v0.5.1 +[d0.5.1]: https://github.com/json5/json5/compare/v0.5.0...v0.5.1 + +This release includes a minor fix for indentations when stringifying empty +arrays. + +- Fix: Indents no longer appear in empty arrays when stringified. ([#134]) + + +### v0.5.0 [[code][c0.5.0], [diff][d0.5.0]] + +[c0.5.0]: https://github.com/json5/json5/tree/v0.5.0 +[d0.5.0]: https://github.com/json5/json5/compare/v0.4.0...v0.5.0 + +This release includes major internal changes and public API enhancements. + +- **Major:** JSON5 officially supports Node.js v4 LTS and v5. Support for + Node.js v0.6 and v0.8 have been dropped, while support for v0.10 and v0.12 + remain. + +- Fix: YUI Compressor no longer fails when compressing json5.js. ([#97]) + +- New: `parse` and the CLI provide line and column numbers when displaying error + messages. ([#101]; awesome work by [@amb26].) + + +### v0.4.0 [[code][c0.4.0], [diff][d0.4.0]] + +[c0.4.0]: https://github.com/json5/json5/tree/v0.4.0 +[d0.4.0]: https://github.com/json5/json5/compare/v0.2.0...v0.4.0 + +Note that v0.3.0 was tagged, but never published to npm, so this v0.4.0 +changelog entry includes v0.3.0 features. + +This is a massive release that adds `stringify` support, among other things. + +- **Major:** `JSON5.stringify()` now exists! + This method is analogous to the native `JSON.stringify()`; + it just avoids quoting keys where possible. + See the [usage documentation](./README.md#usage) for more. + ([#32]; huge thanks and props [@aeisenberg]!) + +- New: `NaN` and `-NaN` are now allowed number literals. + ([#30]; thanks [@rowanhill].) + +- New: Duplicate object keys are now allowed; the last value is used. + This is the same behavior as JSON. ([#57]; thanks [@jordanbtucker].) + +- Fix: Properly handle various whitespace and newline cases now. + E.g. JSON5 now properly supports escaped CR and CRLF newlines in strings, + and JSON5 now accepts the same whitespace as JSON (stricter than ES5). + ([#58], [#60], and [#63]; thanks [@jordanbtucker].) + +- New: Negative hexadecimal numbers (e.g. `-0xC8`) are allowed again. + (They were disallowed in v0.2.0; see below.) + It turns out they *are* valid in ES5, so JSON5 supports them now too. + ([#36]; thanks [@jordanbtucker]!) + + +### v0.2.0 [[code][c0.2.0], [diff][d0.2.0]] + +[c0.2.0]: https://github.com/json5/json5/tree/v0.2.0 +[d0.2.0]: https://github.com/json5/json5/compare/v0.1.0...v0.2.0 + +This release fixes some bugs and adds some more utility features to help you +express data more easily: + +- **Breaking:** Negative hexadecimal numbers (e.g. `-0xC8`) are rejected now. + While V8 (e.g. Chrome and Node) supported them, it turns out they're invalid + in ES5. This has been [fixed in V8][v8-hex-fix] (and by extension, Chrome + and Node), so JSON5 officially rejects them now, too. ([#36]) + +- New: Trailing decimal points in decimal numbers are allowed again. + (They were disallowed in v0.1.0; see below.) + They're allowed by ES5, and differentiating between integers and floats may + make sense on some platforms. ([#16]; thanks [@Midar].) + +- New: `Infinity` and `-Infinity` are now allowed number literals. + ([#30]; thanks [@pepkin88].) + +- New: Plus signs (`+`) in front of numbers are now allowed, since it can + be helpful in some contexts to explicitly mark numbers as positive. + (E.g. when a property represents changes or deltas.) + +- Fix: unescaped newlines in strings are rejected now. + ([#24]; thanks [@Midar].) + + +### v0.1.0 [[code][c0.1.0], [diff][d0.1.0]] + +[c0.1.0]: https://github.com/json5/json5/tree/v0.1.0 +[d0.1.0]: https://github.com/json5/json5/compare/v0.0.1...v0.1.0 + +This release tightens JSON5 support and adds helpful utility features: + +- New: Support hexadecimal numbers. (Thanks [@MaxNanasy].) + +- Fix: Reject octal numbers properly now. Previously, they were accepted but + improperly parsed as base-10 numbers. (Thanks [@MaxNanasy].) + +- **Breaking:** Reject "noctal" numbers now (base-10 numbers that begin with a + leading zero). These are disallowed by both JSON5 and JSON, as well as by + ES5's strict mode. (Thanks [@MaxNanasy].) + +- New: Support leading decimal points in decimal numbers. + (Thanks [@MaxNanasy].) + +- **Breaking:** Reject trailing decimal points in decimal numbers now. These + are disallowed by both JSON5 and JSON. (Thanks [@MaxNanasy].) + +- **Breaking:** Reject omitted elements in arrays now. These are disallowed by + both JSON5 and JSON. + +- Fix: Throw proper `SyntaxError` instances on errors now. + +- New: Add Node.js `require()` hook. Register via `json5/lib/require`. + +- New: Add Node.js `json5` executable to compile JSON5 files to JSON. + + +### v0.0.1 [[code][c0.0.1], [diff][d0.0.1]] + +[c0.0.1]: https://github.com/json5/json5/tree/v0.0.1 +[d0.0.1]: https://github.com/json5/json5/compare/v0.0.0...v0.0.1 + +This was the first implementation of this JSON5 parser. + +- Support unquoted object keys, including reserved words. Unicode characters + and escape sequences sequences aren't yet supported. + +- Support single-quoted strings. + +- Support multi-line strings. + +- Support trailing commas in arrays and objects. + +- Support comments, both inline and block. + + +### v0.0.0 [[code](https://github.com/json5/json5/tree/v0.0.0)] + +Let's consider this to be Douglas Crockford's original [json_parse.js] — a +parser for the regular JSON format. + + +[json_parse.js]: https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js +[v8-hex-fix]: http://code.google.com/p/v8/issues/detail?id=2240 + +[@MaxNanasy]: https://github.com/MaxNanasy +[@Midar]: https://github.com/Midar +[@pepkin88]: https://github.com/pepkin88 +[@rowanhill]: https://github.com/rowanhill +[@aeisenberg]: https://github.com/aeisenberg +[@jordanbtucker]: https://github.com/jordanbtucker +[@amb26]: https://github.com/amb26 + +[#1]: https://github.com/json5/json5/issues/1 +[#16]: https://github.com/json5/json5/issues/16 +[#24]: https://github.com/json5/json5/issues/24 +[#30]: https://github.com/json5/json5/issues/30 +[#32]: https://github.com/json5/json5/issues/32 +[#36]: https://github.com/json5/json5/issues/36 +[#57]: https://github.com/json5/json5/issues/57 +[#58]: https://github.com/json5/json5/pull/58 +[#60]: https://github.com/json5/json5/pull/60 +[#63]: https://github.com/json5/json5/pull/63 +[#66]: https://github.com/json5/json5/issues/66 +[#67]: https://github.com/json5/json5/issues/67 +[#68]: https://github.com/json5/json5/issues/68 +[#70]: https://github.com/json5/json5/issues/70 +[#71]: https://github.com/json5/json5/issues/71 +[#72]: https://github.com/json5/json5/issues/72 +[#84]: https://github.com/json5/json5/pull/84 +[#89]: https://github.com/json5/json5/pull/89 +[#97]: https://github.com/json5/json5/pull/97 +[#101]: https://github.com/json5/json5/pull/101 +[#108]: https://github.com/json5/json5/pull/108 +[#134]: https://github.com/json5/json5/pull/134 +[#154]: https://github.com/json5/json5/issues/154 +[#181]: https://github.com/json5/json5/issues/181 +[#182]: https://github.com/json5/json5/issues/182 +[#187]: https://github.com/json5/json5/issues/187 diff --git a/node_modules/@babel/core/node_modules/json5/LICENSE.md b/node_modules/@babel/core/node_modules/json5/LICENSE.md new file mode 100644 index 0000000..2171aca --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/LICENSE.md @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2012-2018 Aseem Kishore, and [others]. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +[others]: https://github.com/json5/json5/contributors diff --git a/node_modules/@babel/core/node_modules/json5/README.md b/node_modules/@babel/core/node_modules/json5/README.md new file mode 100644 index 0000000..9064b12 --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/README.md @@ -0,0 +1,234 @@ +# JSON5 – JSON for Humans + +[![Build Status](https://travis-ci.org/json5/json5.svg)][Build Status] +[![Coverage +Status](https://coveralls.io/repos/github/json5/json5/badge.svg)][Coverage +Status] + +The JSON5 Data Interchange Format (JSON5) is a superset of [JSON] that aims to +alleviate some of the limitations of JSON by expanding its syntax to include +some productions from [ECMAScript 5.1]. + +This JavaScript library is the official reference implementation for JSON5 +parsing and serialization libraries. + +[Build Status]: https://travis-ci.org/json5/json5 + +[Coverage Status]: https://coveralls.io/github/json5/json5 + +[JSON]: https://tools.ietf.org/html/rfc7159 + +[ECMAScript 5.1]: https://www.ecma-international.org/ecma-262/5.1/ + +## Summary of Features +The following ECMAScript 5.1 features, which are not supported in JSON, have +been extended to JSON5. + +### Objects +- Object keys may be an ECMAScript 5.1 _[IdentifierName]_. +- Objects may have a single trailing comma. + +### Arrays +- Arrays may have a single trailing comma. + +### Strings +- Strings may be single quoted. +- Strings may span multiple lines by escaping new line characters. +- Strings may include character escapes. + +### Numbers +- Numbers may be hexadecimal. +- Numbers may have a leading or trailing decimal point. +- Numbers may be [IEEE 754] positive infinity, negative infinity, and NaN. +- Numbers may begin with an explicit plus sign. + +### Comments +- Single and multi-line comments are allowed. + +### White Space +- Additional white space characters are allowed. + +[IdentifierName]: https://www.ecma-international.org/ecma-262/5.1/#sec-7.6 + +[IEEE 754]: http://ieeexplore.ieee.org/servlet/opac?punumber=4610933 + +## Short Example +```js +{ + // comments + unquoted: 'and you can quote me on that', + singleQuotes: 'I can use "double quotes" here', + lineBreaks: "Look, Mom! \ +No \\n's!", + hexadecimal: 0xdecaf, + leadingDecimalPoint: .8675309, andTrailing: 8675309., + positiveSign: +1, + trailingComma: 'in objects', andIn: ['arrays',], + "backwardsCompatible": "with JSON", +} +``` + +## Specification +For a detailed explanation of the JSON5 format, please read the [official +specification](https://json5.github.io/json5-spec/). + +## Installation +### Node.js +```sh +npm install json5 +``` + +```js +const JSON5 = require('json5') +``` + +### Browsers +```html + +``` + +This will create a global `JSON5` variable. + +## API +The JSON5 API is compatible with the [JSON API]. + +[JSON API]: +https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON + +### JSON5.parse() +Parses a JSON5 string, constructing the JavaScript value or object described by +the string. An optional reviver function can be provided to perform a +transformation on the resulting object before it is returned. + +#### Syntax + JSON5.parse(text[, reviver]) + +#### Parameters +- `text`: The string to parse as JSON5. +- `reviver`: If a function, this prescribes how the value originally produced by + parsing is transformed, before being returned. + +#### Return value +The object corresponding to the given JSON5 text. + +### JSON5.stringify() +Converts a JavaScript value to a JSON5 string, optionally replacing values if a +replacer function is specified, or optionally including only the specified +properties if a replacer array is specified. + +#### Syntax + JSON5.stringify(value[, replacer[, space]]) + JSON5.stringify(value[, options]) + +#### Parameters +- `value`: The value to convert to a JSON5 string. +- `replacer`: A function that alters the behavior of the stringification + process, or an array of String and Number objects that serve as a whitelist + for selecting/filtering the properties of the value object to be included in + the JSON5 string. If this value is null or not provided, all properties of the + object are included in the resulting JSON5 string. +- `space`: A String or Number object that's used to insert white space into the + output JSON5 string for readability purposes. If this is a Number, it + indicates the number of space characters to use as white space; this number is + capped at 10 (if it is greater, the value is just 10). Values less than 1 + indicate that no space should be used. If this is a String, the string (or the + first 10 characters of the string, if it's longer than that) is used as white + space. If this parameter is not provided (or is null), no white space is used. + If white space is used, trailing commas will be used in objects and arrays. +- `options`: An object with the following properties: + - `replacer`: Same as the `replacer` parameter. + - `space`: Same as the `space` parameter. + - `quote`: A String representing the quote character to use when serializing + strings. + +#### Return value +A JSON5 string representing the value. + +### Node.js `require()` JSON5 files +When using Node.js, you can `require()` JSON5 files by adding the following +statement. + +```js +require('json5/lib/register') +``` + +Then you can load a JSON5 file with a Node.js `require()` statement. For +example: + +```js +const config = require('./config.json5') +``` + +## CLI +Since JSON is more widely used than JSON5, this package includes a CLI for +converting JSON5 to JSON and for validating the syntax of JSON5 documents. + +### Installation +```sh +npm install --global json5 +``` + +### Usage +```sh +json5 [options] +``` + +If `` is not provided, then STDIN is used. + +#### Options: +- `-s`, `--space`: The number of spaces to indent or `t` for tabs +- `-o`, `--out-file [file]`: Output to the specified file, otherwise STDOUT +- `-v`, `--validate`: Validate JSON5 but do not output JSON +- `-V`, `--version`: Output the version number +- `-h`, `--help`: Output usage information + +## Contributing +### Development +```sh +git clone https://github.com/json5/json5 +cd json5 +npm install +``` + +When contributing code, please write relevant tests and run `npm test` and `npm +run lint` before submitting pull requests. Please use an editor that supports +[EditorConfig](http://editorconfig.org/). + +### Issues +To report bugs or request features regarding the JSON5 data format, please +submit an issue to the [official specification +repository](https://github.com/json5/json5-spec). + +To report bugs or request features regarding the JavaScript implentation of +JSON5, please submit an issue to this repository. + +## License +MIT. See [LICENSE.md](./LICENSE.md) for details. + +## Credits +[Assem Kishore](https://github.com/aseemk) founded this project. + +[Michael Bolin](http://bolinfest.com/) independently arrived at and published +some of these same ideas with awesome explanations and detail. Recommended +reading: [Suggested Improvements to JSON](http://bolinfest.com/essays/json.html) + +[Douglas Crockford](http://www.crockford.com/) of course designed and built +JSON, but his state machine diagrams on the [JSON website](http://json.org/), as +cheesy as it may sound, gave us motivation and confidence that building a new +parser to implement these ideas was within reach! The original +implementation of JSON5 was also modeled directly off of Doug’s open-source +[json_parse.js] parser. We’re grateful for that clean and well-documented +code. + +[json_parse.js]: +https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js + +[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific +supporter, contributing multiple patches and ideas. + +[Andrew Eisenberg](https://github.com/aeisenberg) contributed the original +`stringify` method. + +[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely +with ES5, wrote the official JSON5 specification, completely rewrote the +codebase from the ground up, and is actively maintaining this project. diff --git a/node_modules/@babel/core/node_modules/json5/dist/index.js b/node_modules/@babel/core/node_modules/json5/dist/index.js new file mode 100644 index 0000000..dcbe04f --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/dist/index.js @@ -0,0 +1,1688 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.JSON5 = factory()); +}(this, (function () { 'use strict'; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var _global = createCommonjsModule(function (module) { + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); + if (typeof __g == 'number') { __g = global; } // eslint-disable-line no-undef + }); + + var _core = createCommonjsModule(function (module) { + var core = module.exports = { version: '2.5.7' }; + if (typeof __e == 'number') { __e = core; } // eslint-disable-line no-undef + }); + var _core_1 = _core.version; + + var _isObject = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + var _anObject = function (it) { + if (!_isObject(it)) { throw TypeError(it + ' is not an object!'); } + return it; + }; + + var _fails = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + // Thank's IE8 for his funny defineProperty + var _descriptors = !_fails(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; + }); + + var document = _global.document; + // typeof document.createElement is 'object' in old IE + var is = _isObject(document) && _isObject(document.createElement); + var _domCreate = function (it) { + return is ? document.createElement(it) : {}; + }; + + var _ie8DomDefine = !_descriptors && !_fails(function () { + return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; + }); + + // 7.1.1 ToPrimitive(input [, PreferredType]) + + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + var _toPrimitive = function (it, S) { + if (!_isObject(it)) { return it; } + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } + if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) { return val; } + if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } + throw TypeError("Can't convert object to primitive value"); + }; + + var dP = Object.defineProperty; + + var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { + _anObject(O); + P = _toPrimitive(P, true); + _anObject(Attributes); + if (_ie8DomDefine) { try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } } + if ('get' in Attributes || 'set' in Attributes) { throw TypeError('Accessors not supported!'); } + if ('value' in Attributes) { O[P] = Attributes.value; } + return O; + }; + + var _objectDp = { + f: f + }; + + var _propertyDesc = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; + }; + + var _hide = _descriptors ? function (object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); + } : function (object, key, value) { + object[key] = value; + return object; + }; + + var hasOwnProperty = {}.hasOwnProperty; + var _has = function (it, key) { + return hasOwnProperty.call(it, key); + }; + + var id = 0; + var px = Math.random(); + var _uid = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + + var _redefine = createCommonjsModule(function (module) { + var SRC = _uid('src'); + var TO_STRING = 'toString'; + var $toString = Function[TO_STRING]; + var TPL = ('' + $toString).split(TO_STRING); + + _core.inspectSource = function (it) { + return $toString.call(it); + }; + + (module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) { _has(val, 'name') || _hide(val, 'name', key); } + if (O[key] === val) { return; } + if (isFunction) { _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); } + if (O === _global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + _hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + _hide(O, key, val); + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || $toString.call(this); + }); + }); + + var _aFunction = function (it) { + if (typeof it != 'function') { throw TypeError(it + ' is not a function!'); } + return it; + }; + + // optional / simple context binding + + var _ctx = function (fn, that, length) { + _aFunction(fn); + if (that === undefined) { return fn; } + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; + }; + + var PROTOTYPE = 'prototype'; + + var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) { source = name; } + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; + // extend global + if (target) { _redefine(target, key, out, type & $export.U); } + // export + if (exports[key] != out) { _hide(exports, key, exp); } + if (IS_PROTO && expProto[key] != out) { expProto[key] = out; } + } + }; + _global.core = _core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + var _export = $export; + + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + var _toInteger = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + // 7.2.1 RequireObjectCoercible(argument) + var _defined = function (it) { + if (it == undefined) { throw TypeError("Can't call method on " + it); } + return it; + }; + + // true -> String#at + // false -> String#codePointAt + var _stringAt = function (TO_STRING) { + return function (that, pos) { + var s = String(_defined(that)); + var i = _toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) { return TO_STRING ? '' : undefined; } + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + + var $at = _stringAt(false); + _export(_export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } + }); + + var codePointAt = _core.String.codePointAt; + + var max = Math.max; + var min = Math.min; + var _toAbsoluteIndex = function (index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + + var fromCharCode = String.fromCharCode; + var $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + _export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { + var arguments$1 = arguments; + // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments$1[i++]; + if (_toAbsoluteIndex(code, 0x10ffff) !== code) { throw RangeError(code + ' is not a valid code point'); } + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } + }); + + var fromCodePoint = _core.String.fromCodePoint; + + // This is a generated file. Do not edit. + var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; + var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; + var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; + + var unicode = { + Space_Separator: Space_Separator, + ID_Start: ID_Start, + ID_Continue: ID_Continue + }; + + var util = { + isSpaceSeparator: function isSpaceSeparator (c) { + return unicode.Space_Separator.test(c) + }, + + isIdStartChar: function isIdStartChar (c) { + return ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar: function isIdContinueChar (c) { + return ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit: function isDigit (c) { + return /[0-9]/.test(c) + }, + + isHexDigit: function isHexDigit (c) { + return /[0-9A-Fa-f]/.test(c) + }, + }; + + var source; + var parseState; + var stack; + var pos; + var line; + var column; + var token; + var key; + var root; + + var parse = function parse (text, reviver) { + source = String(text); + parseState = 'start'; + stack = []; + pos = 0; + line = 1; + column = 0; + token = undefined; + key = undefined; + root = undefined; + + do { + token = lex(); + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState](); + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root + }; + + function internalize (holder, name, reviver) { + var value = holder[name]; + if (value != null && typeof value === 'object') { + for (var key in value) { + var replacement = internalize(value, key, reviver); + if (replacement === undefined) { + delete value[key]; + } else { + value[key] = replacement; + } + } + } + + return reviver.call(holder, name, value) + } + + var lexState; + var buffer; + var doubleQuote; + var sign; + var c; + + function lex () { + lexState = 'default'; + buffer = ''; + doubleQuote = false; + sign = 1; + + for (;;) { + c = peek(); + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + var token = lexStates[lexState](); + if (token) { + return token + } + } + } + + function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } + } + + function read () { + var c = peek(); + + if (c === '\n') { + line++; + column = 0; + } else if (c) { + column += c.length; + } else { + column++; + } + + if (c) { + pos += c.length; + } + + return c + } + + var lexStates = { + default: function default$1 () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + return + + case '/': + read(); + lexState = 'comment'; + return + + case undefined: + read(); + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read(); + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment: function comment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineComment'; + return + + case '/': + read(); + lexState = 'singleLineComment'; + return + } + + throw invalidChar(read()) + }, + + multiLineComment: function multiLineComment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineCommentAsterisk'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + }, + + multiLineCommentAsterisk: function multiLineCommentAsterisk () { + switch (c) { + case '*': + read(); + return + + case '/': + read(); + lexState = 'default'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + lexState = 'multiLineComment'; + }, + + singleLineComment: function singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + lexState = 'default'; + return + + case undefined: + read(); + return newToken('eof') + } + + read(); + }, + + value: function value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read(); + literal('ull'); + return newToken('null', null) + + case 't': + read(); + literal('rue'); + return newToken('boolean', true) + + case 'f': + read(); + literal('alse'); + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1; + } + + lexState = 'sign'; + return + + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"'); + buffer = ''; + lexState = 'string'; + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape: function identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + var u = unicodeEscape(); + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + identifierName: function identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read(); + return + + case '\\': + read(); + lexState = 'identifierNameEscape'; + return + } + + if (util.isIdContinueChar(c)) { + buffer += read(); + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape: function identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + var u = unicodeEscape(); + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + sign: function sign$1 () { + switch (c) { + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', sign * Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero: function zero () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + + case 'x': + case 'X': + buffer += read(); + lexState = 'hexadecimal'; + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger: function decimalInteger () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading: function decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + throw invalidChar(read()) + }, + + decimalPoint: function decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction: function decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent: function decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read(); + lexState = 'decimalExponentSign'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign: function decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger: function decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal: function hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = 'hexadecimalInteger'; + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger: function hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string: function string () { + switch (c) { + case '\\': + read(); + buffer += escape(); + return + + case '"': + if (doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case "'": + if (!doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c); + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read(); + }, + + start: function start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value'; + }, + + beforePropertyName: function beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read(); + lexState = 'identifierName'; + return + + case '\\': + read(); + lexState = 'identifierNameStartEscape'; + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"'); + lexState = 'string'; + return + } + + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = 'identifierName'; + return + } + + throw invalidChar(read()) + }, + + afterPropertyName: function afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue: function beforePropertyValue () { + lexState = 'value'; + }, + + afterPropertyValue: function afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue: function beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value'; + }, + + afterArrayValue: function afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end: function end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, + }; + + function newToken (type, value) { + return { + type: type, + value: value, + line: line, + column: column, + } + } + + function literal (s) { + for (var i = 0, list = s; i < list.length; i += 1) { + var c = list[i]; + + var p = peek(); + + if (p !== c) { + throw invalidChar(read()) + } + + read(); + } + } + + function escape () { + var c = peek(); + switch (c) { + case 'b': + read(); + return '\b' + + case 'f': + read(); + return '\f' + + case 'n': + read(); + return '\n' + + case 'r': + read(); + return '\r' + + case 't': + read(); + return '\t' + + case 'v': + read(); + return '\v' + + case '0': + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read(); + return hexEscape() + + case 'u': + read(); + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read(); + return '' + + case '\r': + read(); + if (peek() === '\n') { + read(); + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() + } + + function hexEscape () { + var buffer = ''; + var c = peek(); + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + return String.fromCodePoint(parseInt(buffer, 16)) + } + + function unicodeEscape () { + var buffer = ''; + var count = 4; + + while (count-- > 0) { + var c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + } + + return String.fromCodePoint(parseInt(buffer, 16)) + } + + var parseStates = { + start: function start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforePropertyName: function beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value; + parseState = 'afterPropertyName'; + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop(); + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName: function afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue'; + }, + + beforePropertyValue: function beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforeArrayValue: function beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop(); + return + } + + push(); + }, + + afterPropertyValue: function afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName'; + return + + case '}': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue: function afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue'; + return + + case ']': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end: function end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, + }; + + function push () { + var value; + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {}; + break + + case '[': + value = []; + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value; + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value; + } else { + var parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + parent[key] = value; + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value); + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue'; + } else { + parseState = 'beforePropertyName'; + } + } else { + var current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } + } + + function pop () { + stack.pop(); + + var current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } + + // This code is unreachable. + // function invalidParseState () { + // return new Error(`JSON5: invalid parse state '${parseState}'`) + // } + + // This code is unreachable. + // function invalidLexState (state) { + // return new Error(`JSON5: invalid lex state '${state}'`) + // } + + function invalidChar (c) { + if (c === undefined) { + return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) + } + + return syntaxError(("JSON5: invalid character '" + (formatChar(c)) + "' at " + line + ":" + column)) + } + + function invalidEOF () { + return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) + } + + // This code is unreachable. + // function invalidToken () { + // if (token.type === 'eof') { + // return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + // } + + // const c = String.fromCodePoint(token.value.codePointAt(0)) + // return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) + // } + + function invalidIdentifier () { + column -= 5; + return syntaxError(("JSON5: invalid identifier character at " + line + ":" + column)) + } + + function separatorChar (c) { + console.warn(("JSON5: '" + (formatChar(c)) + "' in strings is not valid ECMAScript; consider escaping")); + } + + function formatChar (c) { + var replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + var hexString = c.charCodeAt(0).toString(16); + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c + } + + function syntaxError (message) { + var err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err + } + + var stringify = function stringify (value, replacer, space) { + var stack = []; + var indent = ''; + var propertyList; + var replacerFunc; + var gap = ''; + var quote; + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + + if (typeof replacer === 'function') { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (var i = 0, list = replacer; i < list.length; i += 1) { + var v = list[i]; + + var item = (void 0); + + if (typeof v === 'string') { + item = v; + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v); + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = ' '.substr(0, space); + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10); + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + var value = holder[key]; + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key); + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value); + } + + if (value instanceof Number) { + value = Number(value); + } else if (value instanceof String) { + value = String(value); + } else if (value instanceof Boolean) { + value = value.valueOf(); + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + var quotes = { + "'": 0.1, + '"': 0.2, + }; + + var replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + var product = ''; + + for (var i = 0, list = value; i < list.length; i += 1) { + var c = list[i]; + + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue + } + + if (replacements[c]) { + product += replacements[c]; + continue + } + + if (c < ' ') { + var hexString = c.charCodeAt(0).toString(16); + product += '\\x' + ('00' + hexString).substring(hexString.length); + continue + } + + product += c; + } + + var quoteChar = quote || Object.keys(quotes).reduce(function (a, b) { return (quotes[a] < quotes[b]) ? a : b; }); + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + var stepback = indent; + indent = indent + gap; + + var keys = propertyList || Object.keys(value); + var partial = []; + for (var i = 0, list = keys; i < list.length; i += 1) { + var key = list[i]; + + var propertyString = serializeProperty(key, value); + if (propertyString !== undefined) { + var member = serializeKey(key) + ':'; + if (gap !== '') { + member += ' '; + } + member += propertyString; + partial.push(member); + } + } + + var final; + if (partial.length === 0) { + final = '{}'; + } else { + var properties; + if (gap === '') { + properties = partial.join(','); + final = '{' + properties + '}'; + } else { + var separator = ',\n' + indent; + properties = partial.join(separator); + final = '{\n' + indent + properties + ',\n' + stepback + '}'; + } + } + + stack.pop(); + indent = stepback; + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + var firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (var i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + var stepback = indent; + indent = indent + gap; + + var partial = []; + for (var i = 0; i < value.length; i++) { + var propertyString = serializeProperty(String(i), value); + partial.push((propertyString !== undefined) ? propertyString : 'null'); + } + + var final; + if (partial.length === 0) { + final = '[]'; + } else { + if (gap === '') { + var properties = partial.join(','); + final = '[' + properties + ']'; + } else { + var separator = ',\n' + indent; + var properties$1 = partial.join(separator); + final = '[\n' + indent + properties$1 + ',\n' + stepback + ']'; + } + } + + stack.pop(); + indent = stepback; + return final + } + }; + + var JSON5 = { + parse: parse, + stringify: stringify, + }; + + var lib = JSON5; + + var es5 = lib; + + return es5; + +}))); diff --git a/node_modules/@babel/core/node_modules/json5/dist/index.min.js b/node_modules/@babel/core/node_modules/json5/dist/index.min.js new file mode 100644 index 0000000..b336aba --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/dist/index.min.js @@ -0,0 +1 @@ +!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";function u(u,D){return u(D={exports:{}},D.exports),D.exports}var D=u(function(u){var D=u.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=D)}),e=u(function(u){var D=u.exports={version:"2.5.7"};"number"==typeof __e&&(__e=D)}),t=(e.version,function(u){return"object"==typeof u?null!==u:"function"==typeof u}),r=function(u){if(!t(u))throw TypeError(u+" is not an object!");return u},F=function(u){try{return!!u()}catch(u){return!0}},n=!F(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),C=D.document,A=t(C)&&t(C.createElement),E=!n&&!F(function(){return 7!=Object.defineProperty((u="div",A?C.createElement(u):{}),"a",{get:function(){return 7}}).a;var u}),i=Object.defineProperty,o={f:n?Object.defineProperty:function(u,D,e){if(r(u),D=function(u,D){if(!t(u))return u;var e,r;if(D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;if("function"==typeof(e=u.valueOf)&&!t(r=e.call(u)))return r;if(!D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;throw TypeError("Can't convert object to primitive value")}(D,!0),r(e),E)try{return i(u,D,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[D]=e.value),u}},a=n?function(u,D,e){return o.f(u,D,function(u,D){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:D}}(1,e))}:function(u,D,e){return u[D]=e,u},c={}.hasOwnProperty,B=function(u,D){return c.call(u,D)},s=0,f=Math.random(),l=u(function(u){var t,r="Symbol(".concat(void 0===(t="src")?"":t,")_",(++s+f).toString(36)),F=Function.toString,n=(""+F).split("toString");e.inspectSource=function(u){return F.call(u)},(u.exports=function(u,e,t,F){var C="function"==typeof t;C&&(B(t,"name")||a(t,"name",e)),u[e]!==t&&(C&&(B(t,r)||a(t,r,u[e]?""+u[e]:n.join(String(e)))),u===D?u[e]=t:F?u[e]?u[e]=t:a(u,e,t):(delete u[e],a(u,e,t)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||F.call(this)})}),d=function(u,D,e){if(function(u){if("function"!=typeof u)throw TypeError(u+" is not a function!")}(u),void 0===D)return u;switch(e){case 1:return function(e){return u.call(D,e)};case 2:return function(e,t){return u.call(D,e,t)};case 3:return function(e,t,r){return u.call(D,e,t,r)}}return function(){return u.apply(D,arguments)}},v=function(u,t,r){var F,n,C,A,E=u&v.F,i=u&v.G,o=u&v.S,c=u&v.P,B=u&v.B,s=i?D:o?D[t]||(D[t]={}):(D[t]||{}).prototype,f=i?e:e[t]||(e[t]={}),p=f.prototype||(f.prototype={});for(F in i&&(r=t),r)C=((n=!E&&s&&void 0!==s[F])?s:r)[F],A=B&&n?d(C,D):c&&"function"==typeof C?d(Function.call,C):C,s&&l(s,F,C,u&v.U),f[F]!=C&&a(f,F,A),c&&p[F]!=C&&(p[F]=C)};D.core=e,v.F=1,v.G=2,v.S=4,v.P=8,v.B=16,v.W=32,v.U=64,v.R=128;var p,h=v,m=Math.ceil,g=Math.floor,y=function(u){return isNaN(u=+u)?0:(u>0?g:m)(u)},w=(p=!1,function(u,D){var e,t,r=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),F=y(D),n=r.length;return F<0||F>=n?p?"":void 0:(e=r.charCodeAt(F))<55296||e>56319||F+1===n||(t=r.charCodeAt(F+1))<56320||t>57343?p?r.charAt(F):e:p?r.slice(F,F+2):t-56320+(e-55296<<10)+65536});h(h.P,"String",{codePointAt:function(u){return w(this,u)}});e.String.codePointAt;var S=Math.max,b=Math.min,x=String.fromCharCode,N=String.fromCodePoint;h(h.S+h.F*(!!N&&1!=N.length),"String",{fromCodePoint:function(u){for(var D,e,t,r=arguments,F=[],n=arguments.length,C=0;n>C;){if(D=+r[C++],t=1114111,((e=y(e=D))<0?S(e+t,0):b(e,t))!==D)throw RangeError(D+" is not a valid code point");F.push(D<65536?x(D):x(55296+((D-=65536)>>10),D%1024+56320))}return F.join("")}});e.String.fromCodePoint;var P,I,O,_,j,V,J,M,L,k,T,H,$,z,R={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},G={isSpaceSeparator:function(u){return R.Space_Separator.test(u)},isIdStartChar:function(u){return u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||R.ID_Start.test(u)},isIdContinueChar:function(u){return u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||R.ID_Continue.test(u)},isDigit:function(u){return/[0-9]/.test(u)},isHexDigit:function(u){return/[0-9A-Fa-f]/.test(u)}};function U(){for(k="default",T="",H=!1,$=1;;){z=Z();var u=W[k]();if(u)return u}}function Z(){if(P[_])return String.fromCodePoint(P.codePointAt(_))}function q(){var u=Z();return"\n"===u?(j++,V=0):u?V+=u.length:V++,u&&(_+=u.length),u}var W={default:function(){switch(z){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void q();case"/":return q(),void(k="comment");case void 0:return q(),X("eof")}if(!G.isSpaceSeparator(z))return W[I]();q()},comment:function(){switch(z){case"*":return q(),void(k="multiLineComment");case"/":return q(),void(k="singleLineComment")}throw eu(q())},multiLineComment:function(){switch(z){case"*":return q(),void(k="multiLineCommentAsterisk");case void 0:throw eu(q())}q()},multiLineCommentAsterisk:function(){switch(z){case"*":return void q();case"/":return q(),void(k="default");case void 0:throw eu(q())}q(),k="multiLineComment"},singleLineComment:function(){switch(z){case"\n":case"\r":case"\u2028":case"\u2029":return q(),void(k="default");case void 0:return q(),X("eof")}q()},value:function(){switch(z){case"{":case"[":return X("punctuator",q());case"n":return q(),K("ull"),X("null",null);case"t":return q(),K("rue"),X("boolean",!0);case"f":return q(),K("alse"),X("boolean",!1);case"-":case"+":return"-"===q()&&($=-1),void(k="sign");case".":return T=q(),void(k="decimalPointLeading");case"0":return T=q(),void(k="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return T=q(),void(k="decimalInteger");case"I":return q(),K("nfinity"),X("numeric",1/0);case"N":return q(),K("aN"),X("numeric",NaN);case'"':case"'":return H='"'===q(),T="",void(k="string")}throw eu(q())},identifierNameStartEscape:function(){if("u"!==z)throw eu(q());q();var u=Q();switch(u){case"$":case"_":break;default:if(!G.isIdStartChar(u))throw ru()}T+=u,k="identifierName"},identifierName:function(){switch(z){case"$":case"_":case"‌":case"‍":return void(T+=q());case"\\":return q(),void(k="identifierNameEscape")}if(!G.isIdContinueChar(z))return X("identifier",T);T+=q()},identifierNameEscape:function(){if("u"!==z)throw eu(q());q();var u=Q();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!G.isIdContinueChar(u))throw ru()}T+=u,k="identifierName"},sign:function(){switch(z){case".":return T=q(),void(k="decimalPointLeading");case"0":return T=q(),void(k="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return T=q(),void(k="decimalInteger");case"I":return q(),K("nfinity"),X("numeric",$*(1/0));case"N":return q(),K("aN"),X("numeric",NaN)}throw eu(q())},zero:function(){switch(z){case".":return T+=q(),void(k="decimalPoint");case"e":case"E":return T+=q(),void(k="decimalExponent");case"x":case"X":return T+=q(),void(k="hexadecimal")}return X("numeric",0*$)},decimalInteger:function(){switch(z){case".":return T+=q(),void(k="decimalPoint");case"e":case"E":return T+=q(),void(k="decimalExponent")}if(!G.isDigit(z))return X("numeric",$*Number(T));T+=q()},decimalPointLeading:function(){if(G.isDigit(z))return T+=q(),void(k="decimalFraction");throw eu(q())},decimalPoint:function(){switch(z){case"e":case"E":return T+=q(),void(k="decimalExponent")}return G.isDigit(z)?(T+=q(),void(k="decimalFraction")):X("numeric",$*Number(T))},decimalFraction:function(){switch(z){case"e":case"E":return T+=q(),void(k="decimalExponent")}if(!G.isDigit(z))return X("numeric",$*Number(T));T+=q()},decimalExponent:function(){switch(z){case"+":case"-":return T+=q(),void(k="decimalExponentSign")}if(G.isDigit(z))return T+=q(),void(k="decimalExponentInteger");throw eu(q())},decimalExponentSign:function(){if(G.isDigit(z))return T+=q(),void(k="decimalExponentInteger");throw eu(q())},decimalExponentInteger:function(){if(!G.isDigit(z))return X("numeric",$*Number(T));T+=q()},hexadecimal:function(){if(G.isHexDigit(z))return T+=q(),void(k="hexadecimalInteger");throw eu(q())},hexadecimalInteger:function(){if(!G.isHexDigit(z))return X("numeric",$*Number(T));T+=q()},string:function(){switch(z){case"\\":return q(),void(T+=function(){switch(Z()){case"b":return q(),"\b";case"f":return q(),"\f";case"n":return q(),"\n";case"r":return q(),"\r";case"t":return q(),"\t";case"v":return q(),"\v";case"0":if(q(),G.isDigit(Z()))throw eu(q());return"\0";case"x":return q(),function(){var u="",D=Z();if(!G.isHexDigit(D))throw eu(q());if(u+=q(),D=Z(),!G.isHexDigit(D))throw eu(q());return u+=q(),String.fromCodePoint(parseInt(u,16))}();case"u":return q(),Q();case"\n":case"\u2028":case"\u2029":return q(),"";case"\r":return q(),"\n"===Z()&&q(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw eu(q())}return q()}());case'"':return H?(q(),X("string",T)):void(T+=q());case"'":return H?void(T+=q()):(q(),X("string",T));case"\n":case"\r":throw eu(q());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+Fu(u)+"' in strings is not valid ECMAScript; consider escaping")}(z);break;case void 0:throw eu(q())}T+=q()},start:function(){switch(z){case"{":case"[":return X("punctuator",q())}k="value"},beforePropertyName:function(){switch(z){case"$":case"_":return T=q(),void(k="identifierName");case"\\":return q(),void(k="identifierNameStartEscape");case"}":return X("punctuator",q());case'"':case"'":return H='"'===q(),void(k="string")}if(G.isIdStartChar(z))return T+=q(),void(k="identifierName");throw eu(q())},afterPropertyName:function(){if(":"===z)return X("punctuator",q());throw eu(q())},beforePropertyValue:function(){k="value"},afterPropertyValue:function(){switch(z){case",":case"}":return X("punctuator",q())}throw eu(q())},beforeArrayValue:function(){if("]"===z)return X("punctuator",q());k="value"},afterArrayValue:function(){switch(z){case",":case"]":return X("punctuator",q())}throw eu(q())},end:function(){throw eu(q())}};function X(u,D){return{type:u,value:D,line:j,column:V}}function K(u){for(var D=0,e=u;D0;){var e=Z();if(!G.isHexDigit(e))throw eu(q());u+=q()}return String.fromCodePoint(parseInt(u,16))}var Y={start:function(){if("eof"===J.type)throw tu();uu()},beforePropertyName:function(){switch(J.type){case"identifier":case"string":return M=J.value,void(I="afterPropertyName");case"punctuator":return void Du();case"eof":throw tu()}},afterPropertyName:function(){if("eof"===J.type)throw tu();I="beforePropertyValue"},beforePropertyValue:function(){if("eof"===J.type)throw tu();uu()},beforeArrayValue:function(){if("eof"===J.type)throw tu();"punctuator"!==J.type||"]"!==J.value?uu():Du()},afterPropertyValue:function(){if("eof"===J.type)throw tu();switch(J.value){case",":return void(I="beforePropertyName");case"}":Du()}},afterArrayValue:function(){if("eof"===J.type)throw tu();switch(J.value){case",":return void(I="beforeArrayValue");case"]":Du()}},end:function(){}};function uu(){var u;switch(J.type){case"punctuator":switch(J.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=J.value}if(void 0===L)L=u;else{var D=O[O.length-1];Array.isArray(D)?D.push(u):D[M]=u}if(null!==u&&"object"==typeof u)O.push(u),I=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=O[O.length-1];I=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function Du(){O.pop();var u=O[O.length-1];I=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function eu(u){return nu(void 0===u?"JSON5: invalid end of input at "+j+":"+V:"JSON5: invalid character '"+Fu(u)+"' at "+j+":"+V)}function tu(){return nu("JSON5: invalid end of input at "+j+":"+V)}function ru(){return nu("JSON5: invalid identifier character at "+j+":"+(V-=5))}function Fu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function nu(u){var D=new SyntaxError(u);return D.lineNumber=j,D.columnNumber=V,D}return{parse:function(u,D){P=String(u),I="start",O=[],_=0,j=1,V=0,J=void 0,M=void 0,L=void 0;do{J=U(),Y[I]()}while("eof"!==J.type);return"function"==typeof D?function u(D,e,t){var r=D[e];if(null!=r&&"object"==typeof r)for(var F in r){var n=u(r,F,t);void 0===n?delete r[F]:r[F]=n}return t.call(D,e,r)}({"":L},"",D):L},stringify:function(u,D,e){var t,r,F,n=[],C="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,F=D.quote,D=D.replacer),"function"==typeof D)r=D;else if(Array.isArray(D)){t=[];for(var E=0,i=D;E0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),r&&(e=r.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(n.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,t=[],r=0;r=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,r,F=t||Object.keys(u),E=[],i=0,o=F;iunicode.Space_Separator.test(u),isIdStartChar:u=>u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u),isIdContinueChar:u=>u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||unicode.ID_Continue.test(u),isDigit:u=>/[0-9]/.test(u),isHexDigit:u=>/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)for(const u in r){const D=internalize(r,u,e);void 0===D?delete r[u]:r[u]=D}return e.call(u,D,r)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const u=lexStates[lexState]();if(u)return u}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const u=peek();return"\n"===u?(line++,column=0):u?column+=u.length:column++,u&&(pos+=u.length),u}const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void read();case"/":return read(),void(lexState="comment");case void 0:return read(),newToken("eof")}if(!util.isSpaceSeparator(c))return lexStates[parseState]();read()},comment(){switch(c){case"*":return read(),void(lexState="multiLineComment");case"/":return read(),void(lexState="singleLineComment")}throw invalidChar(read())},multiLineComment(){switch(c){case"*":return read(),void(lexState="multiLineCommentAsterisk");case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":return void read();case"/":return read(),void(lexState="default");case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":return read(),void(lexState="default");case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":return"-"===read()&&(sign=-1),void(lexState="sign");case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":return doubleQuote='"'===read(),buffer="",void(lexState="string")}throw invalidChar(read())},identifierNameStartEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"‌":case"‍":return void(buffer+=read());case"\\":return read(),void(lexState="identifierNameEscape")}if(!util.isIdContinueChar(c))return newToken("identifier",buffer);buffer+=read()},identifierNameEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!util.isIdContinueChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},sign(){switch(c){case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");case"x":case"X":return buffer+=read(),void(lexState="hexadecimal")}return newToken("numeric",0*sign)},decimalInteger(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalPointLeading(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalFraction");throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}return util.isDigit(c)?(buffer+=read(),void(lexState="decimalFraction")):newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalExponent(){switch(c){case"+":case"-":return buffer+=read(),void(lexState="decimalExponentSign")}if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentInteger(){if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},hexadecimal(){if(util.isHexDigit(c))return buffer+=read(),void(lexState="hexadecimalInteger");throw invalidChar(read())},hexadecimalInteger(){if(!util.isHexDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},string(){switch(c){case"\\":return read(),void(buffer+=escape());case'"':return doubleQuote?(read(),newToken("string",buffer)):void(buffer+=read());case"'":return doubleQuote?void(buffer+=read()):(read(),newToken("string",buffer));case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":return buffer=read(),void(lexState="identifierName");case"\\":return read(),void(lexState="identifierNameStartEscape");case"}":return newToken("punctuator",read());case'"':case"'":return doubleQuote='"'===read(),void(lexState="string")}if(util.isIdStartChar(c))return buffer+=read(),void(lexState="identifierName");throw invalidChar(read())},afterPropertyName(){if(":"===c)return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if("]"===c)return newToken("punctuator",read());lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:line,column:column}}function literal(u){for(const D of u){if(peek()!==D)throw invalidChar(read());read()}}function escape(){switch(peek()){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),"\n";case"r":return read(),"\r";case"t":return read(),"\t";case"v":return read(),"\v";case"0":if(read(),util.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case"\n":case"\u2028":case"\u2029":return read(),"";case"\r":return read(),"\n"===peek()&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw invalidChar(read())}return read()}function hexEscape(){let u="",D=peek();if(!util.isHexDigit(D))throw invalidChar(read());if(u+=read(),D=peek(),!util.isHexDigit(D))throw invalidChar(read());return u+=read(),String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="",D=4;for(;D-- >0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):D[key]=u}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),E("",{"":u});function E(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?n(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=E(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function n(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(const t of u){switch(t){case"'":case'"':D[t]++,r+=t;continue}if(e[t])r+=e[t];else if(t<" "){let u=t.charCodeAt(0).toString(16);r+="\\x"+("00"+u).substring(u.length)}else r+=t}const t=C||Object.keys(D).reduce((u,e)=>D[u]= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar (c) { + return ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit (c) { + return /[0-9]/.test(c) + }, + + isHexDigit (c) { + return /[0-9A-Fa-f]/.test(c) + }, +}; + +let source; +let parseState; +let stack; +let pos; +let line; +let column; +let token; +let key; +let root; + +var parse = function parse (text, reviver) { + source = String(text); + parseState = 'start'; + stack = []; + pos = 0; + line = 1; + column = 0; + token = undefined; + key = undefined; + root = undefined; + + do { + token = lex(); + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState](); + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root +}; + +function internalize (holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === 'object') { + for (const key in value) { + const replacement = internalize(value, key, reviver); + if (replacement === undefined) { + delete value[key]; + } else { + value[key] = replacement; + } + } + } + + return reviver.call(holder, name, value) +} + +let lexState; +let buffer; +let doubleQuote; +let sign; +let c; + +function lex () { + lexState = 'default'; + buffer = ''; + doubleQuote = false; + sign = 1; + + for (;;) { + c = peek(); + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + const token = lexStates[lexState](); + if (token) { + return token + } + } +} + +function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } +} + +function read () { + const c = peek(); + + if (c === '\n') { + line++; + column = 0; + } else if (c) { + column += c.length; + } else { + column++; + } + + if (c) { + pos += c.length; + } + + return c +} + +const lexStates = { + default () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + return + + case '/': + read(); + lexState = 'comment'; + return + + case undefined: + read(); + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read(); + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineComment'; + return + + case '/': + read(); + lexState = 'singleLineComment'; + return + } + + throw invalidChar(read()) + }, + + multiLineComment () { + switch (c) { + case '*': + read(); + lexState = 'multiLineCommentAsterisk'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + }, + + multiLineCommentAsterisk () { + switch (c) { + case '*': + read(); + return + + case '/': + read(); + lexState = 'default'; + return + + case undefined: + throw invalidChar(read()) + } + + read(); + lexState = 'multiLineComment'; + }, + + singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read(); + lexState = 'default'; + return + + case undefined: + read(); + return newToken('eof') + } + + read(); + }, + + value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read(); + literal('ull'); + return newToken('null', null) + + case 't': + read(); + literal('rue'); + return newToken('boolean', true) + + case 'f': + read(); + literal('alse'); + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1; + } + + lexState = 'sign'; + return + + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"'); + buffer = ''; + lexState = 'string'; + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + const u = unicodeEscape(); + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read(); + return + + case '\\': + read(); + lexState = 'identifierNameEscape'; + return + } + + if (util.isIdContinueChar(c)) { + buffer += read(); + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read(); + const u = unicodeEscape(); + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + sign () { + switch (c) { + case '.': + buffer = read(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read(); + lexState = 'decimalInteger'; + return + + case 'I': + read(); + literal('nfinity'); + return newToken('numeric', sign * Infinity) + + case 'N': + read(); + literal('aN'); + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + + case 'x': + case 'X': + buffer += read(); + lexState = 'hexadecimal'; + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger () { + switch (c) { + case '.': + buffer += read(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + throw invalidChar(read()) + }, + + decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalFraction'; + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read(); + lexState = 'decimalExponentSign'; + return + } + + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = 'hexadecimalInteger'; + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string () { + switch (c) { + case '\\': + read(); + buffer += escape(); + return + + case '"': + if (doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case "'": + if (!doubleQuote) { + read(); + return newToken('string', buffer) + } + + buffer += read(); + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c); + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read(); + }, + + start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value'; + }, + + beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read(); + lexState = 'identifierName'; + return + + case '\\': + read(); + lexState = 'identifierNameStartEscape'; + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"'); + lexState = 'string'; + return + } + + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = 'identifierName'; + return + } + + throw invalidChar(read()) + }, + + afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue () { + lexState = 'value'; + }, + + afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value'; + }, + + afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, +}; + +function newToken (type, value) { + return { + type, + value, + line, + column, + } +} + +function literal (s) { + for (const c of s) { + const p = peek(); + + if (p !== c) { + throw invalidChar(read()) + } + + read(); + } +} + +function escape () { + const c = peek(); + switch (c) { + case 'b': + read(); + return '\b' + + case 'f': + read(); + return '\f' + + case 'n': + read(); + return '\n' + + case 'r': + read(); + return '\r' + + case 't': + read(); + return '\t' + + case 'v': + read(); + return '\v' + + case '0': + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read(); + return hexEscape() + + case 'u': + read(); + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read(); + return '' + + case '\r': + read(); + if (peek() === '\n') { + read(); + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() +} + +function hexEscape () { + let buffer = ''; + let c = peek(); + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +function unicodeEscape () { + let buffer = ''; + let count = 4; + + while (count-- > 0) { + const c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read(); + } + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +const parseStates = { + start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value; + parseState = 'afterPropertyName'; + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop(); + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue'; + }, + + beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop(); + return + } + + push(); + }, + + afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName'; + return + + case '}': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue'; + return + + case ']': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, +}; + +function push () { + let value; + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {}; + break + + case '[': + value = []; + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value; + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value; + } else { + const parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + parent[key] = value; + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value); + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue'; + } else { + parseState = 'beforePropertyName'; + } + } else { + const current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } +} + +function pop () { + stack.pop(); + + const current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } +} + +// This code is unreachable. +// function invalidParseState () { +// return new Error(`JSON5: invalid parse state '${parseState}'`) +// } + +// This code is unreachable. +// function invalidLexState (state) { +// return new Error(`JSON5: invalid lex state '${state}'`) +// } + +function invalidChar (c) { + if (c === undefined) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + } + + return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +} + +function invalidEOF () { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +} + +// This code is unreachable. +// function invalidToken () { +// if (token.type === 'eof') { +// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +// } + +// const c = String.fromCodePoint(token.value.codePointAt(0)) +// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +// } + +function invalidIdentifier () { + column -= 5; + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) +} + +function separatorChar (c) { + console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`); +} + +function formatChar (c) { + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + const hexString = c.charCodeAt(0).toString(16); + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c +} + +function syntaxError (message) { + const err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err +} + +var stringify = function stringify (value, replacer, space) { + const stack = []; + let indent = ''; + let propertyList; + let replacerFunc; + let gap = ''; + let quote; + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + + if (typeof replacer === 'function') { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (const v of replacer) { + let item; + + if (typeof v === 'string') { + item = v; + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v); + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = ' '.substr(0, space); + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10); + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + let value = holder[key]; + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key); + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value); + } + + if (value instanceof Number) { + value = Number(value); + } else if (value instanceof String) { + value = String(value); + } else if (value instanceof Boolean) { + value = value.valueOf(); + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + const quotes = { + "'": 0.1, + '"': 0.2, + }; + + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + let product = ''; + + for (const c of value) { + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue + } + + if (replacements[c]) { + product += replacements[c]; + continue + } + + if (c < ' ') { + let hexString = c.charCodeAt(0).toString(16); + product += '\\x' + ('00' + hexString).substring(hexString.length); + continue + } + + product += c; + } + + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b); + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + let stepback = indent; + indent = indent + gap; + + let keys = propertyList || Object.keys(value); + let partial = []; + for (const key of keys) { + const propertyString = serializeProperty(key, value); + if (propertyString !== undefined) { + let member = serializeKey(key) + ':'; + if (gap !== '') { + member += ' '; + } + member += propertyString; + partial.push(member); + } + } + + let final; + if (partial.length === 0) { + final = '{}'; + } else { + let properties; + if (gap === '') { + properties = partial.join(','); + final = '{' + properties + '}'; + } else { + let separator = ',\n' + indent; + properties = partial.join(separator); + final = '{\n' + indent + properties + ',\n' + stepback + '}'; + } + } + + stack.pop(); + indent = stepback; + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + const firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + let stepback = indent; + indent = indent + gap; + + let partial = []; + for (let i = 0; i < value.length; i++) { + const propertyString = serializeProperty(String(i), value); + partial.push((propertyString !== undefined) ? propertyString : 'null'); + } + + let final; + if (partial.length === 0) { + final = '[]'; + } else { + if (gap === '') { + let properties = partial.join(','); + final = '[' + properties + ']'; + } else { + let separator = ',\n' + indent; + let properties = partial.join(separator); + final = '[\n' + indent + properties + ',\n' + stepback + ']'; + } + } + + stack.pop(); + indent = stepback; + return final + } +}; + +const JSON5 = { + parse, + stringify, +}; + +var lib = JSON5; + +export default lib; diff --git a/node_modules/@babel/core/node_modules/json5/lib/cli.js b/node_modules/@babel/core/node_modules/json5/lib/cli.js new file mode 100644 index 0000000..de852f1 --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/lib/cli.js @@ -0,0 +1,112 @@ +#!/usr/bin/env node + +const fs = require('fs') +const path = require('path') +const minimist = require('minimist') +const pkg = require('../package.json') +const JSON5 = require('./') + +const argv = minimist(process.argv.slice(2), { + alias: { + 'convert': 'c', + 'space': 's', + 'validate': 'v', + 'out-file': 'o', + 'version': 'V', + 'help': 'h', + }, + boolean: [ + 'convert', + 'validate', + 'version', + 'help', + ], + string: [ + 'space', + 'out-file', + ], +}) + +if (argv.version) { + version() +} else if (argv.help) { + usage() +} else { + const inFilename = argv._[0] + + let readStream + if (inFilename) { + readStream = fs.createReadStream(inFilename) + } else { + readStream = process.stdin + } + + let json5 = '' + readStream.on('data', data => { + json5 += data + }) + + readStream.on('end', () => { + let space + if (argv.space === 't' || argv.space === 'tab') { + space = '\t' + } else { + space = Number(argv.space) + } + + let value + try { + value = JSON5.parse(json5) + if (!argv.validate) { + const json = JSON.stringify(value, null, space) + + let writeStream + + // --convert is for backward compatibility with v0.5.1. If + // specified with and not --out-file, then a file with + // the same name but with a .json extension will be written. + if (argv.convert && inFilename && !argv.o) { + const parsedFilename = path.parse(inFilename) + const outFilename = path.format( + Object.assign( + parsedFilename, + {base: path.basename(parsedFilename.base, parsedFilename.ext) + '.json'} + ) + ) + + writeStream = fs.createWriteStream(outFilename) + } else if (argv.o) { + writeStream = fs.createWriteStream(argv.o) + } else { + writeStream = process.stdout + } + + writeStream.write(json) + } + } catch (err) { + console.error(err.message) + process.exit(1) + } + }) +} + +function version () { + console.log(pkg.version) +} + +function usage () { + console.log( + ` + Usage: json5 [options] + + If is not provided, then STDIN is used. + + Options: + + -s, --space The number of spaces to indent or 't' for tabs + -o, --out-file [file] Output to the specified file, otherwise STDOUT + -v, --validate Validate JSON5 but do not output JSON + -V, --version Output the version number + -h, --help Output usage information` + ) +} diff --git a/node_modules/@babel/core/node_modules/json5/lib/index.js b/node_modules/@babel/core/node_modules/json5/lib/index.js new file mode 100644 index 0000000..3679638 --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/lib/index.js @@ -0,0 +1,9 @@ +const parse = require('./parse') +const stringify = require('./stringify') + +const JSON5 = { + parse, + stringify, +} + +module.exports = JSON5 diff --git a/node_modules/@babel/core/node_modules/json5/lib/parse.js b/node_modules/@babel/core/node_modules/json5/lib/parse.js new file mode 100644 index 0000000..c01646f --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/lib/parse.js @@ -0,0 +1,1087 @@ +const util = require('./util') + +let source +let parseState +let stack +let pos +let line +let column +let token +let key +let root + +module.exports = function parse (text, reviver) { + source = String(text) + parseState = 'start' + stack = [] + pos = 0 + line = 1 + column = 0 + token = undefined + key = undefined + root = undefined + + do { + token = lex() + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState]() + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root +} + +function internalize (holder, name, reviver) { + const value = holder[name] + if (value != null && typeof value === 'object') { + for (const key in value) { + const replacement = internalize(value, key, reviver) + if (replacement === undefined) { + delete value[key] + } else { + value[key] = replacement + } + } + } + + return reviver.call(holder, name, value) +} + +let lexState +let buffer +let doubleQuote +let sign +let c + +function lex () { + lexState = 'default' + buffer = '' + doubleQuote = false + sign = 1 + + for (;;) { + c = peek() + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + const token = lexStates[lexState]() + if (token) { + return token + } + } +} + +function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } +} + +function read () { + const c = peek() + + if (c === '\n') { + line++ + column = 0 + } else if (c) { + column += c.length + } else { + column++ + } + + if (c) { + pos += c.length + } + + return c +} + +const lexStates = { + default () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read() + return + + case '/': + read() + lexState = 'comment' + return + + case undefined: + read() + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read() + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment () { + switch (c) { + case '*': + read() + lexState = 'multiLineComment' + return + + case '/': + read() + lexState = 'singleLineComment' + return + } + + throw invalidChar(read()) + }, + + multiLineComment () { + switch (c) { + case '*': + read() + lexState = 'multiLineCommentAsterisk' + return + + case undefined: + throw invalidChar(read()) + } + + read() + }, + + multiLineCommentAsterisk () { + switch (c) { + case '*': + read() + return + + case '/': + read() + lexState = 'default' + return + + case undefined: + throw invalidChar(read()) + } + + read() + lexState = 'multiLineComment' + }, + + singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read() + lexState = 'default' + return + + case undefined: + read() + return newToken('eof') + } + + read() + }, + + value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + case 'n': + read() + literal('ull') + return newToken('null', null) + + case 't': + read() + literal('rue') + return newToken('boolean', true) + + case 'f': + read() + literal('alse') + return newToken('boolean', false) + + case '-': + case '+': + if (read() === '-') { + sign = -1 + } + + lexState = 'sign' + return + + case '.': + buffer = read() + lexState = 'decimalPointLeading' + return + + case '0': + buffer = read() + lexState = 'zero' + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read() + lexState = 'decimalInteger' + return + + case 'I': + read() + literal('nfinity') + return newToken('numeric', Infinity) + + case 'N': + read() + literal('aN') + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read() === '"') + buffer = '' + lexState = 'string' + return + } + + throw invalidChar(read()) + }, + + identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read() + const u = unicodeEscape() + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u + lexState = 'identifierName' + }, + + identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read() + return + + case '\\': + read() + lexState = 'identifierNameEscape' + return + } + + if (util.isIdContinueChar(c)) { + buffer += read() + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read()) + } + + read() + const u = unicodeEscape() + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u + lexState = 'identifierName' + }, + + sign () { + switch (c) { + case '.': + buffer = read() + lexState = 'decimalPointLeading' + return + + case '0': + buffer = read() + lexState = 'zero' + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read() + lexState = 'decimalInteger' + return + + case 'I': + read() + literal('nfinity') + return newToken('numeric', sign * Infinity) + + case 'N': + read() + literal('aN') + return newToken('numeric', NaN) + } + + throw invalidChar(read()) + }, + + zero () { + switch (c) { + case '.': + buffer += read() + lexState = 'decimalPoint' + return + + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + + case 'x': + case 'X': + buffer += read() + lexState = 'hexadecimal' + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger () { + switch (c) { + case '.': + buffer += read() + lexState = 'decimalPoint' + return + + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalFraction' + return + } + + throw invalidChar(read()) + }, + + decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalFraction' + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read() + lexState = 'decimalExponent' + return + } + + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read() + lexState = 'decimalExponentSign' + return + } + + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalExponentInteger' + return + } + + throw invalidChar(read()) + }, + + decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read() + lexState = 'decimalExponentInteger' + return + } + + throw invalidChar(read()) + }, + + decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read() + lexState = 'hexadecimalInteger' + return + } + + throw invalidChar(read()) + }, + + hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read() + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string () { + switch (c) { + case '\\': + read() + buffer += escape() + return + + case '"': + if (doubleQuote) { + read() + return newToken('string', buffer) + } + + buffer += read() + return + + case "'": + if (!doubleQuote) { + read() + return newToken('string', buffer) + } + + buffer += read() + return + + case '\n': + case '\r': + throw invalidChar(read()) + + case '\u2028': + case '\u2029': + separatorChar(c) + break + + case undefined: + throw invalidChar(read()) + } + + buffer += read() + }, + + start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value' + }, + + beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read() + lexState = 'identifierName' + return + + case '\\': + read() + lexState = 'identifierNameStartEscape' + return + + case '}': + return newToken('punctuator', read()) + + case '"': + case "'": + doubleQuote = (read() === '"') + lexState = 'string' + return + } + + if (util.isIdStartChar(c)) { + buffer += read() + lexState = 'identifierName' + return + } + + throw invalidChar(read()) + }, + + afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforePropertyValue () { + lexState = 'value' + }, + + afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read()) + } + + lexState = 'value' + }, + + afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read()) + } + + throw invalidChar(read()) + }, + + end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read()) + }, +} + +function newToken (type, value) { + return { + type, + value, + line, + column, + } +} + +function literal (s) { + for (const c of s) { + const p = peek() + + if (p !== c) { + throw invalidChar(read()) + } + + read() + } +} + +function escape () { + const c = peek() + switch (c) { + case 'b': + read() + return '\b' + + case 'f': + read() + return '\f' + + case 'n': + read() + return '\n' + + case 'r': + read() + return '\r' + + case 't': + read() + return '\t' + + case 'v': + read() + return '\v' + + case '0': + read() + if (util.isDigit(peek())) { + throw invalidChar(read()) + } + + return '\0' + + case 'x': + read() + return hexEscape() + + case 'u': + read() + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read() + return '' + + case '\r': + read() + if (peek() === '\n') { + read() + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read()) + + case undefined: + throw invalidChar(read()) + } + + return read() +} + +function hexEscape () { + let buffer = '' + let c = peek() + + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + + c = peek() + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +function unicodeEscape () { + let buffer = '' + let count = 4 + + while (count-- > 0) { + const c = peek() + if (!util.isHexDigit(c)) { + throw invalidChar(read()) + } + + buffer += read() + } + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +const parseStates = { + start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push() + }, + + beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value + parseState = 'afterPropertyName' + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop() + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue' + }, + + beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push() + }, + + beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop() + return + } + + push() + }, + + afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName' + return + + case '}': + pop() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue' + return + + case ']': + pop() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, +} + +function push () { + let value + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {} + break + + case '[': + value = [] + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value + } else { + const parent = stack[stack.length - 1] + if (Array.isArray(parent)) { + parent.push(value) + } else { + parent[key] = value + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value) + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue' + } else { + parseState = 'beforePropertyName' + } + } else { + const current = stack[stack.length - 1] + if (current == null) { + parseState = 'end' + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue' + } else { + parseState = 'afterPropertyValue' + } + } +} + +function pop () { + stack.pop() + + const current = stack[stack.length - 1] + if (current == null) { + parseState = 'end' + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue' + } else { + parseState = 'afterPropertyValue' + } +} + +// This code is unreachable. +// function invalidParseState () { +// return new Error(`JSON5: invalid parse state '${parseState}'`) +// } + +// This code is unreachable. +// function invalidLexState (state) { +// return new Error(`JSON5: invalid lex state '${state}'`) +// } + +function invalidChar (c) { + if (c === undefined) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) + } + + return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +} + +function invalidEOF () { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +} + +// This code is unreachable. +// function invalidToken () { +// if (token.type === 'eof') { +// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +// } + +// const c = String.fromCodePoint(token.value.codePointAt(0)) +// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +// } + +function invalidIdentifier () { + column -= 5 + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) +} + +function separatorChar (c) { + console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`) +} + +function formatChar (c) { + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + const hexString = c.charCodeAt(0).toString(16) + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c +} + +function syntaxError (message) { + const err = new SyntaxError(message) + err.lineNumber = line + err.columnNumber = column + return err +} diff --git a/node_modules/@babel/core/node_modules/json5/lib/register.js b/node_modules/@babel/core/node_modules/json5/lib/register.js new file mode 100644 index 0000000..935cdba --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/lib/register.js @@ -0,0 +1,13 @@ +const fs = require('fs') +const JSON5 = require('./') + +// eslint-disable-next-line node/no-deprecated-api +require.extensions['.json5'] = function (module, filename) { + const content = fs.readFileSync(filename, 'utf8') + try { + module.exports = JSON5.parse(content) + } catch (err) { + err.message = filename + ': ' + err.message + throw err + } +} diff --git a/node_modules/@babel/core/node_modules/json5/lib/require.js b/node_modules/@babel/core/node_modules/json5/lib/require.js new file mode 100644 index 0000000..3aa29be --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/lib/require.js @@ -0,0 +1,4 @@ +// This file is for backward compatibility with v0.5.1. +require('./register') + +console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.") diff --git a/node_modules/@babel/core/node_modules/json5/lib/stringify.js b/node_modules/@babel/core/node_modules/json5/lib/stringify.js new file mode 100644 index 0000000..0df12f4 --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/lib/stringify.js @@ -0,0 +1,254 @@ +const util = require('./util') + +module.exports = function stringify (value, replacer, space) { + const stack = [] + let indent = '' + let propertyList + let replacerFunc + let gap = '' + let quote + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space + quote = replacer.quote + replacer = replacer.replacer + } + + if (typeof replacer === 'function') { + replacerFunc = replacer + } else if (Array.isArray(replacer)) { + propertyList = [] + for (const v of replacer) { + let item + + if (typeof v === 'string') { + item = v + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v) + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item) + } + } + } + + if (space instanceof Number) { + space = Number(space) + } else if (space instanceof String) { + space = String(space) + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)) + gap = ' '.substr(0, space) + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10) + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + let value = holder[key] + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key) + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key) + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value) + } + + if (value instanceof Number) { + value = Number(value) + } else if (value instanceof String) { + value = String(value) + } else if (value instanceof Boolean) { + value = value.valueOf() + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value, false) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + const quotes = { + "'": 0.1, + '"': 0.2, + } + + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + } + + let product = '' + + for (const c of value) { + switch (c) { + case "'": + case '"': + quotes[c]++ + product += c + continue + } + + if (replacements[c]) { + product += replacements[c] + continue + } + + if (c < ' ') { + let hexString = c.charCodeAt(0).toString(16) + product += '\\x' + ('00' + hexString).substring(hexString.length) + continue + } + + product += c + } + + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b) + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]) + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value) + + let stepback = indent + indent = indent + gap + + let keys = propertyList || Object.keys(value) + let partial = [] + for (const key of keys) { + const propertyString = serializeProperty(key, value) + if (propertyString !== undefined) { + let member = serializeKey(key) + ':' + if (gap !== '') { + member += ' ' + } + member += propertyString + partial.push(member) + } + } + + let final + if (partial.length === 0) { + final = '{}' + } else { + let properties + if (gap === '') { + properties = partial.join(',') + final = '{' + properties + '}' + } else { + let separator = ',\n' + indent + properties = partial.join(separator) + final = '{\n' + indent + properties + ',\n' + stepback + '}' + } + } + + stack.pop() + indent = stepback + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key, true) + } + + const firstChar = String.fromCodePoint(key.codePointAt(0)) + if (!util.isIdStartChar(firstChar)) { + return quoteString(key, true) + } + + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key, true) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value) + + let stepback = indent + indent = indent + gap + + let partial = [] + for (let i = 0; i < value.length; i++) { + const propertyString = serializeProperty(String(i), value) + partial.push((propertyString !== undefined) ? propertyString : 'null') + } + + let final + if (partial.length === 0) { + final = '[]' + } else { + if (gap === '') { + let properties = partial.join(',') + final = '[' + properties + ']' + } else { + let separator = ',\n' + indent + let properties = partial.join(separator) + final = '[\n' + indent + properties + ',\n' + stepback + ']' + } + } + + stack.pop() + indent = stepback + return final + } +} diff --git a/node_modules/@babel/core/node_modules/json5/lib/unicode.js b/node_modules/@babel/core/node_modules/json5/lib/unicode.js new file mode 100644 index 0000000..215ccd8 --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/lib/unicode.js @@ -0,0 +1,4 @@ +// This is a generated file. Do not edit. +module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/ +module.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/ +module.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ diff --git a/node_modules/@babel/core/node_modules/json5/lib/util.js b/node_modules/@babel/core/node_modules/json5/lib/util.js new file mode 100644 index 0000000..3b5e466 --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/lib/util.js @@ -0,0 +1,35 @@ +const unicode = require('../lib/unicode') + +module.exports = { + isSpaceSeparator (c) { + return unicode.Space_Separator.test(c) + }, + + isIdStartChar (c) { + return ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar (c) { + return ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit (c) { + return /[0-9]/.test(c) + }, + + isHexDigit (c) { + return /[0-9A-Fa-f]/.test(c) + }, +} diff --git a/node_modules/@babel/core/node_modules/json5/package.json b/node_modules/@babel/core/node_modules/json5/package.json new file mode 100644 index 0000000..ac66f2a --- /dev/null +++ b/node_modules/@babel/core/node_modules/json5/package.json @@ -0,0 +1,109 @@ +{ + "_from": "json5@^2.1.0", + "_id": "json5@2.1.0", + "_inBundle": false, + "_integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "_location": "/@babel/core/json5", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "json5@^2.1.0", + "name": "json5", + "escapedName": "json5", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/@babel/core" + ], + "_resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", + "_shasum": "e7a0c62c48285c628d20a10b85c89bb807c32850", + "_spec": "json5@^2.1.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", + "author": { + "name": "Aseem Kishore", + "email": "aseem.kishore@gmail.com" + }, + "bin": { + "json5": "lib/cli.js" + }, + "browser": "dist/index.js", + "bugs": { + "url": "https://github.com/json5/json5/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Max Nanasy", + "email": "max.nanasy@gmail.com" + }, + { + "name": "Andrew Eisenberg", + "email": "andrew@eisenberg.as" + }, + { + "name": "Jordan Tucker", + "email": "jordanbtucker@gmail.com" + } + ], + "dependencies": { + "minimist": "^1.2.0" + }, + "deprecated": false, + "description": "JSON for humans.", + "devDependencies": { + "core-js": "^2.5.7", + "eslint": "^5.3.0", + "eslint-config-standard": "^11.0.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-node": "^7.0.1", + "eslint-plugin-promise": "^3.8.0", + "eslint-plugin-standard": "^3.1.0", + "regenerate": "^1.4.0", + "rollup": "^0.64.1", + "rollup-plugin-buble": "^0.19.2", + "rollup-plugin-commonjs": "^9.1.5", + "rollup-plugin-node-resolve": "^3.3.0", + "rollup-plugin-terser": "^1.0.1", + "sinon": "^6.1.5", + "tap": "^12.0.1", + "unicode-10.0.0": "^0.7.5" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "lib/", + "dist/" + ], + "homepage": "http://json5.org/", + "keywords": [ + "json", + "json5", + "es5", + "es2015", + "ecmascript" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "json5", + "repository": { + "type": "git", + "url": "git+https://github.com/json5/json5.git" + }, + "scripts": { + "build": "rollup -c", + "build-package": "node build/package.js", + "build-unicode": "node build/unicode.js", + "coverage": "tap --coverage-report html test", + "lint": "eslint --fix .", + "prepublishOnly": "npm run production", + "preversion": "npm run production", + "production": "npm run lint && npm test && npm run build", + "test": "tap -Rspec --100 test", + "version": "npm run build-package && git add package.json5" + }, + "version": "2.1.0" +} diff --git a/node_modules/@babel/core/node_modules/ms/index.js b/node_modules/@babel/core/node_modules/ms/index.js new file mode 100644 index 0000000..7229750 --- /dev/null +++ b/node_modules/@babel/core/node_modules/ms/index.js @@ -0,0 +1,162 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} diff --git a/node_modules/@babel/core/node_modules/ms/license.md b/node_modules/@babel/core/node_modules/ms/license.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/node_modules/@babel/core/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/ms/package.json b/node_modules/@babel/core/node_modules/ms/package.json new file mode 100644 index 0000000..7627e12 --- /dev/null +++ b/node_modules/@babel/core/node_modules/ms/package.json @@ -0,0 +1,69 @@ +{ + "_from": "ms@^2.1.1", + "_id": "ms@2.1.1", + "_inBundle": false, + "_integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "_location": "/@babel/core/ms", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ms@^2.1.1", + "name": "ms", + "escapedName": "ms", + "rawSpec": "^2.1.1", + "saveSpec": null, + "fetchSpec": "^2.1.1" + }, + "_requiredBy": [ + "/@babel/core/debug" + ], + "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "_shasum": "30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a", + "_spec": "ms@^2.1.1", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\debug", + "bugs": { + "url": "https://github.com/zeit/ms/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Tiny millisecond conversion utility", + "devDependencies": { + "eslint": "4.12.1", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/zeit/ms#readme", + "license": "MIT", + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "main": "./index", + "name": "ms", + "repository": { + "type": "git", + "url": "git+https://github.com/zeit/ms.git" + }, + "scripts": { + "lint": "eslint lib/* bin/*", + "precommit": "lint-staged", + "test": "mocha tests.js" + }, + "version": "2.1.1" +} diff --git a/node_modules/@babel/core/node_modules/ms/readme.md b/node_modules/@babel/core/node_modules/ms/readme.md new file mode 100644 index 0000000..bb76729 --- /dev/null +++ b/node_modules/@babel/core/node_modules/ms/readme.md @@ -0,0 +1,60 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +ms('-3 days') // -259200000 +ms('-1h') // -3600000 +ms('-200') // -200 +``` + +### Convert from Milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(-3 * 60000) // "-3m" +ms(ms('10 hours')) // "10h" +``` + +### Time Format Written-Out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(-3 * 60000, { long: true }) // "-3 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [Node.js](https://nodejs.org) and in the browser +- If a number is supplied to `ms`, a string with a unit is returned +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) +- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned + +## Related Packages + +- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. + +## Caught a Bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/node_modules/@babel/highlight/node_modules/supports-color/browser.js b/node_modules/@babel/core/node_modules/supports-color/browser.js similarity index 100% rename from node_modules/@babel/highlight/node_modules/supports-color/browser.js rename to node_modules/@babel/core/node_modules/supports-color/browser.js diff --git a/node_modules/@babel/core/node_modules/supports-color/index.js b/node_modules/@babel/core/node_modules/supports-color/index.js new file mode 100644 index 0000000..1704131 --- /dev/null +++ b/node_modules/@babel/core/node_modules/supports-color/index.js @@ -0,0 +1,131 @@ +'use strict'; +const os = require('os'); +const hasFlag = require('has-flag'); + +const env = process.env; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + const min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; diff --git a/node_modules/@babel/traverse/node_modules/globals/license b/node_modules/@babel/core/node_modules/supports-color/license similarity index 100% rename from node_modules/@babel/traverse/node_modules/globals/license rename to node_modules/@babel/core/node_modules/supports-color/license diff --git a/node_modules/@babel/core/node_modules/supports-color/package.json b/node_modules/@babel/core/node_modules/supports-color/package.json new file mode 100644 index 0000000..9403cec --- /dev/null +++ b/node_modules/@babel/core/node_modules/supports-color/package.json @@ -0,0 +1,85 @@ +{ + "_from": "supports-color@^5.3.0", + "_id": "supports-color@5.5.0", + "_inBundle": false, + "_integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "_location": "/@babel/core/supports-color", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "supports-color@^5.3.0", + "name": "supports-color", + "escapedName": "supports-color", + "rawSpec": "^5.3.0", + "saveSpec": null, + "fetchSpec": "^5.3.0" + }, + "_requiredBy": [ + "/@babel/core/chalk" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "_shasum": "e2e69a44ac8772f78a1ec0b35b689df6530efc8f", + "_spec": "supports-color@^5.3.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "bundleDependencies": false, + "dependencies": { + "has-flag": "^3.0.0" + }, + "deprecated": false, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "ava": "^0.25.0", + "import-fresh": "^2.0.0", + "xo": "^0.20.0" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "browser.js" + ], + "homepage": "https://github.com/chalk/supports-color#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "license": "MIT", + "name": "supports-color", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "5.5.0" +} diff --git a/node_modules/@babel/highlight/node_modules/supports-color/readme.md b/node_modules/@babel/core/node_modules/supports-color/readme.md similarity index 100% rename from node_modules/@babel/highlight/node_modules/supports-color/readme.md rename to node_modules/@babel/core/node_modules/supports-color/readme.md diff --git a/node_modules/@babel/types/node_modules/to-fast-properties/index.js b/node_modules/@babel/core/node_modules/to-fast-properties/index.js similarity index 100% rename from node_modules/@babel/types/node_modules/to-fast-properties/index.js rename to node_modules/@babel/core/node_modules/to-fast-properties/index.js diff --git a/node_modules/@babel/types/node_modules/to-fast-properties/license b/node_modules/@babel/core/node_modules/to-fast-properties/license similarity index 100% rename from node_modules/@babel/types/node_modules/to-fast-properties/license rename to node_modules/@babel/core/node_modules/to-fast-properties/license diff --git a/node_modules/@babel/core/node_modules/to-fast-properties/package.json b/node_modules/@babel/core/node_modules/to-fast-properties/package.json new file mode 100644 index 0000000..42e35e3 --- /dev/null +++ b/node_modules/@babel/core/node_modules/to-fast-properties/package.json @@ -0,0 +1,73 @@ +{ + "_args": [ + [ + "to-fast-properties@2.0.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "to-fast-properties@^2.0.0", + "_id": "to-fast-properties@2.0.0", + "_inBundle": false, + "_integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "_location": "/@babel/core/to-fast-properties", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "to-fast-properties@^2.0.0", + "name": "to-fast-properties", + "escapedName": "to-fast-properties", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/@babel/core/@babel/types" + ], + "_resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "_shasum": "dc5e698cbd079265bc73e0377681a4e4e83f616e", + "_spec": "to-fast-properties@^2.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core\\node_modules\\@babel\\types", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/to-fast-properties/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Force V8 to use fast properties for an object", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/to-fast-properties#readme", + "keywords": [ + "object", + "obj", + "properties", + "props", + "v8", + "optimize", + "fast", + "convert", + "mode" + ], + "license": "MIT", + "name": "to-fast-properties", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/to-fast-properties.git" + }, + "scripts": { + "test": "node --allow-natives-syntax test.js" + }, + "version": "2.0.0" +} diff --git a/node_modules/@babel/types/node_modules/to-fast-properties/readme.md b/node_modules/@babel/core/node_modules/to-fast-properties/readme.md similarity index 100% rename from node_modules/@babel/types/node_modules/to-fast-properties/readme.md rename to node_modules/@babel/core/node_modules/to-fast-properties/readme.md diff --git a/node_modules/@babel/core/package.json b/node_modules/@babel/core/package.json index 860219f..0ea0724 100644 --- a/node_modules/@babel/core/package.json +++ b/node_modules/@babel/core/package.json @@ -1,53 +1,59 @@ { - "_from": "@babel/core@^7.0.0-beta.46", - "_id": "@babel/core@7.0.0-beta.46", + "_from": "@babel/core@7.4.0", + "_id": "@babel/core@7.4.0", "_inBundle": false, - "_integrity": "sha512-lCDbBSAhNAt+nL98xbgWmuhgrIxKvbvFHf73zlNCuXCHJkdlo7qzTofYK0ZWb+OVce8fQ17fC7DwTIhAwowzMw==", + "_integrity": "sha512-Dzl7U0/T69DFOTwqz/FJdnOSWS57NpjNfCwMKHABr589Lg8uX1RrlBIJ7L5Dubt/xkLsx0xH5EBFzlBVes1ayA==", "_location": "/@babel/core", "_phantomChildren": { - "ms": "2.0.0" + "@babel/parser": "7.4.2", + "color-convert": "1.9.1", + "escape-string-regexp": "1.0.5", + "esutils": "2.0.2", + "has-flag": "3.0.0", + "lodash": "4.17.11", + "minimist": "1.2.0", + "source-map": "0.5.7", + "trim-right": "1.0.1" }, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "@babel/core@^7.0.0-beta.46", + "raw": "@babel/core@7.4.0", "name": "@babel/core", "escapedName": "@babel%2fcore", "scope": "@babel", - "rawSpec": "^7.0.0-beta.46", + "rawSpec": "7.4.0", "saveSpec": null, - "fetchSpec": "^7.0.0-beta.46" + "fetchSpec": "7.4.0" }, "_requiredBy": [ "/babel-minify" ], - "_resolved": "https://registry.npmjs.org/@babel/core/-/core-7.0.0-beta.46.tgz", - "_shasum": "dbe2189bcdef9a2c84becb1ec624878d31a95689", - "_spec": "@babel/core@^7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-minify", + "_resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.0.tgz", + "_shasum": "248fd6874b7d755010bfe61f557461d4f446d9e9", + "_spec": "@babel/core@7.4.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\babel-minify", "author": { "name": "Sebastian McKenzie", "email": "sebmck@gmail.com" }, "browser": { "./lib/config/files/index.js": "./lib/config/files/index-browser.js", - "./lib/transform-file.js": "./lib/transform-file-browser.js", - "./lib/transform-file-sync.js": "./lib/transform-file-sync-browser.js" + "./lib/transform-file.js": "./lib/transform-file-browser.js" }, "bundleDependencies": false, "dependencies": { - "@babel/code-frame": "7.0.0-beta.46", - "@babel/generator": "7.0.0-beta.46", - "@babel/helpers": "7.0.0-beta.46", - "@babel/template": "7.0.0-beta.46", - "@babel/traverse": "7.0.0-beta.46", - "@babel/types": "7.0.0-beta.46", - "babylon": "7.0.0-beta.46", + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.0", + "@babel/helpers": "^7.4.0", + "@babel/parser": "^7.4.0", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.0", + "@babel/types": "^7.4.0", "convert-source-map": "^1.1.0", - "debug": "^3.1.0", - "json5": "^0.5.0", - "lodash": "^4.2.0", - "micromatch": "^2.3.11", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.11", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" @@ -55,9 +61,13 @@ "deprecated": false, "description": "Babel compiler core.", "devDependencies": { - "@babel/helper-transform-fixture-test-runner": "7.0.0-beta.46", - "@babel/register": "7.0.0-beta.46" + "@babel/helper-transform-fixture-test-runner": "^7.0.0", + "@babel/register": "^7.4.0" }, + "engines": { + "node": ">=6.9.0" + }, + "gitHead": "f1328fb913b5a93d54dfc6e3728b1f56c8f4a804", "homepage": "https://babeljs.io/", "keywords": [ "6to5", @@ -75,11 +85,14 @@ "compiler" ], "license": "MIT", - "main": "./lib/index.js", + "main": "lib/index.js", "name": "@babel/core", + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "https://github.com/babel/babel/tree/master/packages/babel-core" }, - "version": "7.0.0-beta.46" + "version": "7.4.0" } diff --git a/node_modules/@babel/core/yarn.lock b/node_modules/@babel/core/yarn.lock deleted file mode 100644 index 9da52b7..0000000 --- a/node_modules/@babel/core/yarn.lock +++ /dev/null @@ -1,1126 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" - dependencies: - "@babel/highlight" "7.0.0-beta.40" - -"@babel/core@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.40.tgz#455464dd81d499fd97d32b473f0331f74379a33f" - dependencies: - "@babel/code-frame" "7.0.0-beta.40" - "@babel/generator" "7.0.0-beta.40" - "@babel/helpers" "7.0.0-beta.40" - "@babel/template" "7.0.0-beta.40" - "@babel/traverse" "7.0.0-beta.40" - "@babel/types" "7.0.0-beta.40" - babylon "7.0.0-beta.40" - convert-source-map "^1.1.0" - debug "^3.0.1" - json5 "^0.5.0" - lodash "^4.2.0" - micromatch "^2.3.11" - resolve "^1.3.2" - source-map "^0.5.0" - -"@babel/generator@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.40.tgz#ab61f9556f4f71dbd1138949c795bb9a21e302ea" - dependencies: - "@babel/types" "7.0.0-beta.40" - jsesc "^2.5.1" - lodash "^4.2.0" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/helper-fixtures@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/helper-fixtures/-/helper-fixtures-7.0.0-beta.40.tgz#1f1884867970d1fcb63c23d9d7bccbffb07bf88a" - dependencies: - lodash "^4.2.0" - semver "^5.3.0" - try-resolve "^1.0.0" - -"@babel/helper-function-name@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.40.tgz#9d033341ab16517f40d43a73f2d81fc431ccd7b6" - dependencies: - "@babel/helper-get-function-arity" "7.0.0-beta.40" - "@babel/template" "7.0.0-beta.40" - "@babel/types" "7.0.0-beta.40" - -"@babel/helper-get-function-arity@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.40.tgz#ac0419cf067b0ec16453e1274f03878195791c6e" - dependencies: - "@babel/types" "7.0.0-beta.40" - -"@babel/helper-transform-fixture-test-runner@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/helper-transform-fixture-test-runner/-/helper-transform-fixture-test-runner-7.0.0-beta.40.tgz#0655b9a14cb56d73a0535c1a0e777664b508ba8d" - dependencies: - "@babel/code-frame" "7.0.0-beta.40" - "@babel/core" "7.0.0-beta.40" - "@babel/helper-fixtures" "7.0.0-beta.40" - "@babel/polyfill" "7.0.0-beta.40" - chai "^4.1.0" - lodash "^4.2.0" - resolve "^1.3.2" - source-map "^0.5.0" - -"@babel/helpers@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.40.tgz#82f8e144f56b2896b1d624ca88ac4603023ececd" - dependencies: - "@babel/template" "7.0.0-beta.40" - "@babel/traverse" "7.0.0-beta.40" - "@babel/types" "7.0.0-beta.40" - -"@babel/highlight@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.40.tgz#b43d67d76bf46e1d10d227f68cddcd263786b255" - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - -"@babel/polyfill@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0-beta.40.tgz#90f447aa04ab54c317dcf0ccb8cb11ad4228fea0" - dependencies: - core-js "^2.5.3" - regenerator-runtime "^0.11.1" - -"@babel/register@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0-beta.40.tgz#40df0bdbb2fe74a7c7b09af3d59b71c8cd53c4da" - dependencies: - core-js "^2.5.3" - find-cache-dir "^1.0.0" - home-or-tmp "^3.0.0" - lodash "^4.2.0" - mkdirp "^0.5.1" - pirates "^3.0.1" - source-map-support "^0.4.2" - -"@babel/template@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.40.tgz#034988c6424eb5c3268fe6a608626de1f4410fc8" - dependencies: - "@babel/code-frame" "7.0.0-beta.40" - "@babel/types" "7.0.0-beta.40" - babylon "7.0.0-beta.40" - lodash "^4.2.0" - -"@babel/traverse@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.40.tgz#d140e449b2e093ef9fe1a2eecc28421ffb4e521e" - dependencies: - "@babel/code-frame" "7.0.0-beta.40" - "@babel/generator" "7.0.0-beta.40" - "@babel/helper-function-name" "7.0.0-beta.40" - "@babel/types" "7.0.0-beta.40" - babylon "7.0.0-beta.40" - debug "^3.0.1" - globals "^11.1.0" - invariant "^2.2.0" - lodash "^4.2.0" - -"@babel/types@7.0.0-beta.40": - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.40.tgz#25c3d7aae14126abe05fcb098c65a66b6d6b8c14" - dependencies: - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^2.0.0" - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - dependencies: - color-convert "^1.9.0" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - -assertion-error@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - -atob@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d" - -babylon@7.0.0-beta.40: - version "7.0.0-beta.40" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.40.tgz#91fc8cd56d5eb98b28e6fde41045f2957779940a" - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - define-property "^1.0.0" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - kind-of "^6.0.2" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -chai@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c" - dependencies: - assertion-error "^1.0.1" - check-error "^1.0.1" - deep-eql "^3.0.0" - get-func-name "^2.0.0" - pathval "^1.0.0" - type-detect "^4.0.0" - -chalk@^2.0.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -check-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" - dependencies: - color-name "^1.1.1" - -color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - -component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - -convert-source-map@^1.1.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - -core-js@^2.5.3: - version "2.5.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" - -debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - -debug@^3.0.1, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - dependencies: - ms "2.0.0" - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - -deep-eql@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - dependencies: - type-detect "^4.0.0" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -find-cache-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" - dependencies: - commondir "^1.0.1" - make-dir "^1.0.0" - pkg-dir "^2.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - dependencies: - locate-path "^2.0.0" - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - dependencies: - map-cache "^0.2.2" - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -globals@^11.1.0: - version "11.3.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.3.0.tgz#e04fdb7b9796d8adac9c8f64c14837b2313378b0" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -home-or-tmp@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" - -invariant@^2.2.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.3.tgz#1a827dfde7dcbd7c323f0ca826be8fa7c5e9d688" - dependencies: - loose-envify "^1.0.0" - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - dependencies: - kind-of "^6.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - dependencies: - kind-of "^6.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - -is-odd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" - dependencies: - is-number "^4.0.0" - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - -isarray@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - -js-tokens@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - -jsesc@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" - -json5@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - -lazy-cache@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" - dependencies: - set-getter "^0.1.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -lodash@^4.2.0: - version "4.17.5" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" - -loose-envify@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - -make-dir@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" - dependencies: - pify "^3.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - dependencies: - object-visit "^1.0.0" - -micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.5: - version "3.1.9" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.9.tgz#15dc93175ae39e52e93087847096effc73efcf89" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -nanomatch@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-odd "^2.0.0" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -node-modules-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" - -normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - dependencies: - isobject "^3.0.0" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - dependencies: - isobject "^3.0.1" - -p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" - dependencies: - p-try "^1.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - dependencies: - p-limit "^1.1.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -pathval@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - -pirates@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-3.0.2.tgz#7e6f85413fd9161ab4e12b539b06010d85954bb9" - dependencies: - node-modules-regexp "^1.0.0" - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - dependencies: - find-up "^2.1.0" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -regenerator-runtime@^0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - -resolve@^1.3.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" - dependencies: - path-parse "^1.0.5" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - dependencies: - ret "~0.1.10" - -semver@^5.3.0, semver@^5.4.1: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - -set-getter@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" - dependencies: - to-object-path "^0.3.0" - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.1.tgz#e12b5487faded3e3dea0ac91e9400bf75b401370" - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^2.0.0" - -source-map-resolve@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" - dependencies: - atob "^2.0.0" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.4.2: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - -source-map@^0.5.0, source-map@^0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - dependencies: - extend-shallow "^3.0.0" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -supports-color@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" - dependencies: - has-flag "^3.0.0" - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - -try-resolve@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/try-resolve/-/try-resolve-1.0.1.tgz#cfde6fabd72d63e5797cfaab873abbe8e700e912" - -type-detect@^4.0.0: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - -use@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8" - dependencies: - define-property "^0.2.5" - isobject "^3.0.0" - lazy-cache "^2.0.2" diff --git a/node_modules/@babel/generator/README.md b/node_modules/@babel/generator/README.md deleted file mode 100644 index 44725b6..0000000 --- a/node_modules/@babel/generator/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# @babel/generator - -> Turns a [Babylon AST](https://github.com/babel/babel/blob/master/packages/babylon/ast/spec.md) into code. - -## Install - -```sh -npm install --save-dev @babel/generator -``` - -## Usage - -```js -import {parse} from 'babylon'; -import generate from '@babel/generator'; - -const code = 'class Example {}'; -const ast = parse(code); - -const output = generate(ast, { /* options */ }, code); -``` - -## Options - -Options for formatting output: - -name | type | default | description ------------------------|----------|-----------------|-------------------------------------------------------------------------- -auxiliaryCommentBefore | string | | Optional string to add as a block comment at the start of the output file -auxiliaryCommentAfter | string | | Optional string to add as a block comment at the end of the output file -shouldPrintComment | function | `opts.comments` | Function that takes a comment (as a string) and returns `true` if the comment should be included in the output. By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment contains `@preserve` or `@license` -retainLines | boolean | `false` | Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces) -retainFunctionParens | boolean | `false` | Retain parens around function expressions (could be used to change engine parsing behavior) -comments | boolean | `true` | Should comments be included in output -compact | boolean or `'auto'` | `opts.minified` | Set to `true` to avoid adding whitespace for formatting -minified | boolean | `false` | Should the output be minified -concise | boolean | `false` | Set to `true` to reduce whitespace (but not as much as `opts.compact`) -filename | string | | Used in warning messages -jsonCompatibleStrings | boolean | `false` | Set to true to run `jsesc` with "json": true to print "\u00A9" vs. "©"; - -Options for source maps: - -name | type | default | description ------------------------|----------|-----------------|-------------------------------------------------------------------------- -sourceMaps | boolean | `false` | Enable generating source maps -sourceRoot | string | | A root for all relative URLs in the source map -sourceFileName | string | | The filename for the source code (i.e. the code in the `code` argument). This will only be used if `code` is a string. - -## AST from Multiple Sources - -In most cases, Babel does a 1:1 transformation of input-file to output-file. However, -you may be dealing with AST constructed from multiple sources - JS files, templates, etc. -If this is the case, and you want the sourcemaps to reflect the correct sources, you'll need -to pass an object to `generate` as the `code` parameter. Keys -should be the source filenames, and values should be the source content. - -Here's an example of what that might look like: - -```js -import {parse} from 'babylon'; -import generate from '@babel/generator'; - -const a = 'var a = 1;'; -const b = 'var b = 2;'; -const astA = parse(a, { sourceFilename: 'a.js' }); -const astB = parse(b, { sourceFilename: 'b.js' }); -const ast = { - type: 'Program', - body: [].concat(astA.program.body, astB.program.body) -}; - -const { code, map } = generate(ast, { sourceMaps: true }, { - 'a.js': a, - 'b.js': b -}); - -// Sourcemap will point to both a.js and b.js where appropriate. -``` diff --git a/node_modules/@babel/generator/lib/buffer.js b/node_modules/@babel/generator/lib/buffer.js deleted file mode 100644 index 3b229c3..0000000 --- a/node_modules/@babel/generator/lib/buffer.js +++ /dev/null @@ -1,217 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _trimRight() { - var data = _interopRequireDefault(require("trim-right")); - - _trimRight = function _trimRight() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var SPACES_RE = /^[ \t]+$/; - -var Buffer = function () { - function Buffer(map) { - this._map = null; - this._buf = []; - this._last = ""; - this._queue = []; - this._position = { - line: 1, - column: 0 - }; - this._sourcePosition = { - identifierName: null, - line: null, - column: null, - filename: null - }; - this._map = map; - } - - var _proto = Buffer.prototype; - - _proto.get = function get() { - this._flush(); - - var map = this._map; - var result = { - code: (0, _trimRight().default)(this._buf.join("")), - map: null, - rawMappings: map && map.getRawMappings() - }; - - if (map) { - Object.defineProperty(result, "map", { - configurable: true, - enumerable: true, - get: function get() { - return this.map = map.get(); - }, - set: function set(value) { - Object.defineProperty(this, "map", { - value: value, - writable: true - }); - } - }); - } - - return result; - }; - - _proto.append = function append(str) { - this._flush(); - - var _sourcePosition = this._sourcePosition, - line = _sourcePosition.line, - column = _sourcePosition.column, - filename = _sourcePosition.filename, - identifierName = _sourcePosition.identifierName; - - this._append(str, line, column, identifierName, filename); - }; - - _proto.queue = function queue(str) { - if (str === "\n") { - while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) { - this._queue.shift(); - } - } - - var _sourcePosition2 = this._sourcePosition, - line = _sourcePosition2.line, - column = _sourcePosition2.column, - filename = _sourcePosition2.filename, - identifierName = _sourcePosition2.identifierName; - - this._queue.unshift([str, line, column, identifierName, filename]); - }; - - _proto._flush = function _flush() { - var item; - - while (item = this._queue.pop()) { - this._append.apply(this, item); - } - }; - - _proto._append = function _append(str, line, column, identifierName, filename) { - if (this._map && str[0] !== "\n") { - this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename); - } - - this._buf.push(str); - - this._last = str[str.length - 1]; - - for (var i = 0; i < str.length; i++) { - if (str[i] === "\n") { - this._position.line++; - this._position.column = 0; - } else { - this._position.column++; - } - } - }; - - _proto.removeTrailingNewline = function removeTrailingNewline() { - if (this._queue.length > 0 && this._queue[0][0] === "\n") { - this._queue.shift(); - } - }; - - _proto.removeLastSemicolon = function removeLastSemicolon() { - if (this._queue.length > 0 && this._queue[0][0] === ";") { - this._queue.shift(); - } - }; - - _proto.endsWith = function endsWith(suffix) { - if (suffix.length === 1) { - var last; - - if (this._queue.length > 0) { - var str = this._queue[0][0]; - last = str[str.length - 1]; - } else { - last = this._last; - } - - return last === suffix; - } - - var end = this._last + this._queue.reduce(function (acc, item) { - return item[0] + acc; - }, ""); - - if (suffix.length <= end.length) { - return end.slice(-suffix.length) === suffix; - } - - return false; - }; - - _proto.hasContent = function hasContent() { - return this._queue.length > 0 || !!this._last; - }; - - _proto.source = function source(prop, loc) { - if (prop && !loc) return; - var pos = loc ? loc[prop] : null; - this._sourcePosition.identifierName = loc && loc.identifierName || null; - this._sourcePosition.line = pos ? pos.line : null; - this._sourcePosition.column = pos ? pos.column : null; - this._sourcePosition.filename = loc && loc.filename || null; - }; - - _proto.withSource = function withSource(prop, loc, cb) { - if (!this._map) return cb(); - var originalLine = this._sourcePosition.line; - var originalColumn = this._sourcePosition.column; - var originalFilename = this._sourcePosition.filename; - var originalIdentifierName = this._sourcePosition.identifierName; - this.source(prop, loc); - cb(); - this._sourcePosition.line = originalLine; - this._sourcePosition.column = originalColumn; - this._sourcePosition.filename = originalFilename; - this._sourcePosition.identifierName = originalIdentifierName; - }; - - _proto.getCurrentColumn = function getCurrentColumn() { - var extra = this._queue.reduce(function (acc, item) { - return item[0] + acc; - }, ""); - - var lastIndex = extra.lastIndexOf("\n"); - return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex; - }; - - _proto.getCurrentLine = function getCurrentLine() { - var extra = this._queue.reduce(function (acc, item) { - return item[0] + acc; - }, ""); - - var count = 0; - - for (var i = 0; i < extra.length; i++) { - if (extra[i] === "\n") count++; - } - - return this._position.line + count; - }; - - return Buffer; -}(); - -exports.default = Buffer; \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/base.js b/node_modules/@babel/generator/lib/generators/base.js deleted file mode 100644 index e2080c1..0000000 --- a/node_modules/@babel/generator/lib/generators/base.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.File = File; -exports.Program = Program; -exports.BlockStatement = BlockStatement; -exports.Noop = Noop; -exports.Directive = Directive; -Object.defineProperty(exports, "DirectiveLiteral", { - enumerable: true, - get: function get() { - return _types.StringLiteral; - } -}); - -var _types = require("./types"); - -function File(node) { - this.print(node.program, node); -} - -function Program(node) { - this.printInnerComments(node, false); - this.printSequence(node.directives, node); - if (node.directives && node.directives.length) this.newline(); - this.printSequence(node.body, node); -} - -function BlockStatement(node) { - this.token("{"); - this.printInnerComments(node); - var hasDirectives = node.directives && node.directives.length; - - if (node.body.length || hasDirectives) { - this.newline(); - this.printSequence(node.directives, node, { - indent: true - }); - if (hasDirectives) this.newline(); - this.printSequence(node.body, node, { - indent: true - }); - this.removeTrailingNewline(); - this.source("end", node.loc); - if (!this.endsWith("\n")) this.newline(); - this.rightBrace(); - } else { - this.source("end", node.loc); - this.token("}"); - } -} - -function Noop() {} - -function Directive(node) { - this.print(node.value, node); - this.semicolon(); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/flow.js b/node_modules/@babel/generator/lib/generators/flow.js deleted file mode 100644 index b6642c1..0000000 --- a/node_modules/@babel/generator/lib/generators/flow.js +++ /dev/null @@ -1,588 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.DeclareClass = DeclareClass; -exports.DeclareFunction = DeclareFunction; -exports.InferredPredicate = InferredPredicate; -exports.DeclaredPredicate = DeclaredPredicate; -exports.DeclareInterface = DeclareInterface; -exports.DeclareModule = DeclareModule; -exports.DeclareModuleExports = DeclareModuleExports; -exports.DeclareTypeAlias = DeclareTypeAlias; -exports.DeclareOpaqueType = DeclareOpaqueType; -exports.DeclareVariable = DeclareVariable; -exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.ExistsTypeAnnotation = ExistsTypeAnnotation; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.FunctionTypeParam = FunctionTypeParam; -exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends; -exports._interfaceish = _interfaceish; -exports._variance = _variance; -exports.InterfaceDeclaration = InterfaceDeclaration; -exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.StringTypeAnnotation = StringTypeAnnotation; -exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.TypeAlias = TypeAlias; -exports.TypeAnnotation = TypeAnnotation; -exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.TypeParameter = TypeParameter; -exports.OpaqueType = OpaqueType; -exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.ObjectTypeProperty = ObjectTypeProperty; -exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.TypeCastExpression = TypeCastExpression; -exports.Variance = Variance; -exports.VoidTypeAnnotation = VoidTypeAnnotation; -Object.defineProperty(exports, "NumberLiteralTypeAnnotation", { - enumerable: true, - get: function get() { - return _types2.NumericLiteral; - } -}); -Object.defineProperty(exports, "StringLiteralTypeAnnotation", { - enumerable: true, - get: function get() { - return _types2.StringLiteral; - } -}); - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -var _modules = require("./modules"); - -var _types2 = require("./types"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function AnyTypeAnnotation() { - this.word("any"); -} - -function ArrayTypeAnnotation(node) { - this.print(node.elementType, node); - this.token("["); - this.token("]"); -} - -function BooleanTypeAnnotation() { - this.word("boolean"); -} - -function BooleanLiteralTypeAnnotation(node) { - this.word(node.value ? "true" : "false"); -} - -function NullLiteralTypeAnnotation() { - this.word("null"); -} - -function DeclareClass(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("class"); - this.space(); - - this._interfaceish(node); -} - -function DeclareFunction(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("function"); - this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation.typeAnnotation, node); - - if (node.predicate) { - this.space(); - this.print(node.predicate, node); - } - - this.semicolon(); -} - -function InferredPredicate() { - this.token("%"); - this.word("checks"); -} - -function DeclaredPredicate(node) { - this.token("%"); - this.word("checks"); - this.token("("); - this.print(node.value, node); - this.token(")"); -} - -function DeclareInterface(node) { - this.word("declare"); - this.space(); - this.InterfaceDeclaration(node); -} - -function DeclareModule(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.space(); - this.print(node.id, node); - this.space(); - this.print(node.body, node); -} - -function DeclareModuleExports(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.token("."); - this.word("exports"); - this.print(node.typeAnnotation, node); -} - -function DeclareTypeAlias(node) { - this.word("declare"); - this.space(); - this.TypeAlias(node); -} - -function DeclareOpaqueType(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.OpaqueType(node); -} - -function DeclareVariable(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("var"); - this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation, node); - this.semicolon(); -} - -function DeclareExportDeclaration(node) { - this.word("declare"); - this.space(); - this.word("export"); - this.space(); - - if (node.default) { - this.word("default"); - this.space(); - } - - FlowExportDeclaration.apply(this, arguments); -} - -function DeclareExportAllDeclaration() { - this.word("declare"); - this.space(); - - _modules.ExportAllDeclaration.apply(this, arguments); -} - -function FlowExportDeclaration(node) { - if (node.declaration) { - var declar = node.declaration; - this.print(declar, node); - if (!t().isStatement(declar)) this.semicolon(); - } else { - this.token("{"); - - if (node.specifiers.length) { - this.space(); - this.printList(node.specifiers, node); - this.space(); - } - - this.token("}"); - - if (node.source) { - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - } - - this.semicolon(); - } -} - -function ExistsTypeAnnotation() { - this.token("*"); -} - -function FunctionTypeAnnotation(node, parent) { - this.print(node.typeParameters, node); - this.token("("); - this.printList(node.params, node); - - if (node.rest) { - if (node.params.length) { - this.token(","); - this.space(); - } - - this.token("..."); - this.print(node.rest, node); - } - - this.token(")"); - - if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) { - this.token(":"); - } else { - this.space(); - this.token("=>"); - } - - this.space(); - this.print(node.returnType, node); -} - -function FunctionTypeParam(node) { - this.print(node.name, node); - if (node.optional) this.token("?"); - - if (node.name) { - this.token(":"); - this.space(); - } - - this.print(node.typeAnnotation, node); -} - -function InterfaceExtends(node) { - this.print(node.id, node); - this.print(node.typeParameters, node); -} - -function _interfaceish(node) { - this.print(node.id, node); - this.print(node.typeParameters, node); - - if (node.extends.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(node.extends, node); - } - - if (node.mixins && node.mixins.length) { - this.space(); - this.word("mixins"); - this.space(); - this.printList(node.mixins, node); - } - - if (node.implements && node.implements.length) { - this.space(); - this.word("implements"); - this.space(); - this.printList(node.implements, node); - } - - this.space(); - this.print(node.body, node); -} - -function _variance(node) { - if (node.variance) { - if (node.variance.kind === "plus") { - this.token("+"); - } else if (node.variance.kind === "minus") { - this.token("-"); - } - } -} - -function InterfaceDeclaration(node) { - this.word("interface"); - this.space(); - - this._interfaceish(node); -} - -function andSeparator() { - this.space(); - this.token("&"); - this.space(); -} - -function IntersectionTypeAnnotation(node) { - this.printJoin(node.types, node, { - separator: andSeparator - }); -} - -function MixedTypeAnnotation() { - this.word("mixed"); -} - -function EmptyTypeAnnotation() { - this.word("empty"); -} - -function NullableTypeAnnotation(node) { - this.token("?"); - this.print(node.typeAnnotation, node); -} - -function NumberTypeAnnotation() { - this.word("number"); -} - -function StringTypeAnnotation() { - this.word("string"); -} - -function ThisTypeAnnotation() { - this.word("this"); -} - -function TupleTypeAnnotation(node) { - this.token("["); - this.printList(node.types, node); - this.token("]"); -} - -function TypeofTypeAnnotation(node) { - this.word("typeof"); - this.space(); - this.print(node.argument, node); -} - -function TypeAlias(node) { - this.word("type"); - this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); - this.space(); - this.token("="); - this.space(); - this.print(node.right, node); - this.semicolon(); -} - -function TypeAnnotation(node) { - this.token(":"); - this.space(); - if (node.optional) this.token("?"); - this.print(node.typeAnnotation, node); -} - -function TypeParameterInstantiation(node) { - this.token("<"); - this.printList(node.params, node, {}); - this.token(">"); -} - -function TypeParameter(node) { - this._variance(node); - - this.word(node.name); - - if (node.bound) { - this.print(node.bound, node); - } - - if (node.default) { - this.space(); - this.token("="); - this.space(); - this.print(node.default, node); - } -} - -function OpaqueType(node) { - this.word("opaque"); - this.space(); - this.word("type"); - this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); - - if (node.supertype) { - this.token(":"); - this.space(); - this.print(node.supertype, node); - } - - if (node.impltype) { - this.space(); - this.token("="); - this.space(); - this.print(node.impltype, node); - } - - this.semicolon(); -} - -function ObjectTypeAnnotation(node) { - var _this = this; - - if (node.exact) { - this.token("{|"); - } else { - this.token("{"); - } - - var props = node.properties.concat(node.callProperties || [], node.indexers || []); - - if (props.length) { - this.space(); - this.printJoin(props, node, { - addNewlines: function addNewlines(leading) { - if (leading && !props[0]) return 1; - }, - indent: true, - statement: true, - iterator: function iterator() { - if (props.length !== 1) { - _this.token(","); - - _this.space(); - } - } - }); - this.space(); - } - - if (node.exact) { - this.token("|}"); - } else { - this.token("}"); - } -} - -function ObjectTypeCallProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this.print(node.value, node); -} - -function ObjectTypeIndexer(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this._variance(node); - - this.token("["); - - if (node.id) { - this.print(node.id, node); - this.token(":"); - this.space(); - } - - this.print(node.key, node); - this.token("]"); - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ObjectTypeProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this._variance(node); - - this.print(node.key, node); - if (node.optional) this.token("?"); - - if (!node.method) { - this.token(":"); - this.space(); - } - - this.print(node.value, node); -} - -function ObjectTypeSpreadProperty(node) { - this.token("..."); - this.print(node.argument, node); -} - -function QualifiedTypeIdentifier(node) { - this.print(node.qualification, node); - this.token("."); - this.print(node.id, node); -} - -function orSeparator() { - this.space(); - this.token("|"); - this.space(); -} - -function UnionTypeAnnotation(node) { - this.printJoin(node.types, node, { - separator: orSeparator - }); -} - -function TypeCastExpression(node) { - this.token("("); - this.print(node.expression, node); - this.print(node.typeAnnotation, node); - this.token(")"); -} - -function Variance(node) { - if (node.kind === "plus") { - this.token("+"); - } else { - this.token("-"); - } -} - -function VoidTypeAnnotation() { - this.word("void"); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/index.js b/node_modules/@babel/generator/lib/generators/index.js deleted file mode 100644 index a403023..0000000 --- a/node_modules/@babel/generator/lib/generators/index.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _templateLiterals = require("./template-literals"); - -Object.keys(_templateLiterals).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _templateLiterals[key]; - } - }); -}); - -var _expressions = require("./expressions"); - -Object.keys(_expressions).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _expressions[key]; - } - }); -}); - -var _statements = require("./statements"); - -Object.keys(_statements).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _statements[key]; - } - }); -}); - -var _classes = require("./classes"); - -Object.keys(_classes).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _classes[key]; - } - }); -}); - -var _methods = require("./methods"); - -Object.keys(_methods).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _methods[key]; - } - }); -}); - -var _modules = require("./modules"); - -Object.keys(_modules).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _modules[key]; - } - }); -}); - -var _types = require("./types"); - -Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _types[key]; - } - }); -}); - -var _flow = require("./flow"); - -Object.keys(_flow).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _flow[key]; - } - }); -}); - -var _base = require("./base"); - -Object.keys(_base).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _base[key]; - } - }); -}); - -var _jsx = require("./jsx"); - -Object.keys(_jsx).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _jsx[key]; - } - }); -}); - -var _typescript = require("./typescript"); - -Object.keys(_typescript).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _typescript[key]; - } - }); -}); \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/jsx.js b/node_modules/@babel/generator/lib/generators/jsx.js deleted file mode 100644 index 75edb03..0000000 --- a/node_modules/@babel/generator/lib/generators/jsx.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.JSXAttribute = JSXAttribute; -exports.JSXIdentifier = JSXIdentifier; -exports.JSXNamespacedName = JSXNamespacedName; -exports.JSXMemberExpression = JSXMemberExpression; -exports.JSXSpreadAttribute = JSXSpreadAttribute; -exports.JSXExpressionContainer = JSXExpressionContainer; -exports.JSXSpreadChild = JSXSpreadChild; -exports.JSXText = JSXText; -exports.JSXElement = JSXElement; -exports.JSXOpeningElement = JSXOpeningElement; -exports.JSXClosingElement = JSXClosingElement; -exports.JSXEmptyExpression = JSXEmptyExpression; -exports.JSXFragment = JSXFragment; -exports.JSXOpeningFragment = JSXOpeningFragment; -exports.JSXClosingFragment = JSXClosingFragment; - -function JSXAttribute(node) { - this.print(node.name, node); - - if (node.value) { - this.token("="); - this.print(node.value, node); - } -} - -function JSXIdentifier(node) { - this.word(node.name); -} - -function JSXNamespacedName(node) { - this.print(node.namespace, node); - this.token(":"); - this.print(node.name, node); -} - -function JSXMemberExpression(node) { - this.print(node.object, node); - this.token("."); - this.print(node.property, node); -} - -function JSXSpreadAttribute(node) { - this.token("{"); - this.token("..."); - this.print(node.argument, node); - this.token("}"); -} - -function JSXExpressionContainer(node) { - this.token("{"); - this.print(node.expression, node); - this.token("}"); -} - -function JSXSpreadChild(node) { - this.token("{"); - this.token("..."); - this.print(node.expression, node); - this.token("}"); -} - -function JSXText(node) { - var raw = this.getPossibleRaw(node); - - if (raw != null) { - this.token(raw); - } else { - this.token(node.value); - } -} - -function JSXElement(node) { - var open = node.openingElement; - this.print(open, node); - if (open.selfClosing) return; - this.indent(); - var _arr = node.children; - - for (var _i = 0; _i < _arr.length; _i++) { - var child = _arr[_i]; - this.print(child, node); - } - - this.dedent(); - this.print(node.closingElement, node); -} - -function spaceSeparator() { - this.space(); -} - -function JSXOpeningElement(node) { - this.token("<"); - this.print(node.name, node); - - if (node.attributes.length > 0) { - this.space(); - this.printJoin(node.attributes, node, { - separator: spaceSeparator - }); - } - - if (node.selfClosing) { - this.space(); - this.token("/>"); - } else { - this.token(">"); - } -} - -function JSXClosingElement(node) { - this.token(""); -} - -function JSXEmptyExpression(node) { - this.printInnerComments(node); -} - -function JSXFragment(node) { - this.print(node.openingFragment, node); - this.indent(); - var _arr2 = node.children; - - for (var _i2 = 0; _i2 < _arr2.length; _i2++) { - var child = _arr2[_i2]; - this.print(child, node); - } - - this.dedent(); - this.print(node.closingFragment, node); -} - -function JSXOpeningFragment() { - this.token("<"); - this.token(">"); -} - -function JSXClosingFragment() { - this.token(""); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/template-literals.js b/node_modules/@babel/generator/lib/generators/template-literals.js deleted file mode 100644 index 8e09874..0000000 --- a/node_modules/@babel/generator/lib/generators/template-literals.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TaggedTemplateExpression = TaggedTemplateExpression; -exports.TemplateElement = TemplateElement; -exports.TemplateLiteral = TemplateLiteral; - -function TaggedTemplateExpression(node) { - this.print(node.tag, node); - this.print(node.quasi, node); -} - -function TemplateElement(node, parent) { - var isFirst = parent.quasis[0] === node; - var isLast = parent.quasis[parent.quasis.length - 1] === node; - var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${"); - this.token(value); -} - -function TemplateLiteral(node) { - var quasis = node.quasis; - - for (var i = 0; i < quasis.length; i++) { - this.print(quasis[i], node); - - if (i + 1 < quasis.length) { - this.print(node.expressions[i], node); - } - } -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/types.js b/node_modules/@babel/generator/lib/generators/types.js deleted file mode 100644 index b7aa1a5..0000000 --- a/node_modules/@babel/generator/lib/generators/types.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Identifier = Identifier; -exports.SpreadElement = exports.RestElement = RestElement; -exports.ObjectPattern = exports.ObjectExpression = ObjectExpression; -exports.ObjectMethod = ObjectMethod; -exports.ObjectProperty = ObjectProperty; -exports.ArrayPattern = exports.ArrayExpression = ArrayExpression; -exports.RegExpLiteral = RegExpLiteral; -exports.BooleanLiteral = BooleanLiteral; -exports.NullLiteral = NullLiteral; -exports.NumericLiteral = NumericLiteral; -exports.StringLiteral = StringLiteral; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _jsesc() { - var data = _interopRequireDefault(require("jsesc")); - - _jsesc = function _jsesc() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function Identifier(node) { - this.word(node.name); -} - -function RestElement(node) { - this.token("..."); - this.print(node.argument, node); -} - -function ObjectExpression(node) { - var props = node.properties; - this.token("{"); - this.printInnerComments(node); - - if (props.length) { - this.space(); - this.printList(props, node, { - indent: true, - statement: true - }); - this.space(); - } - - this.token("}"); -} - -function ObjectMethod(node) { - this.printJoin(node.decorators, node); - - this._methodHead(node); - - this.space(); - this.print(node.body, node); -} - -function ObjectProperty(node) { - this.printJoin(node.decorators, node); - - if (node.computed) { - this.token("["); - this.print(node.key, node); - this.token("]"); - } else { - if (t().isAssignmentPattern(node.value) && t().isIdentifier(node.key) && node.key.name === node.value.left.name) { - this.print(node.value, node); - return; - } - - this.print(node.key, node); - - if (node.shorthand && t().isIdentifier(node.key) && t().isIdentifier(node.value) && node.key.name === node.value.name) { - return; - } - } - - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ArrayExpression(node) { - var elems = node.elements; - var len = elems.length; - this.token("["); - this.printInnerComments(node); - - for (var i = 0; i < elems.length; i++) { - var elem = elems[i]; - - if (elem) { - if (i > 0) this.space(); - this.print(elem, node); - if (i < len - 1) this.token(","); - } else { - this.token(","); - } - } - - this.token("]"); -} - -function RegExpLiteral(node) { - this.word("/" + node.pattern + "/" + node.flags); -} - -function BooleanLiteral(node) { - this.word(node.value ? "true" : "false"); -} - -function NullLiteral() { - this.word("null"); -} - -function NumericLiteral(node) { - var raw = this.getPossibleRaw(node); - var value = node.value + ""; - - if (raw == null) { - this.number(value); - } else if (this.format.minified) { - this.number(raw.length < value.length ? raw : value); - } else { - this.number(raw); - } -} - -function StringLiteral(node) { - var raw = this.getPossibleRaw(node); - - if (!this.format.minified && raw != null) { - this.token(raw); - return; - } - - var opts = { - quotes: "double", - wrap: true - }; - - if (this.format.jsonCompatibleStrings) { - opts.json = true; - } - - var val = (0, _jsesc().default)(node.value, opts); - return this.token(val); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/typescript.js b/node_modules/@babel/generator/lib/generators/typescript.js deleted file mode 100644 index fcc28fc..0000000 --- a/node_modules/@babel/generator/lib/generators/typescript.js +++ /dev/null @@ -1,661 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TSTypeAnnotation = TSTypeAnnotation; -exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; -exports.TSTypeParameter = TSTypeParameter; -exports.TSParameterProperty = TSParameterProperty; -exports.TSDeclareFunction = TSDeclareFunction; -exports.TSDeclareMethod = TSDeclareMethod; -exports.TSQualifiedName = TSQualifiedName; -exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; -exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.TSPropertySignature = TSPropertySignature; -exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName; -exports.TSMethodSignature = TSMethodSignature; -exports.TSIndexSignature = TSIndexSignature; -exports.TSAnyKeyword = TSAnyKeyword; -exports.TSNumberKeyword = TSNumberKeyword; -exports.TSObjectKeyword = TSObjectKeyword; -exports.TSBooleanKeyword = TSBooleanKeyword; -exports.TSStringKeyword = TSStringKeyword; -exports.TSSymbolKeyword = TSSymbolKeyword; -exports.TSVoidKeyword = TSVoidKeyword; -exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.TSNullKeyword = TSNullKeyword; -exports.TSNeverKeyword = TSNeverKeyword; -exports.TSThisType = TSThisType; -exports.TSFunctionType = TSFunctionType; -exports.TSConstructorType = TSConstructorType; -exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType; -exports.TSTypeReference = TSTypeReference; -exports.TSTypePredicate = TSTypePredicate; -exports.TSTypeQuery = TSTypeQuery; -exports.TSTypeLiteral = TSTypeLiteral; -exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody; -exports.tsPrintBraced = tsPrintBraced; -exports.TSArrayType = TSArrayType; -exports.TSTupleType = TSTupleType; -exports.TSUnionType = TSUnionType; -exports.TSIntersectionType = TSIntersectionType; -exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType; -exports.TSConditionalType = TSConditionalType; -exports.TSInferType = TSInferType; -exports.TSParenthesizedType = TSParenthesizedType; -exports.TSTypeOperator = TSTypeOperator; -exports.TSIndexedAccessType = TSIndexedAccessType; -exports.TSMappedType = TSMappedType; -exports.TSLiteralType = TSLiteralType; -exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; -exports.TSInterfaceDeclaration = TSInterfaceDeclaration; -exports.TSInterfaceBody = TSInterfaceBody; -exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; -exports.TSAsExpression = TSAsExpression; -exports.TSTypeAssertion = TSTypeAssertion; -exports.TSEnumDeclaration = TSEnumDeclaration; -exports.TSEnumMember = TSEnumMember; -exports.TSModuleDeclaration = TSModuleDeclaration; -exports.TSModuleBlock = TSModuleBlock; -exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; -exports.TSExternalModuleReference = TSExternalModuleReference; -exports.TSNonNullExpression = TSNonNullExpression; -exports.TSExportAssignment = TSExportAssignment; -exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; -exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase; - -function TSTypeAnnotation(node) { - this.token(":"); - this.space(); - if (node.optional) this.token("?"); - this.print(node.typeAnnotation, node); -} - -function TSTypeParameterInstantiation(node) { - this.token("<"); - this.printList(node.params, node, {}); - this.token(">"); -} - -function TSTypeParameter(node) { - this.word(node.name); - - if (node.constraint) { - this.space(); - this.word("extends"); - this.space(); - this.print(node.constraint, node); - } - - if (node.default) { - this.space(); - this.token("="); - this.space(); - this.print(node.default, node); - } -} - -function TSParameterProperty(node) { - if (node.accessibility) { - this.word(node.accessibility); - this.space(); - } - - if (node.readonly) { - this.word("readonly"); - this.space(); - } - - this._param(node.parameter); -} - -function TSDeclareFunction(node) { - if (node.declare) { - this.word("declare"); - this.space(); - } - - this._functionHead(node); - - this.token(";"); -} - -function TSDeclareMethod(node) { - this._classMethodHead(node); - - this.token(";"); -} - -function TSQualifiedName(node) { - this.print(node.left, node); - this.token("."); - this.print(node.right, node); -} - -function TSCallSignatureDeclaration(node) { - this.tsPrintSignatureDeclarationBase(node); -} - -function TSConstructSignatureDeclaration(node) { - this.word("new"); - this.space(); - this.tsPrintSignatureDeclarationBase(node); -} - -function TSPropertySignature(node) { - var readonly = node.readonly, - initializer = node.initializer; - - if (readonly) { - this.word("readonly"); - this.space(); - } - - this.tsPrintPropertyOrMethodName(node); - this.print(node.typeAnnotation, node); - - if (initializer) { - this.space(); - this.token("="); - this.space(); - this.print(initializer, node); - } - - this.token(";"); -} - -function tsPrintPropertyOrMethodName(node) { - if (node.computed) { - this.token("["); - } - - this.print(node.key, node); - - if (node.computed) { - this.token("]"); - } - - if (node.optional) { - this.token("?"); - } -} - -function TSMethodSignature(node) { - this.tsPrintPropertyOrMethodName(node); - this.tsPrintSignatureDeclarationBase(node); - this.token(";"); -} - -function TSIndexSignature(node) { - var readonly = node.readonly; - - if (readonly) { - this.word("readonly"); - this.space(); - } - - this.token("["); - - this._parameters(node.parameters, node); - - this.token("]"); - this.print(node.typeAnnotation, node); - this.token(";"); -} - -function TSAnyKeyword() { - this.word("any"); -} - -function TSNumberKeyword() { - this.word("number"); -} - -function TSObjectKeyword() { - this.word("object"); -} - -function TSBooleanKeyword() { - this.word("boolean"); -} - -function TSStringKeyword() { - this.word("string"); -} - -function TSSymbolKeyword() { - this.word("symbol"); -} - -function TSVoidKeyword() { - this.word("void"); -} - -function TSUndefinedKeyword() { - this.word("undefined"); -} - -function TSNullKeyword() { - this.word("null"); -} - -function TSNeverKeyword() { - this.word("never"); -} - -function TSThisType() { - this.word("this"); -} - -function TSFunctionType(node) { - this.tsPrintFunctionOrConstructorType(node); -} - -function TSConstructorType(node) { - this.word("new"); - this.space(); - this.tsPrintFunctionOrConstructorType(node); -} - -function tsPrintFunctionOrConstructorType(node) { - var typeParameters = node.typeParameters, - parameters = node.parameters; - this.print(typeParameters, node); - this.token("("); - - this._parameters(parameters, node); - - this.token(")"); - this.space(); - this.token("=>"); - this.space(); - this.print(node.typeAnnotation.typeAnnotation, node); -} - -function TSTypeReference(node) { - this.print(node.typeName, node); - this.print(node.typeParameters, node); -} - -function TSTypePredicate(node) { - this.print(node.parameterName); - this.space(); - this.word("is"); - this.space(); - this.print(node.typeAnnotation.typeAnnotation); -} - -function TSTypeQuery(node) { - this.word("typeof"); - this.space(); - this.print(node.exprName); -} - -function TSTypeLiteral(node) { - this.tsPrintTypeLiteralOrInterfaceBody(node.members, node); -} - -function tsPrintTypeLiteralOrInterfaceBody(members, node) { - this.tsPrintBraced(members, node); -} - -function tsPrintBraced(members, node) { - this.token("{"); - - if (members.length) { - this.indent(); - this.newline(); - - for (var _iterator = members, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var member = _ref; - this.print(member, node); - this.newline(); - } - - this.dedent(); - this.rightBrace(); - } else { - this.token("}"); - } -} - -function TSArrayType(node) { - this.print(node.elementType); - this.token("[]"); -} - -function TSTupleType(node) { - this.token("["); - this.printList(node.elementTypes, node); - this.token("]"); -} - -function TSUnionType(node) { - this.tsPrintUnionOrIntersectionType(node, "|"); -} - -function TSIntersectionType(node) { - this.tsPrintUnionOrIntersectionType(node, "&"); -} - -function tsPrintUnionOrIntersectionType(node, sep) { - this.printJoin(node.types, node, { - separator: function separator() { - this.space(); - this.token(sep); - this.space(); - } - }); -} - -function TSConditionalType(node) { - this.print(node.checkType); - this.space(); - this.word("extends"); - this.space(); - this.print(node.extendsType); - this.space(); - this.token("?"); - this.space(); - this.print(node.trueType); - this.space(); - this.token(":"); - this.space(); - this.print(node.falseType); -} - -function TSInferType(node) { - this.token("infer"); - this.space(); - this.print(node.typeParameter); -} - -function TSParenthesizedType(node) { - this.token("("); - this.print(node.typeAnnotation, node); - this.token(")"); -} - -function TSTypeOperator(node) { - this.token(node.operator); - this.space(); - this.print(node.typeAnnotation, node); -} - -function TSIndexedAccessType(node) { - this.print(node.objectType, node); - this.token("["); - this.print(node.indexType, node); - this.token("]"); -} - -function TSMappedType(node) { - var readonly = node.readonly, - typeParameter = node.typeParameter, - optional = node.optional; - this.token("{"); - this.space(); - - if (readonly) { - tokenIfPlusMinus(this, readonly); - this.word("readonly"); - this.space(); - } - - this.token("["); - this.word(typeParameter.name); - this.space(); - this.word("in"); - this.space(); - this.print(typeParameter.constraint, typeParameter); - this.token("]"); - - if (optional) { - tokenIfPlusMinus(this, optional); - this.token("?"); - } - - this.token(":"); - this.space(); - this.print(node.typeAnnotation, node); - this.space(); - this.token("}"); -} - -function tokenIfPlusMinus(self, tok) { - if (tok !== true) { - self.token(tok); - } -} - -function TSLiteralType(node) { - this.print(node.literal, node); -} - -function TSExpressionWithTypeArguments(node) { - this.print(node.expression, node); - this.print(node.typeParameters, node); -} - -function TSInterfaceDeclaration(node) { - var declare = node.declare, - id = node.id, - typeParameters = node.typeParameters, - extendz = node.extends, - body = node.body; - - if (declare) { - this.word("declare"); - this.space(); - } - - this.word("interface"); - this.space(); - this.print(id, node); - this.print(typeParameters, node); - - if (extendz) { - this.space(); - this.word("extends"); - this.space(); - this.printList(extendz, node); - } - - this.space(); - this.print(body, node); -} - -function TSInterfaceBody(node) { - this.tsPrintTypeLiteralOrInterfaceBody(node.body, node); -} - -function TSTypeAliasDeclaration(node) { - var declare = node.declare, - id = node.id, - typeParameters = node.typeParameters, - typeAnnotation = node.typeAnnotation; - - if (declare) { - this.word("declare"); - this.space(); - } - - this.word("type"); - this.space(); - this.print(id, node); - this.print(typeParameters, node); - this.space(); - this.token("="); - this.space(); - this.print(typeAnnotation, node); - this.token(";"); -} - -function TSAsExpression(node) { - var expression = node.expression, - typeAnnotation = node.typeAnnotation; - this.print(expression, node); - this.space(); - this.word("as"); - this.space(); - this.print(typeAnnotation, node); -} - -function TSTypeAssertion(node) { - var typeAnnotation = node.typeAnnotation, - expression = node.expression; - this.token("<"); - this.print(typeAnnotation, node); - this.token(">"); - this.space(); - this.print(expression, node); -} - -function TSEnumDeclaration(node) { - var declare = node.declare, - isConst = node.const, - id = node.id, - members = node.members; - - if (declare) { - this.word("declare"); - this.space(); - } - - if (isConst) { - this.word("const"); - this.space(); - } - - this.word("enum"); - this.space(); - this.print(id, node); - this.space(); - this.tsPrintBraced(members, node); -} - -function TSEnumMember(node) { - var id = node.id, - initializer = node.initializer; - this.print(id, node); - - if (initializer) { - this.space(); - this.token("="); - this.space(); - this.print(initializer, node); - } - - this.token(","); -} - -function TSModuleDeclaration(node) { - var declare = node.declare, - id = node.id; - - if (declare) { - this.word("declare"); - this.space(); - } - - if (!node.global) { - this.word(id.type === "Identifier" ? "namespace" : "module"); - this.space(); - } - - this.print(id, node); - - if (!node.body) { - this.token(";"); - return; - } - - var body = node.body; - - while (body.type === "TSModuleDeclaration") { - this.token("."); - this.print(body.id, body); - body = body.body; - } - - this.space(); - this.print(body, node); -} - -function TSModuleBlock(node) { - this.tsPrintBraced(node.body, node); -} - -function TSImportEqualsDeclaration(node) { - var isExport = node.isExport, - id = node.id, - moduleReference = node.moduleReference; - - if (isExport) { - this.word("export"); - this.space(); - } - - this.word("import"); - this.space(); - this.print(id, node); - this.space(); - this.token("="); - this.space(); - this.print(moduleReference, node); - this.token(";"); -} - -function TSExternalModuleReference(node) { - this.token("require("); - this.print(node.expression, node); - this.token(")"); -} - -function TSNonNullExpression(node) { - this.print(node.expression, node); - this.token("!"); -} - -function TSExportAssignment(node) { - this.word("export"); - this.space(); - this.token("="); - this.space(); - this.print(node.expression, node); - this.token(";"); -} - -function TSNamespaceExportDeclaration(node) { - this.word("export"); - this.space(); - this.word("as"); - this.space(); - this.word("namespace"); - this.space(); - this.print(node.id, node); -} - -function tsPrintSignatureDeclarationBase(node) { - var typeParameters = node.typeParameters, - parameters = node.parameters; - this.print(typeParameters, node); - this.token("("); - - this._parameters(parameters, node); - - this.token(")"); - this.print(node.typeAnnotation, node); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/index.js b/node_modules/@babel/generator/lib/index.js deleted file mode 100644 index 30abc8c..0000000 --- a/node_modules/@babel/generator/lib/index.js +++ /dev/null @@ -1,108 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; -exports.CodeGenerator = void 0; - -var _sourceMap = _interopRequireDefault(require("./source-map")); - -var _printer = _interopRequireDefault(require("./printer")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } - -var Generator = function (_Printer) { - _inheritsLoose(Generator, _Printer); - - function Generator(ast, opts, code) { - var _this; - - if (opts === void 0) { - opts = {}; - } - - var format = normalizeOptions(code, opts); - var map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null; - _this = _Printer.call(this, format, map) || this; - _this.ast = ast; - return _this; - } - - var _proto = Generator.prototype; - - _proto.generate = function generate() { - return _Printer.prototype.generate.call(this, this.ast); - }; - - return Generator; -}(_printer.default); - -function normalizeOptions(code, opts) { - var format = { - auxiliaryCommentBefore: opts.auxiliaryCommentBefore, - auxiliaryCommentAfter: opts.auxiliaryCommentAfter, - shouldPrintComment: opts.shouldPrintComment, - retainLines: opts.retainLines, - retainFunctionParens: opts.retainFunctionParens, - comments: opts.comments == null || opts.comments, - compact: opts.compact, - minified: opts.minified, - concise: opts.concise, - jsonCompatibleStrings: opts.jsonCompatibleStrings, - indent: { - adjustMultilineComment: true, - style: " ", - base: 0 - } - }; - - if (format.minified) { - format.compact = true; - - format.shouldPrintComment = format.shouldPrintComment || function () { - return format.comments; - }; - } else { - format.shouldPrintComment = format.shouldPrintComment || function (value) { - return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0; - }; - } - - if (format.compact === "auto") { - format.compact = code.length > 500000; - - if (format.compact) { - console.error("[BABEL] Note: The code generator has deoptimised the styling of " + (opts.filename + " as it exceeds the max of " + "500KB" + ".")); - } - } - - if (format.compact) { - format.indent.adjustMultilineComment = false; - } - - return format; -} - -var CodeGenerator = function () { - function CodeGenerator(ast, opts, code) { - this._generator = new Generator(ast, opts, code); - } - - var _proto2 = CodeGenerator.prototype; - - _proto2.generate = function generate() { - return this._generator.generate(); - }; - - return CodeGenerator; -}(); - -exports.CodeGenerator = CodeGenerator; - -function _default(ast, opts, code) { - var gen = new Generator(ast, opts, code); - return gen.generate(); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/index.js b/node_modules/@babel/generator/lib/node/index.js deleted file mode 100644 index dba0a8e..0000000 --- a/node_modules/@babel/generator/lib/node/index.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.needsWhitespace = needsWhitespace; -exports.needsWhitespaceBefore = needsWhitespaceBefore; -exports.needsWhitespaceAfter = needsWhitespaceAfter; -exports.needsParens = needsParens; - -var whitespace = _interopRequireWildcard(require("./whitespace")); - -var parens = _interopRequireWildcard(require("./parentheses")); - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function expandAliases(obj) { - var newObj = {}; - - function add(type, func) { - var fn = newObj[type]; - newObj[type] = fn ? function (node, parent, stack) { - var result = fn(node, parent, stack); - return result == null ? func(node, parent, stack) : result; - } : func; - } - - var _arr = Object.keys(obj); - - for (var _i = 0; _i < _arr.length; _i++) { - var type = _arr[_i]; - var aliases = t().FLIPPED_ALIAS_KEYS[type]; - - if (aliases) { - for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i2 >= _iterator.length) break; - _ref = _iterator[_i2++]; - } else { - _i2 = _iterator.next(); - if (_i2.done) break; - _ref = _i2.value; - } - - var alias = _ref; - add(alias, obj[type]); - } - } else { - add(type, obj[type]); - } - } - - return newObj; -} - -var expandedParens = expandAliases(parens); -var expandedWhitespaceNodes = expandAliases(whitespace.nodes); -var expandedWhitespaceList = expandAliases(whitespace.list); - -function find(obj, node, parent, printStack) { - var fn = obj[node.type]; - return fn ? fn(node, parent, printStack) : null; -} - -function isOrHasCallExpression(node) { - if (t().isCallExpression(node)) { - return true; - } - - if (t().isMemberExpression(node)) { - return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property); - } else { - return false; - } -} - -function needsWhitespace(node, parent, type) { - if (!node) return 0; - - if (t().isExpressionStatement(node)) { - node = node.expression; - } - - var linesInfo = find(expandedWhitespaceNodes, node, parent); - - if (!linesInfo) { - var items = find(expandedWhitespaceList, node, parent); - - if (items) { - for (var i = 0; i < items.length; i++) { - linesInfo = needsWhitespace(items[i], node, type); - if (linesInfo) break; - } - } - } - - if (typeof linesInfo === "object" && linesInfo !== null) { - return linesInfo[type] || 0; - } - - return 0; -} - -function needsWhitespaceBefore(node, parent) { - return needsWhitespace(node, parent, "before"); -} - -function needsWhitespaceAfter(node, parent) { - return needsWhitespace(node, parent, "after"); -} - -function needsParens(node, parent, printStack) { - if (!parent) return false; - - if (t().isNewExpression(parent) && parent.callee === node) { - if (isOrHasCallExpression(node)) return true; - } - - return find(expandedParens, node, parent, printStack); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/printer.js b/node_modules/@babel/generator/lib/printer.js deleted file mode 100644 index 321aaa3..0000000 --- a/node_modules/@babel/generator/lib/printer.js +++ /dev/null @@ -1,549 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _isInteger() { - var data = _interopRequireDefault(require("lodash/isInteger")); - - _isInteger = function _isInteger() { - return data; - }; - - return data; -} - -function _repeat() { - var data = _interopRequireDefault(require("lodash/repeat")); - - _repeat = function _repeat() { - return data; - }; - - return data; -} - -var _buffer = _interopRequireDefault(require("./buffer")); - -var n = _interopRequireWildcard(require("./node")); - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -var generatorFunctions = _interopRequireWildcard(require("./generators")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var SCIENTIFIC_NOTATION = /e/i; -var ZERO_DECIMAL_INTEGER = /\.0+$/; -var NON_DECIMAL_LITERAL = /^0[box]/; - -var Printer = function () { - function Printer(format, map) { - this.inForStatementInitCounter = 0; - this._printStack = []; - this._indent = 0; - this._insideAux = false; - this._printedCommentStarts = {}; - this._parenPushNewlineState = null; - this._noLineTerminator = false; - this._printAuxAfterOnNextUserNode = false; - this._printedComments = new WeakSet(); - this._endsWithInteger = false; - this._endsWithWord = false; - this.format = format || {}; - this._buf = new _buffer.default(map); - } - - var _proto = Printer.prototype; - - _proto.generate = function generate(ast) { - this.print(ast); - - this._maybeAddAuxComment(); - - return this._buf.get(); - }; - - _proto.indent = function indent() { - if (this.format.compact || this.format.concise) return; - this._indent++; - }; - - _proto.dedent = function dedent() { - if (this.format.compact || this.format.concise) return; - this._indent--; - }; - - _proto.semicolon = function semicolon(force) { - if (force === void 0) { - force = false; - } - - this._maybeAddAuxComment(); - - this._append(";", !force); - }; - - _proto.rightBrace = function rightBrace() { - if (this.format.minified) { - this._buf.removeLastSemicolon(); - } - - this.token("}"); - }; - - _proto.space = function space(force) { - if (force === void 0) { - force = false; - } - - if (this.format.compact) return; - - if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) { - this._space(); - } - }; - - _proto.word = function word(str) { - if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) { - this._space(); - } - - this._maybeAddAuxComment(); - - this._append(str); - - this._endsWithWord = true; - }; - - _proto.number = function number(str) { - this.word(str); - this._endsWithInteger = (0, _isInteger().default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== "."; - }; - - _proto.token = function token(str) { - if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) { - this._space(); - } - - this._maybeAddAuxComment(); - - this._append(str); - }; - - _proto.newline = function newline(i) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; - } - - if (this.endsWith("\n\n")) return; - if (typeof i !== "number") i = 1; - i = Math.min(2, i); - if (this.endsWith("{\n") || this.endsWith(":\n")) i--; - if (i <= 0) return; - - for (var j = 0; j < i; j++) { - this._newline(); - } - }; - - _proto.endsWith = function endsWith(str) { - return this._buf.endsWith(str); - }; - - _proto.removeTrailingNewline = function removeTrailingNewline() { - this._buf.removeTrailingNewline(); - }; - - _proto.source = function source(prop, loc) { - this._catchUp(prop, loc); - - this._buf.source(prop, loc); - }; - - _proto.withSource = function withSource(prop, loc, cb) { - this._catchUp(prop, loc); - - this._buf.withSource(prop, loc, cb); - }; - - _proto._space = function _space() { - this._append(" ", true); - }; - - _proto._newline = function _newline() { - this._append("\n", true); - }; - - _proto._append = function _append(str, queue) { - if (queue === void 0) { - queue = false; - } - - this._maybeAddParen(str); - - this._maybeIndent(str); - - if (queue) this._buf.queue(str);else this._buf.append(str); - this._endsWithWord = false; - this._endsWithInteger = false; - }; - - _proto._maybeIndent = function _maybeIndent(str) { - if (this._indent && this.endsWith("\n") && str[0] !== "\n") { - this._buf.queue(this._getIndent()); - } - }; - - _proto._maybeAddParen = function _maybeAddParen(str) { - var parenPushNewlineState = this._parenPushNewlineState; - if (!parenPushNewlineState) return; - this._parenPushNewlineState = null; - var i; - - for (i = 0; i < str.length && str[i] === " "; i++) { - continue; - } - - if (i === str.length) return; - var cha = str[i]; - - if (cha !== "\n") { - if (cha !== "/") return; - if (i + 1 === str.length) return; - var chaPost = str[i + 1]; - if (chaPost !== "/" && chaPost !== "*") return; - } - - this.token("("); - this.indent(); - parenPushNewlineState.printed = true; - }; - - _proto._catchUp = function _catchUp(prop, loc) { - if (!this.format.retainLines) return; - var pos = loc ? loc[prop] : null; - - if (pos && pos.line !== null) { - var count = pos.line - this._buf.getCurrentLine(); - - for (var i = 0; i < count; i++) { - this._newline(); - } - } - }; - - _proto._getIndent = function _getIndent() { - return (0, _repeat().default)(this.format.indent.style, this._indent); - }; - - _proto.startTerminatorless = function startTerminatorless(isLabel) { - if (isLabel === void 0) { - isLabel = false; - } - - if (isLabel) { - this._noLineTerminator = true; - return null; - } else { - return this._parenPushNewlineState = { - printed: false - }; - } - }; - - _proto.endTerminatorless = function endTerminatorless(state) { - this._noLineTerminator = false; - - if (state && state.printed) { - this.dedent(); - this.newline(); - this.token(")"); - } - }; - - _proto.print = function print(node, parent) { - var _this = this; - - if (!node) return; - var oldConcise = this.format.concise; - - if (node._compact) { - this.format.concise = true; - } - - var printMethod = this[node.type]; - - if (!printMethod) { - throw new ReferenceError("unknown node of type " + JSON.stringify(node.type) + " with constructor " + JSON.stringify(node && node.constructor.name)); - } - - this._printStack.push(node); - - var oldInAux = this._insideAux; - this._insideAux = !node.loc; - - this._maybeAddAuxComment(this._insideAux && !oldInAux); - - var needsParens = n.needsParens(node, parent, this._printStack); - - if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) { - needsParens = true; - } - - if (needsParens) this.token("("); - - this._printLeadingComments(node, parent); - - var loc = t().isProgram(node) || t().isFile(node) ? null : node.loc; - this.withSource("start", loc, function () { - _this[node.type](node, parent); - }); - - this._printTrailingComments(node, parent); - - if (needsParens) this.token(")"); - - this._printStack.pop(); - - this.format.concise = oldConcise; - this._insideAux = oldInAux; - }; - - _proto._maybeAddAuxComment = function _maybeAddAuxComment(enteredPositionlessNode) { - if (enteredPositionlessNode) this._printAuxBeforeComment(); - if (!this._insideAux) this._printAuxAfterComment(); - }; - - _proto._printAuxBeforeComment = function _printAuxBeforeComment() { - if (this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = true; - var comment = this.format.auxiliaryCommentBefore; - - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }); - } - }; - - _proto._printAuxAfterComment = function _printAuxAfterComment() { - if (!this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = false; - var comment = this.format.auxiliaryCommentAfter; - - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }); - } - }; - - _proto.getPossibleRaw = function getPossibleRaw(node) { - var extra = node.extra; - - if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) { - return extra.raw; - } - }; - - _proto.printJoin = function printJoin(nodes, parent, opts) { - if (opts === void 0) { - opts = {}; - } - - if (!nodes || !nodes.length) return; - if (opts.indent) this.indent(); - var newlineOpts = { - addNewlines: opts.addNewlines - }; - - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - if (!node) continue; - if (opts.statement) this._printNewline(true, node, parent, newlineOpts); - this.print(node, parent); - - if (opts.iterator) { - opts.iterator(node, i); - } - - if (opts.separator && i < nodes.length - 1) { - opts.separator.call(this); - } - - if (opts.statement) this._printNewline(false, node, parent, newlineOpts); - } - - if (opts.indent) this.dedent(); - }; - - _proto.printAndIndentOnComments = function printAndIndentOnComments(node, parent) { - var indent = node.leadingComments && node.leadingComments.length > 0; - if (indent) this.indent(); - this.print(node, parent); - if (indent) this.dedent(); - }; - - _proto.printBlock = function printBlock(parent) { - var node = parent.body; - - if (!t().isEmptyStatement(node)) { - this.space(); - } - - this.print(node, parent); - }; - - _proto._printTrailingComments = function _printTrailingComments(node, parent) { - this._printComments(this._getComments(false, node, parent)); - }; - - _proto._printLeadingComments = function _printLeadingComments(node, parent) { - this._printComments(this._getComments(true, node, parent)); - }; - - _proto.printInnerComments = function printInnerComments(node, indent) { - if (indent === void 0) { - indent = true; - } - - if (!node.innerComments || !node.innerComments.length) return; - if (indent) this.indent(); - - this._printComments(node.innerComments); - - if (indent) this.dedent(); - }; - - _proto.printSequence = function printSequence(nodes, parent, opts) { - if (opts === void 0) { - opts = {}; - } - - opts.statement = true; - return this.printJoin(nodes, parent, opts); - }; - - _proto.printList = function printList(items, parent, opts) { - if (opts === void 0) { - opts = {}; - } - - if (opts.separator == null) { - opts.separator = commaSeparator; - } - - return this.printJoin(items, parent, opts); - }; - - _proto._printNewline = function _printNewline(leading, node, parent, opts) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; - } - - var lines = 0; - - if (this._buf.hasContent()) { - if (!leading) lines++; - if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0; - var needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter; - if (needs(node, parent)) lines++; - } - - this.newline(lines); - }; - - _proto._getComments = function _getComments(leading, node) { - return node && (leading ? node.leadingComments : node.trailingComments) || []; - }; - - _proto._printComment = function _printComment(comment) { - var _this2 = this; - - if (!this.format.shouldPrintComment(comment.value)) return; - if (comment.ignore) return; - if (this._printedComments.has(comment)) return; - - this._printedComments.add(comment); - - if (comment.start != null) { - if (this._printedCommentStarts[comment.start]) return; - this._printedCommentStarts[comment.start] = true; - } - - var isBlockComment = comment.type === "CommentBlock"; - this.newline(this._buf.hasContent() && !this._noLineTerminator && isBlockComment ? 1 : 0); - if (!this.endsWith("[") && !this.endsWith("{")) this.space(); - var val = !isBlockComment && !this._noLineTerminator ? "//" + comment.value + "\n" : "/*" + comment.value + "*/"; - - if (isBlockComment && this.format.indent.adjustMultilineComment) { - var offset = comment.loc && comment.loc.start.column; - - if (offset) { - var newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); - val = val.replace(newlineRegex, "\n"); - } - - var indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn()); - val = val.replace(/\n(?!$)/g, "\n" + (0, _repeat().default)(" ", indentSize)); - } - - if (this.endsWith("/")) this._space(); - this.withSource("start", comment.loc, function () { - _this2._append(val); - }); - this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0); - }; - - _proto._printComments = function _printComments(comments) { - if (!comments || !comments.length) return; - - for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var _comment = _ref; - - this._printComment(_comment); - } - }; - - return Printer; -}(); - -exports.default = Printer; -Object.assign(Printer.prototype, generatorFunctions); - -function commaSeparator() { - this.token(","); - this.space(); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/source-map.js b/node_modules/@babel/generator/lib/source-map.js deleted file mode 100644 index 42b72e1..0000000 --- a/node_modules/@babel/generator/lib/source-map.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _sourceMap() { - var data = _interopRequireDefault(require("source-map")); - - _sourceMap = function _sourceMap() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var SourceMap = function () { - function SourceMap(opts, code) { - this._cachedMap = null; - this._code = code; - this._opts = opts; - this._rawMappings = []; - } - - var _proto = SourceMap.prototype; - - _proto.get = function get() { - if (!this._cachedMap) { - var map = this._cachedMap = new (_sourceMap().default.SourceMapGenerator)({ - sourceRoot: this._opts.sourceRoot - }); - var code = this._code; - - if (typeof code === "string") { - map.setSourceContent(this._opts.sourceFileName, code); - } else if (typeof code === "object") { - Object.keys(code).forEach(function (sourceFileName) { - map.setSourceContent(sourceFileName, code[sourceFileName]); - }); - } - - this._rawMappings.forEach(map.addMapping, map); - } - - return this._cachedMap.toJSON(); - }; - - _proto.getRawMappings = function getRawMappings() { - return this._rawMappings.slice(); - }; - - _proto.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename) { - if (this._lastGenLine !== generatedLine && line === null) return; - - if (this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) { - return; - } - - this._cachedMap = null; - this._lastGenLine = generatedLine; - this._lastSourceLine = line; - this._lastSourceColumn = column; - - this._rawMappings.push({ - name: identifierName || undefined, - generated: { - line: generatedLine, - column: generatedColumn - }, - source: line == null ? undefined : filename || this._opts.sourceFileName, - original: line == null ? undefined : { - line: line, - column: column - } - }); - }; - - return SourceMap; -}(); - -exports.default = SourceMap; \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/.bin/jsesc b/node_modules/@babel/generator/node_modules/.bin/jsesc deleted file mode 120000 index 7237604..0000000 --- a/node_modules/@babel/generator/node_modules/.bin/jsesc +++ /dev/null @@ -1 +0,0 @@ -../jsesc/bin/jsesc \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/jsesc/package.json b/node_modules/@babel/generator/node_modules/jsesc/package.json deleted file mode 100644 index 77b55cc..0000000 --- a/node_modules/@babel/generator/node_modules/jsesc/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "jsesc@^2.5.1", - "_id": "jsesc@2.5.1", - "_inBundle": false, - "_integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", - "_location": "/@babel/generator/jsesc", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "jsesc@^2.5.1", - "name": "jsesc", - "escapedName": "jsesc", - "rawSpec": "^2.5.1", - "saveSpec": null, - "fetchSpec": "^2.5.1" - }, - "_requiredBy": [ - "/@babel/generator" - ], - "_resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", - "_shasum": "e421a2a8e20d6b0819df28908f782526b96dd1fe", - "_spec": "jsesc@^2.5.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/generator", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "bin": { - "jsesc": "bin/jsesc" - }, - "bugs": { - "url": "https://github.com/mathiasbynens/jsesc/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.", - "devDependencies": { - "coveralls": "^2.11.6", - "grunt": "^0.4.5", - "grunt-template": "^0.2.3", - "istanbul": "^0.4.2", - "mocha": "*", - "regenerate": "^1.3.0", - "requirejs": "^2.1.22" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "LICENSE-MIT.txt", - "jsesc.js", - "bin/", - "man/" - ], - "homepage": "https://mths.be/jsesc", - "keywords": [ - "buffer", - "escape", - "javascript", - "json", - "map", - "set", - "string", - "stringify", - "tool" - ], - "license": "MIT", - "main": "jsesc.js", - "man": [ - "man/jsesc.1" - ], - "name": "jsesc", - "repository": { - "type": "git", - "url": "git+https://github.com/mathiasbynens/jsesc.git" - }, - "scripts": { - "build": "grunt template", - "cover": "istanbul cover --report 'html' --verbose --dir 'coverage' 'tests/tests.js'", - "coveralls": "istanbul cover --verbose --dir 'coverage' 'tests/tests.js' && coveralls < coverage/lcov.info'", - "test": "mocha tests" - }, - "version": "2.5.1" -} diff --git a/node_modules/@babel/generator/package.json b/node_modules/@babel/generator/package.json deleted file mode 100644 index b017216..0000000 --- a/node_modules/@babel/generator/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "@babel/generator@7.0.0-beta.46", - "_id": "@babel/generator@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-5VfaEVkPG0gpNSTcf70jvV+MjbMoNn4g2iluwM7MhciedkolEtmG7PcdoUj5W1EmMfngz5cF65V7UMZXJO6y8Q==", - "_location": "/@babel/generator", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/generator@7.0.0-beta.46", - "name": "@babel/generator", - "escapedName": "@babel%2fgenerator", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.46.tgz", - "_shasum": "6f57159bcc28bf8c3ed6b549789355cebfa3faa7", - "_spec": "@babel/generator@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/types": "7.0.0-beta.46", - "jsesc": "^2.5.1", - "lodash": "^4.2.0", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "deprecated": false, - "description": "Turns an AST into code.", - "devDependencies": { - "@babel/helper-fixtures": "7.0.0-beta.46", - "babylon": "7.0.0-beta.46" - }, - "files": [ - "lib" - ], - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/generator", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-generator" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/helper-function-name/README.md b/node_modules/@babel/helper-function-name/README.md deleted file mode 100644 index 97b5b4d..0000000 --- a/node_modules/@babel/helper-function-name/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# @babel/helper-function-name - -## Usage - -TODO diff --git a/node_modules/@babel/helper-function-name/lib/index.js b/node_modules/@babel/helper-function-name/lib/index.js deleted file mode 100644 index b2e4f33..0000000 --- a/node_modules/@babel/helper-function-name/lib/index.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function _helperGetFunctionArity() { - var data = _interopRequireDefault(require("@babel/helper-get-function-arity")); - - _helperGetFunctionArity = function _helperGetFunctionArity() { - return data; - }; - - return data; -} - -function _template2() { - var data = _interopRequireDefault(require("@babel/template")); - - _template2 = function _template2() { - return data; - }; - - return data; -} - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var buildPropertyMethodAssignmentWrapper = (0, _template2().default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); -var buildGeneratorPropertyMethodAssignmentWrapper = (0, _template2().default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); -var visitor = { - "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) { - if (path.node.name !== state.name) return; - var localDeclar = path.scope.getBindingIdentifier(state.name); - if (localDeclar !== state.outerDeclar) return; - state.selfReference = true; - path.stop(); - } -}; - -function getNameFromLiteralId(id) { - if (t().isNullLiteral(id)) { - return "null"; - } - - if (t().isRegExpLiteral(id)) { - return "_" + id.pattern + "_" + id.flags; - } - - if (t().isTemplateLiteral(id)) { - return id.quasis.map(function (quasi) { - return quasi.value.raw; - }).join(""); - } - - if (id.value !== undefined) { - return id.value + ""; - } - - return ""; -} - -function wrap(state, method, id, scope) { - if (state.selfReference) { - if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) { - scope.rename(id.name); - } else { - if (!t().isFunction(method)) return; - var build = buildPropertyMethodAssignmentWrapper; - - if (method.generator) { - build = buildGeneratorPropertyMethodAssignmentWrapper; - } - - var _template = build({ - FUNCTION: method, - FUNCTION_ID: id, - FUNCTION_KEY: scope.generateUidIdentifier(id.name) - }).expression; - var params = _template.callee.body.body[0].params; - - for (var i = 0, len = (0, _helperGetFunctionArity().default)(method); i < len; i++) { - params.push(scope.generateUidIdentifier("x")); - } - - return _template; - } - } - - method.id = id; - scope.getProgramParent().references[id.name] = true; -} - -function visit(node, name, scope) { - var state = { - selfAssignment: false, - selfReference: false, - outerDeclar: scope.getBindingIdentifier(name), - references: [], - name: name - }; - var binding = scope.getOwnBinding(name); - - if (binding) { - if (binding.kind === "param") { - state.selfReference = true; - } else {} - } else if (state.outerDeclar || scope.hasGlobal(name)) { - scope.traverse(node, visitor, state); - } - - return state; -} - -function _default(_ref, localBinding) { - var node = _ref.node, - parent = _ref.parent, - scope = _ref.scope, - id = _ref.id; - - if (localBinding === void 0) { - localBinding = false; - } - - if (node.id) return; - - if ((t().isObjectProperty(parent) || t().isObjectMethod(parent, { - kind: "method" - })) && (!parent.computed || t().isLiteral(parent.key))) { - id = parent.key; - } else if (t().isVariableDeclarator(parent)) { - id = parent.id; - - if (t().isIdentifier(id) && !localBinding) { - var binding = scope.parent.getBinding(id.name); - - if (binding && binding.constant && scope.getBinding(id.name) === binding) { - node.id = t().cloneNode(id); - node.id[t().NOT_LOCAL_BINDING] = true; - return; - } - } - } else if (t().isAssignmentExpression(parent)) { - id = parent.left; - } else if (!id) { - return; - } - - var name; - - if (id && t().isLiteral(id)) { - name = getNameFromLiteralId(id); - } else if (id && t().isIdentifier(id)) { - name = id.name; - } - - if (name === undefined) { - return; - } - - name = t().toBindingIdentifierName(name); - id = t().identifier(name); - id[t().NOT_LOCAL_BINDING] = true; - var state = visit(node, name, scope); - return wrap(state, node, id, scope) || node; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-function-name/package.json b/node_modules/@babel/helper-function-name/package.json deleted file mode 100644 index fb4b0f8..0000000 --- a/node_modules/@babel/helper-function-name/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "_from": "@babel/helper-function-name@7.0.0-beta.46", - "_id": "@babel/helper-function-name@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-zm4Kc5XB2njGs8PkmjV1zE/g1hBuphbh+VcDyFLaQsxkxSFSUtCbKwFL8AQpL/qPIcGbvX1MBt50a/3ZZH2CQA==", - "_location": "/@babel/helper-function-name", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helper-function-name@7.0.0-beta.46", - "name": "@babel/helper-function-name", - "escapedName": "@babel%2fhelper-function-name", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.46.tgz", - "_shasum": "d0c4eed2e220e180f91b02e008dcc4594afe1d39", - "_spec": "@babel/helper-function-name@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/traverse", - "bundleDependencies": false, - "dependencies": { - "@babel/helper-get-function-arity": "7.0.0-beta.46", - "@babel/template": "7.0.0-beta.46", - "@babel/types": "7.0.0-beta.46" - }, - "deprecated": false, - "description": "Helper function to change the property 'name' of every function", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-function-name", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/helper-get-function-arity/README.md b/node_modules/@babel/helper-get-function-arity/README.md deleted file mode 100644 index d341c9c..0000000 --- a/node_modules/@babel/helper-get-function-arity/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# @babel/helper-get-function-arity - -Function that returns the number of arguments that a function takes. -* Examples of what is considered an argument can be found at [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length) - -## Usage - -```javascript -import getFunctionArity from "@babel/helper-get-function-arity"; - -function wrap(state, method, id, scope) { - // ... - if (!t.isFunction(method)) { - return false; - } - - const argumentsLength = getFunctionArity(method); - - // ... -} -``` diff --git a/node_modules/@babel/helper-get-function-arity/lib/index.js b/node_modules/@babel/helper-get-function-arity/lib/index.js deleted file mode 100644 index 38e80df..0000000 --- a/node_modules/@babel/helper-get-function-arity/lib/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _default(node) { - var params = node.params; - - for (var i = 0; i < params.length; i++) { - var param = params[i]; - - if (t().isAssignmentPattern(param) || t().isRestElement(param)) { - return i; - } - } - - return params.length; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-get-function-arity/package.json b/node_modules/@babel/helper-get-function-arity/package.json deleted file mode 100644 index 6c81f47..0000000 --- a/node_modules/@babel/helper-get-function-arity/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "_from": "@babel/helper-get-function-arity@7.0.0-beta.46", - "_id": "@babel/helper-get-function-arity@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-dPrTb7QHVx44xJLjUl3LGAc13iS7hdXdO0fiOxdRN1suIS91yGGgeuwiQBlrw5SxbFchYtwenhlKbqHdVfGyVA==", - "_location": "/@babel/helper-get-function-arity", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helper-get-function-arity@7.0.0-beta.46", - "name": "@babel/helper-get-function-arity", - "escapedName": "@babel%2fhelper-get-function-arity", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/helper-function-name" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.46.tgz", - "_shasum": "7161bfe449b4183dbe25d1fe5579338b7429e5f2", - "_spec": "@babel/helper-get-function-arity@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/helper-function-name", - "bundleDependencies": false, - "dependencies": { - "@babel/types": "7.0.0-beta.46" - }, - "deprecated": false, - "description": "Helper function to get function arity", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-get-function-arity", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/helper-split-export-declaration/README.md b/node_modules/@babel/helper-split-export-declaration/README.md deleted file mode 100644 index 195f151..0000000 --- a/node_modules/@babel/helper-split-export-declaration/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# @babel/helper-split-export-declaration - -## API - -```js -declare export default splitExportDeclaration(path: NodePath); -``` - -## Usage - -```js -import traverse from "@babel/traverse"; -import splitExportDeclaration from "@babel/helper-split-export-declaration"; - -// ... - -traverse(file, { - ExportDefaultDeclaration(path) { - if (!path.get("declaration").isClassDeclaration()) return; - splitExportDeclaration(path); - }, -}); -``` diff --git a/node_modules/@babel/helper-split-export-declaration/lib/index.js b/node_modules/@babel/helper-split-export-declaration/lib/index.js deleted file mode 100644 index fe4366a..0000000 --- a/node_modules/@babel/helper-split-export-declaration/lib/index.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = splitExportDeclaration; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function splitExportDeclaration(exportDeclaration) { - if (!exportDeclaration.isExportDeclaration()) { - throw new Error("Only export declarations can be splitted."); - } - - var isDefault = exportDeclaration.isExportDefaultDeclaration(); - var declaration = exportDeclaration.get("declaration"); - var isClassDeclaration = declaration.isClassDeclaration(); - - if (isDefault) { - var standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration; - var scope = declaration.isScope() ? declaration.scope.parent : declaration.scope; - var id = declaration.node.id; - var needBindingRegistration = false; - - if (!id) { - needBindingRegistration = true; - id = scope.generateUidIdentifier("default"); - - if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) { - declaration.node.id = t().cloneNode(id); - } - } - - var updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]); - var updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]); - exportDeclaration.insertAfter(updatedExportDeclaration); - exportDeclaration.replaceWith(updatedDeclaration); - - if (needBindingRegistration) { - scope.registerBinding(isClassDeclaration ? "let" : "var", exportDeclaration); - } - - return exportDeclaration; - } - - if (exportDeclaration.get("specifiers").length > 0) { - throw new Error("It doesn't make sense to split exported specifiers."); - } - - var bindingIdentifiers = declaration.getOuterBindingIdentifiers(); - var specifiers = Object.keys(bindingIdentifiers).map(function (name) { - return t().exportSpecifier(t().identifier(name), t().identifier(name)); - }); - var aliasDeclar = t().exportNamedDeclaration(null, specifiers); - exportDeclaration.insertAfter(aliasDeclar); - exportDeclaration.replaceWith(declaration.node); - return exportDeclaration; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-split-export-declaration/package.json b/node_modules/@babel/helper-split-export-declaration/package.json deleted file mode 100644 index ce56a2b..0000000 --- a/node_modules/@babel/helper-split-export-declaration/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "_from": "@babel/helper-split-export-declaration@7.0.0-beta.46", - "_id": "@babel/helper-split-export-declaration@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-UT7acgV7wsnBPwnqslqcnUFvsPBP4TtVaYM82xPGA7+evAa8q8HXOmFk08qsMK/pX/yy4+51gJJwyw2zofnacA==", - "_location": "/@babel/helper-split-export-declaration", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helper-split-export-declaration@7.0.0-beta.46", - "name": "@babel/helper-split-export-declaration", - "escapedName": "@babel%2fhelper-split-export-declaration", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.46.tgz", - "_shasum": "6903893c72bb2a3d54ed20b5ff2aa8a28e8d2ea1", - "_spec": "@babel/helper-split-export-declaration@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/traverse", - "bundleDependencies": false, - "dependencies": { - "@babel/types": "7.0.0-beta.46" - }, - "deprecated": false, - "description": "## API", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-split-export-declaration", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/helpers/README.md b/node_modules/@babel/helpers/README.md deleted file mode 100644 index ce5288b..0000000 --- a/node_modules/@babel/helpers/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# @babel/helpers - -> Collection of helper functions used by Babel transforms. - -## Install - -```sh -npm install --save-dev @babel/helpers -``` - -## Usage - -Direct: - -```js -import * as helpers from '@babel/helpers'; -import * as t from '@babel/types'; - -const typeofHelper = helpers.get('typeof'); - -t.isExpressionStatement(typeofHelper); -// true -``` - -Inside a plugin: - -```js -export default { - visitor: { - UnaryExpression(path) { - // The .addHelper function adds, if needed, the helper to the file - // and returns an expression which references the helper - const typeofHelper = this.addHelper("typeof"); - t.isExpression(typeofHelper); // true - } -}; -``` - -## Defining Helpers - -> **NOTE**: This package is only meant to be used by the packages inluded in this repository. There is currently no way for third-party plugins to define an helper. - -Helpers are defined in the `src/helpers.js` file, and they must be valid modules which follow these guidelines: - - They must have a default export, which is their entry-point. - - They can import other helpers, exclusively by using default imports. - - They can't have named exports. - -```js -helpers.customHelper = defineHelper(` - import dep from "dependency"; - const foo = 2; - export default function getFooTimesDepPlusX(x) { - return foo * dep() + x; - } -`); -``` diff --git a/node_modules/@babel/helpers/lib/helpers.js b/node_modules/@babel/helpers/lib/helpers.js deleted file mode 100644 index 5329258..0000000 --- a/node_modules/@babel/helpers/lib/helpers.js +++ /dev/null @@ -1,300 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _template() { - var data = _interopRequireDefault(require("@babel/template")); - - _template = function _template() { - return data; - }; - - return data; -} - -var _templateObject = _taggedTemplateLiteralLoose(["\n export default function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) { return typeof obj; };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n"]), - _templateObject2 = _taggedTemplateLiteralLoose(["\n var REACT_ELEMENT_TYPE;\n\n export default function _createRawReactElement(type, props, key, children) {\n if (!REACT_ELEMENT_TYPE) {\n REACT_ELEMENT_TYPE = (\n typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\")\n ) || 0xeac7;\n }\n\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we're going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {\n children: void 0,\n };\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = new Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n }\n"]), - _templateObject3 = _taggedTemplateLiteralLoose(["\n export default function _asyncIterator(iterable) {\n var method\n if (typeof Symbol === \"function\") {\n if (Symbol.asyncIterator) {\n method = iterable[Symbol.asyncIterator]\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n method = iterable[Symbol.iterator]\n if (method != null) return method.call(iterable);\n }\n }\n throw new TypeError(\"Object is not async iterable\");\n }\n"]), - _templateObject4 = _taggedTemplateLiteralLoose(["\n export default function _AwaitValue(value) {\n this.wrapped = value;\n }\n"]), - _templateObject5 = _taggedTemplateLiteralLoose(["\n import AwaitValue from \"AwaitValue\";\n\n export default function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null,\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n var wrappedAwait = value instanceof AwaitValue;\n\n Promise.resolve(wrappedAwait ? value.wrapped : value).then(\n function (arg) {\n if (wrappedAwait) {\n resume(\"next\", arg);\n return\n }\n\n settle(result.done ? \"return\" : \"normal\", arg);\n },\n function (err) { resume(\"throw\", err); });\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({ value: value, done: true });\n break;\n case \"throw\":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide \"return\" method if generator return is not supported\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke(\"next\", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke(\"throw\", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke(\"return\", arg); };\n"]), - _templateObject6 = _taggedTemplateLiteralLoose(["\n import AsyncGenerator from \"AsyncGenerator\";\n\n export default function _wrapAsyncGenerator(fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n }\n"]), - _templateObject7 = _taggedTemplateLiteralLoose(["\n import AwaitValue from \"AwaitValue\";\n\n export default function _awaitAsyncGenerator(value) {\n return new AwaitValue(value);\n }\n"]), - _templateObject8 = _taggedTemplateLiteralLoose(["\n export default function _asyncGeneratorDelegate(inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === \"function\" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"next\", value);\n };\n\n if (typeof inner.throw === \"function\") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump(\"throw\", value);\n };\n }\n\n if (typeof inner.return === \"function\") {\n iter.return = function (value) {\n return pump(\"return\", value);\n };\n }\n\n return iter;\n }\n"]), - _templateObject9 = _taggedTemplateLiteralLoose(["\n export default function _asyncToGenerator(fn) {\n return function () {\n var self = this, args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n }\n function _next(value) { step(\"next\", value); }\n function _throw(err) { step(\"throw\", err); }\n\n _next();\n });\n };\n }\n"]), - _templateObject10 = _taggedTemplateLiteralLoose(["\n export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n"]), - _templateObject11 = _taggedTemplateLiteralLoose(["\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n export default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n"]), - _templateObject12 = _taggedTemplateLiteralLoose(["\n export default function _defineEnumerableProperties(obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n // Symbols are not enumerated over by for-in loops. If native\n // Symbols are available, fetch all of the descs object's own\n // symbol properties and define them on our target object too.\n if (Object.getOwnPropertySymbols) {\n var objectSymbols = Object.getOwnPropertySymbols(descs);\n for (var i = 0; i < objectSymbols.length; i++) {\n var sym = objectSymbols[i];\n var desc = descs[sym];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, sym, desc);\n }\n }\n return obj;\n }\n"]), - _templateObject13 = _taggedTemplateLiteralLoose(["\n export default function _defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n }\n"]), - _templateObject14 = _taggedTemplateLiteralLoose(["\n export default function _defineProperty(obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n }\n"]), - _templateObject15 = _taggedTemplateLiteralLoose(["\n export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n"]), - _templateObject16 = _taggedTemplateLiteralLoose(["\n import defineProperty from \"defineProperty\";\n\n export default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = (arguments[i] != null) ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n defineProperty(target, key, source[key]);\n });\n }\n return target;\n }\n"]), - _templateObject17 = _taggedTemplateLiteralLoose(["\n import setPrototypeOf from \"setPrototypeOf\";\n\n export default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n setPrototypeOf(subClass.prototype, superClass && superClass.prototype);\n if (superClass) setPrototypeOf(subClass, superClass);\n }\n"]), - _templateObject18 = _taggedTemplateLiteralLoose(["\n export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype.__proto__ = superClass && superClass.prototype;\n subClass.__proto__ = superClass;\n }\n"]), - _templateObject19 = _taggedTemplateLiteralLoose(["\n export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) {\n return o.__proto__;\n };\n return _getPrototypeOf(o);\n }\n"]), - _templateObject20 = _taggedTemplateLiteralLoose(["\n export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n }\n"]), - _templateObject21 = _taggedTemplateLiteralLoose(["\n import setPrototypeOf from \"setPrototypeOf\";\n\n export default function _construct(Parent, args, Class) {\n if (typeof Reflect !== \"undefined\" && Reflect.construct) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Parent.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n // Avoid issues with Class being present but undefined when it wasn't\n // present in the original call.\n return _construct.apply(null, arguments);\n }\n"]), - _templateObject22 = _taggedTemplateLiteralLoose(["\n import _gPO from \"getPrototypeOf\";\n import _sPO from \"setPrototypeOf\";\n import construct from \"construct\";\n\n export default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {}\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true,\n }\n });\n return _sPO(\n Wrapper,\n _sPO(\n function Super() {\n return construct(Class, arguments, _gPO(this).constructor);\n },\n Class\n )\n );\n }\n\n return _wrapNativeSuper(Class)\n }\n"]), - _templateObject23 = _taggedTemplateLiteralLoose(["\n export default function _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n }\n"]), - _templateObject24 = _taggedTemplateLiteralLoose(["\n export default function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n"]), - _templateObject25 = _taggedTemplateLiteralLoose(["\n export default function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = Object.defineProperty && Object.getOwnPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : {};\n if (desc.get || desc.set) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n }\n"]), - _templateObject26 = _taggedTemplateLiteralLoose(["\n export default function _newArrowCheck(innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n }\n"]), - _templateObject27 = _taggedTemplateLiteralLoose(["\n export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n }\n"]), - _templateObject28 = _taggedTemplateLiteralLoose(["\n export default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n }\n"]), - _templateObject29 = _taggedTemplateLiteralLoose(["\n export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n }\n"]), - _templateObject30 = _taggedTemplateLiteralLoose(["\n import assertThisInitialized from \"assertThisInitialized\";\n\n export default function _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return assertThisInitialized(self);\n }\n"]), - _templateObject31 = _taggedTemplateLiteralLoose(["\n import getPrototypeOf from \"getPrototypeOf\";\n\n export default function _superPropBase(object, property) {\n // Yes, this throws if object is null to being with, that's on purpose.\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n return object;\n }\n"]), - _templateObject32 = _taggedTemplateLiteralLoose(["\n import getPrototypeOf from \"getPrototypeOf\";\n import superPropBase from \"superPropBase\";\n\n export default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n\n if (!base) return;\n\n var desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n return _get(target, property, receiver || target);\n }\n"]), - _templateObject33 = _taggedTemplateLiteralLoose(["\n import getPrototypeOf from \"getPrototypeOf\";\n import superPropBase from \"superPropBase\";\n import defineProperty from \"defineProperty\";\n\n function set(target, property, value, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.set) {\n set = Reflect.set;\n } else {\n set = function set(target, property, value, receiver) {\n var base = superPropBase(target, property);\n var desc;\n\n if (base) {\n desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.set) {\n desc.set.call(receiver, value);\n return true;\n } else if (!desc.writable) {\n // Both getter and non-writable fall into this.\n return false;\n }\n }\n\n // Without a super that defines the property, spec boils down to\n // \"define on receiver\" for some reason.\n desc = Object.getOwnPropertyDescriptor(receiver, property);\n if (desc) {\n if (!desc.writable) {\n // Setter, getter, and non-writable fall into this.\n return false;\n }\n\n desc.value = value;\n Object.defineProperty(receiver, property, desc);\n } else {\n // Avoid setters that may be defined on Sub's prototype, but not on\n // the instance.\n defineProperty(receiver, property, value);\n }\n\n return true;\n };\n }\n\n return set(target, property, value, receiver);\n }\n\n export default function _set(target, property, value, receiver, isStrict) {\n const s = set(target, property, value, receiver || target);\n if (!s && isStrict) {\n throw new Error('failed to set property');\n }\n\n return value;\n }\n"]), - _templateObject34 = _taggedTemplateLiteralLoose(["\n export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) { raw = strings.slice(0); }\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n }\n"]), - _templateObject35 = _taggedTemplateLiteralLoose(["\n export default function _taggedTemplateLiteralLoose(strings, raw) {\n if (!raw) { raw = strings.slice(0); }\n strings.raw = raw;\n return strings;\n }\n"]), - _templateObject36 = _taggedTemplateLiteralLoose(["\n import undef from \"temporalUndefined\";\n\n export default function _temporalRef(val, name) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n }\n"]), - _templateObject37 = _taggedTemplateLiteralLoose(["\n export default function _readOnlyError(name) {\n throw new Error(\"\\\"\" + name + \"\\\" is read-only\");\n }\n"], ["\n export default function _readOnlyError(name) {\n throw new Error(\"\\\\\"\" + name + \"\\\\\" is read-only\");\n }\n"]), - _templateObject38 = _taggedTemplateLiteralLoose(["\n export default function _classNameTDZError(name) {\n throw new Error(\"Class \\\"\" + name + \"\\\" cannot be referenced in computed property keys.\");\n }\n"], ["\n export default function _classNameTDZError(name) {\n throw new Error(\"Class \\\\\"\" + name + \"\\\\\" cannot be referenced in computed property keys.\");\n }\n"]), - _templateObject39 = _taggedTemplateLiteralLoose(["\n export default {};\n"]), - _templateObject40 = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArrayLimit from \"iterableToArrayLimit\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n }\n"]), - _templateObject41 = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArrayLimitLoose from \"iterableToArrayLimitLoose\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _slicedToArrayLoose(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || nonIterableRest();\n }\n"]), - _templateObject42 = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArray from \"iterableToArray\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest();\n }\n"]), - _templateObject43 = _taggedTemplateLiteralLoose(["\n import arrayWithoutHoles from \"arrayWithoutHoles\";\n import iterableToArray from \"iterableToArray\";\n import nonIterableSpread from \"nonIterableSpread\";\n\n export default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n }\n"]), - _templateObject44 = _taggedTemplateLiteralLoose(["\n export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n }\n }\n"]), - _templateObject45 = _taggedTemplateLiteralLoose(["\n export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n"]), - _templateObject46 = _taggedTemplateLiteralLoose(["\n export default function _iterableToArray(iter) {\n if (\n Symbol.iterator in Object(iter) ||\n Object.prototype.toString.call(iter) === \"[object Arguments]\"\n ) return Array.from(iter);\n }\n"]), - _templateObject47 = _taggedTemplateLiteralLoose(["\n export default function _iterableToArrayLimit(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n"], ["\n export default function _iterableToArrayLimit(arr, i) {\n // this is an expanded form of \\`for...of\\` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n"]), - _templateObject48 = _taggedTemplateLiteralLoose(["\n export default function _iterableToArrayLimitLoose(arr, i) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n }\n"]), - _templateObject49 = _taggedTemplateLiteralLoose(["\n export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n"]), - _templateObject50 = _taggedTemplateLiteralLoose(["\n export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n"]), - _templateObject51 = _taggedTemplateLiteralLoose(["\n export default function _skipFirstGeneratorNext(fn) {\n return function () {\n var it = fn.apply(this, arguments);\n it.next();\n return it;\n }\n }\n"]), - _templateObject52 = _taggedTemplateLiteralLoose(["\n export default function _toPropertyKey(key) {\n if (typeof key === \"symbol\") {\n return key;\n } else {\n return String(key);\n }\n }\n"]), - _templateObject53 = _taggedTemplateLiteralLoose(["\n export default function _initializerWarningHelper(descriptor, context){\n throw new Error(\n 'Decorating class property failed. Please ensure that ' +\n 'proposal-class-properties is enabled and set to use loose mode. ' +\n 'To use proposal-class-properties in spec mode with decorators, wait for ' +\n 'the next major version of decorators in stage 2.'\n );\n }\n"]), - _templateObject54 = _taggedTemplateLiteralLoose(["\n export default function _initializerDefineProperty(target, property, descriptor, context){\n if (!descriptor) return;\n\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n });\n }\n"]), - _templateObject55 = _taggedTemplateLiteralLoose(["\n export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){\n var desc = {};\n Object['ke' + 'ys'](descriptor).forEach(function(key){\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer){\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function(desc, decorator){\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0){\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0){\n // This is a hack to avoid this being processed by 'transform-runtime'.\n // See issue #9.\n Object['define' + 'Property'](target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n"]); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; } - -var helpers = {}; -var _default = helpers; -exports.default = _default; - -helpers.typeof = function () { - return _template().default.program.ast(_templateObject); -}; - -helpers.jsx = function () { - return _template().default.program.ast(_templateObject2); -}; - -helpers.asyncIterator = function () { - return _template().default.program.ast(_templateObject3); -}; - -helpers.AwaitValue = function () { - return _template().default.program.ast(_templateObject4); -}; - -helpers.AsyncGenerator = function () { - return _template().default.program.ast(_templateObject5); -}; - -helpers.wrapAsyncGenerator = function () { - return _template().default.program.ast(_templateObject6); -}; - -helpers.awaitAsyncGenerator = function () { - return _template().default.program.ast(_templateObject7); -}; - -helpers.asyncGeneratorDelegate = function () { - return _template().default.program.ast(_templateObject8); -}; - -helpers.asyncToGenerator = function () { - return _template().default.program.ast(_templateObject9); -}; - -helpers.classCallCheck = function () { - return _template().default.program.ast(_templateObject10); -}; - -helpers.createClass = function () { - return _template().default.program.ast(_templateObject11); -}; - -helpers.defineEnumerableProperties = function () { - return _template().default.program.ast(_templateObject12); -}; - -helpers.defaults = function () { - return _template().default.program.ast(_templateObject13); -}; - -helpers.defineProperty = function () { - return _template().default.program.ast(_templateObject14); -}; - -helpers.extends = function () { - return _template().default.program.ast(_templateObject15); -}; - -helpers.objectSpread = function () { - return _template().default.program.ast(_templateObject16); -}; - -helpers.inherits = function () { - return _template().default.program.ast(_templateObject17); -}; - -helpers.inheritsLoose = function () { - return _template().default.program.ast(_templateObject18); -}; - -helpers.getPrototypeOf = function () { - return _template().default.program.ast(_templateObject19); -}; - -helpers.setPrototypeOf = function () { - return _template().default.program.ast(_templateObject20); -}; - -helpers.construct = function () { - return _template().default.program.ast(_templateObject21); -}; - -helpers.wrapNativeSuper = function () { - return _template().default.program.ast(_templateObject22); -}; - -helpers.instanceof = function () { - return _template().default.program.ast(_templateObject23); -}; - -helpers.interopRequireDefault = function () { - return _template().default.program.ast(_templateObject24); -}; - -helpers.interopRequireWildcard = function () { - return _template().default.program.ast(_templateObject25); -}; - -helpers.newArrowCheck = function () { - return _template().default.program.ast(_templateObject26); -}; - -helpers.objectDestructuringEmpty = function () { - return _template().default.program.ast(_templateObject27); -}; - -helpers.objectWithoutProperties = function () { - return _template().default.program.ast(_templateObject28); -}; - -helpers.assertThisInitialized = function () { - return _template().default.program.ast(_templateObject29); -}; - -helpers.possibleConstructorReturn = function () { - return _template().default.program.ast(_templateObject30); -}; - -helpers.superPropBase = function () { - return _template().default.program.ast(_templateObject31); -}; - -helpers.get = function () { - return _template().default.program.ast(_templateObject32); -}; - -helpers.set = function () { - return _template().default.program.ast(_templateObject33); -}; - -helpers.taggedTemplateLiteral = function () { - return _template().default.program.ast(_templateObject34); -}; - -helpers.taggedTemplateLiteralLoose = function () { - return _template().default.program.ast(_templateObject35); -}; - -helpers.temporalRef = function () { - return _template().default.program.ast(_templateObject36); -}; - -helpers.readOnlyError = function () { - return _template().default.program.ast(_templateObject37); -}; - -helpers.classNameTDZError = function () { - return _template().default.program.ast(_templateObject38); -}; - -helpers.temporalUndefined = function () { - return _template().default.program.ast(_templateObject39); -}; - -helpers.slicedToArray = function () { - return _template().default.program.ast(_templateObject40); -}; - -helpers.slicedToArrayLoose = function () { - return _template().default.program.ast(_templateObject41); -}; - -helpers.toArray = function () { - return _template().default.program.ast(_templateObject42); -}; - -helpers.toConsumableArray = function () { - return _template().default.program.ast(_templateObject43); -}; - -helpers.arrayWithoutHoles = function () { - return _template().default.program.ast(_templateObject44); -}; - -helpers.arrayWithHoles = function () { - return _template().default.program.ast(_templateObject45); -}; - -helpers.iterableToArray = function () { - return _template().default.program.ast(_templateObject46); -}; - -helpers.iterableToArrayLimit = function () { - return _template().default.program.ast(_templateObject47); -}; - -helpers.iterableToArrayLimitLoose = function () { - return _template().default.program.ast(_templateObject48); -}; - -helpers.nonIterableSpread = function () { - return _template().default.program.ast(_templateObject49); -}; - -helpers.nonIterableRest = function () { - return _template().default.program.ast(_templateObject50); -}; - -helpers.skipFirstGeneratorNext = function () { - return _template().default.program.ast(_templateObject51); -}; - -helpers.toPropertyKey = function () { - return _template().default.program.ast(_templateObject52); -}; - -helpers.initializerWarningHelper = function () { - return _template().default.program.ast(_templateObject53); -}; - -helpers.initializerDefineProperty = function () { - return _template().default.program.ast(_templateObject54); -}; - -helpers.applyDecoratedDescriptor = function () { - return _template().default.program.ast(_templateObject55); -}; \ No newline at end of file diff --git a/node_modules/@babel/helpers/lib/index.js b/node_modules/@babel/helpers/lib/index.js deleted file mode 100644 index 1c8acdb..0000000 --- a/node_modules/@babel/helpers/lib/index.js +++ /dev/null @@ -1,295 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.get = get; -exports.getDependencies = getDependencies; -exports.default = exports.list = void 0; - -function _traverse() { - var data = _interopRequireDefault(require("@babel/traverse")); - - _traverse = function _traverse() { - return data; - }; - - return data; -} - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -var _helpers = _interopRequireDefault(require("./helpers")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function makePath(path) { - var parts = []; - - for (; path.parentPath; path = path.parentPath) { - parts.push(path.key); - if (path.inList) parts.push(path.listKey); - } - - return parts.reverse().join("."); -} - -function getHelperMetadata(file) { - var globals = new Set(); - var localBindingNames = new Set(); - var dependencies = new Map(); - var exportName; - var exportPath; - var exportBindingAssignments = []; - var importPaths = []; - var importBindingsReferences = []; - (0, _traverse().default)(file, { - ImportDeclaration: function ImportDeclaration(child) { - var name = child.node.source.value; - - if (!_helpers.default[name]) { - throw child.buildCodeFrameError("Unknown helper " + name); - } - - if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) { - throw child.buildCodeFrameError("Helpers can only import a default value"); - } - - var bindingIdentifier = child.node.specifiers[0].local; - dependencies.set(bindingIdentifier, name); - importPaths.push(makePath(child)); - }, - ExportDefaultDeclaration: function ExportDefaultDeclaration(child) { - var decl = child.get("declaration"); - - if (decl.isFunctionDeclaration()) { - if (!decl.node.id) { - throw decl.buildCodeFrameError("Helpers should give names to their exported func declaration"); - } - - exportName = decl.node.id.name; - } - - exportPath = makePath(child); - }, - ExportAllDeclaration: function ExportAllDeclaration(child) { - throw child.buildCodeFrameError("Helpers can only export default"); - }, - ExportNamedDeclaration: function ExportNamedDeclaration(child) { - throw child.buildCodeFrameError("Helpers can only export default"); - }, - Statement: function Statement(child) { - if (child.isModuleDeclaration()) return; - child.skip(); - } - }); - (0, _traverse().default)(file, { - Program: function Program(path) { - var bindings = path.scope.getAllBindings(); - Object.keys(bindings).forEach(function (name) { - if (name === exportName) return; - if (dependencies.has(bindings[name].identifier)) return; - localBindingNames.add(name); - }); - }, - ReferencedIdentifier: function ReferencedIdentifier(child) { - var name = child.node.name; - var binding = child.scope.getBinding(name, true); - - if (!binding) { - globals.add(name); - } else if (dependencies.has(binding.identifier)) { - importBindingsReferences.push(makePath(child)); - } - }, - AssignmentExpression: function AssignmentExpression(child) { - var left = child.get("left"); - if (!(exportName in left.getBindingIdentifiers())) return; - - if (!left.isIdentifier()) { - throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers"); - } - - var binding = child.scope.getBinding(exportName); - - if (binding && binding.scope.path.isProgram()) { - exportBindingAssignments.push(makePath(child)); - } - } - }); - if (!exportPath) throw new Error("Helpers must default-export something."); - exportBindingAssignments.reverse(); - return { - globals: Array.from(globals), - localBindingNames: Array.from(localBindingNames), - dependencies: dependencies, - exportBindingAssignments: exportBindingAssignments, - exportPath: exportPath, - exportName: exportName, - importBindingsReferences: importBindingsReferences, - importPaths: importPaths - }; -} - -function permuteHelperAST(file, metadata, id, localBindings, getDependency) { - if (localBindings && !id) { - throw new Error("Unexpected local bindings for module-based helpers."); - } - - if (!id) return; - var localBindingNames = metadata.localBindingNames, - dependencies = metadata.dependencies, - exportBindingAssignments = metadata.exportBindingAssignments, - exportPath = metadata.exportPath, - exportName = metadata.exportName, - importBindingsReferences = metadata.importBindingsReferences, - importPaths = metadata.importPaths; - var dependenciesRefs = {}; - dependencies.forEach(function (name, id) { - dependenciesRefs[id.name] = typeof getDependency === "function" && getDependency(name) || id; - }); - var toRename = {}; - var bindings = new Set(localBindings || []); - localBindingNames.forEach(function (name) { - var newName = name; - - while (bindings.has(newName)) { - newName = "_" + newName; - } - - if (newName !== name) toRename[name] = newName; - }); - - if (id.type === "Identifier" && exportName !== id.name) { - toRename[exportName] = id.name; - } - - (0, _traverse().default)(file, { - Program: function Program(path) { - var exp = path.get(exportPath); - var imps = importPaths.map(function (p) { - return path.get(p); - }); - var impsBindingRefs = importBindingsReferences.map(function (p) { - return path.get(p); - }); - var decl = exp.get("declaration"); - - if (id.type === "Identifier") { - if (decl.isFunctionDeclaration()) { - exp.replaceWith(decl); - } else { - exp.replaceWith(t().variableDeclaration("var", [t().variableDeclarator(id, decl.node)])); - } - } else if (id.type === "MemberExpression") { - if (decl.isFunctionDeclaration()) { - exportBindingAssignments.forEach(function (assignPath) { - var assign = path.get(assignPath); - assign.replaceWith(t().assignmentExpression("=", id, assign.node)); - }); - exp.replaceWith(decl); - path.pushContainer("body", t().expressionStatement(t().assignmentExpression("=", id, t().identifier(exportName)))); - } else { - exp.replaceWith(t().expressionStatement(t().assignmentExpression("=", id, decl.node))); - } - } else { - throw new Error("Unexpected helper format."); - } - - Object.keys(toRename).forEach(function (name) { - path.scope.rename(name, toRename[name]); - }); - - for (var _iterator = imps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var _path = _ref; - - _path.remove(); - } - - for (var _iterator2 = impsBindingRefs, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _path2 = _ref2; - var node = t().cloneNode(dependenciesRefs[_path2.node.name]); - - _path2.replaceWith(node); - } - - path.stop(); - } - }); -} - -var helperData = {}; - -function loadHelper(name) { - if (!helperData[name]) { - if (!_helpers.default[name]) throw new ReferenceError("Unknown helper " + name); - - var fn = function fn() { - return t().file(_helpers.default[name]()); - }; - - var metadata = getHelperMetadata(fn()); - helperData[name] = { - build: function build(getDependency, id, localBindings) { - var file = fn(); - permuteHelperAST(file, metadata, id, localBindings, getDependency); - return { - nodes: file.program.body, - globals: metadata.globals - }; - }, - dependencies: metadata.dependencies - }; - } - - return helperData[name]; -} - -function get(name, getDependency, id, localBindings) { - return loadHelper(name).build(getDependency, id, localBindings); -} - -function getDependencies(name) { - return Array.from(loadHelper(name).dependencies.values()); -} - -var list = Object.keys(_helpers.default).map(function (name) { - return name.replace(/^_/, ""); -}).filter(function (name) { - return name !== "__esModule"; -}); -exports.list = list; -var _default = get; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/helpers/package.json b/node_modules/@babel/helpers/package.json deleted file mode 100644 index 9c55fd1..0000000 --- a/node_modules/@babel/helpers/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "_from": "@babel/helpers@7.0.0-beta.46", - "_id": "@babel/helpers@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-mbpH9pM3pJzo/tBr75U+zva3pqpyivogt1aofgEoD7bWFAYSuqOudRuz+m4XP6VPxxLoxcA4SFPGkuLRt9+7nQ==", - "_location": "/@babel/helpers", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helpers@7.0.0-beta.46", - "name": "@babel/helpers", - "escapedName": "@babel%2fhelpers", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.0.0-beta.46.tgz", - "_shasum": "b5f988dfd77f4f713792cf7818b687050736ee52", - "_spec": "@babel/helpers@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/template": "7.0.0-beta.46", - "@babel/traverse": "7.0.0-beta.46", - "@babel/types": "7.0.0-beta.46" - }, - "deprecated": false, - "description": "Collection of helper functions used by Babel transforms.", - "devDependencies": { - "@babel/helper-plugin-test-runner": "7.0.0-beta.46" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helpers", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helpers" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/highlight/README.md b/node_modules/@babel/highlight/README.md deleted file mode 100644 index 3614384..0000000 --- a/node_modules/@babel/highlight/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# @babel/highlight - -> Syntax highlight JavaScript strings for output in terminals. - -## Install - -```sh -npm install --save @babel/highlight -``` - -## Usage - -```js -import highlight from "@babel/highlight"; - -const code = `class Foo { - constructor() -}`; - -const result = highlight(code); - -console.log(result); -``` - -```js -class Foo { - constructor() -} -``` - -By default, `highlight` will not highlight your code if your terminal does not support color. To force colors, pass `{ forceColor: true }` as the second argument to `highlight`. - -```js -import highlight from "@babel/highlight"; - -const code = `class Foo { - constructor() -}`; - -const result = highlight(code, { forceColor: true }); -``` diff --git a/node_modules/@babel/highlight/lib/index.js b/node_modules/@babel/highlight/lib/index.js deleted file mode 100644 index 83ba78c..0000000 --- a/node_modules/@babel/highlight/lib/index.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.shouldHighlight = shouldHighlight; -exports.getChalk = getChalk; -exports.default = highlight; - -function _jsTokens() { - var data = _interopRequireWildcard(require("js-tokens")); - - _jsTokens = function _jsTokens() { - return data; - }; - - return data; -} - -function _esutils() { - var data = _interopRequireDefault(require("esutils")); - - _esutils = function _esutils() { - return data; - }; - - return data; -} - -function _chalk() { - var data = _interopRequireDefault(require("chalk")); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -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 - }; -} - -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 (_esutils().default.keyword.isReservedWordES6(token.value)) { - return "keyword"; - } - - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-styles#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "ansi-styles", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-styles.git" - }, - "scripts": { - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", - "test": "xo && ava" - }, - "version": "3.2.1" -} diff --git a/node_modules/@babel/highlight/node_modules/chalk/index.js.flow b/node_modules/@babel/highlight/node_modules/chalk/index.js.flow deleted file mode 100644 index 872a156..0000000 --- a/node_modules/@babel/highlight/node_modules/chalk/index.js.flow +++ /dev/null @@ -1,93 +0,0 @@ -// @flow - -type TemplateStringsArray = $ReadOnlyArray; - -export type Level = $Values<{ - None: 0, - Basic: 1, - Ansi256: 2, - TrueColor: 3 -}>; - -export type ChalkOptions = {| - enabled?: boolean, - level?: Level -|}; - -export type ColorSupport = {| - level: Level, - hasBasic: boolean, - has256: boolean, - has16m: boolean -|}; - -export interface Chalk { - (...text: string[]): string, - (text: TemplateStringsArray, ...placeholders: string[]): string, - constructor(options?: ChalkOptions): Chalk, - enabled: boolean, - level: Level, - rgb(r: number, g: number, b: number): Chalk, - hsl(h: number, s: number, l: number): Chalk, - hsv(h: number, s: number, v: number): Chalk, - hwb(h: number, w: number, b: number): Chalk, - bgHex(color: string): Chalk, - bgKeyword(color: string): Chalk, - bgRgb(r: number, g: number, b: number): Chalk, - bgHsl(h: number, s: number, l: number): Chalk, - bgHsv(h: number, s: number, v: number): Chalk, - bgHwb(h: number, w: number, b: number): Chalk, - hex(color: string): Chalk, - keyword(color: string): Chalk, - - +reset: Chalk, - +bold: Chalk, - +dim: Chalk, - +italic: Chalk, - +underline: Chalk, - +inverse: Chalk, - +hidden: Chalk, - +strikethrough: Chalk, - - +visible: Chalk, - - +black: Chalk, - +red: Chalk, - +green: Chalk, - +yellow: Chalk, - +blue: Chalk, - +magenta: Chalk, - +cyan: Chalk, - +white: Chalk, - +gray: Chalk, - +grey: Chalk, - +blackBright: Chalk, - +redBright: Chalk, - +greenBright: Chalk, - +yellowBright: Chalk, - +blueBright: Chalk, - +magentaBright: Chalk, - +cyanBright: Chalk, - +whiteBright: Chalk, - - +bgBlack: Chalk, - +bgRed: Chalk, - +bgGreen: Chalk, - +bgYellow: Chalk, - +bgBlue: Chalk, - +bgMagenta: Chalk, - +bgCyan: Chalk, - +bgWhite: Chalk, - +bgBlackBright: Chalk, - +bgRedBright: Chalk, - +bgGreenBright: Chalk, - +bgYellowBright: Chalk, - +bgBlueBright: Chalk, - +bgMagentaBright: Chalk, - +bgCyanBright: Chalk, - +bgWhiteBrigh: Chalk, - - supportsColor: ColorSupport -}; - -declare module.exports: Chalk; diff --git a/node_modules/@babel/highlight/node_modules/chalk/package.json b/node_modules/@babel/highlight/node_modules/chalk/package.json deleted file mode 100644 index 16bcb45..0000000 --- a/node_modules/@babel/highlight/node_modules/chalk/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_from": "chalk@^2.0.0", - "_id": "chalk@2.4.1", - "_inBundle": false, - "_integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "_location": "/@babel/highlight/chalk", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "chalk@^2.0.0", - "name": "chalk", - "escapedName": "chalk", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/@babel/highlight" - ], - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "_shasum": "18c49ab16a037b6eb0152cc83e3471338215b66e", - "_spec": "chalk@^2.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/highlight", - "bugs": { - "url": "https://github.com/chalk/chalk/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "deprecated": false, - "description": "Terminal string styling done right", - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "templates.js", - "types/index.d.ts", - "index.js.flow" - ], - "homepage": "https://github.com/chalk/chalk#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "chalk", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/chalk.git" - }, - "scripts": { - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" - }, - "types": "types/index.d.ts", - "version": "2.4.1", - "xo": { - "envs": [ - "node", - "mocha" - ], - "ignores": [ - "test/_flow.js" - ] - } -} diff --git a/node_modules/@babel/highlight/node_modules/supports-color/index.js b/node_modules/@babel/highlight/node_modules/supports-color/index.js deleted file mode 100644 index 62d14de..0000000 --- a/node_modules/@babel/highlight/node_modules/supports-color/index.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict'; -const os = require('os'); -const hasFlag = require('has-flag'); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; diff --git a/node_modules/@babel/highlight/node_modules/supports-color/package.json b/node_modules/@babel/highlight/node_modules/supports-color/package.json deleted file mode 100644 index 4c68292..0000000 --- a/node_modules/@babel/highlight/node_modules/supports-color/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "supports-color@^5.3.0", - "_id": "supports-color@5.4.0", - "_inBundle": false, - "_integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "_location": "/@babel/highlight/supports-color", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "supports-color@^5.3.0", - "name": "supports-color", - "escapedName": "supports-color", - "rawSpec": "^5.3.0", - "saveSpec": null, - "fetchSpec": "^5.3.0" - }, - "_requiredBy": [ - "/@babel/highlight/chalk" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "_shasum": "1c6b337402c2137605efe19f10fec390f6faab54", - "_spec": "supports-color@^5.3.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/highlight/node_modules/chalk", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "bundleDependencies": false, - "dependencies": { - "has-flag": "^3.0.0" - }, - "deprecated": false, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "ava": "*", - "import-fresh": "^2.0.0", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "browser.js" - ], - "homepage": "https://github.com/chalk/supports-color#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "license": "MIT", - "name": "supports-color", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "5.4.0" -} diff --git a/node_modules/@babel/highlight/package.json b/node_modules/@babel/highlight/package.json deleted file mode 100644 index fa4df29..0000000 --- a/node_modules/@babel/highlight/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_from": "@babel/highlight@7.0.0-beta.46", - "_id": "@babel/highlight@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-r4snW6Q8ICL3Y8hGzYJRvyG/+sc+kvkewXNedG9tQjoHmUFMwMSv/o45GWQUQswevGnWghiGkpRPivFfOuMsOA==", - "_location": "/@babel/highlight", - "_phantomChildren": { - "color-convert": "1.9.1", - "escape-string-regexp": "1.0.5", - "has-flag": "3.0.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/highlight@7.0.0-beta.46", - "name": "@babel/highlight", - "escapedName": "@babel%2fhighlight", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/code-frame" - ], - "_resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.46.tgz", - "_shasum": "c553c51e65f572bdedd6eff66fc0bb563016645e", - "_spec": "@babel/highlight@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/code-frame", - "author": { - "name": "suchipi", - "email": "me@suchipi.com" - }, - "bundleDependencies": false, - "dependencies": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" - }, - "deprecated": false, - "description": "Syntax highlight JavaScript strings for output in terminals.", - "devDependencies": { - "strip-ansi": "^4.0.0" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/highlight", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/parser/CHANGELOG.md b/node_modules/@babel/parser/CHANGELOG.md new file mode 100644 index 0000000..cc96c3f --- /dev/null +++ b/node_modules/@babel/parser/CHANGELOG.md @@ -0,0 +1,1073 @@ +# Changelog + +> **Tags:** +> - :boom: [Breaking Change] +> - :eyeglasses: [Spec Compliancy] +> - :rocket: [New Feature] +> - :bug: [Bug Fix] +> - :memo: [Documentation] +> - :house: [Internal] +> - :nail_care: [Polish] + +> Semver Policy: https://github.com/babel/babel/tree/master/packages/babel-parser#semver + +_Note: Gaps between patch versions are faulty, broken or test releases._ + +See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog. + +## 6.17.1 (2017-05-10) + +### :bug: Bug Fix + * Fix typo in flow spread operator error (Brian Ng) + * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) + * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) + * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) + * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) + * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) + * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) + +## 6.17.0 (2017-04-20) + +### :bug: Bug Fix + * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) + * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) + * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) + * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) + * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) + * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) + +## 7.0.0-beta.8 (2017-04-04) + +### New Feature +* Add support for flow type spread (#418) (Conrad Buck) +* Allow statics in flow interfaces (#427) (Brian Ng) + +### Bug Fix +* Fix predicate attachment to match flow parser (#428) (Brian Ng) +* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray) +* Fix rest parameters with array and objects (#424) (Brian Ng) +* Fix number parser (#433) (Alex Kuzmenko) + +### Docs +* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko) + +### Internal +* Use babel-register script when running babel smoke tests (#442) (Brian Ng) + +## 7.0.0-beta.7 (2017-03-22) + +### Spec Compliancy +* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu) + +### Bug Fix + +* Fix push-pop logic in flow (#405) (Daniel Tschinder) + +## 7.0.0-beta.6 (2017-03-21) + +### New Feature +* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons) + +### Polish +* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal) + +### Docs + +* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning) + +## 7.0.0-beta.5 (2017-03-21) + +### Bug Fix +* Throw error if new.target is used outside of a function (#402) (Brian Ng) +* Fix parsing of class properties (#351) (Kevin Gibbons) + +### Other + * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy) + * Optimize travis builds (#419) (Daniel Tschinder) + * Update codecov to 2.0 (#412) (Daniel Tschinder) + * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy) + * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning) + * Upgrade flow to 0.41 (Daniel Tschinder) + * Fix watch command (#403) (Brian Ng) + * Update yarn lock (Daniel Tschinder) + * Fix watch command (#403) (Brian Ng) + * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot]) + * Add estree test for correct order of directives (Daniel Tschinder) + * Add DoExpression to spec (#364) (Alex Kuzmenko) + * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde) + * Explain how to run only one test (#389) [skip ci] (Aaron Ang) + + ## 7.0.0-beta.4 (2017-03-01) + +* Don't consume async when checking for async func decl (#377) (Brian Ng) +* add `ranges` option [skip ci] (Henry Zhu) +* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine) + +## 7.0.0-beta.3 (2017-02-28) + +- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384) +- Merge changes from 6.x + +## 7.0.0-beta.2 (2017-02-20) + +- estree: correctly change literals in all cases (#368) (Daniel Tschinder) + +## 7.0.0-beta.1 (2017-02-20) + +- Fix negative number literal typeannotations (#366) (Daniel Tschinder) +- Update contributing with more test info [skip ci] (#355) (Brian Ng) + +## 7.0.0-beta.0 (2017-02-15) + +- Reintroduce Variance node (#333) (Daniel Tschinder) +- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick) +- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail) +- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot]) +- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot]) +- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder) +- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi) +- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder) +- Remove classConstructorCall plugin (#291) (Brian Ng) +- Update yarn.lock (Daniel Tschinder) +- Update cross-env to 3.x (Daniel Tschinder) +- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov) +- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens) + +## 6.16.1 (2017-02-23) + +### :bug: Regression + +- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375)) + +Need to modify Babel for this AST node change, so moving to 7.0. + +- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376)) + +[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted. + +## 6.16.0 (2017-02-23) + +### :rocket: New Feature + +***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) + +We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) + +We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. + +To enable `estree` mode simply add the plugin in the config: +```json +{ + "plugins": [ "estree" ] +} +``` + +If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. + +Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) + +Babylon exports a new function to parse a single expression + +```js +import { parseExpression } from 'babylon'; + +const ast = parseExpression('x || y && z', options); +``` + +The returned AST will only consist of the expression. The options are the same as for `parse()` + +Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) + +A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`. +Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... + +Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) + +Added support for function predicates which flow introduced in version 0.33.0 + +```js +declare function is_number(x: mixed): boolean %checks(typeof x === "number"); +``` + +Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) + +Added support for imports within module declarations which flow introduced in version 0.37.0 + +```js +declare module "C" { + import type { DT } from "D"; + declare export type CT = { D: DT }; +} +``` + +### :eyeglasses: Spec Compliancy + +Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) + +This example now correctly throws an error when there is a semicolon after the decorator: + +```js +class A { +@a; +foo(){} +} +``` + +Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) + +Using keywords in imports is not allowed anymore: + +```js +import { default } from "foo"; +import { a as debugger } from "foo"; +``` + +Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) + +In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. + +Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) + +The following code now correctly throws an error + +```js +import type { type a } from "foo"; +``` + +Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) + +Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. + +If you enable the flow plugin you can only define the type of the class properties, but not initialize them. + +Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) + +Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. + +```js +export default async function bar() {}; +``` + +### :nail_care: Polish + +Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) + +### :bug: Bug Fix + +Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) + +Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) + +ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) + +Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) + +Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) + +Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) + +Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) + +Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) + + +### :house: Internal + +Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) + +Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) + +Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) + +chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) + +Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) + +Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) + +Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) + +devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) + +Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) + +Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) + +### :memo: Documentation + +Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) + +Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) + +Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) + +AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) + +## 6.15.0 (2017-01-10) + +### :eyeglasses: Spec Compliancy + +Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) + +This change implements flows new shorthand import syntax +and where previously you had to write this code: + +```js +import {someValue} from "blah"; +import type {someType} from "blah"; +import typeof {someOtherValue} from "blah"; +``` + +you can now write it like this: + +```js +import { + someValue, + type someType, + typeof someOtherValue, +} from "blah"; +``` + +For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. + +flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) + +This change now allows a leading pipe everywhere types can be used: +```js +var f = (x): | 1 | 2 => 1; +``` + +Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) + +Previously babylon parsed the following exports, although they are not valid: +```js +export typeof foo; +export new Foo(); +export function() {}; +export for (;;); +export while(foo); +``` + +### :bug: Bug Fix + +Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) + +This fixes parsing of this case: + +```js +const map = { + [age <= 17] : 'Too young' +}; +``` + +Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) + +The following case produced an invalid AST +```js +
{/* foo */}
+``` + +Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) + +When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. + +Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) + +Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) + +### :house: Internal + +User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) + +Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) + +Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) + +Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) + +Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) + +Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) + +Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) + +chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) + +chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) + +## 6.14.1 (2016-11-17) + +### :bug: Bug Fix + +Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) + +```js +{ + "plugins": ["*"] +} +``` + +Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. + +## 6.14.0 (2016-11-16) + +### :eyeglasses: Spec Compliancy + +Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) + +[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) + +Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). + +``` +class enum {} // throws +class await {} // throws in strict mode (module) +``` + +Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) + +So where you used to have to write + +```js +type A = (x: string, y: boolean) => number; +type B = (z: string) => number; +type C = { [key: string]: number }; +``` + +you can now write (with flow 0.34.0) + +```js +type A = (string, boolean) => number; +type B = string => number; +type C = { [string]: number }; +``` + +Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) + +Supports these form now of specifying array types: + +```js +var a: number[][][][]; +var b: string[][]; +``` + +### :bug: Bug Fix + +Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) + +``` +declare module "foo" { declare module.exports: number } +declare module "foo" { declare module.exports: number; } // also allowed now +``` + +### :house: Internal + + * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) + * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) + * Add node 7 (Daniel Tschinder) + * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) + +## v6.13.1 (2016-10-26) + +### :nail_care: Polish + +- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) + +```js +const babylon = require('babylon'); +const ast = babylon.parse('var foo = "lol";'); +``` + +With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. + +**Without bundling** +![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) + +**With bundling** +![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) + +- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) +- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) + +## v6.13.0 (2016-10-21) + +### :eyeglasses: Spec Compliancy + +Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) + +> See https://flowtype.org/docs/variance.html for more information + +```js +type T = { +p: T }; +interface T { -p: T }; +declare class T { +[k:K]: V }; +class T { -[k:K]: V }; +class C2 { +p: T = e }; +``` + +Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) + +```js +({ __proto__: 1, __proto__: 2 }) // Throws an error now +``` + +### :bug: Bug Fix + +Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) + +```js +declare class A { + static: T; +} +``` + +Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) + +```js +var foo = { async, bar }; +``` + +### :nail_care: Polish + +Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) + +> This improves the performance slightly (because of hidden classes) + +### :house: Internal + +Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) + +Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) + +Readd missin .eslinignore for IDEs (Daniel Tschinder) + +Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) + +Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) + +Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) + +## v6.12.0 (2016-10-14) + +### :eyeglasses: Spec Compliancy + +Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) + +#### Dynamic Import + +- Proposal Repo: https://github.com/domenic/proposal-dynamic-import +- Championed by [@domenic](https://github.com/domenic) +- stage-2 +- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) + +> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript + +```js +import(`./section-modules/${link.dataset.entryModule}.js`) +.then(module => { + module.loadPageInto(main); +}) +``` + +Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) + +#### EmptyTypeAnnotation + +Just wasn't covered before. + +```js +type T = empty; +``` + +### :bug: Bug Fix + +Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) + +```js +// was failing due to sparse array +export const { foo: [ ,, qux7 ] } = bar; +``` + +Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) + +```js +declare class X { + foobar(): void; + static foobar(): void; +} +``` + +Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) + +```js +class Foo { + delete(item: T): T { + return item; + } +} +``` + +Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) + +```js +function *foo() { + const x = (yield 5: any); +} +``` + +### :nail_care: Polish + +Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) + +```js +// Unexpected token, expected ; (1:6) +{ set 1 } +``` + +### :house: Internal + +Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) + +Also run flow, linting, babel tests on seperate instances (add back node 0.10) + +## v6.11.6 (2016-10-12) + +### :bug: Bug Fix/Regression + +Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) + +```js +// was failing with `Cannot read property 'type' of null` because of null identifiers +export const { foo: [ ,, qux7 ] } = bar; +``` + +## v6.11.5 (2016-10-12) + +### :eyeglasses: Spec Compliancy + +Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) + +```js +// `foo` has already been exported. Exported identifiers must be unique. (2:20) +export function foo() {}; +export const { a: [{foo}] } = bar; +``` + +Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) + +```js +// `foo` has already been exported. Exported identifiers must be unique. (2:22) +export const foo = 1; +export const [bar, ...foo] = baz; +``` + +### :bug: Bug Fix + +Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) + +```js +// this is ok now +const test = ({async = true}) => {}; +``` + +### :nail_care: Polish + +Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) + +```bash +# So in the case of a missing ending curly (`}`) +Module build failed: SyntaxError: Unexpected token, expected } (30:0) + 28 | } + 29 | +> 30 | + | ^ +``` + +## v6.11.4 (2016-10-03) + +Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) + +## v6.11.3 (2016-10-01) + +### :eyeglasses: Spec Compliancy + +Add static errors for object rest (#149) ([@danez](https://github.com/danez)) + +> https://github.com/sebmarkbage/ecmascript-rest-spread + +Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. + +```js +let { x, y, ...z } = { x: 1, y: 2, z: 3 }; +// x = 1 +// y = 2 +// z = { z: 3 } +``` + +#### New Syntax Errors: + +**SyntaxError**: The rest element has to be the last element when destructuring (1:10) +```bash +> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; + | ^ +# Previous behavior: +# x = { x: 1, y: 2, z: 3 } +# y = 2 +# z = 3 +``` + +Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. + +**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) + +```bash +> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; + | ^ +# Previous behavior: +# x = 1 +# y = { y: 2, z: 3 } +# z = { y: 2, z: 3 } +``` + +Before y and z would just be the same value anyway so there is no reason to need to have both. + +**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) + +```js +let { x, y, ...z, } = obj; +``` + +The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. + +--- + +get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) + +```js +// valid +function something({ set = null, get = null }) {} +``` + +## v6.11.2 (2016-09-23) + +### Bug Fix + +- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo + +```js +// regression with duplicate export check +SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) + 20 | + 21 | export const { rhythm } = typography; +> 22 | export const { TypographyStyle } = typography +``` + +Bail out for now, and make a change to account for destructuring in the next release. + +## 6.11.1 (2016-09-22) + +### Bug Fix +- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez + +```javascript +export toString from './toString'; +``` + +```bash +`toString` has already been exported. Exported identifiers must be unique. (1:7) +> 1 | export toString from './toString'; + | ^ + 2 | +``` + +## 6.11.0 (2016-09-22) + +### Spec Compliancy (will break CI) + +- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo + +```js +// Only one default export allowed per module. (2:9) +export default function() {}; +export { foo as default }; + +// Only one default export allowed per module. (2:0) +export default {}; +export default function() {}; + +// `Foo` has already been exported. Exported identifiers must be unique. (2:0) +export { Foo }; +export class Foo {}; +``` + +### New Feature (Syntax) + +- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 + +```js +// AST +interface ClassProperty <: Node { + type: "ClassProperty"; + key: Identifier; + value: Expression; + computed: boolean; // added +} +``` + +```js +// with "plugins": ["classProperties"] +class Foo { + [x] + ['y'] +} + +class Bar { + [p] + [m] () {} +} + ``` + +### Bug Fix + +- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper + +```js +declare class X { + a: number; + static b: number; // static + c: number; // this was being marked as static in the AST as well +} +``` + +### Polish + +- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 + +```js +// Used to error with: +// SyntaxError: Assigning to rvalue (1:0) + +// Now: +// Invalid left-hand side in assignment expression (1:0) +3 = 4 + +// Invalid left-hand side in for-in statement (1:5) +for (+i in {}); +``` + +### Internal + +- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez +- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo + +## 6.10.0 (2016-09-19) + +> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue. + +### Spec Compliancy + +* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) + +> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors + +More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) + +For example: + +```js +// this errors because it uses destructuring and default parameters +// in a function with a "use strict" directive +function a([ option1, option2 ] = []) { + "use strict"; +} + ``` + +The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. + +### New Feature + +* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) + +Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 + +Looks like: + +```js +var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; +``` + +### Bug Fixes + +* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) +* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) +* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) + +### Misc + +* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) +* Fix Contributing guidelines [skip ci] (Daniel Tschinder) + +## 6.9.2 (2016-09-09) + +The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. + +## 6.9.1 (2016-08-23) + +This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. + +### Bug Fixes + +- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez +- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez +- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper +- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez +- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez + +## 6.9.0 (2016-08-16) + +### New syntax support + +- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer + +(Be aware that React is not going to support this syntax) + +```js +
+ {...todos.map(todo => )} +
+``` + +- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez + +```js +declare module "foo" { + declare module.exports: {} +} +``` + +### New Features + +- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain +- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens + +### Bug Fixes + +- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez +- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez +- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi +- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez +- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi +- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez +- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez + +### Internal + +- Add codecoverage to tests @danez +- Fix tests to not save expected output if we expect the test to fail @danez +- Make a shallow clone of babel for testing @danez +- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot +- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot +- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot +- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot + +## 6.8.4 (2016-07-06) + +### Bug Fixes + +- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez + +## 6.8.3 (2016-07-02) + +### Bug Fixes + +- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez + +## 6.8.2 (2016-06-24) + +### Bug Fixes + +- Fix parse error with yielding jsx elements in generators `function* it() { yield ; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal +- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez +- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez +- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez +- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez +- Support negative numeric type literals @kittens +- Remove line terminator restriction after await keyword @kittens +- Remove grouped type arrow restriction as it seems flow no longer has it @kittens +- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin +- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi + +### Documentation + +- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene +- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo + +### Internal + +- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez +- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez +- Upgrade test runner ava @kittens +- Add missing generate-identifier-regex script @kittens +- Rename parser context types @kittens +- Add node v6 to travis testing @hzoo +- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens + +## 6.8.1 (2016-06-06) + +### New Feature + +- Parse type parameter declarations with defaults like `type Foo = T` + +### Bug Fixes +- Type parameter declarations need 1 or more type parameters. +- The existential type `*` is not a valid type parameter. +- The existential type `*` is a primary type + +### Spec Compliancy +- The param list for type parameter declarations now consists of `TypeParameter` nodes +- New `TypeParameter` AST Node (replaces using the `Identifier` node before) + +``` +interface TypeParameter <: Node { + bound: TypeAnnotation; + default: TypeAnnotation; + name: string; + variance: "plus" | "minus"; +} +``` + +## 6.8.0 (2016-05-02) + +#### New Feature + +##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) + +> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). + +Examples: + +```js +class Foo { + constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} +} + +export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} + +var obj = { + method(@foo() x, @bar({ a: 123 }) @baz() y) {} +}; +``` + +##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) + +There is also a new node type, `ForAwaitStatement`. + +> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). + +Example: + +```js +async function f() { + for await (let x of y); +} +``` diff --git a/node_modules/@babel/core/node_modules/babylon/LICENSE b/node_modules/@babel/parser/LICENSE similarity index 100% rename from node_modules/@babel/core/node_modules/babylon/LICENSE rename to node_modules/@babel/parser/LICENSE diff --git a/node_modules/@babel/parser/README.md b/node_modules/@babel/parser/README.md new file mode 100644 index 0000000..65092a0 --- /dev/null +++ b/node_modules/@babel/parser/README.md @@ -0,0 +1,19 @@ +# @babel/parser + +> A JavaScript parser + +See our website [@babel/parser](https://babeljs.io/docs/en/next/babel-parser.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen) associated with this package. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/parser +``` + +or using yarn: + +```sh +yarn add @babel/parser --dev +``` diff --git a/node_modules/@babel/parser/bin/babel-parser.js b/node_modules/@babel/parser/bin/babel-parser.js new file mode 100644 index 0000000..58f00b8 --- /dev/null +++ b/node_modules/@babel/parser/bin/babel-parser.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node +/* eslint no-var: 0 */ + +var parser = require(".."); +var fs = require("fs"); + +var filename = process.argv[2]; +if (!filename) { + console.error("no filename specified"); + process.exit(0); +} + +var file = fs.readFileSync(filename, "utf8"); +var ast = parser.parse(file); + +console.log(JSON.stringify(ast, null, " ")); diff --git a/node_modules/@babel/parser/lib/index.js b/node_modules/@babel/parser/lib/index.js new file mode 100644 index 0000000..928e6c1 --- /dev/null +++ b/node_modules/@babel/parser/lib/index.js @@ -0,0 +1,11180 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const beforeExpr = true; +const startsExpr = true; +const isLoop = true; +const isAssign = true; +const prefix = true; +const postfix = true; +class TokenType { + constructor(label, conf = {}) { + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.rightAssociative = !!conf.rightAssociative; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop != null ? conf.binop : null; + this.updateContext = null; + } + +} +const keywords = new Map(); + +function createKeyword(name, options = {}) { + options.keyword = name; + const token = new TokenType(name, options); + keywords.set(name, token); + return token; +} + +function createBinop(name, binop) { + return new TokenType(name, { + beforeExpr, + binop + }); +} + +const types = { + num: new TokenType("num", { + startsExpr + }), + bigint: new TokenType("bigint", { + startsExpr + }), + regexp: new TokenType("regexp", { + startsExpr + }), + string: new TokenType("string", { + startsExpr + }), + name: new TokenType("name", { + startsExpr + }), + eof: new TokenType("eof"), + bracketL: new TokenType("[", { + beforeExpr, + startsExpr + }), + bracketR: new TokenType("]"), + braceL: new TokenType("{", { + beforeExpr, + startsExpr + }), + braceBarL: new TokenType("{|", { + beforeExpr, + startsExpr + }), + braceR: new TokenType("}"), + braceBarR: new TokenType("|}"), + parenL: new TokenType("(", { + beforeExpr, + startsExpr + }), + parenR: new TokenType(")"), + comma: new TokenType(",", { + beforeExpr + }), + semi: new TokenType(";", { + beforeExpr + }), + colon: new TokenType(":", { + beforeExpr + }), + doubleColon: new TokenType("::", { + beforeExpr + }), + dot: new TokenType("."), + question: new TokenType("?", { + beforeExpr + }), + questionDot: new TokenType("?."), + arrow: new TokenType("=>", { + beforeExpr + }), + template: new TokenType("template"), + ellipsis: new TokenType("...", { + beforeExpr + }), + backQuote: new TokenType("`", { + startsExpr + }), + dollarBraceL: new TokenType("${", { + beforeExpr, + startsExpr + }), + at: new TokenType("@"), + hash: new TokenType("#", { + startsExpr + }), + interpreterDirective: new TokenType("#!..."), + eq: new TokenType("=", { + beforeExpr, + isAssign + }), + assign: new TokenType("_=", { + beforeExpr, + isAssign + }), + incDec: new TokenType("++/--", { + prefix, + postfix, + startsExpr + }), + bang: new TokenType("!", { + beforeExpr, + prefix, + startsExpr + }), + tilde: new TokenType("~", { + beforeExpr, + prefix, + startsExpr + }), + pipeline: createBinop("|>", 0), + nullishCoalescing: createBinop("??", 1), + logicalOR: createBinop("||", 1), + logicalAND: createBinop("&&", 2), + bitwiseOR: createBinop("|", 3), + bitwiseXOR: createBinop("^", 4), + bitwiseAND: createBinop("&", 5), + equality: createBinop("==/!=", 6), + relational: createBinop("", 7), + bitShift: createBinop("<>", 8), + plusMin: new TokenType("+/-", { + beforeExpr, + binop: 9, + prefix, + startsExpr + }), + modulo: createBinop("%", 10), + star: createBinop("*", 10), + slash: createBinop("/", 10), + exponent: new TokenType("**", { + beforeExpr, + binop: 11, + rightAssociative: true + }), + _break: createKeyword("break"), + _case: createKeyword("case", { + beforeExpr + }), + _catch: createKeyword("catch"), + _continue: createKeyword("continue"), + _debugger: createKeyword("debugger"), + _default: createKeyword("default", { + beforeExpr + }), + _do: createKeyword("do", { + isLoop, + beforeExpr + }), + _else: createKeyword("else", { + beforeExpr + }), + _finally: createKeyword("finally"), + _for: createKeyword("for", { + isLoop + }), + _function: createKeyword("function", { + startsExpr + }), + _if: createKeyword("if"), + _return: createKeyword("return", { + beforeExpr + }), + _switch: createKeyword("switch"), + _throw: createKeyword("throw", { + beforeExpr, + prefix, + startsExpr + }), + _try: createKeyword("try"), + _var: createKeyword("var"), + _const: createKeyword("const"), + _while: createKeyword("while", { + isLoop + }), + _with: createKeyword("with"), + _new: createKeyword("new", { + beforeExpr, + startsExpr + }), + _this: createKeyword("this", { + startsExpr + }), + _super: createKeyword("super", { + startsExpr + }), + _class: createKeyword("class", { + startsExpr + }), + _extends: createKeyword("extends", { + beforeExpr + }), + _export: createKeyword("export"), + _import: createKeyword("import", { + startsExpr + }), + _null: createKeyword("null", { + startsExpr + }), + _true: createKeyword("true", { + startsExpr + }), + _false: createKeyword("false", { + startsExpr + }), + _in: createKeyword("in", { + beforeExpr, + binop: 7 + }), + _instanceof: createKeyword("instanceof", { + beforeExpr, + binop: 7 + }), + _typeof: createKeyword("typeof", { + beforeExpr, + prefix, + startsExpr + }), + _void: createKeyword("void", { + beforeExpr, + prefix, + startsExpr + }), + _delete: createKeyword("delete", { + beforeExpr, + prefix, + startsExpr + }) +}; + +const SCOPE_OTHER = 0b000000000, + SCOPE_PROGRAM = 0b000000001, + SCOPE_FUNCTION = 0b000000010, + SCOPE_ASYNC = 0b000000100, + SCOPE_GENERATOR = 0b000001000, + SCOPE_ARROW = 0b000010000, + SCOPE_SIMPLE_CATCH = 0b000100000, + SCOPE_SUPER = 0b001000000, + SCOPE_DIRECT_SUPER = 0b010000000, + SCOPE_CLASS = 0b100000000, + SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION; +function functionFlags(isAsync, isGenerator) { + return SCOPE_FUNCTION | (isAsync ? SCOPE_ASYNC : 0) | (isGenerator ? SCOPE_GENERATOR : 0); +} +const BIND_NONE = 0, + BIND_VAR = 1, + BIND_LEXICAL = 2, + BIND_FUNCTION = 3, + BIND_SIMPLE_CATCH = 4, + BIND_OUTSIDE = 5; + +function isSimpleProperty(node) { + return node != null && node.type === "Property" && node.kind === "init" && node.method === false; +} + +var estree = (superClass => class extends superClass { + estreeParseRegExpLiteral({ + pattern, + flags + }) { + let regex = null; + + try { + regex = new RegExp(pattern, flags); + } catch (e) {} + + const node = this.estreeParseLiteral(regex); + node.regex = { + pattern, + flags + }; + return node; + } + + estreeParseLiteral(value) { + return this.parseLiteral(value, "Literal"); + } + + directiveToStmt(directive) { + const directiveLiteral = directive.value; + const stmt = this.startNodeAt(directive.start, directive.loc.start); + const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); + expression.value = directiveLiteral.value; + expression.raw = directiveLiteral.extra.raw; + stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end); + stmt.directive = directiveLiteral.extra.raw.slice(1, -1); + return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end); + } + + initFunction(node, isAsync) { + super.initFunction(node, isAsync); + node.expression = false; + } + + checkDeclaration(node) { + if (isSimpleProperty(node)) { + this.checkDeclaration(node.value); + } else { + super.checkDeclaration(node); + } + } + + checkGetterSetterParams(method) { + const prop = method; + const paramCount = prop.kind === "get" ? 0 : 1; + const start = prop.start; + + if (prop.value.params.length !== paramCount) { + if (prop.kind === "get") { + this.raise(start, "getter must not have any formal parameters"); + } else { + this.raise(start, "setter must have exactly one formal parameter"); + } + } + + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { + this.raise(start, "setter function argument must not be a rest parameter"); + } + } + + checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { + switch (expr.type) { + case "ObjectPattern": + expr.properties.forEach(prop => { + this.checkLVal(prop.type === "Property" ? prop.value : prop, bindingType, checkClashes, "object destructuring pattern"); + }); + break; + + default: + super.checkLVal(expr, bindingType, checkClashes, contextDescription); + } + } + + checkPropClash(prop, propHash) { + if (prop.type === "SpreadElement" || prop.computed || prop.method || prop.shorthand) { + return; + } + + const key = prop.key; + const name = key.type === "Identifier" ? key.name : String(key.value); + + if (name === "__proto__" && prop.kind === "init") { + if (propHash.proto) { + this.raise(key.start, "Redefinition of __proto__ property"); + } + + propHash.proto = true; + } + } + + isStrictBody(node) { + const isBlockStatement = node.body.type === "BlockStatement"; + + if (isBlockStatement && node.body.body.length > 0) { + for (let _i = 0, _node$body$body = node.body.body; _i < _node$body$body.length; _i++) { + const directive = _node$body$body[_i]; + + if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") { + if (directive.expression.value === "use strict") return true; + } else { + break; + } + } + } + + return false; + } + + isValidDirective(stmt) { + return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized); + } + + stmtToDirective(stmt) { + const directive = super.stmtToDirective(stmt); + const value = stmt.expression.value; + directive.value.value = value; + return directive; + } + + parseBlockBody(node, allowDirectives, topLevel, end) { + super.parseBlockBody(node, allowDirectives, topLevel, end); + const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); + node.body = directiveStatements.concat(node.body); + delete node.directives; + } + + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "MethodDefinition", true); + + if (method.typeParameters) { + method.value.typeParameters = method.typeParameters; + delete method.typeParameters; + } + + classBody.body.push(method); + } + + parseExprAtom(refShorthandDefaultPos) { + switch (this.state.type) { + case types.regexp: + return this.estreeParseRegExpLiteral(this.state.value); + + case types.num: + case types.string: + return this.estreeParseLiteral(this.state.value); + + case types._null: + return this.estreeParseLiteral(null); + + case types._true: + return this.estreeParseLiteral(true); + + case types._false: + return this.estreeParseLiteral(false); + + default: + return super.parseExprAtom(refShorthandDefaultPos); + } + } + + parseLiteral(value, type, startPos, startLoc) { + const node = super.parseLiteral(value, type, startPos, startLoc); + node.raw = node.extra.raw; + delete node.extra; + return node; + } + + parseFunctionBody(node, allowExpression, isMethod = false) { + super.parseFunctionBody(node, allowExpression, isMethod); + node.expression = node.body.type !== "BlockStatement"; + } + + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { + let funcNode = this.startNode(); + funcNode.kind = node.kind; + funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, "FunctionExpression", inClassScope); + delete funcNode.kind; + node.value = funcNode; + return this.finishNode(node, type); + } + + parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { + const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc); + + if (node) { + node.type = "Property"; + if (node.kind === "method") node.kind = "init"; + node.shorthand = false; + } + + return node; + } + + parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { + const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); + + if (node) { + node.kind = "init"; + node.type = "Property"; + } + + return node; + } + + toAssignable(node, isBinding, contextDescription) { + if (isSimpleProperty(node)) { + this.toAssignable(node.value, isBinding, contextDescription); + return node; + } + + return super.toAssignable(node, isBinding, contextDescription); + } + + toAssignableObjectExpressionProp(prop, isBinding, isLast) { + if (prop.kind === "get" || prop.kind === "set") { + this.raise(prop.key.start, "Object pattern can't contain getter or setter"); + } else if (prop.method) { + this.raise(prop.key.start, "Object pattern can't contain methods"); + } else { + super.toAssignableObjectExpressionProp(prop, isBinding, isLast); + } + } + +}); + +const lineBreak = /\r\n?|[\n\u2028\u2029]/; +const lineBreakG = new RegExp(lineBreak.source, "g"); +function isNewLine(code) { + switch (code) { + case 10: + case 13: + case 8232: + case 8233: + return true; + + default: + return false; + } +} +const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; +function isWhitespace(code) { + switch (code) { + case 0x0009: + case 0x000b: + case 0x000c: + case 32: + case 160: + case 5760: + case 0x2000: + case 0x2001: + case 0x2002: + case 0x2003: + case 0x2004: + case 0x2005: + case 0x2006: + case 0x2007: + case 0x2008: + case 0x2009: + case 0x200a: + case 0x202f: + case 0x205f: + case 0x3000: + case 0xfeff: + return true; + + default: + return false; + } +} + +class TokContext { + constructor(token, isExpr, preserveSpace, override) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + } + +} +const types$1 = { + braceStatement: new TokContext("{", false), + braceExpression: new TokContext("{", true), + templateQuasi: new TokContext("${", false), + parenStatement: new TokContext("(", false), + parenExpression: new TokContext("(", true), + template: new TokContext("`", true, true, p => p.readTmplToken()), + functionExpression: new TokContext("function", true), + functionStatement: new TokContext("function", false) +}; + +types.parenR.updateContext = types.braceR.updateContext = function () { + if (this.state.context.length === 1) { + this.state.exprAllowed = true; + return; + } + + let out = this.state.context.pop(); + + if (out === types$1.braceStatement && this.curContext().token === "function") { + out = this.state.context.pop(); + } + + this.state.exprAllowed = !out.isExpr; +}; + +types.name.updateContext = function (prevType) { + let allowed = false; + + if (prevType !== types.dot) { + if (this.state.value === "of" && !this.state.exprAllowed || this.state.value === "yield" && this.scope.inGenerator) { + allowed = true; + } + } + + this.state.exprAllowed = allowed; + + if (this.state.isIterator) { + this.state.isIterator = false; + } +}; + +types.braceL.updateContext = function (prevType) { + this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); + this.state.exprAllowed = true; +}; + +types.dollarBraceL.updateContext = function () { + this.state.context.push(types$1.templateQuasi); + this.state.exprAllowed = true; +}; + +types.parenL.updateContext = function (prevType) { + const statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); + this.state.exprAllowed = true; +}; + +types.incDec.updateContext = function () {}; + +types._function.updateContext = types._class.updateContext = function (prevType) { + if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && !(prevType === types._return && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) { + this.state.context.push(types$1.functionExpression); + } else { + this.state.context.push(types$1.functionStatement); + } + + this.state.exprAllowed = false; +}; + +types.backQuote.updateContext = function () { + if (this.curContext() === types$1.template) { + this.state.context.pop(); + } else { + this.state.context.push(types$1.template); + } + + this.state.exprAllowed = false; +}; + +const reservedWords = { + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] +}; +const reservedWordsStrictSet = new Set(reservedWords.strict); +const reservedWordsStrictBindSet = new Set(reservedWords.strict.concat(reservedWords.strictBind)); +const isReservedWord = (word, inModule) => { + return inModule && word === "await" || word === "enum"; +}; +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} +function isStrictBindReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictBindSet.has(word); +} +function isKeyword(word) { + return keywords.has(word); +} +const keywordRelationalOperator = /^in(stanceof)?$/; +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; +const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; +const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 477, 28, 11, 0, 9, 21, 155, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 0, 33, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 0, 161, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 270, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 754, 9486, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541]; +const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 525, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 232, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 792487, 239]; + +function isInAstralSet(code, set) { + let pos = 0x10000; + + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + + return false; +} + +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + + return isInAstralSet(code, astralIdentifierStartCodes); +} +function isIteratorStart(current, next) { + return current === 64 && next === 64; +} +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} + +const reservedTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void", "interface", "extends", "_"]; + +function isEsModuleType(bodyElement) { + return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); +} + +function hasTypeImportKind(node) { + return node.importKind === "type" || node.importKind === "typeof"; +} + +function isMaybeDefaultImport(state) { + return (state.type === types.name || !!state.type.keyword) && state.value !== "from"; +} + +const exportSuggestions = { + const: "declare export var", + let: "declare export var", + type: "export type", + interface: "export interface" +}; + +function partition(list, test) { + const list1 = []; + const list2 = []; + + for (let i = 0; i < list.length; i++) { + (test(list[i], i, list) ? list1 : list2).push(list[i]); + } + + return [list1, list2]; +} + +const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; +var flow = (superClass => class extends superClass { + constructor(options, input) { + super(options, input); + this.flowPragma = undefined; + } + + shouldParseTypes() { + return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; + } + + addComment(comment) { + if (this.flowPragma === undefined) { + const matches = FLOW_PRAGMA_REGEX.exec(comment.value); + + if (!matches) { + this.flowPragma = null; + } else if (matches[1] === "flow") { + this.flowPragma = "flow"; + } else if (matches[1] === "noflow") { + this.flowPragma = "noflow"; + } else { + throw new Error("Unexpected flow pragma"); + } + } + + return super.addComment(comment); + } + + flowParseTypeInitialiser(tok) { + const oldInType = this.state.inType; + this.state.inType = true; + this.expect(tok || types.colon); + const type = this.flowParseType(); + this.state.inType = oldInType; + return type; + } + + flowParsePredicate() { + const node = this.startNode(); + const moduloLoc = this.state.startLoc; + const moduloPos = this.state.start; + this.expect(types.modulo); + const checksLoc = this.state.startLoc; + this.expectContextual("checks"); + + if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) { + this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here."); + } + + if (this.eat(types.parenL)) { + node.value = this.parseExpression(); + this.expect(types.parenR); + return this.finishNode(node, "DeclaredPredicate"); + } else { + return this.finishNode(node, "InferredPredicate"); + } + } + + flowParseTypeAndPredicateInitialiser() { + const oldInType = this.state.inType; + this.state.inType = true; + this.expect(types.colon); + let type = null; + let predicate = null; + + if (this.match(types.modulo)) { + this.state.inType = oldInType; + predicate = this.flowParsePredicate(); + } else { + type = this.flowParseType(); + this.state.inType = oldInType; + + if (this.match(types.modulo)) { + predicate = this.flowParsePredicate(); + } + } + + return [type, predicate]; + } + + flowParseDeclareClass(node) { + this.next(); + this.flowParseInterfaceish(node, true); + return this.finishNode(node, "DeclareClass"); + } + + flowParseDeclareFunction(node) { + this.next(); + const id = node.id = this.parseIdentifier(); + const typeNode = this.startNode(); + const typeContainer = this.startNode(); + + if (this.isRelational("<")) { + typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + typeNode.typeParameters = null; + } + + this.expect(types.parenL); + const tmp = this.flowParseFunctionTypeParams(); + typeNode.params = tmp.params; + typeNode.rest = tmp.rest; + this.expect(types.parenR); + [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); + id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); + this.finishNode(id, id.type); + this.semicolon(); + return this.finishNode(node, "DeclareFunction"); + } + + flowParseDeclare(node, insideModule) { + if (this.match(types._class)) { + return this.flowParseDeclareClass(node); + } else if (this.match(types._function)) { + return this.flowParseDeclareFunction(node); + } else if (this.match(types._var)) { + return this.flowParseDeclareVariable(node); + } else if (this.isContextual("module")) { + if (this.lookahead().type === types.dot) { + return this.flowParseDeclareModuleExports(node); + } else { + if (insideModule) { + this.unexpected(null, "`declare module` cannot be used inside another `declare module`"); + } + + return this.flowParseDeclareModule(node); + } + } else if (this.isContextual("type")) { + return this.flowParseDeclareTypeAlias(node); + } else if (this.isContextual("opaque")) { + return this.flowParseDeclareOpaqueType(node); + } else if (this.isContextual("interface")) { + return this.flowParseDeclareInterface(node); + } else if (this.match(types._export)) { + return this.flowParseDeclareExportDeclaration(node, insideModule); + } else { + throw this.unexpected(); + } + } + + flowParseDeclareVariable(node) { + this.next(); + node.id = this.flowParseTypeAnnotatableIdentifier(true); + this.semicolon(); + return this.finishNode(node, "DeclareVariable"); + } + + flowParseDeclareModule(node) { + this.next(); + this.scope.enter(SCOPE_OTHER); + + if (this.match(types.string)) { + node.id = this.parseExprAtom(); + } else { + node.id = this.parseIdentifier(); + } + + const bodyNode = node.body = this.startNode(); + const body = bodyNode.body = []; + this.expect(types.braceL); + + while (!this.match(types.braceR)) { + let bodyNode = this.startNode(); + + if (this.match(types._import)) { + const lookahead = this.lookahead(); + + if (lookahead.value !== "type" && lookahead.value !== "typeof") { + this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`"); + } + + this.next(); + this.parseImport(bodyNode); + } else { + this.expectContextual("declare", "Only declares and type imports are allowed inside declare module"); + bodyNode = this.flowParseDeclare(bodyNode, true); + } + + body.push(bodyNode); + } + + this.scope.exit(); + this.expect(types.braceR); + this.finishNode(bodyNode, "BlockStatement"); + let kind = null; + let hasModuleExport = false; + const errorMessage = "Found both `declare module.exports` and `declare export` in the same module. " + "Modules can only have 1 since they are either an ES module or they are a CommonJS module"; + body.forEach(bodyElement => { + if (isEsModuleType(bodyElement)) { + if (kind === "CommonJS") { + this.unexpected(bodyElement.start, errorMessage); + } + + kind = "ES"; + } else if (bodyElement.type === "DeclareModuleExports") { + if (hasModuleExport) { + this.unexpected(bodyElement.start, "Duplicate `declare module.exports` statement"); + } + + if (kind === "ES") this.unexpected(bodyElement.start, errorMessage); + kind = "CommonJS"; + hasModuleExport = true; + } + }); + node.kind = kind || "CommonJS"; + return this.finishNode(node, "DeclareModule"); + } + + flowParseDeclareExportDeclaration(node, insideModule) { + this.expect(types._export); + + if (this.eat(types._default)) { + if (this.match(types._function) || this.match(types._class)) { + node.declaration = this.flowParseDeclare(this.startNode()); + } else { + node.declaration = this.flowParseType(); + this.semicolon(); + } + + node.default = true; + return this.finishNode(node, "DeclareExportDeclaration"); + } else { + if (this.match(types._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) { + const label = this.state.value; + const suggestion = exportSuggestions[label]; + this.unexpected(this.state.start, `\`declare export ${label}\` is not supported. Use \`${suggestion}\` instead`); + } + + if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) { + node.declaration = this.flowParseDeclare(this.startNode()); + node.default = false; + return this.finishNode(node, "DeclareExportDeclaration"); + } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) { + node = this.parseExport(node); + + if (node.type === "ExportNamedDeclaration") { + node.type = "ExportDeclaration"; + node.default = false; + delete node.exportKind; + } + + node.type = "Declare" + node.type; + return node; + } + } + + throw this.unexpected(); + } + + flowParseDeclareModuleExports(node) { + this.expectContextual("module"); + this.expect(types.dot); + this.expectContextual("exports"); + node.typeAnnotation = this.flowParseTypeAnnotation(); + this.semicolon(); + return this.finishNode(node, "DeclareModuleExports"); + } + + flowParseDeclareTypeAlias(node) { + this.next(); + this.flowParseTypeAlias(node); + return this.finishNode(node, "DeclareTypeAlias"); + } + + flowParseDeclareOpaqueType(node) { + this.next(); + this.flowParseOpaqueType(node, true); + return this.finishNode(node, "DeclareOpaqueType"); + } + + flowParseDeclareInterface(node) { + this.next(); + this.flowParseInterfaceish(node); + return this.finishNode(node, "DeclareInterface"); + } + + flowParseInterfaceish(node, isClass = false) { + node.id = this.flowParseRestrictedIdentifier(!isClass); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + + node.extends = []; + node.implements = []; + node.mixins = []; + + if (this.eat(types._extends)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (!isClass && this.eat(types.comma)); + } + + if (this.isContextual("mixins")) { + this.next(); + + do { + node.mixins.push(this.flowParseInterfaceExtends()); + } while (this.eat(types.comma)); + } + + if (this.isContextual("implements")) { + this.next(); + + do { + node.implements.push(this.flowParseInterfaceExtends()); + } while (this.eat(types.comma)); + } + + node.body = this.flowParseObjectType({ + allowStatic: isClass, + allowExact: false, + allowSpread: false, + allowProto: isClass, + allowInexact: false + }); + } + + flowParseInterfaceExtends() { + const node = this.startNode(); + node.id = this.flowParseQualifiedTypeIdentifier(); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + + return this.finishNode(node, "InterfaceExtends"); + } + + flowParseInterface(node) { + this.flowParseInterfaceish(node); + return this.finishNode(node, "InterfaceDeclaration"); + } + + checkNotUnderscore(word) { + if (word === "_") { + throw this.unexpected(null, "`_` is only allowed as a type argument to call or new"); + } + } + + checkReservedType(word, startLoc) { + if (reservedTypes.indexOf(word) > -1) { + this.raise(startLoc, `Cannot overwrite reserved type ${word}`); + } + } + + flowParseRestrictedIdentifier(liberal) { + this.checkReservedType(this.state.value, this.state.start); + return this.parseIdentifier(liberal); + } + + flowParseTypeAlias(node) { + node.id = this.flowParseRestrictedIdentifier(); + this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + + node.right = this.flowParseTypeInitialiser(types.eq); + this.semicolon(); + return this.finishNode(node, "TypeAlias"); + } + + flowParseOpaqueType(node, declare) { + this.expectContextual("type"); + node.id = this.flowParseRestrictedIdentifier(true); + this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } else { + node.typeParameters = null; + } + + node.supertype = null; + + if (this.match(types.colon)) { + node.supertype = this.flowParseTypeInitialiser(types.colon); + } + + node.impltype = null; + + if (!declare) { + node.impltype = this.flowParseTypeInitialiser(types.eq); + } + + this.semicolon(); + return this.finishNode(node, "OpaqueType"); + } + + flowParseTypeParameter(allowDefault = true, requireDefault = false) { + if (!allowDefault && requireDefault) { + throw new Error("Cannot disallow a default value (`allowDefault`) while also requiring it (`requireDefault`)."); + } + + const nodeStart = this.state.start; + const node = this.startNode(); + const variance = this.flowParseVariance(); + const ident = this.flowParseTypeAnnotatableIdentifier(); + node.name = ident.name; + node.variance = variance; + node.bound = ident.typeAnnotation; + + if (this.match(types.eq)) { + if (allowDefault) { + this.eat(types.eq); + node.default = this.flowParseType(); + } else { + this.unexpected(); + } + } else { + if (requireDefault) { + this.unexpected(nodeStart, "Type parameter declaration needs a default, since a preceding type parameter declaration has a default."); + } + } + + return this.finishNode(node, "TypeParameter"); + } + + flowParseTypeParameterDeclaration(allowDefault = true) { + const oldInType = this.state.inType; + const node = this.startNode(); + node.params = []; + this.state.inType = true; + + if (this.isRelational("<") || this.match(types.jsxTagStart)) { + this.next(); + } else { + this.unexpected(); + } + + let defaultRequired = false; + + do { + const typeParameter = this.flowParseTypeParameter(allowDefault, defaultRequired); + node.params.push(typeParameter); + + if (typeParameter.default) { + defaultRequired = true; + } + + if (!this.isRelational(">")) { + this.expect(types.comma); + } + } while (!this.isRelational(">")); + + this.expectRelational(">"); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterDeclaration"); + } + + flowParseTypeParameterInstantiation() { + const node = this.startNode(); + const oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expectRelational("<"); + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = false; + + while (!this.isRelational(">")) { + node.params.push(this.flowParseType()); + + if (!this.isRelational(">")) { + this.expect(types.comma); + } + } + + this.state.noAnonFunctionType = oldNoAnonFunctionType; + this.expectRelational(">"); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + } + + flowParseTypeParameterInstantiationCallOrNew() { + const node = this.startNode(); + const oldInType = this.state.inType; + node.params = []; + this.state.inType = true; + this.expectRelational("<"); + + while (!this.isRelational(">")) { + node.params.push(this.flowParseTypeOrImplicitInstantiation()); + + if (!this.isRelational(">")) { + this.expect(types.comma); + } + } + + this.expectRelational(">"); + this.state.inType = oldInType; + return this.finishNode(node, "TypeParameterInstantiation"); + } + + flowParseInterfaceType() { + const node = this.startNode(); + this.expectContextual("interface"); + node.extends = []; + + if (this.eat(types._extends)) { + do { + node.extends.push(this.flowParseInterfaceExtends()); + } while (this.eat(types.comma)); + } + + node.body = this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: false, + allowProto: false, + allowInexact: false + }); + return this.finishNode(node, "InterfaceTypeAnnotation"); + } + + flowParseObjectPropertyKey() { + return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); + } + + flowParseObjectTypeIndexer(node, isStatic, variance) { + node.static = isStatic; + + if (this.lookahead().type === types.colon) { + node.id = this.flowParseObjectPropertyKey(); + node.key = this.flowParseTypeInitialiser(); + } else { + node.id = null; + node.key = this.flowParseType(); + } + + this.expect(types.bracketR); + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + return this.finishNode(node, "ObjectTypeIndexer"); + } + + flowParseObjectTypeInternalSlot(node, isStatic) { + node.static = isStatic; + node.id = this.flowParseObjectPropertyKey(); + this.expect(types.bracketR); + this.expect(types.bracketR); + + if (this.isRelational("<") || this.match(types.parenL)) { + node.method = true; + node.optional = false; + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); + } else { + node.method = false; + + if (this.eat(types.question)) { + node.optional = true; + } + + node.value = this.flowParseTypeInitialiser(); + } + + return this.finishNode(node, "ObjectTypeInternalSlot"); + } + + flowParseObjectTypeMethodish(node) { + node.params = []; + node.rest = null; + node.typeParameters = null; + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(false); + } + + this.expect(types.parenL); + + while (!this.match(types.parenR) && !this.match(types.ellipsis)) { + node.params.push(this.flowParseFunctionTypeParam()); + + if (!this.match(types.parenR)) { + this.expect(types.comma); + } + } + + if (this.eat(types.ellipsis)) { + node.rest = this.flowParseFunctionTypeParam(); + } + + this.expect(types.parenR); + node.returnType = this.flowParseTypeInitialiser(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } + + flowParseObjectTypeCallProperty(node, isStatic) { + const valueNode = this.startNode(); + node.static = isStatic; + node.value = this.flowParseObjectTypeMethodish(valueNode); + return this.finishNode(node, "ObjectTypeCallProperty"); + } + + flowParseObjectType({ + allowStatic, + allowExact, + allowSpread, + allowProto, + allowInexact + }) { + const oldInType = this.state.inType; + this.state.inType = true; + const nodeStart = this.startNode(); + nodeStart.callProperties = []; + nodeStart.properties = []; + nodeStart.indexers = []; + nodeStart.internalSlots = []; + let endDelim; + let exact; + let inexact = false; + + if (allowExact && this.match(types.braceBarL)) { + this.expect(types.braceBarL); + endDelim = types.braceBarR; + exact = true; + } else { + this.expect(types.braceL); + endDelim = types.braceR; + exact = false; + } + + nodeStart.exact = exact; + + while (!this.match(endDelim)) { + let isStatic = false; + let protoStart = null; + const node = this.startNode(); + + if (allowProto && this.isContextual("proto")) { + const lookahead = this.lookahead(); + + if (lookahead.type !== types.colon && lookahead.type !== types.question) { + this.next(); + protoStart = this.state.start; + allowStatic = false; + } + } + + if (allowStatic && this.isContextual("static")) { + const lookahead = this.lookahead(); + + if (lookahead.type !== types.colon && lookahead.type !== types.question) { + this.next(); + isStatic = true; + } + } + + const variance = this.flowParseVariance(); + + if (this.eat(types.bracketL)) { + if (protoStart != null) { + this.unexpected(protoStart); + } + + if (this.eat(types.bracketL)) { + if (variance) { + this.unexpected(variance.start); + } + + nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); + } else { + nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); + } + } else if (this.match(types.parenL) || this.isRelational("<")) { + if (protoStart != null) { + this.unexpected(protoStart); + } + + if (variance) { + this.unexpected(variance.start); + } + + nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); + } else { + let kind = "init"; + + if (this.isContextual("get") || this.isContextual("set")) { + const lookahead = this.lookahead(); + + if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) { + kind = this.state.value; + this.next(); + } + } + + const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact); + + if (propOrInexact === null) { + inexact = true; + } else { + nodeStart.properties.push(propOrInexact); + } + } + + this.flowObjectTypeSemicolon(); + } + + this.expect(endDelim); + + if (allowSpread) { + nodeStart.inexact = inexact; + } + + const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); + this.state.inType = oldInType; + return out; + } + + flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) { + if (this.match(types.ellipsis)) { + if (!allowSpread) { + this.unexpected(null, "Spread operator cannot appear in class or interface definitions"); + } + + if (protoStart != null) { + this.unexpected(protoStart); + } + + if (variance) { + this.unexpected(variance.start, "Spread properties cannot have variance"); + } + + this.expect(types.ellipsis); + const isInexactToken = this.eat(types.comma) || this.eat(types.semi); + + if (this.match(types.braceR)) { + if (allowInexact) return null; + this.unexpected(null, "Explicit inexact syntax is only allowed inside inexact objects"); + } + + if (this.match(types.braceBarR)) { + this.unexpected(null, "Explicit inexact syntax cannot appear inside an explicit exact object type"); + } + + if (isInexactToken) { + this.unexpected(null, "Explicit inexact syntax must appear at the end of an inexact object"); + } + + node.argument = this.flowParseType(); + return this.finishNode(node, "ObjectTypeSpreadProperty"); + } else { + node.key = this.flowParseObjectPropertyKey(); + node.static = isStatic; + node.proto = protoStart != null; + node.kind = kind; + let optional = false; + + if (this.isRelational("<") || this.match(types.parenL)) { + node.method = true; + + if (protoStart != null) { + this.unexpected(protoStart); + } + + if (variance) { + this.unexpected(variance.start); + } + + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); + + if (kind === "get" || kind === "set") { + this.flowCheckGetterSetterParams(node); + } + } else { + if (kind !== "init") this.unexpected(); + node.method = false; + + if (this.eat(types.question)) { + optional = true; + } + + node.value = this.flowParseTypeInitialiser(); + node.variance = variance; + } + + node.optional = optional; + return this.finishNode(node, "ObjectTypeProperty"); + } + } + + flowCheckGetterSetterParams(property) { + const paramCount = property.kind === "get" ? 0 : 1; + const start = property.start; + const length = property.value.params.length + (property.value.rest ? 1 : 0); + + if (length !== paramCount) { + if (property.kind === "get") { + this.raise(start, "getter must not have any formal parameters"); + } else { + this.raise(start, "setter must have exactly one formal parameter"); + } + } + + if (property.kind === "set" && property.value.rest) { + this.raise(start, "setter function argument must not be a rest parameter"); + } + } + + flowObjectTypeSemicolon() { + if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) { + this.unexpected(); + } + } + + flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { + startPos = startPos || this.state.start; + startLoc = startLoc || this.state.startLoc; + let node = id || this.parseIdentifier(); + + while (this.eat(types.dot)) { + const node2 = this.startNodeAt(startPos, startLoc); + node2.qualification = node; + node2.id = this.parseIdentifier(); + node = this.finishNode(node2, "QualifiedTypeIdentifier"); + } + + return node; + } + + flowParseGenericType(startPos, startLoc, id) { + const node = this.startNodeAt(startPos, startLoc); + node.typeParameters = null; + node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } + + return this.finishNode(node, "GenericTypeAnnotation"); + } + + flowParseTypeofType() { + const node = this.startNode(); + this.expect(types._typeof); + node.argument = this.flowParsePrimaryType(); + return this.finishNode(node, "TypeofTypeAnnotation"); + } + + flowParseTupleType() { + const node = this.startNode(); + node.types = []; + this.expect(types.bracketL); + + while (this.state.pos < this.length && !this.match(types.bracketR)) { + node.types.push(this.flowParseType()); + if (this.match(types.bracketR)) break; + this.expect(types.comma); + } + + this.expect(types.bracketR); + return this.finishNode(node, "TupleTypeAnnotation"); + } + + flowParseFunctionTypeParam() { + let name = null; + let optional = false; + let typeAnnotation = null; + const node = this.startNode(); + const lh = this.lookahead(); + + if (lh.type === types.colon || lh.type === types.question) { + name = this.parseIdentifier(); + + if (this.eat(types.question)) { + optional = true; + } + + typeAnnotation = this.flowParseTypeInitialiser(); + } else { + typeAnnotation = this.flowParseType(); + } + + node.name = name; + node.optional = optional; + node.typeAnnotation = typeAnnotation; + return this.finishNode(node, "FunctionTypeParam"); + } + + reinterpretTypeAsFunctionTypeParam(type) { + const node = this.startNodeAt(type.start, type.loc.start); + node.name = null; + node.optional = false; + node.typeAnnotation = type; + return this.finishNode(node, "FunctionTypeParam"); + } + + flowParseFunctionTypeParams(params = []) { + let rest = null; + + while (!this.match(types.parenR) && !this.match(types.ellipsis)) { + params.push(this.flowParseFunctionTypeParam()); + + if (!this.match(types.parenR)) { + this.expect(types.comma); + } + } + + if (this.eat(types.ellipsis)) { + rest = this.flowParseFunctionTypeParam(); + } + + return { + params, + rest + }; + } + + flowIdentToTypeAnnotation(startPos, startLoc, node, id) { + switch (id.name) { + case "any": + return this.finishNode(node, "AnyTypeAnnotation"); + + case "bool": + case "boolean": + return this.finishNode(node, "BooleanTypeAnnotation"); + + case "mixed": + return this.finishNode(node, "MixedTypeAnnotation"); + + case "empty": + return this.finishNode(node, "EmptyTypeAnnotation"); + + case "number": + return this.finishNode(node, "NumberTypeAnnotation"); + + case "string": + return this.finishNode(node, "StringTypeAnnotation"); + + default: + this.checkNotUnderscore(id.name); + return this.flowParseGenericType(startPos, startLoc, id); + } + } + + flowParsePrimaryType() { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const node = this.startNode(); + let tmp; + let type; + let isGroupedType = false; + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + + switch (this.state.type) { + case types.name: + if (this.isContextual("interface")) { + return this.flowParseInterfaceType(); + } + + return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); + + case types.braceL: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: true, + allowProto: false, + allowInexact: true + }); + + case types.braceBarL: + return this.flowParseObjectType({ + allowStatic: false, + allowExact: true, + allowSpread: true, + allowProto: false, + allowInexact: false + }); + + case types.bracketL: + return this.flowParseTupleType(); + + case types.relational: + if (this.state.value === "<") { + node.typeParameters = this.flowParseTypeParameterDeclaration(false); + this.expect(types.parenL); + tmp = this.flowParseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + this.expect(types.parenR); + this.expect(types.arrow); + node.returnType = this.flowParseType(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } + + break; + + case types.parenL: + this.next(); + + if (!this.match(types.parenR) && !this.match(types.ellipsis)) { + if (this.match(types.name)) { + const token = this.lookahead().type; + isGroupedType = token !== types.question && token !== types.colon; + } else { + isGroupedType = true; + } + } + + if (isGroupedType) { + this.state.noAnonFunctionType = false; + type = this.flowParseType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + + if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) { + this.expect(types.parenR); + return type; + } else { + this.eat(types.comma); + } + } + + if (type) { + tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); + } else { + tmp = this.flowParseFunctionTypeParams(); + } + + node.params = tmp.params; + node.rest = tmp.rest; + this.expect(types.parenR); + this.expect(types.arrow); + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + + case types.string: + return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); + + case types._true: + case types._false: + node.value = this.match(types._true); + this.next(); + return this.finishNode(node, "BooleanLiteralTypeAnnotation"); + + case types.plusMin: + if (this.state.value === "-") { + this.next(); + + if (!this.match(types.num)) { + this.unexpected(null, `Unexpected token, expected "number"`); + } + + return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start); + } + + this.unexpected(); + + case types.num: + return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); + + case types._void: + this.next(); + return this.finishNode(node, "VoidTypeAnnotation"); + + case types._null: + this.next(); + return this.finishNode(node, "NullLiteralTypeAnnotation"); + + case types._this: + this.next(); + return this.finishNode(node, "ThisTypeAnnotation"); + + case types.star: + this.next(); + return this.finishNode(node, "ExistsTypeAnnotation"); + + default: + if (this.state.type.keyword === "typeof") { + return this.flowParseTypeofType(); + } else if (this.state.type.keyword) { + const label = this.state.type.label; + this.next(); + return super.createIdentifier(node, label); + } + + } + + throw this.unexpected(); + } + + flowParsePostfixType() { + const startPos = this.state.start, + startLoc = this.state.startLoc; + let type = this.flowParsePrimaryType(); + + while (this.match(types.bracketL) && !this.canInsertSemicolon()) { + const node = this.startNodeAt(startPos, startLoc); + node.elementType = type; + this.expect(types.bracketL); + this.expect(types.bracketR); + type = this.finishNode(node, "ArrayTypeAnnotation"); + } + + return type; + } + + flowParsePrefixType() { + const node = this.startNode(); + + if (this.eat(types.question)) { + node.typeAnnotation = this.flowParsePrefixType(); + return this.finishNode(node, "NullableTypeAnnotation"); + } else { + return this.flowParsePostfixType(); + } + } + + flowParseAnonFunctionWithoutParens() { + const param = this.flowParsePrefixType(); + + if (!this.state.noAnonFunctionType && this.eat(types.arrow)) { + const node = this.startNodeAt(param.start, param.loc.start); + node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; + node.rest = null; + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); + } + + return param; + } + + flowParseIntersectionType() { + const node = this.startNode(); + this.eat(types.bitwiseAND); + const type = this.flowParseAnonFunctionWithoutParens(); + node.types = [type]; + + while (this.eat(types.bitwiseAND)) { + node.types.push(this.flowParseAnonFunctionWithoutParens()); + } + + return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); + } + + flowParseUnionType() { + const node = this.startNode(); + this.eat(types.bitwiseOR); + const type = this.flowParseIntersectionType(); + node.types = [type]; + + while (this.eat(types.bitwiseOR)) { + node.types.push(this.flowParseIntersectionType()); + } + + return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); + } + + flowParseType() { + const oldInType = this.state.inType; + this.state.inType = true; + const type = this.flowParseUnionType(); + this.state.inType = oldInType; + this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType; + return type; + } + + flowParseTypeOrImplicitInstantiation() { + if (this.state.type === types.name && this.state.value === "_") { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const node = this.parseIdentifier(); + return this.flowParseGenericType(startPos, startLoc, node); + } else { + return this.flowParseType(); + } + } + + flowParseTypeAnnotation() { + const node = this.startNode(); + node.typeAnnotation = this.flowParseTypeInitialiser(); + return this.finishNode(node, "TypeAnnotation"); + } + + flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { + const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); + + if (this.match(types.colon)) { + ident.typeAnnotation = this.flowParseTypeAnnotation(); + this.finishNode(ident, ident.type); + } + + return ident; + } + + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end); + } + + flowParseVariance() { + let variance = null; + + if (this.match(types.plusMin)) { + variance = this.startNode(); + + if (this.state.value === "+") { + variance.kind = "plus"; + } else { + variance.kind = "minus"; + } + + this.next(); + this.finishNode(variance, "Variance"); + } + + return variance; + } + + parseFunctionBody(node, allowExpressionBody, isMethod = false) { + if (allowExpressionBody) { + return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); + } + + return super.parseFunctionBody(node, false, isMethod); + } + + parseFunctionBodyAndFinish(node, type, isMethod = false) { + if (this.match(types.colon)) { + const typeNode = this.startNode(); + [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; + } + + super.parseFunctionBodyAndFinish(node, type, isMethod); + } + + parseStatement(context, topLevel) { + if (this.state.strict && this.match(types.name) && this.state.value === "interface") { + const node = this.startNode(); + this.next(); + return this.flowParseInterface(node); + } else { + const stmt = super.parseStatement(context, topLevel); + + if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { + this.flowPragma = null; + } + + return stmt; + } + } + + parseExpressionStatement(node, expr) { + if (expr.type === "Identifier") { + if (expr.name === "declare") { + if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) { + return this.flowParseDeclare(node); + } + } else if (this.match(types.name)) { + if (expr.name === "interface") { + return this.flowParseInterface(node); + } else if (expr.name === "type") { + return this.flowParseTypeAlias(node); + } else if (expr.name === "opaque") { + return this.flowParseOpaqueType(node, false); + } + } + } + + return super.parseExpressionStatement(node, expr); + } + + shouldParseExportDeclaration() { + return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || super.shouldParseExportDeclaration(); + } + + isExportDefaultSpecifier() { + if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque")) { + return false; + } + + return super.isExportDefaultSpecifier(); + } + + parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { + if (!this.match(types.question)) return expr; + + if (refNeedsArrowPos) { + const state = this.state.clone(); + + try { + return super.parseConditional(expr, noIn, startPos, startLoc); + } catch (err) { + if (err instanceof SyntaxError) { + this.state = state; + refNeedsArrowPos.start = err.pos || this.state.start; + return expr; + } else { + throw err; + } + } + } + + this.expect(types.question); + const state = this.state.clone(); + const originalNoArrowAt = this.state.noArrowAt; + const node = this.startNodeAt(startPos, startLoc); + let { + consequent, + failed + } = this.tryParseConditionalConsequent(); + let [valid, invalid] = this.getArrowLikeExpressions(consequent); + + if (failed || invalid.length > 0) { + const noArrowAt = [...originalNoArrowAt]; + + if (invalid.length > 0) { + this.state = state; + this.state.noArrowAt = noArrowAt; + + for (let i = 0; i < invalid.length; i++) { + noArrowAt.push(invalid[i].start); + } + + ({ + consequent, + failed + } = this.tryParseConditionalConsequent()); + [valid, invalid] = this.getArrowLikeExpressions(consequent); + } + + if (failed && valid.length > 1) { + this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."); + } + + if (failed && valid.length === 1) { + this.state = state; + this.state.noArrowAt = noArrowAt.concat(valid[0].start); + ({ + consequent, + failed + } = this.tryParseConditionalConsequent()); + } + + this.getArrowLikeExpressions(consequent, true); + } + + this.state.noArrowAt = originalNoArrowAt; + this.expect(types.colon); + node.test = expr; + node.consequent = consequent; + node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(noIn, undefined, undefined, undefined)); + return this.finishNode(node, "ConditionalExpression"); + } + + tryParseConditionalConsequent() { + this.state.noArrowParamsConversionAt.push(this.state.start); + const consequent = this.parseMaybeAssign(); + const failed = !this.match(types.colon); + this.state.noArrowParamsConversionAt.pop(); + return { + consequent, + failed + }; + } + + getArrowLikeExpressions(node, disallowInvalid) { + const stack = [node]; + const arrows = []; + + while (stack.length !== 0) { + const node = stack.pop(); + + if (node.type === "ArrowFunctionExpression") { + if (node.typeParameters || !node.returnType) { + this.toAssignableList(node.params, true, "arrow function parameters"); + this.scope.enter(functionFlags(false, false) | SCOPE_ARROW); + super.checkParams(node, false, true); + this.scope.exit(); + } else { + arrows.push(node); + } + + stack.push(node.body); + } else if (node.type === "ConditionalExpression") { + stack.push(node.consequent); + stack.push(node.alternate); + } + } + + if (disallowInvalid) { + for (let i = 0; i < arrows.length; i++) { + this.toAssignableList(node.params, true, "arrow function parameters"); + } + + return [arrows, []]; + } + + return partition(arrows, node => { + try { + this.toAssignableList(node.params, true, "arrow function parameters"); + return true; + } catch (err) { + return false; + } + }); + } + + forwardNoArrowParamsConversionAt(node, parse) { + let result; + + if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + this.state.noArrowParamsConversionAt.push(this.state.start); + result = parse(); + this.state.noArrowParamsConversionAt.pop(); + } else { + result = parse(); + } + + return result; + } + + parseParenItem(node, startPos, startLoc) { + node = super.parseParenItem(node, startPos, startLoc); + + if (this.eat(types.question)) { + node.optional = true; + } + + if (this.match(types.colon)) { + const typeCastNode = this.startNodeAt(startPos, startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TypeCastExpression"); + } + + return node; + } + + assertModuleNodeAllowed(node) { + if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { + return; + } + + super.assertModuleNodeAllowed(node); + } + + parseExport(node) { + const decl = super.parseExport(node); + + if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") { + decl.exportKind = decl.exportKind || "value"; + } + + return decl; + } + + parseExportDeclaration(node) { + if (this.isContextual("type")) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + + if (this.match(types.braceL)) { + node.specifiers = this.parseExportSpecifiers(); + this.parseExportFrom(node); + return null; + } else { + return this.flowParseTypeAlias(declarationNode); + } + } else if (this.isContextual("opaque")) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseOpaqueType(declarationNode, false); + } else if (this.isContextual("interface")) { + node.exportKind = "type"; + const declarationNode = this.startNode(); + this.next(); + return this.flowParseInterface(declarationNode); + } else { + return super.parseExportDeclaration(node); + } + } + + eatExportStar(node) { + if (super.eatExportStar(...arguments)) return true; + + if (this.isContextual("type") && this.lookahead().type === types.star) { + node.exportKind = "type"; + this.next(); + this.next(); + return true; + } + + return false; + } + + maybeParseExportNamespaceSpecifier(node) { + const pos = this.state.start; + const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); + + if (hasNamespace && node.exportKind === "type") { + this.unexpected(pos); + } + + return hasNamespace; + } + + parseClassId(node, isStatement, optionalId) { + super.parseClassId(node, isStatement, optionalId); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(); + } + } + + getTokenFromCode(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (code === 123 && next === 124) { + return this.finishOp(types.braceBarL, 2); + } else if (this.state.inType && (code === 62 || code === 60)) { + return this.finishOp(types.relational, 1); + } else if (isIteratorStart(code, next)) { + this.state.isIterator = true; + return super.readWord(); + } else { + return super.getTokenFromCode(code); + } + } + + toAssignable(node, isBinding, contextDescription) { + if (node.type === "TypeCastExpression") { + return super.toAssignable(this.typeCastToParameter(node), isBinding, contextDescription); + } else { + return super.toAssignable(node, isBinding, contextDescription); + } + } + + toAssignableList(exprList, isBinding, contextDescription) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + + if (expr && expr.type === "TypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + + return super.toAssignableList(exprList, isBinding, contextDescription); + } + + toReferencedList(exprList, isParenthesizedExpr) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + + if (expr && expr.type === "TypeCastExpression" && (!expr.extra || !expr.extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { + this.raise(expr.typeAnnotation.start, "The type cast expression is expected to be wrapped with parenthesis"); + } + } + + return exprList; + } + + checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { + if (expr.type !== "TypeCastExpression") { + return super.checkLVal(expr, bindingType, checkClashes, contextDescription); + } + } + + parseClassProperty(node) { + if (this.match(types.colon)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + + return super.parseClassProperty(node); + } + + parseClassPrivateProperty(node) { + if (this.match(types.colon)) { + node.typeAnnotation = this.flowParseTypeAnnotation(); + } + + return super.parseClassPrivateProperty(node); + } + + isClassMethod() { + return this.isRelational("<") || super.isClassMethod(); + } + + isClassProperty() { + return this.match(types.colon) || super.isClassProperty(); + } + + isNonstaticConstructor(method) { + return !this.match(types.colon) && super.isNonstaticConstructor(method); + } + + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + if (method.variance) { + this.unexpected(method.variance.start); + } + + delete method.variance; + + if (this.isRelational("<")) { + method.typeParameters = this.flowParseTypeParameterDeclaration(false); + } + + super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + } + + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + if (method.variance) { + this.unexpected(method.variance.start); + } + + delete method.variance; + + if (this.isRelational("<")) { + method.typeParameters = this.flowParseTypeParameterDeclaration(); + } + + super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); + } + + parseClassSuper(node) { + super.parseClassSuper(node); + + if (node.superClass && this.isRelational("<")) { + node.superTypeParameters = this.flowParseTypeParameterInstantiation(); + } + + if (this.isContextual("implements")) { + this.next(); + const implemented = node.implements = []; + + do { + const node = this.startNode(); + node.id = this.flowParseRestrictedIdentifier(true); + + if (this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterInstantiation(); + } else { + node.typeParameters = null; + } + + implemented.push(this.finishNode(node, "ClassImplements")); + } while (this.eat(types.comma)); + } + } + + parsePropertyName(node) { + const variance = this.flowParseVariance(); + const key = super.parsePropertyName(node); + node.variance = variance; + return key; + } + + parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { + if (prop.variance) { + this.unexpected(prop.variance.start); + } + + delete prop.variance; + let typeParameters; + + if (this.isRelational("<")) { + typeParameters = this.flowParseTypeParameterDeclaration(false); + if (!this.match(types.parenL)) this.unexpected(); + } + + super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); + + if (typeParameters) { + (prop.value || prop).typeParameters = typeParameters; + } + } + + parseAssignableListItemTypes(param) { + if (this.eat(types.question)) { + if (param.type !== "Identifier") { + throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); + } + + param.optional = true; + } + + if (this.match(types.colon)) { + param.typeAnnotation = this.flowParseTypeAnnotation(); + } + + this.finishNode(param, param.type); + return param; + } + + parseMaybeDefault(startPos, startLoc, left) { + const node = super.parseMaybeDefault(startPos, startLoc, left); + + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); + } + + return node; + } + + shouldParseDefaultImport(node) { + if (!hasTypeImportKind(node)) { + return super.shouldParseDefaultImport(node); + } + + return isMaybeDefaultImport(this.state); + } + + parseImportSpecifierLocal(node, specifier, type, contextDescription) { + specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier(); + this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription); + node.specifiers.push(this.finishNode(specifier, type)); + } + + maybeParseDefaultImportSpecifier(node) { + node.importKind = "value"; + let kind = null; + + if (this.match(types._typeof)) { + kind = "typeof"; + } else if (this.isContextual("type")) { + kind = "type"; + } + + if (kind) { + const lh = this.lookahead(); + + if (kind === "type" && lh.type === types.star) { + this.unexpected(lh.start); + } + + if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) { + this.next(); + node.importKind = kind; + } + } + + return super.maybeParseDefaultImportSpecifier(node); + } + + parseImportSpecifier(node) { + const specifier = this.startNode(); + const firstIdentLoc = this.state.start; + const firstIdent = this.parseIdentifier(true); + let specifierTypeKind = null; + + if (firstIdent.name === "type") { + specifierTypeKind = "type"; + } else if (firstIdent.name === "typeof") { + specifierTypeKind = "typeof"; + } + + let isBinding = false; + + if (this.isContextual("as") && !this.isLookaheadContextual("as")) { + const as_ident = this.parseIdentifier(true); + + if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) { + specifier.imported = as_ident; + specifier.importKind = specifierTypeKind; + specifier.local = as_ident.__clone(); + } else { + specifier.imported = firstIdent; + specifier.importKind = null; + specifier.local = this.parseIdentifier(); + } + } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) { + specifier.imported = this.parseIdentifier(true); + specifier.importKind = specifierTypeKind; + + if (this.eatContextual("as")) { + specifier.local = this.parseIdentifier(); + } else { + isBinding = true; + specifier.local = specifier.imported.__clone(); + } + } else { + isBinding = true; + specifier.imported = firstIdent; + specifier.importKind = null; + specifier.local = specifier.imported.__clone(); + } + + const nodeIsTypeImport = hasTypeImportKind(node); + const specifierIsTypeImport = hasTypeImportKind(specifier); + + if (nodeIsTypeImport && specifierIsTypeImport) { + this.raise(firstIdentLoc, "The `type` and `typeof` keywords on named imports can only be used on regular " + "`import` statements. It cannot be used with `import type` or `import typeof` statements"); + } + + if (nodeIsTypeImport || specifierIsTypeImport) { + this.checkReservedType(specifier.local.name, specifier.local.start); + } + + if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) { + this.checkReservedWord(specifier.local.name, specifier.start, true, true); + } + + this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier"); + node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); + } + + parseFunctionParams(node, allowModifiers) { + const kind = node.kind; + + if (kind !== "get" && kind !== "set" && this.isRelational("<")) { + node.typeParameters = this.flowParseTypeParameterDeclaration(false); + } + + super.parseFunctionParams(node, allowModifiers); + } + + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + + if (this.match(types.colon)) { + decl.id.typeAnnotation = this.flowParseTypeAnnotation(); + this.finishNode(decl.id, decl.id.type); + } + } + + parseAsyncArrowFromCallExpression(node, call) { + if (this.match(types.colon)) { + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + node.returnType = this.flowParseTypeAnnotation(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + } + + return super.parseAsyncArrowFromCallExpression(node, call); + } + + shouldParseAsyncArrow() { + return this.match(types.colon) || super.shouldParseAsyncArrow(); + } + + parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { + let jsxError = null; + + if (this.hasPlugin("jsx") && (this.match(types.jsxTagStart) || this.isRelational("<"))) { + const state = this.state.clone(); + + try { + return super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); + } catch (err) { + if (err instanceof SyntaxError) { + this.state = state; + const cLength = this.state.context.length; + + if (this.state.context[cLength - 1] === types$1.j_oTag) { + this.state.context.length -= 2; + } + + jsxError = err; + } else { + throw err; + } + } + } + + if (jsxError != null || this.isRelational("<")) { + let arrowExpression; + let typeParameters; + + try { + typeParameters = this.flowParseTypeParameterDeclaration(); + arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos)); + arrowExpression.typeParameters = typeParameters; + this.resetStartLocationFromNode(arrowExpression, typeParameters); + } catch (err) { + throw jsxError || err; + } + + if (arrowExpression.type === "ArrowFunctionExpression") { + return arrowExpression; + } else if (jsxError != null) { + throw jsxError; + } else { + this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration"); + } + } + + return super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); + } + + parseArrow(node) { + if (this.match(types.colon)) { + const state = this.state.clone(); + + try { + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = true; + const typeNode = this.startNode(); + [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.canInsertSemicolon()) this.unexpected(); + if (!this.match(types.arrow)) this.unexpected(); + node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; + } catch (err) { + if (err instanceof SyntaxError) { + this.state = state; + } else { + throw err; + } + } + } + + return super.parseArrow(node); + } + + shouldParseArrow() { + return this.match(types.colon) || super.shouldParseArrow(); + } + + setArrowFunctionParameters(node, params) { + if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + node.params = params; + } else { + super.setArrowFunctionParameters(node, params); + } + } + + checkParams(node, allowDuplicates, isArrowFunction) { + if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { + return; + } + + return super.checkParams(node, allowDuplicates, isArrowFunction); + } + + parseParenAndDistinguishExpression(canBeArrow) { + return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); + } + + parseSubscripts(base, startPos, startLoc, noCalls) { + if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { + this.next(); + const node = this.startNodeAt(startPos, startLoc); + node.callee = base; + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + base = this.finishNode(node, "CallExpression"); + } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) { + const state = this.state.clone(); + let error; + + try { + const node = this.parseAsyncArrowWithTypeParameters(startPos, startLoc); + if (node) return node; + } catch (e) { + error = e; + } + + this.state = state; + + try { + return super.parseSubscripts(base, startPos, startLoc, noCalls); + } catch (e) { + throw error || e; + } + } + + return super.parseSubscripts(base, startPos, startLoc, noCalls); + } + + parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow) { + if (this.match(types.questionDot) && this.isLookaheadRelational("<")) { + this.expectPlugin("optionalChaining"); + subscriptState.optionalChainMember = true; + + if (noCalls) { + subscriptState.stop = true; + return base; + } + + this.next(); + const node = this.startNodeAt(startPos, startLoc); + node.callee = base; + node.typeArguments = this.flowParseTypeParameterInstantiation(); + this.expect(types.parenL); + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + node.optional = true; + return this.finishNode(node, "OptionalCallExpression"); + } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) { + const node = this.startNodeAt(startPos, startLoc); + node.callee = base; + const state = this.state.clone(); + + try { + node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); + this.expect(types.parenL); + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + + if (subscriptState.optionalChainMember) { + node.optional = false; + return this.finishNode(node, "OptionalCallExpression"); + } + + return this.finishNode(node, "CallExpression"); + } catch (e) { + if (e instanceof SyntaxError) { + this.state = state; + } else { + throw e; + } + } + } + + return super.parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow); + } + + parseNewArguments(node) { + let targs = null; + + if (this.shouldParseTypes() && this.isRelational("<")) { + const state = this.state.clone(); + + try { + targs = this.flowParseTypeParameterInstantiationCallOrNew(); + } catch (e) { + if (e instanceof SyntaxError) { + this.state = state; + } else { + throw e; + } + } + } + + node.typeArguments = targs; + super.parseNewArguments(node); + } + + parseAsyncArrowWithTypeParameters(startPos, startLoc) { + const node = this.startNodeAt(startPos, startLoc); + this.parseFunctionParams(node); + if (!this.parseArrow(node)) return; + return this.parseArrowExpression(node, undefined, true); + } + + readToken_mult_modulo(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (code === 42 && next === 47 && this.state.hasFlowComment) { + this.state.hasFlowComment = false; + this.state.pos += 2; + this.nextToken(); + return; + } + + super.readToken_mult_modulo(code); + } + + readToken_pipe_amp(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (code === 124 && next === 125) { + this.finishOp(types.braceBarR, 2); + return; + } + + super.readToken_pipe_amp(code); + } + + parseTopLevel(file, program) { + const fileNode = super.parseTopLevel(file, program); + + if (this.state.hasFlowComment) { + this.unexpected(null, "Unterminated flow-comment"); + } + + return fileNode; + } + + skipBlockComment() { + if (this.hasPlugin("flowComments") && this.skipFlowComment()) { + if (this.state.hasFlowComment) { + this.unexpected(null, "Cannot have a flow comment inside another flow comment"); + } + + this.hasFlowCommentCompletion(); + this.state.pos += this.skipFlowComment(); + this.state.hasFlowComment = true; + return; + } + + if (this.state.hasFlowComment) { + const end = this.input.indexOf("*-/", this.state.pos += 2); + if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); + this.state.pos = end + 3; + return; + } + + super.skipBlockComment(); + } + + skipFlowComment() { + const { + pos + } = this.state; + let shiftToFirstNonWhiteSpace = 2; + + while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { + shiftToFirstNonWhiteSpace++; + } + + const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); + const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); + + if (ch2 === 58 && ch3 === 58) { + return shiftToFirstNonWhiteSpace + 2; + } + + if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { + return shiftToFirstNonWhiteSpace + 12; + } + + if (ch2 === 58 && ch3 !== 58) { + return shiftToFirstNonWhiteSpace; + } + + return false; + } + + hasFlowCommentCompletion() { + const end = this.input.indexOf("*/", this.state.pos); + + if (end === -1) { + this.raise(this.state.pos, "Unterminated comment"); + } + } + +}); + +const entities = { + quot: "\u0022", + amp: "&", + apos: "\u0027", + lt: "<", + gt: ">", + nbsp: "\u00A0", + iexcl: "\u00A1", + cent: "\u00A2", + pound: "\u00A3", + curren: "\u00A4", + yen: "\u00A5", + brvbar: "\u00A6", + sect: "\u00A7", + uml: "\u00A8", + copy: "\u00A9", + ordf: "\u00AA", + laquo: "\u00AB", + not: "\u00AC", + shy: "\u00AD", + reg: "\u00AE", + macr: "\u00AF", + deg: "\u00B0", + plusmn: "\u00B1", + sup2: "\u00B2", + sup3: "\u00B3", + acute: "\u00B4", + micro: "\u00B5", + para: "\u00B6", + middot: "\u00B7", + cedil: "\u00B8", + sup1: "\u00B9", + ordm: "\u00BA", + raquo: "\u00BB", + frac14: "\u00BC", + frac12: "\u00BD", + frac34: "\u00BE", + iquest: "\u00BF", + Agrave: "\u00C0", + Aacute: "\u00C1", + Acirc: "\u00C2", + Atilde: "\u00C3", + Auml: "\u00C4", + Aring: "\u00C5", + AElig: "\u00C6", + Ccedil: "\u00C7", + Egrave: "\u00C8", + Eacute: "\u00C9", + Ecirc: "\u00CA", + Euml: "\u00CB", + Igrave: "\u00CC", + Iacute: "\u00CD", + Icirc: "\u00CE", + Iuml: "\u00CF", + ETH: "\u00D0", + Ntilde: "\u00D1", + Ograve: "\u00D2", + Oacute: "\u00D3", + Ocirc: "\u00D4", + Otilde: "\u00D5", + Ouml: "\u00D6", + times: "\u00D7", + Oslash: "\u00D8", + Ugrave: "\u00D9", + Uacute: "\u00DA", + Ucirc: "\u00DB", + Uuml: "\u00DC", + Yacute: "\u00DD", + THORN: "\u00DE", + szlig: "\u00DF", + agrave: "\u00E0", + aacute: "\u00E1", + acirc: "\u00E2", + atilde: "\u00E3", + auml: "\u00E4", + aring: "\u00E5", + aelig: "\u00E6", + ccedil: "\u00E7", + egrave: "\u00E8", + eacute: "\u00E9", + ecirc: "\u00EA", + euml: "\u00EB", + igrave: "\u00EC", + iacute: "\u00ED", + icirc: "\u00EE", + iuml: "\u00EF", + eth: "\u00F0", + ntilde: "\u00F1", + ograve: "\u00F2", + oacute: "\u00F3", + ocirc: "\u00F4", + otilde: "\u00F5", + ouml: "\u00F6", + divide: "\u00F7", + oslash: "\u00F8", + ugrave: "\u00F9", + uacute: "\u00FA", + ucirc: "\u00FB", + uuml: "\u00FC", + yacute: "\u00FD", + thorn: "\u00FE", + yuml: "\u00FF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + int: "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" +}; + +const HEX_NUMBER = /^[\da-fA-F]+$/; +const DECIMAL_NUMBER = /^\d+$/; +types$1.j_oTag = new TokContext("...", true, true); +types.jsxName = new TokenType("jsxName"); +types.jsxText = new TokenType("jsxText", { + beforeExpr: true +}); +types.jsxTagStart = new TokenType("jsxTagStart", { + startsExpr: true +}); +types.jsxTagEnd = new TokenType("jsxTagEnd"); + +types.jsxTagStart.updateContext = function () { + this.state.context.push(types$1.j_expr); + this.state.context.push(types$1.j_oTag); + this.state.exprAllowed = false; +}; + +types.jsxTagEnd.updateContext = function (prevType) { + const out = this.state.context.pop(); + + if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) { + this.state.context.pop(); + this.state.exprAllowed = this.curContext() === types$1.j_expr; + } else { + this.state.exprAllowed = true; + } +}; + +function isFragment(object) { + return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; +} + +function getQualifiedJSXName(object) { + if (object.type === "JSXIdentifier") { + return object.name; + } + + if (object.type === "JSXNamespacedName") { + return object.namespace.name + ":" + object.name.name; + } + + if (object.type === "JSXMemberExpression") { + return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); + } + + throw new Error("Node had unexpected type: " + object.type); +} + +var jsx = (superClass => class extends superClass { + jsxReadToken() { + let out = ""; + let chunkStart = this.state.pos; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(this.state.start, "Unterminated JSX contents"); + } + + const ch = this.input.charCodeAt(this.state.pos); + + switch (ch) { + case 60: + case 123: + if (this.state.pos === this.state.start) { + if (ch === 60 && this.state.exprAllowed) { + ++this.state.pos; + return this.finishToken(types.jsxTagStart); + } + + return super.getTokenFromCode(ch); + } + + out += this.input.slice(chunkStart, this.state.pos); + return this.finishToken(types.jsxText, out); + + case 38: + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + break; + + default: + if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(true); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + + } + } + } + + jsxReadNewLine(normalizeCRLF) { + const ch = this.input.charCodeAt(this.state.pos); + let out; + ++this.state.pos; + + if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + out = normalizeCRLF ? "\n" : "\r\n"; + } else { + out = String.fromCharCode(ch); + } + + ++this.state.curLine; + this.state.lineStart = this.state.pos; + return out; + } + + jsxReadString(quote) { + let out = ""; + let chunkStart = ++this.state.pos; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(this.state.start, "Unterminated string constant"); + } + + const ch = this.input.charCodeAt(this.state.pos); + if (ch === quote) break; + + if (ch === 38) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadEntity(); + chunkStart = this.state.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.jsxReadNewLine(false); + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + + out += this.input.slice(chunkStart, this.state.pos++); + return this.finishToken(types.string, out); + } + + jsxReadEntity() { + let str = ""; + let count = 0; + let entity; + let ch = this.input[this.state.pos]; + const startPos = ++this.state.pos; + + while (this.state.pos < this.length && count++ < 10) { + ch = this.input[this.state.pos++]; + + if (ch === ";") { + if (str[0] === "#") { + if (str[1] === "x") { + str = str.substr(2); + + if (HEX_NUMBER.test(str)) { + entity = String.fromCodePoint(parseInt(str, 16)); + } + } else { + str = str.substr(1); + + if (DECIMAL_NUMBER.test(str)) { + entity = String.fromCodePoint(parseInt(str, 10)); + } + } + } else { + entity = entities[str]; + } + + break; + } + + str += ch; + } + + if (!entity) { + this.state.pos = startPos; + return "&"; + } + + return entity; + } + + jsxReadWord() { + let ch; + const start = this.state.pos; + + do { + ch = this.input.charCodeAt(++this.state.pos); + } while (isIdentifierChar(ch) || ch === 45); + + return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos)); + } + + jsxParseIdentifier() { + const node = this.startNode(); + + if (this.match(types.jsxName)) { + node.name = this.state.value; + } else if (this.state.type.keyword) { + node.name = this.state.type.keyword; + } else { + this.unexpected(); + } + + this.next(); + return this.finishNode(node, "JSXIdentifier"); + } + + jsxParseNamespacedName() { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const name = this.jsxParseIdentifier(); + if (!this.eat(types.colon)) return name; + const node = this.startNodeAt(startPos, startLoc); + node.namespace = name; + node.name = this.jsxParseIdentifier(); + return this.finishNode(node, "JSXNamespacedName"); + } + + jsxParseElementName() { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + let node = this.jsxParseNamespacedName(); + + while (this.eat(types.dot)) { + const newNode = this.startNodeAt(startPos, startLoc); + newNode.object = node; + newNode.property = this.jsxParseIdentifier(); + node = this.finishNode(newNode, "JSXMemberExpression"); + } + + return node; + } + + jsxParseAttributeValue() { + let node; + + switch (this.state.type) { + case types.braceL: + node = this.jsxParseExpressionContainer(); + + if (node.expression.type === "JSXEmptyExpression") { + throw this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); + } else { + return node; + } + + case types.jsxTagStart: + case types.string: + return this.parseExprAtom(); + + default: + throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text"); + } + } + + jsxParseEmptyExpression() { + const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); + return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc); + } + + jsxParseSpreadChild() { + const node = this.startNode(); + this.expect(types.braceL); + this.expect(types.ellipsis); + node.expression = this.parseExpression(); + this.expect(types.braceR); + return this.finishNode(node, "JSXSpreadChild"); + } + + jsxParseExpressionContainer() { + const node = this.startNode(); + this.next(); + + if (this.match(types.braceR)) { + node.expression = this.jsxParseEmptyExpression(); + } else { + node.expression = this.parseExpression(); + } + + this.expect(types.braceR); + return this.finishNode(node, "JSXExpressionContainer"); + } + + jsxParseAttribute() { + const node = this.startNode(); + + if (this.eat(types.braceL)) { + this.expect(types.ellipsis); + node.argument = this.parseMaybeAssign(); + this.expect(types.braceR); + return this.finishNode(node, "JSXSpreadAttribute"); + } + + node.name = this.jsxParseNamespacedName(); + node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null; + return this.finishNode(node, "JSXAttribute"); + } + + jsxParseOpeningElementAt(startPos, startLoc) { + const node = this.startNodeAt(startPos, startLoc); + + if (this.match(types.jsxTagEnd)) { + this.expect(types.jsxTagEnd); + return this.finishNode(node, "JSXOpeningFragment"); + } + + node.name = this.jsxParseElementName(); + return this.jsxParseOpeningElementAfterName(node); + } + + jsxParseOpeningElementAfterName(node) { + const attributes = []; + + while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) { + attributes.push(this.jsxParseAttribute()); + } + + node.attributes = attributes; + node.selfClosing = this.eat(types.slash); + this.expect(types.jsxTagEnd); + return this.finishNode(node, "JSXOpeningElement"); + } + + jsxParseClosingElementAt(startPos, startLoc) { + const node = this.startNodeAt(startPos, startLoc); + + if (this.match(types.jsxTagEnd)) { + this.expect(types.jsxTagEnd); + return this.finishNode(node, "JSXClosingFragment"); + } + + node.name = this.jsxParseElementName(); + this.expect(types.jsxTagEnd); + return this.finishNode(node, "JSXClosingElement"); + } + + jsxParseElementAt(startPos, startLoc) { + const node = this.startNodeAt(startPos, startLoc); + const children = []; + const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); + let closingElement = null; + + if (!openingElement.selfClosing) { + contents: for (;;) { + switch (this.state.type) { + case types.jsxTagStart: + startPos = this.state.start; + startLoc = this.state.startLoc; + this.next(); + + if (this.eat(types.slash)) { + closingElement = this.jsxParseClosingElementAt(startPos, startLoc); + break contents; + } + + children.push(this.jsxParseElementAt(startPos, startLoc)); + break; + + case types.jsxText: + children.push(this.parseExprAtom()); + break; + + case types.braceL: + if (this.lookahead().type === types.ellipsis) { + children.push(this.jsxParseSpreadChild()); + } else { + children.push(this.jsxParseExpressionContainer()); + } + + break; + + default: + throw this.unexpected(); + } + } + + if (isFragment(openingElement) && !isFragment(closingElement)) { + this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>"); + } else if (!isFragment(openingElement) && isFragment(closingElement)) { + this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); + } else if (!isFragment(openingElement) && !isFragment(closingElement)) { + if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { + this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); + } + } + } + + if (isFragment(openingElement)) { + node.openingFragment = openingElement; + node.closingFragment = closingElement; + } else { + node.openingElement = openingElement; + node.closingElement = closingElement; + } + + node.children = children; + + if (this.match(types.relational) && this.state.value === "<") { + this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...?"); + } + + return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); + } + + jsxParseElement() { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + this.next(); + return this.jsxParseElementAt(startPos, startLoc); + } + + parseExprAtom(refShortHandDefaultPos) { + if (this.match(types.jsxText)) { + return this.parseLiteral(this.state.value, "JSXText"); + } else if (this.match(types.jsxTagStart)) { + return this.jsxParseElement(); + } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) { + this.finishToken(types.jsxTagStart); + return this.jsxParseElement(); + } else { + return super.parseExprAtom(refShortHandDefaultPos); + } + } + + getTokenFromCode(code) { + if (this.state.inPropertyName) return super.getTokenFromCode(code); + const context = this.curContext(); + + if (context === types$1.j_expr) { + return this.jsxReadToken(); + } + + if (context === types$1.j_oTag || context === types$1.j_cTag) { + if (isIdentifierStart(code)) { + return this.jsxReadWord(); + } + + if (code === 62) { + ++this.state.pos; + return this.finishToken(types.jsxTagEnd); + } + + if ((code === 34 || code === 39) && context === types$1.j_oTag) { + return this.jsxReadString(code); + } + } + + if (code === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) { + ++this.state.pos; + return this.finishToken(types.jsxTagStart); + } + + return super.getTokenFromCode(code); + } + + updateContext(prevType) { + if (this.match(types.braceL)) { + const curContext = this.curContext(); + + if (curContext === types$1.j_oTag) { + this.state.context.push(types$1.braceExpression); + } else if (curContext === types$1.j_expr) { + this.state.context.push(types$1.templateQuasi); + } else { + super.updateContext(prevType); + } + + this.state.exprAllowed = true; + } else if (this.match(types.slash) && prevType === types.jsxTagStart) { + this.state.context.length -= 2; + this.state.context.push(types$1.j_cTag); + this.state.exprAllowed = false; + } else { + return super.updateContext(prevType); + } + } + +}); + +const defaultOptions = { + sourceType: "script", + sourceFilename: undefined, + startLine: 1, + allowAwaitOutsideFunction: false, + allowReturnOutsideFunction: false, + allowImportExportEverywhere: false, + allowSuperOutsideMethod: false, + plugins: [], + strictMode: null, + ranges: false, + tokens: false, + createParenthesizedExpressions: false +}; +function getOptions(opts) { + const options = {}; + + for (let _i = 0, _Object$keys = Object.keys(defaultOptions); _i < _Object$keys.length; _i++) { + const key = _Object$keys[_i]; + options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; + } + + return options; +} + +class Position { + constructor(line, col) { + this.line = line; + this.column = col; + } + +} +class SourceLocation { + constructor(start, end) { + this.start = start; + this.end = end; + } + +} +function getLineInfo(input, offset) { + let line = 1; + let lineStart = 0; + let match; + lineBreakG.lastIndex = 0; + + while ((match = lineBreakG.exec(input)) && match.index < offset) { + line++; + lineStart = lineBreakG.lastIndex; + } + + return new Position(line, offset - lineStart); +} + +class BaseParser { + constructor() { + this.sawUnambiguousESM = false; + } + + hasPlugin(name) { + return this.plugins.has(name); + } + + getPluginOption(plugin, name) { + if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name]; + } + +} + +function last(stack) { + return stack[stack.length - 1]; +} + +class CommentsParser extends BaseParser { + addComment(comment) { + if (this.filename) comment.loc.filename = this.filename; + this.state.trailingComments.push(comment); + this.state.leadingComments.push(comment); + } + + processComment(node) { + if (node.type === "Program" && node.body.length > 0) return; + const stack = this.state.commentStack; + let firstChild, lastChild, trailingComments, i, j; + + if (this.state.trailingComments.length > 0) { + if (this.state.trailingComments[0].start >= node.end) { + trailingComments = this.state.trailingComments; + this.state.trailingComments = []; + } else { + this.state.trailingComments.length = 0; + } + } else if (stack.length > 0) { + const lastInStack = last(stack); + + if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) { + trailingComments = lastInStack.trailingComments; + delete lastInStack.trailingComments; + } + } + + if (stack.length > 0 && last(stack).start >= node.start) { + firstChild = stack.pop(); + } + + while (stack.length > 0 && last(stack).start >= node.start) { + lastChild = stack.pop(); + } + + if (!lastChild && firstChild) lastChild = firstChild; + + if (firstChild && this.state.leadingComments.length > 0) { + const lastComment = last(this.state.leadingComments); + + if (firstChild.type === "ObjectProperty") { + if (lastComment.start >= node.start) { + if (this.state.commentPreviousNode) { + for (j = 0; j < this.state.leadingComments.length; j++) { + if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { + this.state.leadingComments.splice(j, 1); + j--; + } + } + + if (this.state.leadingComments.length > 0) { + firstChild.trailingComments = this.state.leadingComments; + this.state.leadingComments = []; + } + } + } + } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) { + const lastArg = last(node.arguments); + + if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) { + if (this.state.commentPreviousNode) { + for (j = 0; j < this.state.leadingComments.length; j++) { + if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { + this.state.leadingComments.splice(j, 1); + j--; + } + } + + if (this.state.leadingComments.length > 0) { + lastArg.trailingComments = this.state.leadingComments; + this.state.leadingComments = []; + } + } + } + } + } + + if (lastChild) { + if (lastChild.leadingComments) { + if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) { + node.leadingComments = lastChild.leadingComments; + delete lastChild.leadingComments; + } else { + for (i = lastChild.leadingComments.length - 2; i >= 0; --i) { + if (lastChild.leadingComments[i].end <= node.start) { + node.leadingComments = lastChild.leadingComments.splice(0, i + 1); + break; + } + } + } + } + } else if (this.state.leadingComments.length > 0) { + if (last(this.state.leadingComments).end <= node.start) { + if (this.state.commentPreviousNode) { + for (j = 0; j < this.state.leadingComments.length; j++) { + if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { + this.state.leadingComments.splice(j, 1); + j--; + } + } + } + + if (this.state.leadingComments.length > 0) { + node.leadingComments = this.state.leadingComments; + this.state.leadingComments = []; + } + } else { + for (i = 0; i < this.state.leadingComments.length; i++) { + if (this.state.leadingComments[i].end > node.start) { + break; + } + } + + const leadingComments = this.state.leadingComments.slice(0, i); + + if (leadingComments.length) { + node.leadingComments = leadingComments; + } + + trailingComments = this.state.leadingComments.slice(i); + + if (trailingComments.length === 0) { + trailingComments = null; + } + } + } + + this.state.commentPreviousNode = node; + + if (trailingComments) { + if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) { + node.innerComments = trailingComments; + } else { + node.trailingComments = trailingComments; + } + } + + stack.push(node); + } + +} + +class LocationParser extends CommentsParser { + raise(pos, message, { + missingPluginNames, + code + } = {}) { + const loc = getLineInfo(this.input, pos); + message += ` (${loc.line}:${loc.column})`; + const err = new SyntaxError(message); + err.pos = pos; + err.loc = loc; + + if (missingPluginNames) { + err.missingPlugin = missingPluginNames; + } + + if (code !== undefined) { + err.code = code; + } + + throw err; + } + +} + +class State { + constructor() { + this.potentialArrowAt = -1; + this.noArrowAt = []; + this.noArrowParamsConversionAt = []; + this.commaAfterSpreadAt = -1; + this.inParameters = false; + this.maybeInArrowParameters = false; + this.inPipeline = false; + this.inType = false; + this.noAnonFunctionType = false; + this.inPropertyName = false; + this.inClassProperty = false; + this.hasFlowComment = false; + this.isIterator = false; + this.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + this.classLevel = 0; + this.labels = []; + this.decoratorStack = [[]]; + this.yieldPos = 0; + this.awaitPos = 0; + this.tokens = []; + this.comments = []; + this.trailingComments = []; + this.leadingComments = []; + this.commentStack = []; + this.commentPreviousNode = null; + this.pos = 0; + this.lineStart = 0; + this.type = types.eof; + this.value = null; + this.start = 0; + this.end = 0; + this.lastTokEndLoc = null; + this.lastTokStartLoc = null; + this.lastTokStart = 0; + this.lastTokEnd = 0; + this.context = [types$1.braceStatement]; + this.exprAllowed = true; + this.containsEsc = false; + this.containsOctal = false; + this.octalPosition = null; + this.exportedIdentifiers = []; + this.invalidTemplateEscapePosition = null; + } + + init(options) { + this.strict = options.strictMode === false ? false : options.sourceType === "module"; + this.curLine = options.startLine; + this.startLoc = this.endLoc = this.curPosition(); + } + + curPosition() { + return new Position(this.curLine, this.pos - this.lineStart); + } + + clone(skipArrays) { + const state = new State(); + const keys = Object.keys(this); + + for (let i = 0, length = keys.length; i < length; i++) { + const key = keys[i]; + let val = this[key]; + + if ((!skipArrays || key === "context") && Array.isArray(val)) { + val = val.slice(); + } + + state[key] = val; + } + + return state; + } + +} + +var _isDigit = function isDigit(code) { + return code >= 48 && code <= 57; +}; +const VALID_REGEX_FLAGS = new Set(["g", "m", "s", "i", "y", "u"]); +const forbiddenNumericSeparatorSiblings = { + decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], + hex: [46, 88, 95, 120] +}; +const allowedNumericSeparatorSiblings = {}; +allowedNumericSeparatorSiblings.bin = [48, 49]; +allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55]; +allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57]; +allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]; +class Token { + constructor(state) { + this.type = state.type; + this.value = state.value; + this.start = state.start; + this.end = state.end; + this.loc = new SourceLocation(state.startLoc, state.endLoc); + } + +} +class Tokenizer extends LocationParser { + constructor(options, input) { + super(); + this.state = new State(); + this.state.init(options); + this.input = input; + this.length = input.length; + this.isLookahead = false; + } + + next() { + if (this.options.tokens && !this.isLookahead) { + this.state.tokens.push(new Token(this.state)); + } + + this.state.lastTokEnd = this.state.end; + this.state.lastTokStart = this.state.start; + this.state.lastTokEndLoc = this.state.endLoc; + this.state.lastTokStartLoc = this.state.startLoc; + this.nextToken(); + } + + eat(type) { + if (this.match(type)) { + this.next(); + return true; + } else { + return false; + } + } + + match(type) { + return this.state.type === type; + } + + lookahead() { + const old = this.state; + this.state = old.clone(true); + this.isLookahead = true; + this.next(); + this.isLookahead = false; + const curr = this.state; + this.state = old; + return curr; + } + + setStrict(strict) { + this.state.strict = strict; + if (!this.match(types.num) && !this.match(types.string)) return; + this.state.pos = this.state.start; + + while (this.state.pos < this.state.lineStart) { + this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; + --this.state.curLine; + } + + this.nextToken(); + } + + curContext() { + return this.state.context[this.state.context.length - 1]; + } + + nextToken() { + const curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) this.skipSpace(); + this.state.containsOctal = false; + this.state.octalPosition = null; + this.state.start = this.state.pos; + this.state.startLoc = this.state.curPosition(); + + if (this.state.pos >= this.length) { + this.finishToken(types.eof); + return; + } + + if (curContext.override) { + curContext.override(this); + } else { + this.getTokenFromCode(this.input.codePointAt(this.state.pos)); + } + } + + pushComment(block, text, start, end, startLoc, endLoc) { + const comment = { + type: block ? "CommentBlock" : "CommentLine", + value: text, + start: start, + end: end, + loc: new SourceLocation(startLoc, endLoc) + }; + + if (!this.isLookahead) { + if (this.options.tokens) this.state.tokens.push(comment); + this.state.comments.push(comment); + this.addComment(comment); + } + } + + skipBlockComment() { + const startLoc = this.state.curPosition(); + const start = this.state.pos; + const end = this.input.indexOf("*/", this.state.pos += 2); + if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); + this.state.pos = end + 2; + lineBreakG.lastIndex = start; + let match; + + while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { + ++this.state.curLine; + this.state.lineStart = match.index + match[0].length; + } + + this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); + } + + skipLineComment(startSkip) { + const start = this.state.pos; + const startLoc = this.state.curPosition(); + let ch = this.input.charCodeAt(this.state.pos += startSkip); + + if (this.state.pos < this.length) { + while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + } + + this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); + } + + skipSpace() { + loop: while (this.state.pos < this.length) { + const ch = this.input.charCodeAt(this.state.pos); + + switch (ch) { + case 32: + case 160: + case 9: + ++this.state.pos; + break; + + case 13: + if (this.input.charCodeAt(this.state.pos + 1) === 10) { + ++this.state.pos; + } + + case 10: + case 8232: + case 8233: + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + break; + + case 47: + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: + this.skipBlockComment(); + break; + + case 47: + this.skipLineComment(2); + break; + + default: + break loop; + } + + break; + + default: + if (isWhitespace(ch)) { + ++this.state.pos; + } else { + break loop; + } + + } + } + } + + finishToken(type, val) { + this.state.end = this.state.pos; + this.state.endLoc = this.state.curPosition(); + const prevType = this.state.type; + this.state.type = type; + this.state.value = val; + this.updateContext(prevType); + } + + readToken_numberSign() { + if (this.state.pos === 0 && this.readToken_interpreter()) { + return; + } + + const nextPos = this.state.pos + 1; + const next = this.input.charCodeAt(nextPos); + + if (next >= 48 && next <= 57) { + this.raise(this.state.pos, "Unexpected digit after hash token"); + } + + if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) { + ++this.state.pos; + this.finishToken(types.hash); + return; + } else if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { + this.finishOp(types.hash, 1); + } else { + this.raise(this.state.pos, "Unexpected character '#'"); + } + } + + readToken_dot() { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (next >= 48 && next <= 57) { + this.readNumber(true); + return; + } + + const next2 = this.input.charCodeAt(this.state.pos + 2); + + if (next === 46 && next2 === 46) { + this.state.pos += 3; + this.finishToken(types.ellipsis); + } else { + ++this.state.pos; + this.finishToken(types.dot); + } + } + + readToken_slash() { + if (this.state.exprAllowed && !this.state.inType) { + ++this.state.pos; + this.readRegexp(); + return; + } + + const next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 61) { + this.finishOp(types.assign, 2); + } else { + this.finishOp(types.slash, 1); + } + } + + readToken_interpreter() { + if (this.state.pos !== 0 || this.length < 2) return false; + const start = this.state.pos; + this.state.pos += 1; + let ch = this.input.charCodeAt(this.state.pos); + if (ch !== 33) return false; + + while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) { + ch = this.input.charCodeAt(this.state.pos); + } + + const value = this.input.slice(start + 2, this.state.pos); + this.finishToken(types.interpreterDirective, value); + return true; + } + + readToken_mult_modulo(code) { + let type = code === 42 ? types.star : types.modulo; + let width = 1; + let next = this.input.charCodeAt(this.state.pos + 1); + const exprAllowed = this.state.exprAllowed; + + if (code === 42 && next === 42) { + width++; + next = this.input.charCodeAt(this.state.pos + 2); + type = types.exponent; + } + + if (next === 61 && !exprAllowed) { + width++; + type = types.assign; + } + + this.finishOp(type, width); + } + + readToken_pipe_amp(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (next === code) { + if (this.input.charCodeAt(this.state.pos + 2) === 61) { + this.finishOp(types.assign, 3); + } else { + this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); + } + + return; + } + + if (code === 124) { + if (next === 62) { + this.finishOp(types.pipeline, 2); + return; + } + } + + if (next === 61) { + this.finishOp(types.assign, 2); + return; + } + + this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); + } + + readToken_caret() { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 61) { + this.finishOp(types.assign, 2); + } else { + this.finishOp(types.bitwiseXOR, 1); + } + } + + readToken_plus_min(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) { + this.skipLineComment(3); + this.skipSpace(); + this.nextToken(); + return; + } + + this.finishOp(types.incDec, 2); + return; + } + + if (next === 61) { + this.finishOp(types.assign, 2); + } else { + this.finishOp(types.plusMin, 1); + } + } + + readToken_lt_gt(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + let size = 1; + + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; + + if (this.input.charCodeAt(this.state.pos + size) === 61) { + this.finishOp(types.assign, size + 1); + return; + } + + this.finishOp(types.bitShift, size); + return; + } + + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { + this.skipLineComment(4); + this.skipSpace(); + this.nextToken(); + return; + } + + if (next === 61) { + size = 2; + } + + this.finishOp(types.relational, size); + } + + readToken_eq_excl(code) { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 61) { + this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); + return; + } + + if (code === 61 && next === 62) { + this.state.pos += 2; + this.finishToken(types.arrow); + return; + } + + this.finishOp(code === 61 ? types.eq : types.bang, 1); + } + + readToken_question() { + const next = this.input.charCodeAt(this.state.pos + 1); + const next2 = this.input.charCodeAt(this.state.pos + 2); + + if (next === 63 && !this.state.inType) { + if (next2 === 61) { + this.finishOp(types.assign, 3); + } else { + this.finishOp(types.nullishCoalescing, 2); + } + } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { + this.state.pos += 2; + this.finishToken(types.questionDot); + } else { + ++this.state.pos; + this.finishToken(types.question); + } + } + + getTokenFromCode(code) { + switch (code) { + case 46: + this.readToken_dot(); + return; + + case 40: + ++this.state.pos; + this.finishToken(types.parenL); + return; + + case 41: + ++this.state.pos; + this.finishToken(types.parenR); + return; + + case 59: + ++this.state.pos; + this.finishToken(types.semi); + return; + + case 44: + ++this.state.pos; + this.finishToken(types.comma); + return; + + case 91: + ++this.state.pos; + this.finishToken(types.bracketL); + return; + + case 93: + ++this.state.pos; + this.finishToken(types.bracketR); + return; + + case 123: + ++this.state.pos; + this.finishToken(types.braceL); + return; + + case 125: + ++this.state.pos; + this.finishToken(types.braceR); + return; + + case 58: + if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { + this.finishOp(types.doubleColon, 2); + } else { + ++this.state.pos; + this.finishToken(types.colon); + } + + return; + + case 63: + this.readToken_question(); + return; + + case 96: + ++this.state.pos; + this.finishToken(types.backQuote); + return; + + case 48: + { + const next = this.input.charCodeAt(this.state.pos + 1); + + if (next === 120 || next === 88) { + this.readRadixNumber(16); + return; + } + + if (next === 111 || next === 79) { + this.readRadixNumber(8); + return; + } + + if (next === 98 || next === 66) { + this.readRadixNumber(2); + return; + } + } + + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + this.readNumber(false); + return; + + case 34: + case 39: + this.readString(code); + return; + + case 47: + this.readToken_slash(); + return; + + case 37: + case 42: + this.readToken_mult_modulo(code); + return; + + case 124: + case 38: + this.readToken_pipe_amp(code); + return; + + case 94: + this.readToken_caret(); + return; + + case 43: + case 45: + this.readToken_plus_min(code); + return; + + case 60: + case 62: + this.readToken_lt_gt(code); + return; + + case 61: + case 33: + this.readToken_eq_excl(code); + return; + + case 126: + this.finishOp(types.tilde, 1); + return; + + case 64: + ++this.state.pos; + this.finishToken(types.at); + return; + + case 35: + this.readToken_numberSign(); + return; + + case 92: + this.readWord(); + return; + + default: + if (isIdentifierStart(code)) { + this.readWord(); + return; + } + + } + + this.raise(this.state.pos, `Unexpected character '${String.fromCodePoint(code)}'`); + } + + finishOp(type, size) { + const str = this.input.slice(this.state.pos, this.state.pos + size); + this.state.pos += size; + this.finishToken(type, str); + } + + readRegexp() { + const start = this.state.pos; + let escaped, inClass; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(start, "Unterminated regular expression"); + } + + const ch = this.input.charAt(this.state.pos); + + if (lineBreak.test(ch)) { + this.raise(start, "Unterminated regular expression"); + } + + if (escaped) { + escaped = false; + } else { + if (ch === "[") { + inClass = true; + } else if (ch === "]" && inClass) { + inClass = false; + } else if (ch === "/" && !inClass) { + break; + } + + escaped = ch === "\\"; + } + + ++this.state.pos; + } + + const content = this.input.slice(start, this.state.pos); + ++this.state.pos; + let mods = ""; + + while (this.state.pos < this.length) { + const char = this.input[this.state.pos]; + const charCode = this.input.codePointAt(this.state.pos); + + if (VALID_REGEX_FLAGS.has(char)) { + if (mods.indexOf(char) > -1) { + this.raise(this.state.pos + 1, "Duplicate regular expression flag"); + } + + ++this.state.pos; + mods += char; + } else if (isIdentifierChar(charCode) || charCode === 92) { + this.raise(this.state.pos + 1, "Invalid regular expression flag"); + } else { + break; + } + } + + this.finishToken(types.regexp, { + pattern: content, + flags: mods + }); + } + + readInt(radix, len) { + const start = this.state.pos; + const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; + const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; + let total = 0; + + for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { + const code = this.input.charCodeAt(this.state.pos); + let val; + + if (this.hasPlugin("numericSeparator")) { + const prev = this.input.charCodeAt(this.state.pos - 1); + const next = this.input.charCodeAt(this.state.pos + 1); + + if (code === 95) { + if (allowedSiblings.indexOf(next) === -1) { + this.raise(this.state.pos, "Invalid or unexpected token"); + } + + if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { + this.raise(this.state.pos, "Invalid or unexpected token"); + } + + ++this.state.pos; + continue; + } + } + + if (code >= 97) { + val = code - 97 + 10; + } else if (code >= 65) { + val = code - 65 + 10; + } else if (_isDigit(code)) { + val = code - 48; + } else { + val = Infinity; + } + + if (val >= radix) break; + ++this.state.pos; + total = total * radix + val; + } + + if (this.state.pos === start || len != null && this.state.pos - start !== len) { + return null; + } + + return total; + } + + readRadixNumber(radix) { + const start = this.state.pos; + let isBigInt = false; + this.state.pos += 2; + const val = this.readInt(radix); + + if (val == null) { + this.raise(this.state.start + 2, "Expected number in radix " + radix); + } + + if (this.hasPlugin("bigInt")) { + if (this.input.charCodeAt(this.state.pos) === 110) { + ++this.state.pos; + isBigInt = true; + } + } + + if (isIdentifierStart(this.input.codePointAt(this.state.pos))) { + this.raise(this.state.pos, "Identifier directly after number"); + } + + if (isBigInt) { + const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); + this.finishToken(types.bigint, str); + return; + } + + this.finishToken(types.num, val); + } + + readNumber(startsWithDot) { + const start = this.state.pos; + let isFloat = false; + let isBigInt = false; + + if (!startsWithDot && this.readInt(10) === null) { + this.raise(start, "Invalid number"); + } + + let octal = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; + + if (octal) { + if (this.state.strict) { + this.raise(start, "Legacy octal literals are not allowed in strict mode"); + } + + if (/[89]/.test(this.input.slice(start, this.state.pos))) { + octal = false; + } + } + + let next = this.input.charCodeAt(this.state.pos); + + if (next === 46 && !octal) { + ++this.state.pos; + this.readInt(10); + isFloat = true; + next = this.input.charCodeAt(this.state.pos); + } + + if ((next === 69 || next === 101) && !octal) { + next = this.input.charCodeAt(++this.state.pos); + + if (next === 43 || next === 45) { + ++this.state.pos; + } + + if (this.readInt(10) === null) this.raise(start, "Invalid number"); + isFloat = true; + next = this.input.charCodeAt(this.state.pos); + } + + if (this.hasPlugin("bigInt")) { + if (next === 110) { + if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral"); + ++this.state.pos; + isBigInt = true; + } + } + + if (isIdentifierStart(this.input.codePointAt(this.state.pos))) { + this.raise(this.state.pos, "Identifier directly after number"); + } + + const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); + + if (isBigInt) { + this.finishToken(types.bigint, str); + return; + } + + const val = octal ? parseInt(str, 8) : parseFloat(str); + this.finishToken(types.num, val); + } + + readCodePoint(throwOnInvalid) { + const ch = this.input.charCodeAt(this.state.pos); + let code; + + if (ch === 123) { + const codePos = ++this.state.pos; + code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid); + ++this.state.pos; + + if (code === null) { + --this.state.invalidTemplateEscapePosition; + } else if (code > 0x10ffff) { + if (throwOnInvalid) { + this.raise(codePos, "Code point out of bounds"); + } else { + this.state.invalidTemplateEscapePosition = codePos - 2; + return null; + } + } + } else { + code = this.readHexChar(4, throwOnInvalid); + } + + return code; + } + + readString(quote) { + let out = "", + chunkStart = ++this.state.pos; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(this.state.start, "Unterminated string constant"); + } + + const ch = this.input.charCodeAt(this.state.pos); + if (ch === quote) break; + + if (ch === 92) { + out += this.input.slice(chunkStart, this.state.pos); + out += this.readEscapedChar(false); + chunkStart = this.state.pos; + } else if (ch === 8232 || ch === 8233) { + ++this.state.pos; + ++this.state.curLine; + } else if (isNewLine(ch)) { + this.raise(this.state.start, "Unterminated string constant"); + } else { + ++this.state.pos; + } + } + + out += this.input.slice(chunkStart, this.state.pos++); + this.finishToken(types.string, out); + } + + readTmplToken() { + let out = "", + chunkStart = this.state.pos, + containsInvalid = false; + + for (;;) { + if (this.state.pos >= this.length) { + this.raise(this.state.start, "Unterminated template"); + } + + const ch = this.input.charCodeAt(this.state.pos); + + if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { + if (this.state.pos === this.state.start && this.match(types.template)) { + if (ch === 36) { + this.state.pos += 2; + this.finishToken(types.dollarBraceL); + return; + } else { + ++this.state.pos; + this.finishToken(types.backQuote); + return; + } + } + + out += this.input.slice(chunkStart, this.state.pos); + this.finishToken(types.template, containsInvalid ? null : out); + return; + } + + if (ch === 92) { + out += this.input.slice(chunkStart, this.state.pos); + const escaped = this.readEscapedChar(true); + + if (escaped === null) { + containsInvalid = true; + } else { + out += escaped; + } + + chunkStart = this.state.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.state.pos); + ++this.state.pos; + + switch (ch) { + case 13: + if (this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + } + + case 10: + out += "\n"; + break; + + default: + out += String.fromCharCode(ch); + break; + } + + ++this.state.curLine; + this.state.lineStart = this.state.pos; + chunkStart = this.state.pos; + } else { + ++this.state.pos; + } + } + } + + readEscapedChar(inTemplate) { + const throwOnInvalid = !inTemplate; + const ch = this.input.charCodeAt(++this.state.pos); + ++this.state.pos; + + switch (ch) { + case 110: + return "\n"; + + case 114: + return "\r"; + + case 120: + { + const code = this.readHexChar(2, throwOnInvalid); + return code === null ? null : String.fromCharCode(code); + } + + case 117: + { + const code = this.readCodePoint(throwOnInvalid); + return code === null ? null : String.fromCodePoint(code); + } + + case 116: + return "\t"; + + case 98: + return "\b"; + + case 118: + return "\u000b"; + + case 102: + return "\f"; + + case 13: + if (this.input.charCodeAt(this.state.pos) === 10) { + ++this.state.pos; + } + + case 10: + this.state.lineStart = this.state.pos; + ++this.state.curLine; + + case 8232: + case 8233: + return ""; + + default: + if (ch >= 48 && ch <= 55) { + const codePos = this.state.pos - 1; + let octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; + let octal = parseInt(octalStr, 8); + + if (octal > 255) { + octalStr = octalStr.slice(0, -1); + octal = parseInt(octalStr, 8); + } + + if (octal > 0) { + if (inTemplate) { + this.state.invalidTemplateEscapePosition = codePos; + return null; + } else if (this.state.strict) { + this.raise(codePos, "Octal literal in strict mode"); + } else if (!this.state.containsOctal) { + this.state.containsOctal = true; + this.state.octalPosition = codePos; + } + } + + this.state.pos += octalStr.length - 1; + return String.fromCharCode(octal); + } + + return String.fromCharCode(ch); + } + } + + readHexChar(len, throwOnInvalid) { + const codePos = this.state.pos; + const n = this.readInt(16, len); + + if (n === null) { + if (throwOnInvalid) { + this.raise(codePos, "Bad character escape sequence"); + } else { + this.state.pos = codePos - 1; + this.state.invalidTemplateEscapePosition = codePos - 1; + } + } + + return n; + } + + readWord1() { + let word = ""; + this.state.containsEsc = false; + const start = this.state.pos; + let chunkStart = this.state.pos; + + while (this.state.pos < this.length) { + const ch = this.input.codePointAt(this.state.pos); + + if (isIdentifierChar(ch)) { + this.state.pos += ch <= 0xffff ? 1 : 2; + } else if (this.state.isIterator && ch === 64) { + ++this.state.pos; + } else if (ch === 92) { + this.state.containsEsc = true; + word += this.input.slice(chunkStart, this.state.pos); + const escStart = this.state.pos; + const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; + + if (this.input.charCodeAt(++this.state.pos) !== 117) { + this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX"); + } + + ++this.state.pos; + const esc = this.readCodePoint(true); + + if (!identifierCheck(esc, true)) { + this.raise(escStart, "Invalid Unicode escape"); + } + + word += String.fromCodePoint(esc); + chunkStart = this.state.pos; + } else { + break; + } + } + + return word + this.input.slice(chunkStart, this.state.pos); + } + + isIterator(word) { + return word === "@@iterator" || word === "@@asyncIterator"; + } + + readWord() { + const word = this.readWord1(); + const type = keywords.get(word) || types.name; + + if (type.keyword && this.state.containsEsc) { + this.raise(this.state.pos, `Escape sequence in keyword ${word}`); + } + + if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) { + this.raise(this.state.pos, `Invalid identifier ${word}`); + } + + this.finishToken(type, word); + } + + braceIsBlock(prevType) { + const parent = this.curContext(); + + if (parent === types$1.functionExpression || parent === types$1.functionStatement) { + return true; + } + + if (prevType === types.colon && (parent === types$1.braceStatement || parent === types$1.braceExpression)) { + return !parent.isExpr; + } + + if (prevType === types._return || prevType === types.name && this.state.exprAllowed) { + return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); + } + + if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) { + return true; + } + + if (prevType === types.braceL) { + return parent === types$1.braceStatement; + } + + if (prevType === types._var || prevType === types._const || prevType === types.name) { + return false; + } + + if (prevType === types.relational) { + return true; + } + + return !this.state.exprAllowed; + } + + updateContext(prevType) { + const type = this.state.type; + let update; + + if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) { + this.state.exprAllowed = false; + } else if (update = type.updateContext) { + update.call(this, prevType); + } else { + this.state.exprAllowed = type.beforeExpr; + } + } + +} + +const literal = /^('|")((?:\\?.)*?)\1/; +class UtilParser extends Tokenizer { + addExtra(node, key, val) { + if (!node) return; + const extra = node.extra = node.extra || {}; + extra[key] = val; + } + + isRelational(op) { + return this.match(types.relational) && this.state.value === op; + } + + isLookaheadRelational(op) { + const l = this.lookahead(); + return l.type === types.relational && l.value === op; + } + + expectRelational(op) { + if (this.isRelational(op)) { + this.next(); + } else { + this.unexpected(null, types.relational); + } + } + + eatRelational(op) { + if (this.isRelational(op)) { + this.next(); + return true; + } + + return false; + } + + isContextual(name) { + return this.match(types.name) && this.state.value === name && !this.state.containsEsc; + } + + isLookaheadContextual(name) { + const l = this.lookahead(); + return l.type === types.name && l.value === name; + } + + eatContextual(name) { + return this.isContextual(name) && this.eat(types.name); + } + + expectContextual(name, message) { + if (!this.eatContextual(name)) this.unexpected(null, message); + } + + canInsertSemicolon() { + return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak(); + } + + hasPrecedingLineBreak() { + return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); + } + + isLineTerminator() { + return this.eat(types.semi) || this.canInsertSemicolon(); + } + + semicolon() { + if (!this.isLineTerminator()) this.unexpected(null, types.semi); + } + + expect(type, pos) { + this.eat(type) || this.unexpected(pos, type); + } + + assertNoSpace(message = "Unexpected space.") { + if (this.state.start > this.state.lastTokEnd) { + this.raise(this.state.lastTokEnd, message); + } + } + + unexpected(pos, messageOrType = "Unexpected token") { + if (typeof messageOrType !== "string") { + messageOrType = `Unexpected token, expected "${messageOrType.label}"`; + } + + throw this.raise(pos != null ? pos : this.state.start, messageOrType); + } + + expectPlugin(name, pos) { + if (!this.hasPlugin(name)) { + throw this.raise(pos != null ? pos : this.state.start, `This experimental syntax requires enabling the parser plugin: '${name}'`, { + missingPluginNames: [name] + }); + } + + return true; + } + + expectOnePlugin(names, pos) { + if (!names.some(n => this.hasPlugin(n))) { + throw this.raise(pos != null ? pos : this.state.start, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`, { + missingPluginNames: names + }); + } + } + + checkYieldAwaitInDefaultParams() { + if (this.state.yieldPos && (!this.state.awaitPos || this.state.yieldPos < this.state.awaitPos)) { + this.raise(this.state.yieldPos, "Yield cannot be used as name inside a generator function"); + } + + if (this.state.awaitPos) { + this.raise(this.state.awaitPos, "Await cannot be used as name inside an async function"); + } + } + + strictDirective(start) { + for (;;) { + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + const match = literal.exec(this.input.slice(start)); + if (!match) break; + if (match[2] === "use strict") return true; + start += match[0].length; + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + + if (this.input[start] === ";") { + start++; + } + } + + return false; + } + +} + +class Node { + constructor(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + this.loc = new SourceLocation(loc); + if (parser && parser.options.ranges) this.range = [pos, 0]; + if (parser && parser.filename) this.loc.filename = parser.filename; + } + + __clone() { + const newNode = new Node(); + const keys = Object.keys(this); + + for (let i = 0, length = keys.length; i < length; i++) { + const key = keys[i]; + + if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { + newNode[key] = this[key]; + } + } + + return newNode; + } + +} + +class NodeUtils extends UtilParser { + startNode() { + return new Node(this, this.state.start, this.state.startLoc); + } + + startNodeAt(pos, loc) { + return new Node(this, pos, loc); + } + + startNodeAtNode(type) { + return this.startNodeAt(type.start, type.loc.start); + } + + finishNode(node, type) { + return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); + } + + finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + node.loc.end = loc; + if (this.options.ranges) node.range[1] = pos; + this.processComment(node); + return node; + } + + resetStartLocation(node, start, startLoc) { + node.start = start; + node.loc.start = startLoc; + if (this.options.ranges) node.range[0] = start; + } + + resetStartLocationFromNode(node, locationNode) { + this.resetStartLocation(node, locationNode.start, locationNode.loc.start); + } + +} + +class LValParser extends NodeUtils { + toAssignable(node, isBinding, contextDescription) { + if (node) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + break; + + case "ObjectExpression": + node.type = "ObjectPattern"; + + for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { + const prop = node.properties[i]; + const isLast = i === last; + this.toAssignableObjectExpressionProp(prop, isBinding, isLast); + } + + break; + + case "ObjectProperty": + this.toAssignable(node.value, isBinding, contextDescription); + break; + + case "SpreadElement": + { + this.checkToRestConversion(node); + node.type = "RestElement"; + const arg = node.argument; + this.toAssignable(arg, isBinding, contextDescription); + break; + } + + case "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, isBinding, contextDescription); + break; + + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern"; + delete node.operator; + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); + } + + break; + + case "ParenthesizedExpression": + node.expression = this.toAssignable(node.expression, isBinding, contextDescription); + break; + + case "MemberExpression": + if (!isBinding) break; + + default: + { + const message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); + this.raise(node.start, message); + } + } + } + + return node; + } + + toAssignableObjectExpressionProp(prop, isBinding, isLast) { + if (prop.type === "ObjectMethod") { + const error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods"; + this.raise(prop.key.start, error); + } else if (prop.type === "SpreadElement" && !isLast) { + this.raiseRestNotLast(prop.start); + } else { + this.toAssignable(prop, isBinding, "object destructuring pattern"); + } + } + + toAssignableList(exprList, isBinding, contextDescription) { + let end = exprList.length; + + if (end) { + const last = exprList[end - 1]; + + if (last && last.type === "RestElement") { + --end; + } else if (last && last.type === "SpreadElement") { + last.type = "RestElement"; + const arg = last.argument; + this.toAssignable(arg, isBinding, contextDescription); + + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") { + this.unexpected(arg.start); + } + + --end; + } + } + + for (let i = 0; i < end; i++) { + const elt = exprList[i]; + + if (elt) { + this.toAssignable(elt, isBinding, contextDescription); + + if (elt.type === "RestElement") { + this.raiseRestNotLast(elt.start); + } + } + } + + return exprList; + } + + toReferencedList(exprList, isParenthesizedExpr) { + return exprList; + } + + toReferencedListDeep(exprList, isParenthesizedExpr) { + this.toReferencedList(exprList, isParenthesizedExpr); + + for (let _i = 0; _i < exprList.length; _i++) { + const expr = exprList[_i]; + + if (expr && expr.type === "ArrayExpression") { + this.toReferencedListDeep(expr.elements); + } + } + + return exprList; + } + + parseSpread(refShorthandDefaultPos, refNeedsArrowPos) { + const node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos); + + if (this.state.commaAfterSpreadAt === -1 && this.match(types.comma)) { + this.state.commaAfterSpreadAt = this.state.start; + } + + return this.finishNode(node, "SpreadElement"); + } + + parseRestBinding() { + const node = this.startNode(); + this.next(); + node.argument = this.parseBindingAtom(); + return this.finishNode(node, "RestElement"); + } + + parseBindingAtom() { + switch (this.state.type) { + case types.name: + return this.parseIdentifier(); + + case types.bracketL: + { + const node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types.bracketR, true); + return this.finishNode(node, "ArrayPattern"); + } + + case types.braceL: + return this.parseObj(true); + + default: + throw this.unexpected(); + } + } + + parseBindingList(close, allowEmpty, allowModifiers) { + const elts = []; + let first = true; + + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + } + + if (allowEmpty && this.match(types.comma)) { + elts.push(null); + } else if (this.eat(close)) { + break; + } else if (this.match(types.ellipsis)) { + elts.push(this.parseAssignableListItemTypes(this.parseRestBinding())); + this.checkCommaAfterRest(); + this.expect(close); + break; + } else { + const decorators = []; + + if (this.match(types.at) && this.hasPlugin("decorators")) { + this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters"); + } + + while (this.match(types.at)) { + decorators.push(this.parseDecorator()); + } + + elts.push(this.parseAssignableListItem(allowModifiers, decorators)); + } + } + + return elts; + } + + parseAssignableListItem(allowModifiers, decorators) { + const left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left); + const elt = this.parseMaybeDefault(left.start, left.loc.start, left); + + if (decorators.length) { + left.decorators = decorators; + } + + return elt; + } + + parseAssignableListItemTypes(param) { + return param; + } + + parseMaybeDefault(startPos, startLoc, left) { + startLoc = startLoc || this.state.startLoc; + startPos = startPos || this.state.start; + left = left || this.parseBindingAtom(); + if (!this.eat(types.eq)) return left; + const node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern"); + } + + checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { + switch (expr.type) { + case "Identifier": + if (this.state.strict && isStrictBindReservedWord(expr.name, this.inModule)) { + this.raise(expr.start, `${bindingType === BIND_NONE ? "Assigning to" : "Binding"} '${expr.name}' in strict mode`); + } + + if (checkClashes) { + const key = `_${expr.name}`; + + if (checkClashes[key]) { + this.raise(expr.start, "Argument name clash"); + } else { + checkClashes[key] = true; + } + } + + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { + this.scope.declareName(expr.name, bindingType, expr.start); + } + + break; + + case "MemberExpression": + if (bindingType !== BIND_NONE) { + this.raise(expr.start, "Binding member expression"); + } + + break; + + case "ObjectPattern": + for (let _i2 = 0, _expr$properties = expr.properties; _i2 < _expr$properties.length; _i2++) { + let prop = _expr$properties[_i2]; + if (prop.type === "ObjectProperty") prop = prop.value; + this.checkLVal(prop, bindingType, checkClashes, "object destructuring pattern"); + } + + break; + + case "ArrayPattern": + for (let _i3 = 0, _expr$elements = expr.elements; _i3 < _expr$elements.length; _i3++) { + const elem = _expr$elements[_i3]; + + if (elem) { + this.checkLVal(elem, bindingType, checkClashes, "array destructuring pattern"); + } + } + + break; + + case "AssignmentPattern": + this.checkLVal(expr.left, bindingType, checkClashes, "assignment pattern"); + break; + + case "RestElement": + this.checkLVal(expr.argument, bindingType, checkClashes, "rest element"); + break; + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, bindingType, checkClashes, "parenthesized expression"); + break; + + default: + { + const message = (bindingType === BIND_NONE ? "Invalid" : "Binding invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); + this.raise(expr.start, message); + } + } + } + + checkToRestConversion(node) { + if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") { + this.raise(node.argument.start, "Invalid rest operator's argument"); + } + } + + checkCommaAfterRest() { + if (this.match(types.comma)) { + this.raiseRestNotLast(this.state.start); + } + } + + checkCommaAfterRestFromSpread() { + if (this.state.commaAfterSpreadAt > -1) { + this.raiseRestNotLast(this.state.commaAfterSpreadAt); + } + } + + raiseRestNotLast(pos) { + this.raise(pos, `Rest element must be last element`); + } + +} + +const unwrapParenthesizedExpression = node => { + return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; +}; + +class ExpressionParser extends LValParser { + checkPropClash(prop, propHash) { + if (prop.type === "SpreadElement" || prop.computed || prop.kind || prop.shorthand) { + return; + } + + const key = prop.key; + const name = key.type === "Identifier" ? key.name : String(key.value); + + if (name === "__proto__") { + if (propHash.proto) { + this.raise(key.start, "Redefinition of __proto__ property"); + } + + propHash.proto = true; + } + } + + getExpression() { + this.scope.enter(SCOPE_PROGRAM); + this.nextToken(); + const expr = this.parseExpression(); + + if (!this.match(types.eof)) { + this.unexpected(); + } + + expr.comments = this.state.comments; + return expr; + } + + parseExpression(noIn, refShorthandDefaultPos) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); + + if (this.match(types.comma)) { + const node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + + while (this.eat(types.comma)) { + node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); + } + + this.toReferencedList(node.expressions); + return this.finishNode(node, "SequenceExpression"); + } + + return expr; + } + + parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + + if (this.isContextual("yield")) { + if (this.scope.inGenerator) { + let left = this.parseYield(noIn); + + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startPos, startLoc); + } + + return left; + } else { + this.state.exprAllowed = false; + } + } + + const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; + this.state.commaAfterSpreadAt = -1; + let failOnShorthandAssign; + + if (refShorthandDefaultPos) { + failOnShorthandAssign = false; + } else { + refShorthandDefaultPos = { + start: 0 + }; + failOnShorthandAssign = true; + } + + if (this.match(types.parenL) || this.match(types.name)) { + this.state.potentialArrowAt = this.state.start; + } + + let left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos); + + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startPos, startLoc); + } + + if (this.state.type.isAssign) { + const node = this.startNodeAt(startPos, startLoc); + const operator = this.state.value; + node.operator = operator; + + if (operator === "??=") { + this.expectPlugin("nullishCoalescingOperator"); + this.expectPlugin("logicalAssignment"); + } + + if (operator === "||=" || operator === "&&=") { + this.expectPlugin("logicalAssignment"); + } + + node.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left; + refShorthandDefaultPos.start = 0; + this.checkLVal(left, undefined, undefined, "assignment expression"); + const maybePattern = unwrapParenthesizedExpression(left); + let patternErrorMsg; + + if (maybePattern.type === "ObjectPattern") { + patternErrorMsg = "`({a}) = 0` use `({a} = 0)`"; + } else if (maybePattern.type === "ArrayPattern") { + patternErrorMsg = "`([a]) = 0` use `([a] = 0)`"; + } + + if (patternErrorMsg && (left.extra && left.extra.parenthesized || left.type === "ParenthesizedExpression")) { + this.raise(maybePattern.start, `You're trying to assign to a parenthesized expression, eg. instead of ${patternErrorMsg}`); + } + + if (patternErrorMsg) this.checkCommaAfterRestFromSpread(); + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression"); + } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; + return left; + } + + parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseExprOps(noIn, refShorthandDefaultPos); + + if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { + return expr; + } + + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); + } + + parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { + if (this.eat(types.question)) { + const node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression"); + } + + return expr; + } + + parseExprOps(noIn, refShorthandDefaultPos) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseMaybeUnary(refShorthandDefaultPos); + + if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { + return expr; + } + + if (refShorthandDefaultPos && refShorthandDefaultPos.start) { + return expr; + } + + return this.parseExprOp(expr, startPos, startLoc, -1, noIn); + } + + parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { + const prec = this.state.type.binop; + + if (prec != null && (!noIn || !this.match(types._in))) { + if (prec > minPrec) { + const node = this.startNodeAt(leftStartPos, leftStartLoc); + const operator = this.state.value; + node.left = left; + node.operator = operator; + + if (operator === "**" && left.type === "UnaryExpression" && (this.options.createParenthesizedExpressions || !(left.extra && left.extra.parenthesized))) { + this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses."); + } + + const op = this.state.type; + + if (op === types.pipeline) { + this.expectPlugin("pipelineOperator"); + this.state.inPipeline = true; + this.checkPipelineAtInfixOperator(left, leftStartPos); + } else if (op === types.nullishCoalescing) { + this.expectPlugin("nullishCoalescingOperator"); + } + + this.next(); + + if (op === types.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") { + if (this.match(types.name) && this.state.value === "await" && this.scope.inAsync) { + throw this.raise(this.state.start, `Unexpected "await" after pipeline body; await must have parentheses in minimal proposal`); + } + } + + node.right = this.parseExprOpRightExpr(op, prec, noIn); + this.finishNode(node, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression"); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); + } + } + + return left; + } + + parseExprOpRightExpr(op, prec, noIn) { + switch (op) { + case types.pipeline: + if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + return this.withTopicPermittingContext(() => { + return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec, noIn), startPos, startLoc); + }); + } + + default: + return this.parseExprOpBaseRightExpr(op, prec, noIn); + } + } + + parseExprOpBaseRightExpr(op, prec, noIn) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn); + } + + parseMaybeUnary(refShorthandDefaultPos) { + if (this.isContextual("await") && (this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction)) { + return this.parseAwait(); + } else if (this.state.type.prefix) { + const node = this.startNode(); + const update = this.match(types.incDec); + node.operator = this.state.value; + node.prefix = true; + + if (node.operator === "throw") { + this.expectPlugin("throwExpressions"); + } + + this.next(); + node.argument = this.parseMaybeUnary(); + + if (refShorthandDefaultPos && refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + + if (update) { + this.checkLVal(node.argument, undefined, undefined, "prefix operation"); + } else if (this.state.strict && node.operator === "delete") { + const arg = node.argument; + + if (arg.type === "Identifier") { + this.raise(node.start, "Deleting local variable in strict mode"); + } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") { + this.raise(node.start, "Deleting a private field is not allowed"); + } + } + + return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } + + const startPos = this.state.start; + const startLoc = this.state.startLoc; + let expr = this.parseExprSubscripts(refShorthandDefaultPos); + if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; + + while (this.state.type.postfix && !this.canInsertSemicolon()) { + const node = this.startNodeAt(startPos, startLoc); + node.operator = this.state.value; + node.prefix = false; + node.argument = expr; + this.checkLVal(expr, undefined, undefined, "postfix operation"); + this.next(); + expr = this.finishNode(node, "UpdateExpression"); + } + + return expr; + } + + parseExprSubscripts(refShorthandDefaultPos) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const potentialArrowAt = this.state.potentialArrowAt; + const expr = this.parseExprAtom(refShorthandDefaultPos); + + if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { + return expr; + } + + if (refShorthandDefaultPos && refShorthandDefaultPos.start) { + return expr; + } + + return this.parseSubscripts(expr, startPos, startLoc); + } + + parseSubscripts(base, startPos, startLoc, noCalls) { + const maybeAsyncArrow = this.atPossibleAsync(base); + const state = { + optionalChainMember: false, + stop: false + }; + + do { + base = this.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow); + } while (!state.stop); + + return base; + } + + parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) { + if (!noCalls && this.eat(types.doubleColon)) { + const node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.callee = this.parseNoCallExpr(); + state.stop = true; + return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls); + } else if (this.match(types.questionDot)) { + this.expectPlugin("optionalChaining"); + state.optionalChainMember = true; + + if (noCalls && this.lookahead().type === types.parenL) { + state.stop = true; + return base; + } + + this.next(); + const node = this.startNodeAt(startPos, startLoc); + + if (this.eat(types.bracketL)) { + node.object = base; + node.property = this.parseExpression(); + node.computed = true; + node.optional = true; + this.expect(types.bracketR); + return this.finishNode(node, "OptionalMemberExpression"); + } else if (this.eat(types.parenL)) { + node.callee = base; + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + node.optional = true; + return this.finishNode(node, "OptionalCallExpression"); + } else { + node.object = base; + node.property = this.parseIdentifier(true); + node.computed = false; + node.optional = true; + return this.finishNode(node, "OptionalMemberExpression"); + } + } else if (this.eat(types.dot)) { + const node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = this.parseMaybePrivateName(); + node.computed = false; + + if (state.optionalChainMember) { + node.optional = false; + return this.finishNode(node, "OptionalMemberExpression"); + } + + return this.finishNode(node, "MemberExpression"); + } else if (this.eat(types.bracketL)) { + const node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = this.parseExpression(); + node.computed = true; + this.expect(types.bracketR); + + if (state.optionalChainMember) { + node.optional = false; + return this.finishNode(node, "OptionalMemberExpression"); + } + + return this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.match(types.parenL)) { + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + const oldYieldPos = this.state.yieldPos; + const oldAwaitPos = this.state.awaitPos; + this.state.maybeInArrowParameters = true; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + this.next(); + let node = this.startNodeAt(startPos, startLoc); + node.callee = base; + const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; + this.state.commaAfterSpreadAt = -1; + node.arguments = this.parseCallExpressionArguments(types.parenR, maybeAsyncArrow, base.type === "Import", base.type !== "Super"); + + if (!state.optionalChainMember) { + this.finishCallExpression(node); + } else { + this.finishOptionalCallExpression(node); + } + + if (maybeAsyncArrow && this.shouldParseAsyncArrow()) { + state.stop = true; + this.checkCommaAfterRestFromSpread(); + node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); + this.checkYieldAwaitInDefaultParams(); + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + } else { + this.toReferencedListDeep(node.arguments); + this.state.yieldPos = oldYieldPos || this.state.yieldPos; + this.state.awaitPos = oldAwaitPos || this.state.awaitPos; + } + + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; + return node; + } else if (this.match(types.backQuote)) { + return this.parseTaggedTemplateExpression(startPos, startLoc, base, state); + } else { + state.stop = true; + return base; + } + } + + parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments) { + const node = this.startNodeAt(startPos, startLoc); + node.tag = base; + node.quasi = this.parseTemplate(true); + if (typeArguments) node.typeParameters = typeArguments; + + if (state.optionalChainMember) { + this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain"); + } + + return this.finishNode(node, "TaggedTemplateExpression"); + } + + atPossibleAsync(base) { + return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; + } + + finishCallExpression(node) { + if (node.callee.type === "Import") { + if (node.arguments.length !== 1) { + this.raise(node.start, "import() requires exactly one argument"); + } + + const importArg = node.arguments[0]; + + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + + return this.finishNode(node, "CallExpression"); + } + + finishOptionalCallExpression(node) { + if (node.callee.type === "Import") { + if (node.arguments.length !== 1) { + this.raise(node.start, "import() requires exactly one argument"); + } + + const importArg = node.arguments[0]; + + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + + return this.finishNode(node, "OptionalCallExpression"); + } + + parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder) { + const elts = []; + let innerParenStart; + let first = true; + + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + + if (this.eat(close)) { + if (dynamicImport) { + this.raise(this.state.lastTokStart, "Trailing comma is disallowed inside import(...) arguments"); + } + + break; + } + } + + if (this.match(types.parenL) && !innerParenStart) { + innerParenStart = this.state.start; + } + + elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { + start: 0 + } : undefined, possibleAsyncArrow ? { + start: 0 + } : undefined, allowPlaceholder)); + } + + if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) { + this.unexpected(); + } + + return elts; + } + + shouldParseAsyncArrow() { + return this.match(types.arrow) && !this.canInsertSemicolon(); + } + + parseAsyncArrowFromCallExpression(node, call) { + this.expect(types.arrow); + this.parseArrowExpression(node, call.arguments, true); + return node; + } + + parseNoCallExpr() { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + } + + parseExprAtom(refShorthandDefaultPos) { + if (this.state.type === types.slash) this.readRegexp(); + const canBeArrow = this.state.potentialArrowAt === this.state.start; + let node; + + switch (this.state.type) { + case types._super: + if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { + this.raise(this.state.start, "super is only allowed in object methods and classes"); + } + + node = this.startNode(); + this.next(); + + if (this.match(types.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { + this.raise(node.start, "super() is only valid inside a class constructor of a subclass. " + "Maybe a typo in the method name ('constructor') or not extending another class?"); + } + + if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) { + this.unexpected(); + } + + return this.finishNode(node, "Super"); + + case types._import: + if (this.lookahead().type === types.dot) { + return this.parseImportMetaProperty(); + } + + this.expectPlugin("dynamicImport"); + node = this.startNode(); + this.next(); + + if (!this.match(types.parenL)) { + this.unexpected(null, types.parenL); + } + + return this.finishNode(node, "Import"); + + case types._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression"); + + case types.name: + { + node = this.startNode(); + const containsEsc = this.state.containsEsc; + const id = this.parseIdentifier(); + + if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) { + this.next(); + return this.parseFunction(node, undefined, true); + } else if (canBeArrow && !containsEsc && id.name === "async" && this.match(types.name) && !this.canInsertSemicolon()) { + const params = [this.parseIdentifier()]; + this.expect(types.arrow); + this.parseArrowExpression(node, params, true); + return node; + } + + if (canBeArrow && this.match(types.arrow) && !this.canInsertSemicolon()) { + this.next(); + this.parseArrowExpression(node, [id], false); + return node; + } + + return id; + } + + case types._do: + { + this.expectPlugin("doExpressions"); + const node = this.startNode(); + this.next(); + const oldLabels = this.state.labels; + this.state.labels = []; + node.body = this.parseBlock(); + this.state.labels = oldLabels; + return this.finishNode(node, "DoExpression"); + } + + case types.regexp: + { + const value = this.state.value; + node = this.parseLiteral(value.value, "RegExpLiteral"); + node.pattern = value.pattern; + node.flags = value.flags; + return node; + } + + case types.num: + return this.parseLiteral(this.state.value, "NumericLiteral"); + + case types.bigint: + return this.parseLiteral(this.state.value, "BigIntLiteral"); + + case types.string: + return this.parseLiteral(this.state.value, "StringLiteral"); + + case types._null: + node = this.startNode(); + this.next(); + return this.finishNode(node, "NullLiteral"); + + case types._true: + case types._false: + return this.parseBooleanLiteral(); + + case types.parenL: + return this.parseParenAndDistinguishExpression(canBeArrow); + + case types.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos); + + if (!this.state.maybeInArrowParameters) { + this.toReferencedList(node.elements); + } + + return this.finishNode(node, "ArrayExpression"); + + case types.braceL: + return this.parseObj(false, refShorthandDefaultPos); + + case types._function: + return this.parseFunctionExpression(); + + case types.at: + this.parseDecorators(); + + case types._class: + node = this.startNode(); + this.takeDecorators(node); + return this.parseClass(node, false); + + case types._new: + return this.parseNew(); + + case types.backQuote: + return this.parseTemplate(false); + + case types.doubleColon: + { + node = this.startNode(); + this.next(); + node.object = null; + const callee = node.callee = this.parseNoCallExpr(); + + if (callee.type === "MemberExpression") { + return this.finishNode(node, "BindExpression"); + } else { + throw this.raise(callee.start, "Binding should be performed on object property."); + } + } + + case types.hash: + { + if (this.state.inPipeline) { + node = this.startNode(); + + if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") { + this.raise(node.start, "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."); + } + + this.next(); + + if (this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) { + this.registerTopicReference(); + return this.finishNode(node, "PipelinePrimaryTopicReference"); + } else { + throw this.raise(node.start, `Topic reference was used in a lexical context without topic binding`); + } + } + } + + default: + throw this.unexpected(); + } + } + + parseBooleanLiteral() { + const node = this.startNode(); + node.value = this.match(types._true); + this.next(); + return this.finishNode(node, "BooleanLiteral"); + } + + parseMaybePrivateName() { + const isPrivate = this.match(types.hash); + + if (isPrivate) { + this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); + const node = this.startNode(); + this.next(); + this.assertNoSpace("Unexpected space between # and identifier"); + node.id = this.parseIdentifier(true); + return this.finishNode(node, "PrivateName"); + } else { + return this.parseIdentifier(true); + } + } + + parseFunctionExpression() { + const node = this.startNode(); + let meta = this.startNode(); + this.next(); + meta = this.createIdentifier(meta, "function"); + + if (this.scope.inGenerator && this.eat(types.dot)) { + return this.parseMetaProperty(node, meta, "sent"); + } + + return this.parseFunction(node); + } + + parseMetaProperty(node, meta, propertyName) { + node.meta = meta; + + if (meta.name === "function" && propertyName === "sent") { + if (this.isContextual(propertyName)) { + this.expectPlugin("functionSent"); + } else if (!this.hasPlugin("functionSent")) { + this.unexpected(); + } + } + + const containsEsc = this.state.containsEsc; + node.property = this.parseIdentifier(true); + + if (node.property.name !== propertyName || containsEsc) { + this.raise(node.property.start, `The only valid meta property for ${meta.name} is ${meta.name}.${propertyName}`); + } + + return this.finishNode(node, "MetaProperty"); + } + + parseImportMetaProperty() { + const node = this.startNode(); + const id = this.parseIdentifier(true); + this.expect(types.dot); + + if (id.name === "import") { + if (this.isContextual("meta")) { + this.expectPlugin("importMeta"); + } else if (!this.hasPlugin("importMeta")) { + this.raise(id.start, `Dynamic imports require a parameter: import('a.js')`); + } + } + + if (!this.inModule) { + this.raise(id.start, `import.meta may appear only with 'sourceType: "module"'`, { + code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" + }); + } + + this.sawUnambiguousESM = true; + return this.parseMetaProperty(node, id, "meta"); + } + + parseLiteral(value, type, startPos, startLoc) { + startPos = startPos || this.state.start; + startLoc = startLoc || this.state.startLoc; + const node = this.startNodeAt(startPos, startLoc); + this.addExtra(node, "rawValue", value); + this.addExtra(node, "raw", this.input.slice(startPos, this.state.end)); + node.value = value; + this.next(); + return this.finishNode(node, type); + } + + parseParenAndDistinguishExpression(canBeArrow) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + let val; + this.expect(types.parenL); + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + const oldYieldPos = this.state.yieldPos; + const oldAwaitPos = this.state.awaitPos; + this.state.maybeInArrowParameters = true; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + const innerStartPos = this.state.start; + const innerStartLoc = this.state.startLoc; + const exprList = []; + const refShorthandDefaultPos = { + start: 0 + }; + const refNeedsArrowPos = { + start: 0 + }; + let first = true; + let spreadStart; + let optionalCommaStart; + + while (!this.match(types.parenR)) { + if (first) { + first = false; + } else { + this.expect(types.comma, refNeedsArrowPos.start || null); + + if (this.match(types.parenR)) { + optionalCommaStart = this.state.start; + break; + } + } + + if (this.match(types.ellipsis)) { + const spreadNodeStartPos = this.state.start; + const spreadNodeStartLoc = this.state.startLoc; + spreadStart = this.state.start; + exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc)); + this.checkCommaAfterRest(); + break; + } else { + exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos)); + } + } + + const innerEndPos = this.state.start; + const innerEndLoc = this.state.startLoc; + this.expect(types.parenR); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + let arrowNode = this.startNodeAt(startPos, startLoc); + + if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) { + this.checkYieldAwaitInDefaultParams(); + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + + for (let _i = 0; _i < exprList.length; _i++) { + const param = exprList[_i]; + + if (param.extra && param.extra.parenthesized) { + this.unexpected(param.extra.parenStart); + } + } + + this.parseArrowExpression(arrowNode, exprList, false); + return arrowNode; + } + + this.state.yieldPos = oldYieldPos || this.state.yieldPos; + this.state.awaitPos = oldAwaitPos || this.state.awaitPos; + + if (!exprList.length) { + this.unexpected(this.state.lastTokStart); + } + + if (optionalCommaStart) this.unexpected(optionalCommaStart); + if (spreadStart) this.unexpected(spreadStart); + + if (refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + + if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start); + this.toReferencedListDeep(exprList, true); + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + + if (!this.options.createParenthesizedExpressions) { + this.addExtra(val, "parenthesized", true); + this.addExtra(val, "parenStart", startPos); + return val; + } + + const parenExpression = this.startNodeAt(startPos, startLoc); + parenExpression.expression = val; + this.finishNode(parenExpression, "ParenthesizedExpression"); + return parenExpression; + } + + shouldParseArrow() { + return !this.canInsertSemicolon(); + } + + parseArrow(node) { + if (this.eat(types.arrow)) { + return node; + } + } + + parseParenItem(node, startPos, startLoc) { + return node; + } + + parseNew() { + const node = this.startNode(); + const meta = this.parseIdentifier(true); + + if (this.eat(types.dot)) { + const metaProp = this.parseMetaProperty(node, meta, "target"); + + if (!this.scope.inNonArrowFunction && !this.state.inClassProperty) { + let error = "new.target can only be used in functions"; + + if (this.hasPlugin("classProperties")) { + error += " or class properties"; + } + + this.raise(metaProp.start, error); + } + + return metaProp; + } + + node.callee = this.parseNoCallExpr(); + + if (node.callee.type === "Import") { + this.raise(node.callee.start, "Cannot use new with import(...)"); + } else if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") { + this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed"); + } else if (this.eat(types.questionDot)) { + this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed"); + } + + this.parseNewArguments(node); + return this.finishNode(node, "NewExpression"); + } + + parseNewArguments(node) { + if (this.eat(types.parenL)) { + const args = this.parseExprList(types.parenR); + this.toReferencedList(args); + node.arguments = args; + } else { + node.arguments = []; + } + } + + parseTemplateElement(isTagged) { + const elem = this.startNode(); + + if (this.state.value === null) { + if (!isTagged) { + this.raise(this.state.invalidTemplateEscapePosition || 0, "Invalid escape sequence in template"); + } else { + this.state.invalidTemplateEscapePosition = null; + } + } + + elem.value = { + raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), + cooked: this.state.value + }; + this.next(); + elem.tail = this.match(types.backQuote); + return this.finishNode(elem, "TemplateElement"); + } + + parseTemplate(isTagged) { + const node = this.startNode(); + this.next(); + node.expressions = []; + let curElt = this.parseTemplateElement(isTagged); + node.quasis = [curElt]; + + while (!curElt.tail) { + this.expect(types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types.braceR); + node.quasis.push(curElt = this.parseTemplateElement(isTagged)); + } + + this.next(); + return this.finishNode(node, "TemplateLiteral"); + } + + parseObj(isPattern, refShorthandDefaultPos) { + const propHash = Object.create(null); + let first = true; + const node = this.startNode(); + node.properties = []; + this.next(); + + while (!this.eat(types.braceR)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + if (this.eat(types.braceR)) break; + } + + const prop = this.parseObjectMember(isPattern, refShorthandDefaultPos); + if (!isPattern) this.checkPropClash(prop, propHash); + + if (prop.shorthand) { + this.addExtra(prop, "shorthand", true); + } + + node.properties.push(prop); + } + + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); + } + + isAsyncProp(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.match(types.name) || this.match(types.num) || this.match(types.string) || this.match(types.bracketL) || this.state.type.keyword || this.match(types.star)) && !this.hasPrecedingLineBreak(); + } + + parseObjectMember(isPattern, refShorthandDefaultPos) { + let decorators = []; + + if (this.match(types.at)) { + if (this.hasPlugin("decorators")) { + this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators"); + } else { + while (this.match(types.at)) { + decorators.push(this.parseDecorator()); + } + } + } + + const prop = this.startNode(); + let isGenerator = false; + let isAsync = false; + let startPos; + let startLoc; + + if (this.match(types.ellipsis)) { + if (decorators.length) this.unexpected(); + + if (isPattern) { + this.next(); + prop.argument = this.parseIdentifier(); + this.checkCommaAfterRest(); + return this.finishNode(prop, "RestElement"); + } + + return this.parseSpread(); + } + + if (decorators.length) { + prop.decorators = decorators; + decorators = []; + } + + prop.method = false; + + if (isPattern || refShorthandDefaultPos) { + startPos = this.state.start; + startLoc = this.state.startLoc; + } + + if (!isPattern) { + isGenerator = this.eat(types.star); + } + + const containsEsc = this.state.containsEsc; + this.parsePropertyName(prop); + + if (!isPattern && !containsEsc && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.eat(types.star); + this.parsePropertyName(prop); + } else { + isAsync = false; + } + + this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); + return prop; + } + + isGetterOrSetterMethod(prop, isPattern) { + return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword); + } + + getGetterSetterExpectedParamCount(method) { + return method.kind === "get" ? 0 : 1; + } + + checkGetterSetterParams(method) { + const paramCount = this.getGetterSetterExpectedParamCount(method); + const start = method.start; + + if (method.params.length !== paramCount) { + if (method.kind === "get") { + this.raise(start, "getter must not have any formal parameters"); + } else { + this.raise(start, "setter must have exactly one formal parameter"); + } + } + + if (method.kind === "set" && method.params[method.params.length - 1].type === "RestElement") { + this.raise(start, "setter function argument must not be a rest parameter"); + } + } + + parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { + if (isAsync || isGenerator || this.match(types.parenL)) { + if (isPattern) this.unexpected(); + prop.kind = "method"; + prop.method = true; + return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); + } + + if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) { + if (isGenerator || isAsync) this.unexpected(); + prop.kind = prop.key.name; + this.parsePropertyName(prop); + this.parseMethod(prop, false, false, false, false, "ObjectMethod"); + this.checkGetterSetterParams(prop); + return prop; + } + } + + parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { + prop.shorthand = false; + + if (this.eat(types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); + return this.finishNode(prop, "ObjectProperty"); + } + + if (!prop.computed && prop.key.type === "Identifier") { + this.checkReservedWord(prop.key.name, prop.key.start, true, true); + + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); + } else if (this.match(types.eq) && refShorthandDefaultPos) { + if (!refShorthandDefaultPos.start) { + refShorthandDefaultPos.start = this.state.start; + } + + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); + } else { + prop.value = prop.key.__clone(); + } + + prop.shorthand = true; + return this.finishNode(prop, "ObjectProperty"); + } + } + + parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { + const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); + if (!node) this.unexpected(); + return node; + } + + parsePropertyName(prop) { + if (this.eat(types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types.bracketR); + } else { + const oldInPropertyName = this.state.inPropertyName; + this.state.inPropertyName = true; + prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName(); + + if (prop.key.type !== "PrivateName") { + prop.computed = false; + } + + this.state.inPropertyName = oldInPropertyName; + } + + return prop.key; + } + + initFunction(node, isAsync) { + node.id = null; + node.generator = false; + node.async = !!isAsync; + } + + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { + const oldYieldPos = this.state.yieldPos; + const oldAwaitPos = this.state.awaitPos; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + this.initFunction(node, isAsync); + node.generator = !!isGenerator; + const allowModifiers = isConstructor; + this.scope.enter(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + this.parseFunctionParams(node, allowModifiers); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBodyAndFinish(node, type, true); + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + return node; + } + + parseArrowExpression(node, params, isAsync) { + this.scope.enter(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node, isAsync); + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + const oldYieldPos = this.state.yieldPos; + const oldAwaitPos = this.state.awaitPos; + this.state.maybeInArrowParameters = false; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + if (params) this.setArrowFunctionParameters(node, params); + this.parseFunctionBody(node, true); + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + return this.finishNode(node, "ArrowFunctionExpression"); + } + + setArrowFunctionParameters(node, params) { + node.params = this.toAssignableList(params, true, "arrow function parameters"); + } + + isStrictBody(node) { + const isBlockStatement = node.body.type === "BlockStatement"; + + if (isBlockStatement && node.body.directives.length) { + for (let _i2 = 0, _node$body$directives = node.body.directives; _i2 < _node$body$directives.length; _i2++) { + const directive = _node$body$directives[_i2]; + + if (directive.value.value === "use strict") { + return true; + } + } + } + + return false; + } + + parseFunctionBodyAndFinish(node, type, isMethod = false) { + this.parseFunctionBody(node, false, isMethod); + this.finishNode(node, type); + } + + parseFunctionBody(node, allowExpression, isMethod = false) { + const isExpression = allowExpression && !this.match(types.braceL); + const oldStrict = this.state.strict; + let useStrict = false; + const oldInParameters = this.state.inParameters; + this.state.inParameters = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + this.checkParams(node, false, allowExpression); + } else { + const nonSimple = !this.isSimpleParamList(node.params); + + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.state.end); + + if (useStrict && nonSimple) { + const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start; + this.raise(errorPos, "Illegal 'use strict' directive in function with non-simple parameter list"); + } + } + + const oldLabels = this.state.labels; + this.state.labels = []; + if (useStrict) this.state.strict = true; + this.checkParams(node, !oldStrict && !useStrict && !allowExpression && !isMethod && !nonSimple, allowExpression); + node.body = this.parseBlock(true, false); + this.state.labels = oldLabels; + } + + this.scope.exit(); + this.state.inParameters = oldInParameters; + + if (this.state.strict && node.id) { + this.checkLVal(node.id, BIND_OUTSIDE, undefined, "function name"); + } + + this.state.strict = oldStrict; + } + + isSimpleParamList(params) { + for (let i = 0, len = params.length; i < len; i++) { + if (params[i].type !== "Identifier") return false; + } + + return true; + } + + checkParams(node, allowDuplicates, isArrowFunction) { + const nameHash = Object.create(null); + + for (let i = 0; i < node.params.length; i++) { + this.checkLVal(node.params[i], BIND_VAR, allowDuplicates ? null : nameHash, "function paramter list"); + } + } + + parseExprList(close, allowEmpty, refShorthandDefaultPos) { + const elts = []; + let first = true; + + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + if (this.eat(close)) break; + } + + elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos)); + } + + return elts; + } + + parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, allowPlaceholder) { + let elt; + + if (allowEmpty && this.match(types.comma)) { + elt = null; + } else if (this.match(types.ellipsis)) { + const spreadNodeStartPos = this.state.start; + const spreadNodeStartLoc = this.state.startLoc; + elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc); + } else if (this.match(types.question)) { + this.expectPlugin("partialApplication"); + + if (!allowPlaceholder) { + this.raise(this.state.start, "Unexpected argument placeholder"); + } + + const node = this.startNode(); + this.next(); + elt = this.finishNode(node, "ArgumentPlaceholder"); + } else { + elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos); + } + + return elt; + } + + parseIdentifier(liberal) { + const node = this.startNode(); + const name = this.parseIdentifierName(node.start, liberal); + return this.createIdentifier(node, name); + } + + createIdentifier(node, name) { + node.name = name; + node.loc.identifierName = name; + return this.finishNode(node, "Identifier"); + } + + parseIdentifierName(pos, liberal) { + let name; + + if (this.match(types.name)) { + name = this.state.value; + } else if (this.state.type.keyword) { + name = this.state.type.keyword; + + if ((name === "class" || name === "function") && (this.state.lastTokEnd !== this.state.lastTokStart + 1 || this.input.charCodeAt(this.state.lastTokStart) !== 46)) { + this.state.context.pop(); + } + } else { + throw this.unexpected(); + } + + if (!liberal) { + this.checkReservedWord(name, this.state.start, !!this.state.type.keyword, false); + } + + this.next(); + return name; + } + + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (this.scope.inGenerator && word === "yield") { + this.raise(startLoc, "Can not use 'yield' as identifier inside a generator"); + } + + if (this.scope.inAsync && word === "await") { + this.raise(startLoc, "Can not use 'await' as identifier inside an async function"); + } + + if (this.state.inClassProperty && word === "arguments") { + this.raise(startLoc, "'arguments' is not allowed in class field initializer"); + } + + if (checkKeywords && isKeyword(word)) { + this.raise(startLoc, `Unexpected keyword '${word}'`); + } + + const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; + + if (reservedTest(word, this.inModule)) { + if (!this.scope.inAsync && word === "await") { + this.raise(startLoc, "Can not use keyword 'await' outside an async function"); + } + + this.raise(startLoc, `Unexpected reserved word '${word}'`); + } + } + + parseAwait() { + if (!this.state.awaitPos) { + this.state.awaitPos = this.state.start; + } + + const node = this.startNode(); + this.next(); + + if (this.state.inParameters) { + this.raise(node.start, "await is not allowed in async function parameters"); + } + + if (this.match(types.star)) { + this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead."); + } + + node.argument = this.parseMaybeUnary(); + return this.finishNode(node, "AwaitExpression"); + } + + parseYield(noIn) { + if (!this.state.yieldPos) { + this.state.yieldPos = this.state.start; + } + + const node = this.startNode(); + + if (this.state.inParameters) { + this.raise(node.start, "yield is not allowed in generator parameters"); + } + + this.next(); + + if (this.match(types.semi) || !this.match(types.star) && !this.state.type.startsExpr || this.canInsertSemicolon()) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types.star); + node.argument = this.parseMaybeAssign(noIn); + } + + return this.finishNode(node, "YieldExpression"); + } + + checkPipelineAtInfixOperator(left, leftStartPos) { + if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { + if (left.type === "SequenceExpression") { + throw this.raise(leftStartPos, `Pipeline head should not be a comma-separated sequence expression`); + } + } + } + + parseSmartPipelineBody(childExpression, startPos, startLoc) { + const pipelineStyle = this.checkSmartPipelineBodyStyle(childExpression); + this.checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos); + return this.parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc); + } + + checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos) { + if (this.match(types.arrow)) { + throw this.raise(this.state.start, `Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized`); + } else if (pipelineStyle === "PipelineTopicExpression" && childExpression.type === "SequenceExpression") { + throw this.raise(startPos, `Pipeline body may not be a comma-separated sequence expression`); + } + } + + parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc) { + const bodyNode = this.startNodeAt(startPos, startLoc); + + switch (pipelineStyle) { + case "PipelineBareFunction": + bodyNode.callee = childExpression; + break; + + case "PipelineBareConstructor": + bodyNode.callee = childExpression.callee; + break; + + case "PipelineBareAwaitedFunction": + bodyNode.callee = childExpression.argument; + break; + + case "PipelineTopicExpression": + if (!this.topicReferenceWasUsedInCurrentTopicContext()) { + throw this.raise(startPos, `Pipeline is in topic style but does not use topic reference`); + } + + bodyNode.expression = childExpression; + break; + + default: + throw this.raise(startPos, `Unknown pipeline style ${pipelineStyle}`); + } + + return this.finishNode(bodyNode, pipelineStyle); + } + + checkSmartPipelineBodyStyle(expression) { + switch (expression.type) { + default: + return this.isSimpleReference(expression) ? "PipelineBareFunction" : "PipelineTopicExpression"; + } + } + + isSimpleReference(expression) { + switch (expression.type) { + case "MemberExpression": + return !expression.computed && this.isSimpleReference(expression.object); + + case "Identifier": + return true; + + default: + return false; + } + } + + withTopicPermittingContext(callback) { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 1, + maxTopicIndex: null + }; + + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + } + + withTopicForbiddingContext(callback) { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } + } + + registerTopicReference() { + this.state.topicContext.maxTopicIndex = 0; + } + + primaryTopicReferenceIsAllowedInCurrentTopicContext() { + return this.state.topicContext.maxNumOfResolvableTopics >= 1; + } + + topicReferenceWasUsedInCurrentTopicContext() { + return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; + } + +} + +const empty = []; +const loopLabel = { + kind: "loop" +}, + switchLabel = { + kind: "switch" +}; +const FUNC_NO_FLAGS = 0b000, + FUNC_STATEMENT = 0b001, + FUNC_HANGING_STATEMENT = 0b010, + FUNC_NULLABLE_ID = 0b100; +class StatementParser extends ExpressionParser { + parseTopLevel(file, program) { + program.sourceType = this.options.sourceType; + program.interpreter = this.parseInterpreterDirective(); + this.parseBlockBody(program, true, true, types.eof); + + if (this.inModule && this.scope.undefinedExports.size > 0) { + for (let _i = 0, _Array$from = Array.from(this.scope.undefinedExports); _i < _Array$from.length; _i++) { + const [name] = _Array$from[_i]; + const pos = this.scope.undefinedExports.get(name); + this.raise(pos, `Export '${name}' is not defined`); + } + } + + file.program = this.finishNode(program, "Program"); + file.comments = this.state.comments; + if (this.options.tokens) file.tokens = this.state.tokens; + return this.finishNode(file, "File"); + } + + stmtToDirective(stmt) { + const expr = stmt.expression; + const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); + const directive = this.startNodeAt(stmt.start, stmt.loc.start); + const raw = this.input.slice(expr.start, expr.end); + const val = directiveLiteral.value = raw.slice(1, -1); + this.addExtra(directiveLiteral, "raw", raw); + this.addExtra(directiveLiteral, "rawValue", val); + directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end); + return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end); + } + + parseInterpreterDirective() { + if (!this.match(types.interpreterDirective)) { + return null; + } + + const node = this.startNode(); + node.value = this.state.value; + this.next(); + return this.finishNode(node, "InterpreterDirective"); + } + + isLet(context) { + if (!this.isContextual("let")) { + return false; + } + + skipWhiteSpace.lastIndex = this.state.pos; + const skip = skipWhiteSpace.exec(this.input); + const next = this.state.pos + skip[0].length; + const nextCh = this.input.charCodeAt(next); + if (nextCh === 91) return true; + if (context) return false; + if (nextCh === 123) return true; + + if (isIdentifierStart(nextCh)) { + let pos = next + 1; + + while (isIdentifierChar(this.input.charCodeAt(pos))) { + ++pos; + } + + const ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) return true; + } + + return false; + } + + parseStatement(context, topLevel) { + if (this.match(types.at)) { + this.parseDecorators(true); + } + + return this.parseStatementContent(context, topLevel); + } + + parseStatementContent(context, topLevel) { + let starttype = this.state.type; + const node = this.startNode(); + let kind; + + if (this.isLet(context)) { + starttype = types._var; + kind = "let"; + } + + switch (starttype) { + case types._break: + case types._continue: + return this.parseBreakContinueStatement(node, starttype.keyword); + + case types._debugger: + return this.parseDebuggerStatement(node); + + case types._do: + return this.parseDoStatement(node); + + case types._for: + return this.parseForStatement(node); + + case types._function: + if (this.lookahead().type === types.dot) break; + + if (context) { + if (this.state.strict) { + this.raise(this.state.start, "In strict mode code, functions can only be declared at top level or inside a block"); + } else if (context !== "if" && context !== "label") { + this.raise(this.state.start, "In non-strict mode code, functions can only be declared at top level, " + "inside a block, or as the body of an if statement"); + } + } + + return this.parseFunctionStatement(node, false, !context); + + case types._class: + if (context) this.unexpected(); + return this.parseClass(node, true); + + case types._if: + return this.parseIfStatement(node); + + case types._return: + return this.parseReturnStatement(node); + + case types._switch: + return this.parseSwitchStatement(node); + + case types._throw: + return this.parseThrowStatement(node); + + case types._try: + return this.parseTryStatement(node); + + case types._const: + case types._var: + kind = kind || this.state.value; + + if (context && kind !== "var") { + this.unexpected(this.state.start, "Lexical declaration cannot appear in a single-statement context"); + } + + return this.parseVarStatement(node, kind); + + case types._while: + return this.parseWhileStatement(node); + + case types._with: + return this.parseWithStatement(node); + + case types.braceL: + return this.parseBlock(); + + case types.semi: + return this.parseEmptyStatement(node); + + case types._export: + case types._import: + { + const nextToken = this.lookahead(); + + if (nextToken.type === types.parenL || nextToken.type === types.dot) { + break; + } + + if (!this.options.allowImportExportEverywhere && !topLevel) { + this.raise(this.state.start, "'import' and 'export' may only appear at the top level"); + } + + this.next(); + let result; + + if (starttype === types._import) { + result = this.parseImport(node); + + if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { + this.sawUnambiguousESM = true; + } + } else { + result = this.parseExport(node); + + if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { + this.sawUnambiguousESM = true; + } + } + + this.assertModuleNodeAllowed(node); + return result; + } + + default: + { + if (this.isAsyncFunction()) { + if (context) { + this.unexpected(null, "Async functions can only be declared at the top level or inside a block"); + } + + this.next(); + return this.parseFunctionStatement(node, true, !context); + } + } + } + + const maybeName = this.state.value; + const expr = this.parseExpression(); + + if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) { + return this.parseLabeledStatement(node, maybeName, expr, context); + } else { + return this.parseExpressionStatement(node, expr); + } + } + + assertModuleNodeAllowed(node) { + if (!this.options.allowImportExportEverywhere && !this.inModule) { + this.raise(node.start, `'import' and 'export' may appear only with 'sourceType: "module"'`, { + code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" + }); + } + } + + takeDecorators(node) { + const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; + + if (decorators.length) { + node.decorators = decorators; + this.resetStartLocationFromNode(node, decorators[0]); + this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; + } + } + + canHaveLeadingDecorator() { + return this.match(types._class); + } + + parseDecorators(allowExport) { + const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; + + while (this.match(types.at)) { + const decorator = this.parseDecorator(); + currentContextDecorators.push(decorator); + } + + if (this.match(types._export)) { + if (!allowExport) { + this.unexpected(); + } + + if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) { + this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead."); + } + } else if (!this.canHaveLeadingDecorator()) { + this.raise(this.state.start, "Leading decorators must be attached to a class declaration"); + } + } + + parseDecorator() { + this.expectOnePlugin(["decorators-legacy", "decorators"]); + const node = this.startNode(); + this.next(); + + if (this.hasPlugin("decorators")) { + this.state.decoratorStack.push([]); + const startPos = this.state.start; + const startLoc = this.state.startLoc; + let expr; + + if (this.eat(types.parenL)) { + expr = this.parseExpression(); + this.expect(types.parenR); + } else { + expr = this.parseIdentifier(false); + + while (this.eat(types.dot)) { + const node = this.startNodeAt(startPos, startLoc); + node.object = expr; + node.property = this.parseIdentifier(true); + node.computed = false; + expr = this.finishNode(node, "MemberExpression"); + } + } + + node.expression = this.parseMaybeDecoratorArguments(expr); + this.state.decoratorStack.pop(); + } else { + node.expression = this.parseMaybeAssign(); + } + + return this.finishNode(node, "Decorator"); + } + + parseMaybeDecoratorArguments(expr) { + if (this.eat(types.parenL)) { + const node = this.startNodeAtNode(expr); + node.callee = expr; + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + this.toReferencedList(node.arguments); + return this.finishNode(node, "CallExpression"); + } + + return expr; + } + + parseBreakContinueStatement(node, keyword) { + const isBreak = keyword === "break"; + this.next(); + + if (this.isLineTerminator()) { + node.label = null; + } else { + node.label = this.parseIdentifier(); + this.semicolon(); + } + + this.verifyBreakContinue(node, keyword); + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); + } + + verifyBreakContinue(node, keyword) { + const isBreak = keyword === "break"; + let i; + + for (i = 0; i < this.state.labels.length; ++i) { + const lab = this.state.labels[i]; + + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break; + if (node.label && isBreak) break; + } + } + + if (i === this.state.labels.length) { + this.raise(node.start, "Unsyntactic " + keyword); + } + } + + parseDebuggerStatement(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement"); + } + + parseHeaderExpression() { + this.expect(types.parenL); + const val = this.parseExpression(); + this.expect(types.parenR); + return val; + } + + parseDoStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + node.body = this.withTopicForbiddingContext(() => this.parseStatement("do")); + this.state.labels.pop(); + this.expect(types._while); + node.test = this.parseHeaderExpression(); + this.eat(types.semi); + return this.finishNode(node, "DoWhileStatement"); + } + + parseForStatement(node) { + this.next(); + this.state.labels.push(loopLabel); + let awaitAt = -1; + + if ((this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await")) { + awaitAt = this.state.lastTokStart; + } + + this.scope.enter(SCOPE_OTHER); + this.expect(types.parenL); + + if (this.match(types.semi)) { + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + + return this.parseFor(node, null); + } + + const isLet = this.isLet(); + + if (this.match(types._var) || this.match(types._const) || isLet) { + const init = this.startNode(); + const kind = isLet ? "let" : this.state.value; + this.next(); + this.parseVar(init, true, kind); + this.finishNode(init, "VariableDeclaration"); + + if (this.match(types._in) || this.isContextual("of")) { + if (init.declarations.length === 1) { + const declaration = init.declarations[0]; + const isForInInitializer = kind === "var" && declaration.init && declaration.id.type != "ObjectPattern" && declaration.id.type != "ArrayPattern" && !this.isContextual("of"); + + if (this.state.strict && isForInInitializer) { + this.raise(this.state.start, "for-in initializer in strict mode"); + } else if (isForInInitializer || !declaration.init) { + return this.parseForIn(node, init, awaitAt); + } + } + } + + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + + return this.parseFor(node, init); + } + + const refShorthandDefaultPos = { + start: 0 + }; + const init = this.parseExpression(true, refShorthandDefaultPos); + + if (this.match(types._in) || this.isContextual("of")) { + const description = this.isContextual("of") ? "for-of statement" : "for-in statement"; + this.toAssignable(init, undefined, description); + this.checkLVal(init, undefined, undefined, description); + return this.parseForIn(node, init, awaitAt); + } else if (refShorthandDefaultPos.start) { + this.unexpected(refShorthandDefaultPos.start); + } + + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + + return this.parseFor(node, init); + } + + parseFunctionStatement(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync); + } + + parseIfStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement"); + } + + parseReturnStatement(node) { + if (!this.scope.inFunction && !this.options.allowReturnOutsideFunction) { + this.raise(this.state.start, "'return' outside of function"); + } + + this.next(); + + if (this.isLineTerminator()) { + node.argument = null; + } else { + node.argument = this.parseExpression(); + this.semicolon(); + } + + return this.finishNode(node, "ReturnStatement"); + } + + parseSwitchStatement(node) { + this.next(); + node.discriminant = this.parseHeaderExpression(); + const cases = node.cases = []; + this.expect(types.braceL); + this.state.labels.push(switchLabel); + this.scope.enter(SCOPE_OTHER); + let cur; + + for (let sawDefault; !this.match(types.braceR);) { + if (this.match(types._case) || this.match(types._default)) { + const isCase = this.match(types._case); + if (cur) this.finishNode(cur, "SwitchCase"); + cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { + this.raise(this.state.lastTokStart, "Multiple default clauses"); + } + + sawDefault = true; + cur.test = null; + } + + this.expect(types.colon); + } else { + if (cur) { + cur.consequent.push(this.parseStatement(null)); + } else { + this.unexpected(); + } + } + } + + this.scope.exit(); + if (cur) this.finishNode(cur, "SwitchCase"); + this.next(); + this.state.labels.pop(); + return this.finishNode(node, "SwitchStatement"); + } + + parseThrowStatement(node) { + this.next(); + + if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) { + this.raise(this.state.lastTokEnd, "Illegal newline after throw"); + } + + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement"); + } + + parseTryStatement(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + + if (this.match(types._catch)) { + const clause = this.startNode(); + this.next(); + + if (this.match(types.parenL)) { + this.expect(types.parenL); + clause.param = this.parseBindingAtom(); + const simple = clause.param.type === "Identifier"; + this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL, null, "catch clause"); + this.expect(types.parenR); + } else { + clause.param = null; + this.scope.enter(SCOPE_OTHER); + } + + clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false)); + this.scope.exit(); + node.handler = this.finishNode(clause, "CatchClause"); + } + + node.guardedHandlers = empty; + node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; + + if (!node.handler && !node.finalizer) { + this.raise(node.start, "Missing catch or finally clause"); + } + + return this.finishNode(node, "TryStatement"); + } + + parseVarStatement(node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration"); + } + + parseWhileStatement(node) { + this.next(); + node.test = this.parseHeaderExpression(); + this.state.labels.push(loopLabel); + node.body = this.withTopicForbiddingContext(() => this.parseStatement("while")); + this.state.labels.pop(); + return this.finishNode(node, "WhileStatement"); + } + + parseWithStatement(node) { + if (this.state.strict) { + this.raise(this.state.start, "'with' in strict mode"); + } + + this.next(); + node.object = this.parseHeaderExpression(); + node.body = this.withTopicForbiddingContext(() => this.parseStatement("with")); + return this.finishNode(node, "WithStatement"); + } + + parseEmptyStatement(node) { + this.next(); + return this.finishNode(node, "EmptyStatement"); + } + + parseLabeledStatement(node, maybeName, expr, context) { + for (let _i2 = 0, _this$state$labels = this.state.labels; _i2 < _this$state$labels.length; _i2++) { + const label = _this$state$labels[_i2]; + + if (label.name === maybeName) { + this.raise(expr.start, `Label '${maybeName}' is already declared`); + } + } + + const kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null; + + for (let i = this.state.labels.length - 1; i >= 0; i--) { + const label = this.state.labels[i]; + + if (label.statementStart === node.start) { + label.statementStart = this.state.start; + label.kind = kind; + } else { + break; + } + } + + this.state.labels.push({ + name: maybeName, + kind: kind, + statementStart: this.state.start + }); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.state.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement"); + } + + parseExpressionStatement(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement"); + } + + parseBlock(allowDirectives = false, createNewLexicalScope = true) { + const node = this.startNode(); + this.expect(types.braceL); + + if (createNewLexicalScope) { + this.scope.enter(SCOPE_OTHER); + } + + this.parseBlockBody(node, allowDirectives, false, types.braceR); + + if (createNewLexicalScope) { + this.scope.exit(); + } + + return this.finishNode(node, "BlockStatement"); + } + + isValidDirective(stmt) { + return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; + } + + parseBlockBody(node, allowDirectives, topLevel, end) { + const body = node.body = []; + const directives = node.directives = []; + this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end); + } + + parseBlockOrModuleBlockBody(body, directives, topLevel, end) { + let parsedNonDirective = false; + let oldStrict; + let octalPosition; + + while (!this.eat(end)) { + if (!parsedNonDirective && this.state.containsOctal && !octalPosition) { + octalPosition = this.state.octalPosition; + } + + const stmt = this.parseStatement(null, topLevel); + + if (directives && !parsedNonDirective && this.isValidDirective(stmt)) { + const directive = this.stmtToDirective(stmt); + directives.push(directive); + + if (oldStrict === undefined && directive.value.value === "use strict") { + oldStrict = this.state.strict; + this.setStrict(true); + + if (octalPosition) { + this.raise(octalPosition, "Octal literal in strict mode"); + } + } + + continue; + } + + parsedNonDirective = true; + body.push(stmt); + } + + if (oldStrict === false) { + this.setStrict(false); + } + } + + parseFor(node, init) { + node.init = init; + this.expect(types.semi); + node.test = this.match(types.semi) ? null : this.parseExpression(); + this.expect(types.semi); + node.update = this.match(types.parenR) ? null : this.parseExpression(); + this.expect(types.parenR); + node.body = this.withTopicForbiddingContext(() => this.parseStatement("for")); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, "ForStatement"); + } + + parseForIn(node, init, awaitAt) { + const type = this.match(types._in) ? "ForInStatement" : "ForOfStatement"; + + if (awaitAt > -1) { + this.eatContextual("of"); + } else { + this.next(); + } + + if (type === "ForOfStatement") { + node.await = awaitAt > -1; + } + + node.left = init; + node.right = this.parseExpression(); + this.expect(types.parenR); + node.body = this.withTopicForbiddingContext(() => this.parseStatement("for")); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(node, type); + } + + parseVar(node, isFor, kind) { + const declarations = node.declarations = []; + const isTypescript = this.hasPlugin("typescript"); + node.kind = kind; + + for (;;) { + const decl = this.startNode(); + this.parseVarId(decl, kind); + + if (this.eat(types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else { + if (kind === "const" && !(this.match(types._in) || this.isContextual("of"))) { + if (!isTypescript) { + this.unexpected(); + } + } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) { + this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value"); + } + + decl.init = null; + } + + declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types.comma)) break; + } + + return node; + } + + parseVarId(decl, kind) { + if ((kind === "const" || kind === "let") && this.isContextual("let")) { + this.unexpected(null, "let is disallowed as a lexically bound name"); + } + + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, "variable declaration"); + } + + parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) { + const isStatement = statement & FUNC_STATEMENT; + const isHangingStatement = statement & FUNC_HANGING_STATEMENT; + const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID); + this.initFunction(node, isAsync); + + if (this.match(types.star) && isHangingStatement) { + this.unexpected(this.state.start, "Generators can only be declared at the top level or inside a block"); + } + + node.generator = this.eat(types.star); + + if (isStatement) { + node.id = this.parseFunctionId(requireId); + + if (node.id && !isHangingStatement) { + this.checkLVal(node.id, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, null, "function name"); + } + } + + const oldInClassProperty = this.state.inClassProperty; + const oldYieldPos = this.state.yieldPos; + const oldAwaitPos = this.state.awaitPos; + this.state.inClassProperty = false; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + this.scope.enter(functionFlags(node.async, node.generator)); + + if (!isStatement) { + node.id = this.parseFunctionId(); + } + + this.parseFunctionParams(node); + this.withTopicForbiddingContext(() => { + this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); + }); + this.state.inClassProperty = oldInClassProperty; + this.state.yieldPos = oldYieldPos; + this.state.awaitPos = oldAwaitPos; + return node; + } + + parseFunctionId(requireId) { + return requireId || this.match(types.name) ? this.parseIdentifier() : null; + } + + parseFunctionParams(node, allowModifiers) { + const oldInParameters = this.state.inParameters; + this.state.inParameters = true; + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, allowModifiers); + this.state.inParameters = oldInParameters; + this.checkYieldAwaitInDefaultParams(); + } + + parseClass(node, isStatement, optionalId) { + this.next(); + this.takeDecorators(node); + const oldStrict = this.state.strict; + this.state.strict = true; + this.parseClassId(node, isStatement, optionalId); + this.parseClassSuper(node); + node.body = this.parseClassBody(!!node.superClass); + this.state.strict = oldStrict; + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); + } + + isClassProperty() { + return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR); + } + + isClassMethod() { + return this.match(types.parenL); + } + + isNonstaticConstructor(method) { + return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); + } + + parseClassBody(constructorAllowsSuper) { + this.state.classLevel++; + const state = { + hadConstructor: false + }; + let decorators = []; + const classBody = this.startNode(); + classBody.body = []; + this.expect(types.braceL); + this.withTopicForbiddingContext(() => { + while (!this.eat(types.braceR)) { + if (this.eat(types.semi)) { + if (decorators.length > 0) { + this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon"); + } + + continue; + } + + if (this.match(types.at)) { + decorators.push(this.parseDecorator()); + continue; + } + + const member = this.startNode(); + + if (decorators.length) { + member.decorators = decorators; + this.resetStartLocationFromNode(member, decorators[0]); + decorators = []; + } + + this.parseClassMember(classBody, member, state, constructorAllowsSuper); + + if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { + this.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?"); + } + } + }); + + if (decorators.length) { + this.raise(this.state.start, "You have trailing decorators with no method"); + } + + this.state.classLevel--; + return this.finishNode(classBody, "ClassBody"); + } + + parseClassMember(classBody, member, state, constructorAllowsSuper) { + let isStatic = false; + const containsEsc = this.state.containsEsc; + + if (this.match(types.name) && this.state.value === "static") { + const key = this.parseIdentifier(true); + + if (this.isClassMethod()) { + const method = member; + method.kind = "method"; + method.computed = false; + method.key = key; + method.static = false; + this.pushClassMethod(classBody, method, false, false, false, false); + return; + } else if (this.isClassProperty()) { + const prop = member; + prop.computed = false; + prop.key = key; + prop.static = false; + classBody.body.push(this.parseClassProperty(prop)); + return; + } else if (containsEsc) { + throw this.unexpected(); + } + + isStatic = true; + } + + this.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper); + } + + parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) { + const publicMethod = member; + const privateMethod = member; + const publicProp = member; + const privateProp = member; + const method = publicMethod; + const publicMember = publicMethod; + member.static = isStatic; + + if (this.eat(types.star)) { + method.kind = "method"; + this.parseClassPropertyName(method); + + if (method.key.type === "PrivateName") { + this.pushClassPrivateMethod(classBody, privateMethod, true, false); + return; + } + + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(publicMethod.key.start, "Constructor can't be a generator"); + } + + this.pushClassMethod(classBody, publicMethod, true, false, false, false); + return; + } + + const containsEsc = this.state.containsEsc; + const key = this.parseClassPropertyName(member); + const isPrivate = key.type === "PrivateName"; + const isSimple = key.type === "Identifier"; + this.parsePostMemberNameModifiers(publicMember); + + if (this.isClassMethod()) { + method.kind = "method"; + + if (isPrivate) { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + return; + } + + const isConstructor = this.isNonstaticConstructor(publicMethod); + let allowsDirectSuper = false; + + if (isConstructor) { + publicMethod.kind = "constructor"; + + if (publicMethod.decorators) { + this.raise(publicMethod.start, "You can't attach decorators to a class constructor"); + } + + if (state.hadConstructor && !this.hasPlugin("typescript")) { + this.raise(key.start, "Duplicate constructor in the same class"); + } + + state.hadConstructor = true; + allowsDirectSuper = constructorAllowsSuper; + } + + this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); + } else if (this.isClassProperty()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) { + const isGenerator = this.eat(types.star); + method.kind = "method"; + this.parseClassPropertyName(method); + + if (method.key.type === "PrivateName") { + this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(publicMethod.key.start, "Constructor can't be an async function"); + } + + this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); + } + } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types.star) && this.isLineTerminator())) { + method.kind = key.name; + this.parseClassPropertyName(publicMethod); + + if (method.key.type === "PrivateName") { + this.pushClassPrivateMethod(classBody, privateMethod, false, false); + } else { + if (this.isNonstaticConstructor(publicMethod)) { + this.raise(publicMethod.key.start, "Constructor can't have get/set modifier"); + } + + this.pushClassMethod(classBody, publicMethod, false, false, false, false); + } + + this.checkGetterSetterParams(publicMethod); + } else if (this.isLineTerminator()) { + if (isPrivate) { + this.pushClassPrivateProperty(classBody, privateProp); + } else { + this.pushClassProperty(classBody, publicProp); + } + } else { + this.unexpected(); + } + } + + parseClassPropertyName(member) { + const key = this.parsePropertyName(member); + + if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) { + this.raise(key.start, "Classes may not have static property named prototype"); + } + + if (key.type === "PrivateName" && key.id.name === "constructor") { + this.raise(key.start, "Classes may not have a private field named '#constructor'"); + } + + return key; + } + + pushClassProperty(classBody, prop) { + if (this.isNonstaticConstructor(prop)) { + this.raise(prop.key.start, "Classes may not have a non-static field named 'constructor'"); + } + + classBody.body.push(this.parseClassProperty(prop)); + } + + pushClassPrivateProperty(classBody, prop) { + this.expectPlugin("classPrivateProperties", prop.key.start); + classBody.body.push(this.parseClassPrivateProperty(prop)); + } + + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); + } + + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + this.expectPlugin("classPrivateMethods", method.key.start); + classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true)); + } + + parsePostMemberNameModifiers(methodOrProp) {} + + parseAccessModifier() { + return undefined; + } + + parseClassPrivateProperty(node) { + this.state.inClassProperty = true; + this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); + node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null; + this.semicolon(); + this.state.inClassProperty = false; + this.scope.exit(); + return this.finishNode(node, "ClassPrivateProperty"); + } + + parseClassProperty(node) { + if (!node.typeAnnotation) { + this.expectPlugin("classProperties"); + } + + this.state.inClassProperty = true; + this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); + + if (this.match(types.eq)) { + this.expectPlugin("classProperties"); + this.next(); + node.value = this.parseMaybeAssign(); + } else { + node.value = null; + } + + this.semicolon(); + this.state.inClassProperty = false; + this.scope.exit(); + return this.finishNode(node, "ClassProperty"); + } + + parseClassId(node, isStatement, optionalId) { + if (this.match(types.name)) { + node.id = this.parseIdentifier(); + + if (isStatement) { + this.checkLVal(node.id, BIND_LEXICAL, undefined, "class name"); + } + } else { + if (optionalId || !isStatement) { + node.id = null; + } else { + this.unexpected(null, "A class name is required"); + } + } + } + + parseClassSuper(node) { + node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; + } + + parseExport(node) { + const hasDefault = this.maybeParseExportDefaultSpecifier(node); + const parseAfterDefault = !hasDefault || this.eat(types.comma); + const hasStar = parseAfterDefault && this.eatExportStar(node); + const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); + const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types.comma)); + const isFromRequired = hasDefault || hasStar; + + if (hasStar && !hasNamespace) { + if (hasDefault) this.unexpected(); + this.parseExportFrom(node, true); + return this.finishNode(node, "ExportAllDeclaration"); + } + + const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); + + if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) { + throw this.unexpected(null, types.braceL); + } + + let hasDeclaration; + + if (isFromRequired || hasSpecifiers) { + hasDeclaration = false; + this.parseExportFrom(node, isFromRequired); + } else { + hasDeclaration = this.maybeParseExportDeclaration(node); + } + + if (isFromRequired || hasSpecifiers || hasDeclaration) { + this.checkExport(node, true, false, !!node.source); + return this.finishNode(node, "ExportNamedDeclaration"); + } + + if (this.eat(types._default)) { + node.declaration = this.parseExportDefaultExpression(); + this.checkExport(node, true, true); + return this.finishNode(node, "ExportDefaultDeclaration"); + } + + throw this.unexpected(null, types.braceL); + } + + eatExportStar(node) { + return this.eat(types.star); + } + + maybeParseExportDefaultSpecifier(node) { + if (this.isExportDefaultSpecifier()) { + this.expectPlugin("exportDefaultFrom"); + const specifier = this.startNode(); + specifier.exported = this.parseIdentifier(true); + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return true; + } + + return false; + } + + maybeParseExportNamespaceSpecifier(node) { + if (this.isContextual("as")) { + if (!node.specifiers) node.specifiers = []; + this.expectPlugin("exportNamespaceFrom"); + const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); + this.next(); + specifier.exported = this.parseIdentifier(true); + node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); + return true; + } + + return false; + } + + maybeParseExportNamedSpecifiers(node) { + if (this.match(types.braceL)) { + if (!node.specifiers) node.specifiers = []; + node.specifiers.push(...this.parseExportSpecifiers()); + node.source = null; + node.declaration = null; + return true; + } + + return false; + } + + maybeParseExportDeclaration(node) { + if (this.shouldParseExportDeclaration()) { + if (this.isContextual("async")) { + const next = this.lookahead(); + + if (next.type !== types._function) { + this.unexpected(next.start, `Unexpected token, expected "function"`); + } + } + + node.specifiers = []; + node.source = null; + node.declaration = this.parseExportDeclaration(node); + return true; + } + + return false; + } + + isAsyncFunction() { + if (!this.isContextual("async")) return false; + const { + pos + } = this.state; + skipWhiteSpace.lastIndex = pos; + const skip = skipWhiteSpace.exec(this.input); + if (!skip || !skip.length) return false; + const next = pos + skip[0].length; + return !lineBreak.test(this.input.slice(pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.length || !isIdentifierChar(this.input.charCodeAt(next + 8))); + } + + parseExportDefaultExpression() { + const expr = this.startNode(); + const isAsync = this.isAsyncFunction(); + + if (this.match(types._function) || isAsync) { + this.next(); + + if (isAsync) { + this.next(); + } + + return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync); + } else if (this.match(types._class)) { + return this.parseClass(expr, true, true); + } else if (this.match(types.at)) { + if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) { + this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax"); + } + + this.parseDecorators(false); + return this.parseClass(expr, true, true); + } else if (this.match(types._const) || this.match(types._var) || this.isLet()) { + return this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export."); + } else { + const res = this.parseMaybeAssign(); + this.semicolon(); + return res; + } + } + + parseExportDeclaration(node) { + return this.parseStatement(null); + } + + isExportDefaultSpecifier() { + if (this.match(types.name)) { + return this.state.value !== "async" && this.state.value !== "let"; + } + + if (!this.match(types._default)) { + return false; + } + + const lookahead = this.lookahead(); + return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from"; + } + + parseExportFrom(node, expect) { + if (this.eatContextual("from")) { + node.source = this.parseImportSource(); + this.checkExport(node); + } else { + if (expect) { + this.unexpected(); + } else { + node.source = null; + } + } + + this.semicolon(); + } + + shouldParseExportDeclaration() { + if (this.match(types.at)) { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + + if (this.hasPlugin("decorators")) { + if (this.getPluginOption("decorators", "decoratorsBeforeExport")) { + this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax"); + } else { + return true; + } + } + } + + return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction(); + } + + checkExport(node, checkNames, isDefault, isFrom) { + if (checkNames) { + if (isDefault) { + this.checkDuplicateExports(node, "default"); + } else if (node.specifiers && node.specifiers.length) { + for (let _i3 = 0, _node$specifiers = node.specifiers; _i3 < _node$specifiers.length; _i3++) { + const specifier = _node$specifiers[_i3]; + this.checkDuplicateExports(specifier, specifier.exported.name); + + if (!isFrom && specifier.local) { + this.checkReservedWord(specifier.local.name, specifier.local.start, true, false); + this.scope.checkLocalExport(specifier.local); + } + } + } else if (node.declaration) { + if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { + const id = node.declaration.id; + if (!id) throw new Error("Assertion failure"); + this.checkDuplicateExports(node, id.name); + } else if (node.declaration.type === "VariableDeclaration") { + for (let _i4 = 0, _node$declaration$dec = node.declaration.declarations; _i4 < _node$declaration$dec.length; _i4++) { + const declaration = _node$declaration$dec[_i4]; + this.checkDeclaration(declaration.id); + } + } + } + } + + const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; + + if (currentContextDecorators.length) { + const isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); + + if (!node.declaration || !isClass) { + throw this.raise(node.start, "You can only use decorators on an export when exporting a class"); + } + + this.takeDecorators(node.declaration); + } + } + + checkDeclaration(node) { + if (node.type === "Identifier") { + this.checkDuplicateExports(node, node.name); + } else if (node.type === "ObjectPattern") { + for (let _i5 = 0, _node$properties = node.properties; _i5 < _node$properties.length; _i5++) { + const prop = _node$properties[_i5]; + this.checkDeclaration(prop); + } + } else if (node.type === "ArrayPattern") { + for (let _i6 = 0, _node$elements = node.elements; _i6 < _node$elements.length; _i6++) { + const elem = _node$elements[_i6]; + + if (elem) { + this.checkDeclaration(elem); + } + } + } else if (node.type === "ObjectProperty") { + this.checkDeclaration(node.value); + } else if (node.type === "RestElement") { + this.checkDeclaration(node.argument); + } else if (node.type === "AssignmentPattern") { + this.checkDeclaration(node.left); + } + } + + checkDuplicateExports(node, name) { + if (this.state.exportedIdentifiers.indexOf(name) > -1) { + throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : `\`${name}\` has already been exported. Exported identifiers must be unique.`); + } + + this.state.exportedIdentifiers.push(name); + } + + parseExportSpecifiers() { + const nodes = []; + let first = true; + this.expect(types.braceL); + + while (!this.eat(types.braceR)) { + if (first) { + first = false; + } else { + this.expect(types.comma); + if (this.eat(types.braceR)) break; + } + + const node = this.startNode(); + node.local = this.parseIdentifier(true); + node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + + return nodes; + } + + parseImport(node) { + node.specifiers = []; + + if (!this.match(types.string)) { + const hasDefault = this.maybeParseDefaultImportSpecifier(node); + const parseNext = !hasDefault || this.eat(types.comma); + const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); + if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); + this.expectContextual("from"); + } + + node.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + + parseImportSource() { + if (!this.match(types.string)) this.unexpected(); + return this.parseExprAtom(); + } + + shouldParseDefaultImport(node) { + return this.match(types.name); + } + + parseImportSpecifierLocal(node, specifier, type, contextDescription) { + specifier.local = this.parseIdentifier(); + this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription); + node.specifiers.push(this.finishNode(specifier, type)); + } + + maybeParseDefaultImportSpecifier(node) { + if (this.shouldParseDefaultImport(node)) { + this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); + return true; + } + + return false; + } + + maybeParseStarImportSpecifier(node) { + if (this.match(types.star)) { + const specifier = this.startNode(); + this.next(); + this.expectContextual("as"); + this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); + return true; + } + + return false; + } + + parseNamedImportSpecifiers(node) { + let first = true; + this.expect(types.braceL); + + while (!this.eat(types.braceR)) { + if (first) { + first = false; + } else { + if (this.eat(types.colon)) { + this.unexpected(null, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import."); + } + + this.expect(types.comma); + if (this.eat(types.braceR)) break; + } + + this.parseImportSpecifier(node); + } + } + + parseImportSpecifier(node) { + const specifier = this.startNode(); + specifier.imported = this.parseIdentifier(true); + + if (this.eatContextual("as")) { + specifier.local = this.parseIdentifier(); + } else { + this.checkReservedWord(specifier.imported.name, specifier.start, true, true); + specifier.local = specifier.imported.__clone(); + } + + this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier"); + node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); + } + +} + +class Scope { + constructor(flags) { + this.var = []; + this.lexical = []; + this.functions = []; + this.flags = flags; + } + +} + +class ScopeHandler { + constructor(raise, inModule) { + this.scopeStack = []; + this.undefinedExports = new Map(); + this.raise = raise; + this.inModule = inModule; + } + + get inFunction() { + return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0; + } + + get inGenerator() { + return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0; + } + + get inAsync() { + return (this.currentVarScope().flags & SCOPE_ASYNC) > 0; + } + + get allowSuper() { + return (this.currentThisScope().flags & SCOPE_SUPER) > 0; + } + + get allowDirectSuper() { + return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0; + } + + get inNonArrowFunction() { + return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0; + } + + get treatFunctionsAsVar() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + } + + enter(flags) { + this.scopeStack.push(new Scope(flags)); + } + + exit() { + this.scopeStack.pop(); + } + + treatFunctionsAsVarInScope(scope) { + return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM); + } + + declareName(name, bindingType, pos) { + let redeclared = false; + + if (bindingType === BIND_LEXICAL) { + const scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + + if (this.inModule && scope.flags & SCOPE_PROGRAM) { + this.undefinedExports.delete(name); + } + } else if (bindingType === BIND_SIMPLE_CATCH) { + const scope = this.currentScope(); + scope.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + const scope = this.currentScope(); + + if (this.treatFunctionsAsVar) { + redeclared = scope.lexical.indexOf(name) > -1; + } else { + redeclared = scope.lexical.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + } + + scope.functions.push(name); + } else { + for (let i = this.scopeStack.length - 1; i >= 0; --i) { + const scope = this.scopeStack[i]; + + if (scope.lexical.indexOf(name) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1) { + redeclared = true; + break; + } + + scope.var.push(name); + + if (this.inModule && scope.flags & SCOPE_PROGRAM) { + this.undefinedExports.delete(name); + } + + if (scope.flags & SCOPE_VAR) break; + } + } + + if (redeclared) { + this.raise(pos, `Identifier '${name}' has already been declared`); + } + } + + checkLocalExport(id) { + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && this.scopeStack[0].functions.indexOf(id.name) === -1) { + this.undefinedExports.set(id.name, id.start); + } + } + + currentScope() { + return this.scopeStack[this.scopeStack.length - 1]; + } + + currentVarScope() { + for (let i = this.scopeStack.length - 1;; i--) { + const scope = this.scopeStack[i]; + + if (scope.flags & SCOPE_VAR) { + return scope; + } + } + } + + currentThisScope() { + for (let i = this.scopeStack.length - 1;; i--) { + const scope = this.scopeStack[i]; + + if ((scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW)) { + return scope; + } + } + } + +} + +class Parser extends StatementParser { + constructor(options, input) { + options = getOptions(options); + super(options, input); + this.options = options; + this.inModule = this.options.sourceType === "module"; + this.scope = new ScopeHandler(this.raise.bind(this), this.inModule); + this.plugins = pluginsMap(this.options.plugins); + this.filename = options.sourceFilename; + } + + parse() { + this.scope.enter(SCOPE_PROGRAM); + const file = this.startNode(); + const program = this.startNode(); + this.nextToken(); + return this.parseTopLevel(file, program); + } + +} + +function pluginsMap(plugins) { + const pluginMap = new Map(); + + for (let _i = 0; _i < plugins.length; _i++) { + const plugin = plugins[_i]; + const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}]; + if (!pluginMap.has(name)) pluginMap.set(name, options || {}); + } + + return pluginMap; +} + +function nonNull(x) { + if (x == null) { + throw new Error(`Unexpected ${x} value.`); + } + + return x; +} + +function assert(x) { + if (!x) { + throw new Error("Assert fail"); + } +} + +function keywordTypeFromName(value) { + switch (value) { + case "any": + return "TSAnyKeyword"; + + case "boolean": + return "TSBooleanKeyword"; + + case "bigint": + return "TSBigIntKeyword"; + + case "never": + return "TSNeverKeyword"; + + case "number": + return "TSNumberKeyword"; + + case "object": + return "TSObjectKeyword"; + + case "string": + return "TSStringKeyword"; + + case "symbol": + return "TSSymbolKeyword"; + + case "undefined": + return "TSUndefinedKeyword"; + + case "unknown": + return "TSUnknownKeyword"; + + default: + return undefined; + } +} + +var typescript = (superClass => class extends superClass { + tsIsIdentifier() { + return this.match(types.name); + } + + tsNextTokenCanFollowModifier() { + this.next(); + return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.parenR) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question) && !this.match(types.bang); + } + + tsParseModifier(allowedModifiers) { + if (!this.match(types.name)) { + return undefined; + } + + const modifier = this.state.value; + + if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { + return modifier; + } + + return undefined; + } + + tsIsListTerminator(kind) { + switch (kind) { + case "EnumMembers": + case "TypeMembers": + return this.match(types.braceR); + + case "HeritageClauseElement": + return this.match(types.braceL); + + case "TupleElementTypes": + return this.match(types.bracketR); + + case "TypeParametersOrArguments": + return this.isRelational(">"); + } + + throw new Error("Unreachable"); + } + + tsParseList(kind, parseElement) { + const result = []; + + while (!this.tsIsListTerminator(kind)) { + result.push(parseElement()); + } + + return result; + } + + tsParseDelimitedList(kind, parseElement) { + return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true)); + } + + tsTryParseDelimitedList(kind, parseElement) { + return this.tsParseDelimitedListWorker(kind, parseElement, false); + } + + tsParseDelimitedListWorker(kind, parseElement, expectSuccess) { + const result = []; + + while (true) { + if (this.tsIsListTerminator(kind)) { + break; + } + + const element = parseElement(); + + if (element == null) { + return undefined; + } + + result.push(element); + + if (this.eat(types.comma)) { + continue; + } + + if (this.tsIsListTerminator(kind)) { + break; + } + + if (expectSuccess) { + this.expect(types.comma); + } + + return undefined; + } + + return result; + } + + tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) { + if (!skipFirstToken) { + if (bracket) { + this.expect(types.bracketL); + } else { + this.expectRelational("<"); + } + } + + const result = this.tsParseDelimitedList(kind, parseElement); + + if (bracket) { + this.expect(types.bracketR); + } else { + this.expectRelational(">"); + } + + return result; + } + + tsParseImportType() { + const node = this.startNode(); + this.expect(types._import); + this.expect(types.parenL); + + if (!this.match(types.string)) { + throw this.unexpected(null, "Argument in a type import must be a string literal"); + } + + node.argument = this.parseLiteral(this.state.value, "StringLiteral"); + this.expect(types.parenR); + + if (this.eat(types.dot)) { + node.qualifier = this.tsParseEntityName(true); + } + + if (this.isRelational("<")) { + node.typeParameters = this.tsParseTypeArguments(); + } + + return this.finishNode(node, "TSImportType"); + } + + tsParseEntityName(allowReservedWords) { + let entity = this.parseIdentifier(); + + while (this.eat(types.dot)) { + const node = this.startNodeAtNode(entity); + node.left = entity; + node.right = this.parseIdentifier(allowReservedWords); + entity = this.finishNode(node, "TSQualifiedName"); + } + + return entity; + } + + tsParseTypeReference() { + const node = this.startNode(); + node.typeName = this.tsParseEntityName(false); + + if (!this.hasPrecedingLineBreak() && this.isRelational("<")) { + node.typeParameters = this.tsParseTypeArguments(); + } + + return this.finishNode(node, "TSTypeReference"); + } + + tsParseThisTypePredicate(lhs) { + this.next(); + const node = this.startNodeAtNode(lhs); + node.parameterName = lhs; + node.typeAnnotation = this.tsParseTypeAnnotation(false); + return this.finishNode(node, "TSTypePredicate"); + } + + tsParseThisTypeNode() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSThisType"); + } + + tsParseTypeQuery() { + const node = this.startNode(); + this.expect(types._typeof); + + if (this.match(types._import)) { + node.exprName = this.tsParseImportType(); + } else { + node.exprName = this.tsParseEntityName(true); + } + + return this.finishNode(node, "TSTypeQuery"); + } + + tsParseTypeParameter() { + const node = this.startNode(); + node.name = this.parseIdentifierName(node.start); + node.constraint = this.tsEatThenParseType(types._extends); + node.default = this.tsEatThenParseType(types.eq); + return this.finishNode(node, "TSTypeParameter"); + } + + tsTryParseTypeParameters() { + if (this.isRelational("<")) { + return this.tsParseTypeParameters(); + } + } + + tsParseTypeParameters() { + const node = this.startNode(); + + if (this.isRelational("<") || this.match(types.jsxTagStart)) { + this.next(); + } else { + this.unexpected(); + } + + node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true); + return this.finishNode(node, "TSTypeParameterDeclaration"); + } + + tsTryNextParseConstantContext() { + if (this.lookahead().type === types._const) { + this.next(); + return this.tsParseTypeReference(); + } + + return null; + } + + tsCheckLiteralForConstantContext(node) { + switch (node.type) { + case "StringLiteral": + case "TemplateLiteral": + case "NumericLiteral": + case "BooleanLiteral": + case "SpreadElement": + case "ObjectMethod": + case "ObjectExpression": + return; + + case "ArrayExpression": + return node.elements.forEach(element => { + if (element) { + this.tsCheckLiteralForConstantContext(element); + } + }); + + case "ObjectProperty": + return this.tsCheckLiteralForConstantContext(node.value); + + case "UnaryExpression": + return this.tsCheckLiteralForConstantContext(node.argument); + + default: + this.raise(node.start, "Only literal values are allowed in constant contexts"); + } + } + + tsFillSignature(returnToken, signature) { + const returnTokenRequired = returnToken === types.arrow; + signature.typeParameters = this.tsTryParseTypeParameters(); + this.expect(types.parenL); + signature.parameters = this.tsParseBindingListForSignature(); + + if (returnTokenRequired) { + signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (this.match(returnToken)) { + signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } + } + + tsParseBindingListForSignature() { + return this.parseBindingList(types.parenR).map(pattern => { + if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") { + throw this.unexpected(pattern.start, `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${pattern.type}`); + } + + return pattern; + }); + } + + tsParseTypeMemberSemicolon() { + if (!this.eat(types.comma)) { + this.semicolon(); + } + } + + tsParseSignatureMember(kind) { + const node = this.startNode(); + + if (kind === "TSConstructSignatureDeclaration") { + this.expect(types._new); + } + + this.tsFillSignature(types.colon, node); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, kind); + } + + tsIsUnambiguouslyIndexSignature() { + this.next(); + return this.eat(types.name) && this.match(types.colon); + } + + tsTryParseIndexSignature(node) { + if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { + return undefined; + } + + this.expect(types.bracketL); + const id = this.parseIdentifier(); + id.typeAnnotation = this.tsParseTypeAnnotation(); + this.finishNode(id, "Identifier"); + this.expect(types.bracketR); + node.parameters = [id]; + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, "TSIndexSignature"); + } + + tsParsePropertyOrMethodSignature(node, readonly) { + this.parsePropertyName(node); + if (this.eat(types.question)) node.optional = true; + const nodeAny = node; + + if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) { + const method = nodeAny; + this.tsFillSignature(types.colon, method); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(method, "TSMethodSignature"); + } else { + const property = nodeAny; + if (readonly) property.readonly = true; + const type = this.tsTryParseTypeAnnotation(); + if (type) property.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(property, "TSPropertySignature"); + } + } + + tsParseTypeMember() { + if (this.match(types.parenL) || this.isRelational("<")) { + return this.tsParseSignatureMember("TSCallSignatureDeclaration"); + } + + if (this.match(types._new) && this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this))) { + return this.tsParseSignatureMember("TSConstructSignatureDeclaration"); + } + + const node = this.startNode(); + const readonly = !!this.tsParseModifier(["readonly"]); + const idx = this.tsTryParseIndexSignature(node); + + if (idx) { + if (readonly) node.readonly = true; + return idx; + } + + return this.tsParsePropertyOrMethodSignature(node, readonly); + } + + tsIsStartOfConstructSignature() { + this.next(); + return this.match(types.parenL) || this.isRelational("<"); + } + + tsParseTypeLiteral() { + const node = this.startNode(); + node.members = this.tsParseObjectTypeMembers(); + return this.finishNode(node, "TSTypeLiteral"); + } + + tsParseObjectTypeMembers() { + this.expect(types.braceL); + const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.expect(types.braceR); + return members; + } + + tsIsStartOfMappedType() { + this.next(); + + if (this.eat(types.plusMin)) { + return this.isContextual("readonly"); + } + + if (this.isContextual("readonly")) { + this.next(); + } + + if (!this.match(types.bracketL)) { + return false; + } + + this.next(); + + if (!this.tsIsIdentifier()) { + return false; + } + + this.next(); + return this.match(types._in); + } + + tsParseMappedTypeParameter() { + const node = this.startNode(); + node.name = this.parseIdentifierName(node.start); + node.constraint = this.tsExpectThenParseType(types._in); + return this.finishNode(node, "TSTypeParameter"); + } + + tsParseMappedType() { + const node = this.startNode(); + this.expect(types.braceL); + + if (this.match(types.plusMin)) { + node.readonly = this.state.value; + this.next(); + this.expectContextual("readonly"); + } else if (this.eatContextual("readonly")) { + node.readonly = true; + } + + this.expect(types.bracketL); + node.typeParameter = this.tsParseMappedTypeParameter(); + this.expect(types.bracketR); + + if (this.match(types.plusMin)) { + node.optional = this.state.value; + this.next(); + this.expect(types.question); + } else if (this.eat(types.question)) { + node.optional = true; + } + + node.typeAnnotation = this.tsTryParseType(); + this.semicolon(); + this.expect(types.braceR); + return this.finishNode(node, "TSMappedType"); + } + + tsParseTupleType() { + const node = this.startNode(); + node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); + let seenOptionalElement = false; + node.elementTypes.forEach(elementNode => { + if (elementNode.type === "TSOptionalType") { + seenOptionalElement = true; + } else if (seenOptionalElement && elementNode.type !== "TSRestType") { + this.raise(elementNode.start, "A required element cannot follow an optional element."); + } + }); + return this.finishNode(node, "TSTupleType"); + } + + tsParseTupleElementType() { + if (this.match(types.ellipsis)) { + const restNode = this.startNode(); + this.next(); + restNode.typeAnnotation = this.tsParseType(); + this.checkCommaAfterRest(); + return this.finishNode(restNode, "TSRestType"); + } + + const type = this.tsParseType(); + + if (this.eat(types.question)) { + const optionalTypeNode = this.startNodeAtNode(type); + optionalTypeNode.typeAnnotation = type; + return this.finishNode(optionalTypeNode, "TSOptionalType"); + } + + return type; + } + + tsParseParenthesizedType() { + const node = this.startNode(); + this.expect(types.parenL); + node.typeAnnotation = this.tsParseType(); + this.expect(types.parenR); + return this.finishNode(node, "TSParenthesizedType"); + } + + tsParseFunctionOrConstructorType(type) { + const node = this.startNode(); + + if (type === "TSConstructorType") { + this.expect(types._new); + } + + this.tsFillSignature(types.arrow, node); + return this.finishNode(node, type); + } + + tsParseLiteralTypeNode() { + const node = this.startNode(); + + node.literal = (() => { + switch (this.state.type) { + case types.num: + return this.parseLiteral(this.state.value, "NumericLiteral"); + + case types.string: + return this.parseLiteral(this.state.value, "StringLiteral"); + + case types._true: + case types._false: + return this.parseBooleanLiteral(); + + default: + throw this.unexpected(); + } + })(); + + return this.finishNode(node, "TSLiteralType"); + } + + tsParseNonArrayType() { + switch (this.state.type) { + case types.name: + case types._void: + case types._null: + { + const type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value); + + if (type !== undefined && this.lookahead().type !== types.dot) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, type); + } + + return this.tsParseTypeReference(); + } + + case types.string: + case types.num: + case types._true: + case types._false: + return this.tsParseLiteralTypeNode(); + + case types.plusMin: + if (this.state.value === "-") { + const node = this.startNode(); + this.next(); + + if (!this.match(types.num)) { + throw this.unexpected(); + } + + node.literal = this.parseLiteral(-this.state.value, "NumericLiteral", node.start, node.loc.start); + return this.finishNode(node, "TSLiteralType"); + } + + break; + + case types._this: + { + const thisKeyword = this.tsParseThisTypeNode(); + + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + return this.tsParseThisTypePredicate(thisKeyword); + } else { + return thisKeyword; + } + } + + case types._typeof: + return this.tsParseTypeQuery(); + + case types._import: + return this.tsParseImportType(); + + case types.braceL: + return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + + case types.bracketL: + return this.tsParseTupleType(); + + case types.parenL: + return this.tsParseParenthesizedType(); + } + + throw this.unexpected(); + } + + tsParseArrayTypeOrHigher() { + let type = this.tsParseNonArrayType(); + + while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) { + if (this.match(types.bracketR)) { + const node = this.startNodeAtNode(type); + node.elementType = type; + this.expect(types.bracketR); + type = this.finishNode(node, "TSArrayType"); + } else { + const node = this.startNodeAtNode(type); + node.objectType = type; + node.indexType = this.tsParseType(); + this.expect(types.bracketR); + type = this.finishNode(node, "TSIndexedAccessType"); + } + } + + return type; + } + + tsParseTypeOperator(operator) { + const node = this.startNode(); + this.expectContextual(operator); + node.operator = operator; + node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); + + if (operator === "readonly") { + this.tsCheckTypeAnnotationForReadOnly(node); + } + + return this.finishNode(node, "TSTypeOperator"); + } + + tsCheckTypeAnnotationForReadOnly(node) { + switch (node.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": + return; + + default: + this.raise(node.operator, "'readonly' type modifier is only permitted on array and tuple literal types."); + } + } + + tsParseInferType() { + const node = this.startNode(); + this.expectContextual("infer"); + const typeParameter = this.startNode(); + typeParameter.name = this.parseIdentifierName(typeParameter.start); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + return this.finishNode(node, "TSInferType"); + } + + tsParseTypeOperatorOrHigher() { + const operator = ["keyof", "unique", "readonly"].find(kw => this.isContextual(kw)); + return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); + } + + tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { + this.eat(operator); + let type = parseConstituentType(); + + if (this.match(operator)) { + const types = [type]; + + while (this.eat(operator)) { + types.push(parseConstituentType()); + } + + const node = this.startNodeAtNode(type); + node.types = types; + type = this.finishNode(node, kind); + } + + return type; + } + + tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND); + } + + tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR); + } + + tsIsStartOfFunctionType() { + if (this.isRelational("<")) { + return true; + } + + return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + } + + tsSkipParameterStart() { + if (this.match(types.name) || this.match(types._this)) { + this.next(); + return true; + } + + if (this.match(types.braceL)) { + let braceStackCounter = 1; + this.next(); + + while (braceStackCounter > 0) { + if (this.match(types.braceL)) { + ++braceStackCounter; + } else if (this.match(types.braceR)) { + --braceStackCounter; + } + + this.next(); + } + + return true; + } + + if (this.match(types.bracketL)) { + let braceStackCounter = 1; + this.next(); + + while (braceStackCounter > 0) { + if (this.match(types.bracketL)) { + ++braceStackCounter; + } else if (this.match(types.bracketR)) { + --braceStackCounter; + } + + this.next(); + } + + return true; + } + + return false; + } + + tsIsUnambiguouslyStartOfFunctionType() { + this.next(); + + if (this.match(types.parenR) || this.match(types.ellipsis)) { + return true; + } + + if (this.tsSkipParameterStart()) { + if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) { + return true; + } + + if (this.match(types.parenR)) { + this.next(); + + if (this.match(types.arrow)) { + return true; + } + } + } + + return false; + } + + tsParseTypeOrTypePredicateAnnotation(returnToken) { + return this.tsInType(() => { + const t = this.startNode(); + this.expect(returnToken); + const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); + + if (!typePredicateVariable) { + return this.tsParseTypeAnnotation(false, t); + } + + const type = this.tsParseTypeAnnotation(false); + const node = this.startNodeAtNode(typePredicateVariable); + node.parameterName = typePredicateVariable; + node.typeAnnotation = type; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + }); + } + + tsTryParseTypeOrTypePredicateAnnotation() { + return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined; + } + + tsTryParseTypeAnnotation() { + return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined; + } + + tsTryParseType() { + return this.tsEatThenParseType(types.colon); + } + + tsParseTypePredicatePrefix() { + const id = this.parseIdentifier(); + + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + this.next(); + return id; + } + } + + tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { + this.tsInType(() => { + if (eatColon) this.expect(types.colon); + t.typeAnnotation = this.tsParseType(); + }); + return this.finishNode(t, "TSTypeAnnotation"); + } + + tsParseType() { + assert(this.state.inType); + const type = this.tsParseNonConditionalType(); + + if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) { + return type; + } + + const node = this.startNodeAtNode(type); + node.checkType = type; + node.extendsType = this.tsParseNonConditionalType(); + this.expect(types.question); + node.trueType = this.tsParseType(); + this.expect(types.colon); + node.falseType = this.tsParseType(); + return this.finishNode(node, "TSConditionalType"); + } + + tsParseNonConditionalType() { + if (this.tsIsStartOfFunctionType()) { + return this.tsParseFunctionOrConstructorType("TSFunctionType"); + } + + if (this.match(types._new)) { + return this.tsParseFunctionOrConstructorType("TSConstructorType"); + } + + return this.tsParseUnionTypeOrHigher(); + } + + tsParseTypeAssertion() { + const node = this.startNode(); + + const _const = this.tsTryNextParseConstantContext(); + + node.typeAnnotation = _const || this.tsNextThenParseType(); + this.expectRelational(">"); + node.expression = this.parseMaybeUnary(); + + if (_const) { + this.tsCheckLiteralForConstantContext(node.expression); + } + + return this.finishNode(node, "TSTypeAssertion"); + } + + tsParseHeritageClause(descriptor) { + const originalStart = this.state.start; + const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); + + if (!delimitedList.length) { + this.raise(originalStart, `'${descriptor}' list cannot be empty.`); + } + + return delimitedList; + } + + tsParseExpressionWithTypeArguments() { + const node = this.startNode(); + node.expression = this.tsParseEntityName(false); + + if (this.isRelational("<")) { + node.typeParameters = this.tsParseTypeArguments(); + } + + return this.finishNode(node, "TSExpressionWithTypeArguments"); + } + + tsParseInterfaceDeclaration(node) { + node.id = this.parseIdentifier(); + node.typeParameters = this.tsTryParseTypeParameters(); + + if (this.eat(types._extends)) { + node.extends = this.tsParseHeritageClause("extends"); + } + + const body = this.startNode(); + body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); + node.body = this.finishNode(body, "TSInterfaceBody"); + return this.finishNode(node, "TSInterfaceDeclaration"); + } + + tsParseTypeAliasDeclaration(node) { + node.id = this.parseIdentifier(); + node.typeParameters = this.tsTryParseTypeParameters(); + node.typeAnnotation = this.tsExpectThenParseType(types.eq); + this.semicolon(); + return this.finishNode(node, "TSTypeAliasDeclaration"); + } + + tsInNoContext(cb) { + const oldContext = this.state.context; + this.state.context = [oldContext[0]]; + + try { + return cb(); + } finally { + this.state.context = oldContext; + } + } + + tsInType(cb) { + const oldInType = this.state.inType; + this.state.inType = true; + + try { + return cb(); + } finally { + this.state.inType = oldInType; + } + } + + tsEatThenParseType(token) { + return !this.match(token) ? undefined : this.tsNextThenParseType(); + } + + tsExpectThenParseType(token) { + return this.tsDoThenParseType(() => this.expect(token)); + } + + tsNextThenParseType() { + return this.tsDoThenParseType(() => this.next()); + } + + tsDoThenParseType(cb) { + return this.tsInType(() => { + cb(); + return this.tsParseType(); + }); + } + + tsParseEnumMember() { + const node = this.startNode(); + node.id = this.match(types.string) ? this.parseLiteral(this.state.value, "StringLiteral") : this.parseIdentifier(true); + + if (this.eat(types.eq)) { + node.initializer = this.parseMaybeAssign(); + } + + return this.finishNode(node, "TSEnumMember"); + } + + tsParseEnumDeclaration(node, isConst) { + if (isConst) node.const = true; + node.id = this.parseIdentifier(); + this.expect(types.braceL); + node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(types.braceR); + return this.finishNode(node, "TSEnumDeclaration"); + } + + tsParseModuleBlock() { + const node = this.startNode(); + this.scope.enter(SCOPE_OTHER); + this.expect(types.braceL); + this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR); + this.scope.exit(); + return this.finishNode(node, "TSModuleBlock"); + } + + tsParseModuleOrNamespaceDeclaration(node) { + node.id = this.parseIdentifier(); + + if (this.eat(types.dot)) { + const inner = this.startNode(); + this.tsParseModuleOrNamespaceDeclaration(inner); + node.body = inner; + } else { + node.body = this.tsParseModuleBlock(); + } + + return this.finishNode(node, "TSModuleDeclaration"); + } + + tsParseAmbientExternalModuleDeclaration(node) { + if (this.isContextual("global")) { + node.global = true; + node.id = this.parseIdentifier(); + } else if (this.match(types.string)) { + node.id = this.parseExprAtom(); + } else { + this.unexpected(); + } + + if (this.match(types.braceL)) { + node.body = this.tsParseModuleBlock(); + } else { + this.semicolon(); + } + + return this.finishNode(node, "TSModuleDeclaration"); + } + + tsParseImportEqualsDeclaration(node, isExport) { + node.isExport = isExport || false; + node.id = this.parseIdentifier(); + this.expect(types.eq); + node.moduleReference = this.tsParseModuleReference(); + this.semicolon(); + return this.finishNode(node, "TSImportEqualsDeclaration"); + } + + tsIsExternalModuleReference() { + return this.isContextual("require") && this.lookahead().type === types.parenL; + } + + tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); + } + + tsParseExternalModuleReference() { + const node = this.startNode(); + this.expectContextual("require"); + this.expect(types.parenL); + + if (!this.match(types.string)) { + throw this.unexpected(); + } + + node.expression = this.parseLiteral(this.state.value, "StringLiteral"); + this.expect(types.parenR); + return this.finishNode(node, "TSExternalModuleReference"); + } + + tsLookAhead(f) { + const state = this.state.clone(); + const res = f(); + this.state = state; + return res; + } + + tsTryParseAndCatch(f) { + const state = this.state.clone(); + + try { + return f(); + } catch (e) { + if (e instanceof SyntaxError) { + this.state = state; + return undefined; + } + + throw e; + } + } + + tsTryParse(f) { + const state = this.state.clone(); + const result = f(); + + if (result !== undefined && result !== false) { + return result; + } else { + this.state = state; + return undefined; + } + } + + nodeWithSamePosition(original, type) { + const node = this.startNodeAtNode(original); + node.type = type; + node.end = original.end; + node.loc.end = original.loc.end; + + if (original.leadingComments) { + node.leadingComments = original.leadingComments; + } + + if (original.trailingComments) { + node.trailingComments = original.trailingComments; + } + + if (original.innerComments) node.innerComments = original.innerComments; + return node; + } + + tsTryParseDeclare(nany) { + if (this.isLineTerminator()) { + return; + } + + let starttype = this.state.type; + let kind; + + if (this.isContextual("let")) { + starttype = types._var; + kind = "let"; + } + + switch (starttype) { + case types._function: + return this.parseFunctionStatement(nany); + + case types._class: + return this.parseClass(nany, true, false); + + case types._const: + if (this.match(types._const) && this.isLookaheadContextual("enum")) { + this.expect(types._const); + this.expectContextual("enum"); + return this.tsParseEnumDeclaration(nany, true); + } + + case types._var: + kind = kind || this.state.value; + return this.parseVarStatement(nany, kind); + + case types.name: + { + const value = this.state.value; + + if (value === "global") { + return this.tsParseAmbientExternalModuleDeclaration(nany); + } else { + return this.tsParseDeclaration(nany, value, true); + } + } + } + } + + tsTryParseExportDeclaration() { + return this.tsParseDeclaration(this.startNode(), this.state.value, true); + } + + tsParseExpressionStatement(node, expr) { + switch (expr.name) { + case "declare": + { + const declaration = this.tsTryParseDeclare(node); + + if (declaration) { + declaration.declare = true; + return declaration; + } + + break; + } + + case "global": + if (this.match(types.braceL)) { + const mod = node; + mod.global = true; + mod.id = expr; + mod.body = this.tsParseModuleBlock(); + return this.finishNode(mod, "TSModuleDeclaration"); + } + + break; + + default: + return this.tsParseDeclaration(node, expr.name, false); + } + } + + tsParseDeclaration(node, value, next) { + switch (value) { + case "abstract": + if (this.tsCheckLineTerminatorAndMatch(types._class, next)) { + const cls = node; + cls.abstract = true; + + if (next) { + this.next(); + + if (!this.match(types._class)) { + this.unexpected(null, types._class); + } + } + + return this.parseClass(cls, true, false); + } + + break; + + case "enum": + if (next || this.match(types.name)) { + if (next) this.next(); + return this.tsParseEnumDeclaration(node, false); + } + + break; + + case "interface": + if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { + if (next) this.next(); + return this.tsParseInterfaceDeclaration(node); + } + + break; + + case "module": + if (next) this.next(); + + if (this.match(types.string)) { + return this.tsParseAmbientExternalModuleDeclaration(node); + } else if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + + break; + + case "namespace": + if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { + if (next) this.next(); + return this.tsParseModuleOrNamespaceDeclaration(node); + } + + break; + + case "type": + if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { + if (next) this.next(); + return this.tsParseTypeAliasDeclaration(node); + } + + break; + } + } + + tsCheckLineTerminatorAndMatch(tokenType, next) { + return (next || this.match(tokenType)) && !this.isLineTerminator(); + } + + tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { + const res = this.tsTryParseAndCatch(() => { + const node = this.startNodeAt(startPos, startLoc); + node.typeParameters = this.tsParseTypeParameters(); + super.parseFunctionParams(node); + node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); + this.expect(types.arrow); + return node; + }); + + if (!res) { + return undefined; + } + + return this.parseArrowExpression(res, null, true); + } + + tsParseTypeArguments() { + const node = this.startNode(); + node.params = this.tsInType(() => this.tsInNoContext(() => { + this.expectRelational("<"); + return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); + })); + this.state.exprAllowed = false; + this.expectRelational(">"); + return this.finishNode(node, "TSTypeParameterInstantiation"); + } + + tsIsDeclarationStart() { + if (this.match(types.name)) { + switch (this.state.value) { + case "abstract": + case "declare": + case "enum": + case "interface": + case "module": + case "namespace": + case "type": + return true; + } + } + + return false; + } + + isExportDefaultSpecifier() { + if (this.tsIsDeclarationStart()) return false; + return super.isExportDefaultSpecifier(); + } + + parseAssignableListItem(allowModifiers, decorators) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + let accessibility; + let readonly = false; + + if (allowModifiers) { + accessibility = this.parseAccessModifier(); + readonly = !!this.tsParseModifier(["readonly"]); + } + + const left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left); + const elt = this.parseMaybeDefault(left.start, left.loc.start, left); + + if (accessibility || readonly) { + const pp = this.startNodeAt(startPos, startLoc); + + if (decorators.length) { + pp.decorators = decorators; + } + + if (accessibility) pp.accessibility = accessibility; + if (readonly) pp.readonly = readonly; + + if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { + throw this.raise(pp.start, "A parameter property may not be declared using a binding pattern."); + } + + pp.parameter = elt; + return this.finishNode(pp, "TSParameterProperty"); + } + + if (decorators.length) { + left.decorators = decorators; + } + + return elt; + } + + parseFunctionBodyAndFinish(node, type, isMethod = false) { + if (this.match(types.colon)) { + node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); + } + + const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined; + + if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) { + this.finishNode(node, bodilessType); + return; + } + + super.parseFunctionBodyAndFinish(node, type, isMethod); + } + + parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) { + if (!this.hasPrecedingLineBreak() && this.match(types.bang)) { + this.state.exprAllowed = false; + this.next(); + const nonNullExpression = this.startNodeAt(startPos, startLoc); + nonNullExpression.expression = base; + return this.finishNode(nonNullExpression, "TSNonNullExpression"); + } + + if (this.isRelational("<")) { + const result = this.tsTryParseAndCatch(() => { + if (!noCalls && this.atPossibleAsync(base)) { + const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); + + if (asyncArrowFn) { + return asyncArrowFn; + } + } + + const node = this.startNodeAt(startPos, startLoc); + node.callee = base; + const typeArguments = this.tsParseTypeArguments(); + + if (typeArguments) { + if (!noCalls && this.eat(types.parenL)) { + node.arguments = this.parseCallExpressionArguments(types.parenR, false); + node.typeParameters = typeArguments; + return this.finishCallExpression(node); + } else if (this.match(types.backQuote)) { + return this.parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments); + } + } + + this.unexpected(); + }); + if (result) return result; + } + + return super.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow); + } + + parseNewArguments(node) { + if (this.isRelational("<")) { + const typeParameters = this.tsTryParseAndCatch(() => { + const args = this.tsParseTypeArguments(); + if (!this.match(types.parenL)) this.unexpected(); + return args; + }); + + if (typeParameters) { + node.typeParameters = typeParameters; + } + } + + super.parseNewArguments(node); + } + + parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { + if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) { + const node = this.startNodeAt(leftStartPos, leftStartLoc); + node.expression = left; + + const _const = this.tsTryNextParseConstantContext(); + + if (_const) { + this.tsCheckLiteralForConstantContext(node.expression); + node.typeAnnotation = _const; + } else { + node.typeAnnotation = this.tsNextThenParseType(); + } + + this.finishNode(node, "TSAsExpression"); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); + } + + return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn); + } + + checkReservedWord(word, startLoc, checkKeywords, isBinding) {} + + checkDuplicateExports() {} + + parseImport(node) { + if (this.match(types.name) && this.lookahead().type === types.eq) { + return this.tsParseImportEqualsDeclaration(node); + } + + return super.parseImport(node); + } + + parseExport(node) { + if (this.match(types._import)) { + this.expect(types._import); + return this.tsParseImportEqualsDeclaration(node, true); + } else if (this.eat(types.eq)) { + const assign = node; + assign.expression = this.parseExpression(); + this.semicolon(); + return this.finishNode(assign, "TSExportAssignment"); + } else if (this.eatContextual("as")) { + const decl = node; + this.expectContextual("namespace"); + decl.id = this.parseIdentifier(); + this.semicolon(); + return this.finishNode(decl, "TSNamespaceExportDeclaration"); + } else { + return super.parseExport(node); + } + } + + isAbstractClass() { + return this.isContextual("abstract") && this.lookahead().type === types._class; + } + + parseExportDefaultExpression() { + if (this.isAbstractClass()) { + const cls = this.startNode(); + this.next(); + this.parseClass(cls, true, true); + cls.abstract = true; + return cls; + } + + if (this.state.value === "interface") { + const result = this.tsParseDeclaration(this.startNode(), this.state.value, true); + if (result) return result; + } + + return super.parseExportDefaultExpression(); + } + + parseStatementContent(context, topLevel) { + if (this.state.type === types._const) { + const ahead = this.lookahead(); + + if (ahead.type === types.name && ahead.value === "enum") { + const node = this.startNode(); + this.expect(types._const); + this.expectContextual("enum"); + return this.tsParseEnumDeclaration(node, true); + } + } + + return super.parseStatementContent(context, topLevel); + } + + parseAccessModifier() { + return this.tsParseModifier(["public", "protected", "private"]); + } + + parseClassMember(classBody, member, state, constructorAllowsSuper) { + const accessibility = this.parseAccessModifier(); + if (accessibility) member.accessibility = accessibility; + super.parseClassMember(classBody, member, state, constructorAllowsSuper); + } + + parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) { + const methodOrProp = member; + const prop = member; + const propOrIdx = member; + let abstract = false, + readonly = false; + const mod = this.tsParseModifier(["abstract", "readonly"]); + + switch (mod) { + case "readonly": + readonly = true; + abstract = !!this.tsParseModifier(["abstract"]); + break; + + case "abstract": + abstract = true; + readonly = !!this.tsParseModifier(["readonly"]); + break; + } + + if (abstract) methodOrProp.abstract = true; + if (readonly) propOrIdx.readonly = true; + + if (!abstract && !isStatic && !methodOrProp.accessibility) { + const idx = this.tsTryParseIndexSignature(member); + + if (idx) { + classBody.body.push(idx); + return; + } + } + + if (readonly) { + methodOrProp.static = isStatic; + this.parseClassPropertyName(prop); + this.parsePostMemberNameModifiers(methodOrProp); + this.pushClassProperty(classBody, prop); + return; + } + + super.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper); + } + + parsePostMemberNameModifiers(methodOrProp) { + const optional = this.eat(types.question); + if (optional) methodOrProp.optional = true; + } + + parseExpressionStatement(node, expr) { + const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined; + return decl || super.parseExpressionStatement(node, expr); + } + + shouldParseExportDeclaration() { + if (this.tsIsDeclarationStart()) return true; + return super.shouldParseExportDeclaration(); + } + + parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { + if (!refNeedsArrowPos || !this.match(types.question)) { + return super.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); + } + + const state = this.state.clone(); + + try { + return super.parseConditional(expr, noIn, startPos, startLoc); + } catch (err) { + if (!(err instanceof SyntaxError)) { + throw err; + } + + this.state = state; + refNeedsArrowPos.start = err.pos || this.state.start; + return expr; + } + } + + parseParenItem(node, startPos, startLoc) { + node = super.parseParenItem(node, startPos, startLoc); + + if (this.eat(types.question)) { + node.optional = true; + } + + if (this.match(types.colon)) { + const typeCastNode = this.startNodeAt(startPos, startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TSTypeCastExpression"); + } + + return this.finishNode(node, node.type); + } + + parseExportDeclaration(node) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const isDeclare = this.eatContextual("declare"); + let declaration; + + if (this.match(types.name)) { + declaration = this.tsTryParseExportDeclaration(); + } + + if (!declaration) { + declaration = super.parseExportDeclaration(node); + } + + if (declaration && isDeclare) { + this.resetStartLocation(declaration, startPos, startLoc); + declaration.declare = true; + } + + return declaration; + } + + parseClassId(node, isStatement, optionalId) { + if ((!isStatement || optionalId) && this.isContextual("implements")) { + return; + } + + super.parseClassId(...arguments); + const typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) node.typeParameters = typeParameters; + } + + parseClassProperty(node) { + if (!node.optional && this.eat(types.bang)) { + node.definite = true; + } + + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + return super.parseClassProperty(node); + } + + pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { + const typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) method.typeParameters = typeParameters; + super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); + } + + pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { + const typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) method.typeParameters = typeParameters; + super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); + } + + parseClassSuper(node) { + super.parseClassSuper(node); + + if (node.superClass && this.isRelational("<")) { + node.superTypeParameters = this.tsParseTypeArguments(); + } + + if (this.eatContextual("implements")) { + node.implements = this.tsParseHeritageClause("implements"); + } + } + + parseObjPropValue(prop, ...args) { + const typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) prop.typeParameters = typeParameters; + super.parseObjPropValue(prop, ...args); + } + + parseFunctionParams(node, allowModifiers) { + const typeParameters = this.tsTryParseTypeParameters(); + if (typeParameters) node.typeParameters = typeParameters; + super.parseFunctionParams(node, allowModifiers); + } + + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + + if (decl.id.type === "Identifier" && this.eat(types.bang)) { + decl.definite = true; + } + + const type = this.tsTryParseTypeAnnotation(); + + if (type) { + decl.id.typeAnnotation = type; + this.finishNode(decl.id, decl.id.type); + } + } + + parseAsyncArrowFromCallExpression(node, call) { + if (this.match(types.colon)) { + node.returnType = this.tsParseTypeAnnotation(); + } + + return super.parseAsyncArrowFromCallExpression(node, call); + } + + parseMaybeAssign(...args) { + let jsxError; + + if (this.match(types.jsxTagStart)) { + const context = this.curContext(); + assert(context === types$1.j_oTag); + assert(this.state.context[this.state.context.length - 2] === types$1.j_expr); + const state = this.state.clone(); + + try { + return super.parseMaybeAssign(...args); + } catch (err) { + if (!(err instanceof SyntaxError)) { + throw err; + } + + this.state = state; + assert(this.curContext() === types$1.j_oTag); + this.state.context.pop(); + assert(this.curContext() === types$1.j_expr); + this.state.context.pop(); + jsxError = err; + } + } + + if (jsxError === undefined && !this.isRelational("<")) { + return super.parseMaybeAssign(...args); + } + + let arrowExpression; + let typeParameters; + const state = this.state.clone(); + + try { + typeParameters = this.tsParseTypeParameters(); + arrowExpression = super.parseMaybeAssign(...args); + + if (arrowExpression.type !== "ArrowFunctionExpression" || arrowExpression.extra && arrowExpression.extra.parenthesized) { + this.unexpected(); + } + } catch (err) { + if (!(err instanceof SyntaxError)) { + throw err; + } + + if (jsxError) { + throw jsxError; + } + + assert(!this.hasPlugin("jsx")); + this.state = state; + return super.parseMaybeAssign(...args); + } + + if (typeParameters && typeParameters.params.length !== 0) { + this.resetStartLocationFromNode(arrowExpression, typeParameters); + } + + arrowExpression.typeParameters = typeParameters; + return arrowExpression; + } + + parseMaybeUnary(refShorthandDefaultPos) { + if (!this.hasPlugin("jsx") && this.isRelational("<")) { + return this.tsParseTypeAssertion(); + } else { + return super.parseMaybeUnary(refShorthandDefaultPos); + } + } + + parseArrow(node) { + if (this.match(types.colon)) { + const state = this.state.clone(); + + try { + const returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); + if (this.canInsertSemicolon()) this.unexpected(); + if (!this.match(types.arrow)) this.unexpected(); + node.returnType = returnType; + } catch (err) { + if (err instanceof SyntaxError) { + this.state = state; + } else { + throw err; + } + } + } + + return super.parseArrow(node); + } + + parseAssignableListItemTypes(param) { + if (this.eat(types.question)) { + if (param.type !== "Identifier") { + throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); + } + + param.optional = true; + } + + const type = this.tsTryParseTypeAnnotation(); + if (type) param.typeAnnotation = type; + return this.finishNode(param, param.type); + } + + toAssignable(node, isBinding, contextDescription) { + switch (node.type) { + case "TSTypeCastExpression": + return super.toAssignable(this.typeCastToParameter(node), isBinding, contextDescription); + + case "TSParameterProperty": + return super.toAssignable(node, isBinding, contextDescription); + + case "TSAsExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + node.expression = this.toAssignable(node.expression, isBinding, contextDescription); + return node; + + default: + return super.toAssignable(node, isBinding, contextDescription); + } + } + + checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { + switch (expr.type) { + case "TSTypeCastExpression": + return; + + case "TSParameterProperty": + this.checkLVal(expr.parameter, bindingType, checkClashes, "parameter property"); + return; + + case "TSAsExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + this.checkLVal(expr.expression, bindingType, checkClashes, contextDescription); + return; + + default: + super.checkLVal(expr, bindingType, checkClashes, contextDescription); + return; + } + } + + parseBindingAtom() { + switch (this.state.type) { + case types._this: + return this.parseIdentifier(true); + + default: + return super.parseBindingAtom(); + } + } + + parseMaybeDecoratorArguments(expr) { + if (this.isRelational("<")) { + const typeArguments = this.tsParseTypeArguments(); + + if (this.match(types.parenL)) { + const call = super.parseMaybeDecoratorArguments(expr); + call.typeParameters = typeArguments; + return call; + } + + this.unexpected(this.state.start, types.parenL); + } + + return super.parseMaybeDecoratorArguments(expr); + } + + isClassMethod() { + return this.isRelational("<") || super.isClassMethod(); + } + + isClassProperty() { + return this.match(types.bang) || this.match(types.colon) || super.isClassProperty(); + } + + parseMaybeDefault(...args) { + const node = super.parseMaybeDefault(...args); + + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); + } + + return node; + } + + getTokenFromCode(code) { + if (this.state.inType && (code === 62 || code === 60)) { + return this.finishOp(types.relational, 1); + } else { + return super.getTokenFromCode(code); + } + } + + toAssignableList(exprList, isBinding, contextDescription) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if (!expr) continue; + + switch (expr.type) { + case "TSTypeCastExpression": + exprList[i] = this.typeCastToParameter(expr); + break; + + case "TSAsExpression": + case "TSTypeAssertion": + this.raise(expr.start, "Unexpected type cast in parameter position."); + break; + } + } + + return super.toAssignableList(exprList, isBinding, contextDescription); + } + + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end); + } + + toReferencedList(exprList, isInParens) { + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + + if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") { + this.raise(expr.start, "Did not expect a type annotation here."); + } + } + + return exprList; + } + + shouldParseArrow() { + return this.match(types.colon) || super.shouldParseArrow(); + } + + shouldParseAsyncArrow() { + return this.match(types.colon) || super.shouldParseAsyncArrow(); + } + + canHaveLeadingDecorator() { + return super.canHaveLeadingDecorator() || this.isAbstractClass(); + } + + jsxParseOpeningElementAfterName(node) { + const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments()); + if (typeArguments) node.typeParameters = typeArguments; + return super.jsxParseOpeningElementAfterName(node); + } + + getGetterSetterExpectedParamCount(method) { + const baseCount = super.getGetterSetterExpectedParamCount(method); + const firstParam = method.params[0]; + const hasContextParam = firstParam && firstParam.type === "Identifier" && firstParam.name === "this"; + return hasContextParam ? baseCount + 1 : baseCount; + } + +}); + +types.placeholder = new TokenType("%%", { + startsExpr: true +}); +var placeholders = (superClass => class extends superClass { + parsePlaceholder(expectedNode) { + if (this.match(types.placeholder)) { + const node = this.startNode(); + this.next(); + this.assertNoSpace("Unexpected space in placeholder."); + node.name = super.parseIdentifier(true); + this.assertNoSpace("Unexpected space in placeholder."); + this.expect(types.placeholder); + return this.finishPlaceholder(node, expectedNode); + } + } + + finishPlaceholder(node, expectedNode) { + node.expectedNode = expectedNode; + return this.finishNode(node, "Placeholder"); + } + + getTokenFromCode(code) { + if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { + return this.finishOp(types.placeholder, 2); + } + + return super.getTokenFromCode(...arguments); + } + + parseExprAtom() { + return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments); + } + + parseIdentifier() { + return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments); + } + + checkReservedWord(word) { + if (word !== undefined) super.checkReservedWord(...arguments); + } + + parseBindingAtom() { + return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments); + } + + checkLVal(expr) { + if (expr.type !== "Placeholder") super.checkLVal(...arguments); + } + + toAssignable(node) { + if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { + node.expectedNode = "Pattern"; + return node; + } + + return super.toAssignable(...arguments); + } + + verifyBreakContinue(node) { + if (node.label && node.label.type === "Placeholder") return; + super.verifyBreakContinue(...arguments); + } + + parseExpressionStatement(node, expr) { + if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) { + return super.parseExpressionStatement(...arguments); + } + + if (this.match(types.colon)) { + const stmt = node; + stmt.label = this.finishPlaceholder(expr, "Identifier"); + this.next(); + stmt.body = this.parseStatement("label"); + return this.finishNode(stmt, "LabeledStatement"); + } + + this.semicolon(); + node.name = expr.name; + return this.finishPlaceholder(node, "Statement"); + } + + parseBlock() { + return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments); + } + + parseFunctionId() { + return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments); + } + + parseClass(node, isStatement, optionalId) { + const type = isStatement ? "ClassDeclaration" : "ClassExpression"; + this.next(); + this.takeDecorators(node); + const placeholder = this.parsePlaceholder("Identifier"); + + if (placeholder) { + if (this.match(types._extends) || this.match(types.placeholder) || this.match(types.braceL)) { + node.id = placeholder; + } else if (optionalId || !isStatement) { + node.id = null; + node.body = this.finishPlaceholder(placeholder, "ClassBody"); + return this.finishNode(node, type); + } else { + this.unexpected(null, "A class name is required"); + } + } else { + this.parseClassId(node, isStatement, optionalId); + } + + this.parseClassSuper(node); + node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass); + return this.finishNode(node, type); + } + + parseExport(node) { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseExport(...arguments); + + if (!this.isContextual("from") && !this.match(types.comma)) { + node.specifiers = []; + node.source = null; + node.declaration = this.finishPlaceholder(placeholder, "Declaration"); + return this.finishNode(node, "ExportNamedDeclaration"); + } + + this.expectPlugin("exportDefaultFrom"); + const specifier = this.startNode(); + specifier.exported = placeholder; + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return super.parseExport(node); + } + + maybeParseExportDefaultSpecifier(node) { + if (node.specifiers && node.specifiers.length > 0) { + return true; + } + + return super.maybeParseExportDefaultSpecifier(...arguments); + } + + checkExport(node) { + const { + specifiers + } = node; + + if (specifiers && specifiers.length) { + node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); + } + + super.checkExport(node); + node.specifiers = specifiers; + } + + parseImport(node) { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseImport(...arguments); + node.specifiers = []; + + if (!this.isContextual("from") && !this.match(types.comma)) { + node.source = this.finishPlaceholder(placeholder, "StringLiteral"); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + + const specifier = this.startNodeAtNode(placeholder); + specifier.local = placeholder; + this.finishNode(specifier, "ImportDefaultSpecifier"); + node.specifiers.push(specifier); + + if (this.eat(types.comma)) { + const hasStarImport = this.maybeParseStarImportSpecifier(node); + if (!hasStarImport) this.parseNamedImportSpecifiers(node); + } + + this.expectContextual("from"); + node.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + + parseImportSource() { + return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments); + } + +}); + +function hasPlugin(plugins, name) { + return plugins.some(plugin => { + if (Array.isArray(plugin)) { + return plugin[0] === name; + } else { + return plugin === name; + } + }); +} +function getPluginOption(plugins, name, option) { + const plugin = plugins.find(plugin => { + if (Array.isArray(plugin)) { + return plugin[0] === name; + } else { + return plugin === name; + } + }); + + if (plugin && Array.isArray(plugin)) { + return plugin[1][option]; + } + + return null; +} +const PIPELINE_PROPOSALS = ["minimal", "smart"]; +function validatePlugins(plugins) { + if (hasPlugin(plugins, "decorators")) { + if (hasPlugin(plugins, "decorators-legacy")) { + throw new Error("Cannot use the decorators and decorators-legacy plugin together"); + } + + const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport"); + + if (decoratorsBeforeExport == null) { + throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'."); + } else if (typeof decoratorsBeforeExport !== "boolean") { + throw new Error("'decoratorsBeforeExport' must be a boolean."); + } + } + + if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) { + throw new Error("Cannot combine flow and typescript plugins."); + } + + if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) { + throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(p => `'${p}'`).join(", ")); + } +} +const mixinPlugins = { + estree, + jsx, + flow, + typescript, + placeholders +}; +const mixinPluginNames = Object.keys(mixinPlugins); + +function parse(input, options) { + if (options && options.sourceType === "unambiguous") { + options = Object.assign({}, options); + + try { + options.sourceType = "module"; + const parser = getParser(options, input); + const ast = parser.parse(); + if (!parser.sawUnambiguousESM) ast.program.sourceType = "script"; + return ast; + } catch (moduleError) { + try { + options.sourceType = "script"; + return getParser(options, input).parse(); + } catch (scriptError) {} + + throw moduleError; + } + } else { + return getParser(options, input).parse(); + } +} +function parseExpression(input, options) { + const parser = getParser(options, input); + + if (parser.options.strictMode) { + parser.state.strict = true; + } + + return parser.getExpression(); +} + +function getParser(options, input) { + let cls = Parser; + + if (options && options.plugins) { + validatePlugins(options.plugins); + cls = getParserClass(options.plugins); + } + + return new cls(options, input); +} + +const parserClassCache = {}; + +function getParserClass(pluginsFromOptions) { + const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name)); + const key = pluginList.join("/"); + let cls = parserClassCache[key]; + + if (!cls) { + cls = Parser; + + for (let _i = 0; _i < pluginList.length; _i++) { + const plugin = pluginList[_i]; + cls = mixinPlugins[plugin](cls); + } + + parserClassCache[key] = cls; + } + + return cls; +} + +exports.parse = parse; +exports.parseExpression = parseExpression; +exports.tokTypes = types; diff --git a/node_modules/@babel/parser/package.json b/node_modules/@babel/parser/package.json new file mode 100644 index 0000000..a3a875a --- /dev/null +++ b/node_modules/@babel/parser/package.json @@ -0,0 +1,74 @@ +{ + "_from": "@babel/parser@^7.4.0", + "_id": "@babel/parser@7.4.2", + "_inBundle": false, + "_integrity": "sha512-9fJTDipQFvlfSVdD/JBtkiY0br9BtfvW2R8wo6CX/Ej2eMuV0gWPk1M67Mt3eggQvBqYW1FCEk8BN7WvGm/g5g==", + "_location": "/@babel/parser", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@babel/parser@^7.4.0", + "name": "@babel/parser", + "escapedName": "@babel%2fparser", + "scope": "@babel", + "rawSpec": "^7.4.0", + "saveSpec": null, + "fetchSpec": "^7.4.0" + }, + "_requiredBy": [ + "/@babel/core", + "/@babel/core/@babel/template", + "/@babel/core/@babel/traverse" + ], + "_resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.2.tgz", + "_shasum": "b4521a400cb5a871eab3890787b4bc1326d38d91", + "_spec": "@babel/parser@^7.4.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\@babel\\core", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "bin": { + "parser": "./bin/babel-parser.js" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A JavaScript parser", + "devDependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/helper-fixtures": "^7.2.0", + "charcodes": "^0.2.0", + "unicode-12.0.0": "^0.7.9" + }, + "engines": { + "node": ">=6.0.0" + }, + "files": [ + "bin", + "lib", + "typings" + ], + "gitHead": "7dea0f23de51af336a2fab0286a73af30cddf3be", + "homepage": "https://babeljs.io/", + "keywords": [ + "babel", + "javascript", + "parser", + "tc39", + "ecmascript", + "@babel/parser" + ], + "license": "MIT", + "main": "lib/index.js", + "name": "@babel/parser", + "publishConfig": { + "tag": "next" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-parser" + }, + "types": "typings/babel-parser.d.ts", + "version": "7.4.2" +} diff --git a/node_modules/@babel/parser/typings/babel-parser.d.ts b/node_modules/@babel/parser/typings/babel-parser.d.ts new file mode 100644 index 0000000..deba6be --- /dev/null +++ b/node_modules/@babel/parser/typings/babel-parser.d.ts @@ -0,0 +1,135 @@ +// Type definitions for @babel/parser +// Project: https://github.com/babel/babel/tree/master/packages/babel-parser +// Definitions by: Troy Gerwien +// Marvin Hagemeister +// Avi Vahl +// TypeScript Version: 2.9 + +/** + * Parse the provided code as an entire ECMAScript program. + */ +export function parse(input: string, options?: ParserOptions): import('@babel/types').File; + +/** + * Parse the provided code as a single expression. + */ +export function parseExpression(input: string, options?: ParserOptions): import('@babel/types').Expression; + +export interface ParserOptions { + /** + * By default, import and export declarations can only appear at a program's top level. + * Setting this option to true allows them anywhere where a statement is allowed. + */ + allowImportExportEverywhere?: boolean; + + /** + * By default, await use is not allowed outside of an async function. + * Set this to true to accept such code. + */ + allowAwaitOutsideFunction?: boolean; + + /** + * By default, a return statement at the top level raises an error. + * Set this to true to accept such code. + */ + allowReturnOutsideFunction?: boolean; + + allowSuperOutsideMethod?: boolean; + + /** + * Indicate the mode the code should be parsed in. + * Can be one of "script", "module", or "unambiguous". Defaults to "script". + * "unambiguous" will make @babel/parser attempt to guess, based on the presence + * of ES6 import or export statements. + * Files with ES6 imports and exports are considered "module" and are otherwise "script". + */ + sourceType?: 'script' | 'module' | 'unambiguous'; + + /** + * Correlate output AST nodes with their source filename. + * Useful when generating code and source maps from the ASTs of multiple input files. + */ + sourceFilename?: string; + + /** + * By default, the first line of code parsed is treated as line 1. + * You can provide a line number to alternatively start with. + * Useful for integration with other source tools. + */ + startLine?: number; + + /** + * Array containing the plugins that you want to enable. + */ + plugins?: ParserPlugin[]; + + /** + * Should the parser work in strict mode. + * Defaults to true if sourceType === 'module'. Otherwise, false. + */ + strictMode?: boolean; + + /** + * Adds a ranges property to each node: [node.start, node.end] + */ + ranges?: boolean; + + /** + * Adds all parsed tokens to a tokens property on the File node. + */ + tokens?: boolean; + + /** + * By default, the parser adds information about parentheses by setting + * `extra.parenthesized` to `true` as needed. + * When this option is `true` the parser creates `ParenthesizedExpression` + * AST nodes instead of using the `extra` property. + */ + createParenthesizedExpressions?: boolean; +} + +export type ParserPlugin = + 'estree' | + 'jsx' | + 'flow' | + 'flowComments' | + 'typescript' | + 'doExpressions' | + 'objectRestSpread' | + 'decorators' | + 'decorators-legacy' | + 'classProperties' | + 'classPrivateProperties' | + 'classPrivateMethods' | + 'exportDefaultFrom' | + 'exportNamespaceFrom' | + 'asyncGenerators' | + 'functionBind' | + 'functionSent' | + 'dynamicImport' | + 'numericSeparator' | + 'optionalChaining' | + 'importMeta' | + 'bigInt' | + 'optionalCatchBinding' | + 'throwExpressions' | + 'pipelineOperator' | + 'nullishCoalescingOperator' | + ParserPluginWithOptions; + +export type ParserPluginWithOptions = + ['decorators', DecoratorsPluginOptions] | + ['pipelineOperator', PipelineOperatorPluginOptions] | + ['flow', FlowPluginOptions]; + +export interface DecoratorsPluginOptions { + decoratorsBeforeExport?: boolean; +} + +export interface PipelineOperatorPluginOptions { + proposal: 'minimal' | 'smart'; +} + +export interface FlowPluginOptions { + all?: boolean; +} diff --git a/node_modules/@babel/template/README.md b/node_modules/@babel/template/README.md deleted file mode 100644 index 0219286..0000000 --- a/node_modules/@babel/template/README.md +++ /dev/null @@ -1,172 +0,0 @@ -# @babel/template - -> Generate an AST from a string template or template literal. - -In computer science, this is known as an implementation of quasiquotes. - -## Install - -```sh -npm install --save-dev @babel/template -``` - -## String Usage - -```js -import template from "@babel/template"; -import generate from "@babel/generator"; -import * as t from "@babel/types"; - -const buildRequire = template(` - var IMPORT_NAME = require(SOURCE); -`); - -const ast = buildRequire({ - IMPORT_NAME: t.identifier("myModule"), - SOURCE: t.stringLiteral("my-module") -}); - -console.log(generate(ast).code); -``` - -```js -const myModule = require("my-module"); -``` - -### `.ast` - -If no placeholders are in use and you just want a simple way to parse a -string into an AST, you can use the `.ast` version of the template. - -```js -const ast = template.ast(` - var myModule = require("my-module"); -`); -``` -which will parse and return the AST directly. - - -## Template Literal Usage - -```js -import template from "@babel/template"; -import generate from "@babel/generator"; -import * as t from "@babel/types"; - -const fn = template` - var IMPORT_NAME = require('${"my-module"}'); -`); - -const ast = fn({ - IMPORT_NAME: t.identifier("myModule"); -}); - -console.log(generate(ast).code); -``` - -Note that placeholders can be passed directly as part of the template literal -in order to make things as readable as possible, or they can be passed into -the template function. - -### `.ast` - -If no placeholders are in use and you just want a simple way to parse a -string into an AST, you can use the `.ast` version of the template. - -```js -const name = "my-module"; -const mod = "myModule"; - -const ast = template.ast` - var ${mod} = require("${name}"); -`; -``` -which will parse and return the AST directly. Note that unlike the string-based -version mentioned earlier, since this is a template literal, it is still -valid to perform replacements using template literal replacements. - - -## AST results - -The `@babel/template` API exposes a few flexible APIs to make it as easy as -possible to create ASTs with an expected structure. Each of these also has -the `.ast` property mentioned above. - -### `template` - -`template` returns either a single statement, or an array of -statements, depending on the parsed result. - -### `template.smart` - -This is the same as the default `template` API, returning either a single -node, or an array of nodes, depending on the parsed result. - -### `template.statement` - -`template.statement("foo;")()` returns a single statement node, and throw -an exception if the result is anything but a single statement. - -### `template.statements` - -`template.statements("foo;foo;")()` returns an array of statement nodes. - -### `template.expression` - -`template.expression("foo")()` returns the expression node. - -### `template.program` - -`template.program("foo;")()` returns the `Program` node for the template. - - -## API - -### `template(code, [opts])` - -#### code - -Type: `string` - -#### options - -`@babel/template` accepts all of the options from [babylon](https://github.com/babel/babel/tree/master/packages/babylon), and specifies -some defaults of its own: - -* `allowReturnOutsideFunction` is set to `true` by default. -* `allowSuperOutsideMethod` is set to `true` by default. -* `sourceType` is set to `module` by default. - -##### placeholderWhitelist - -Type: `Set` -Default: `undefined` - -A set of placeholder names to automatically accept. Items in this list do -not need to match the given placeholder pattern. - -##### placeholderPattern - -Type: `RegExp | false` -Default: `/^[_$A-Z0-9]+$/` - -A pattern to search for when looking for Identifier and StringLiteral -nodes that should be considered placeholders. -'false' will disable placeholder searching entirely, leaving only the -'placeholderWhitelist' value to find placeholders. - -##### preserveComments - -Type: `boolean` -Default: `false` - -Set this to `true` to preserve any comments from the `code` parameter. - -#### Return value - -By default `@babel/template` returns a `function` which is invoked with an -optional object of replacements. See the usage section for an example. - -When using `.ast`, the AST will be returned directly. - -[babylon]: https://github.com/babel/babylon#options diff --git a/node_modules/@babel/template/lib/builder.js b/node_modules/@babel/template/lib/builder.js deleted file mode 100644 index cc09beb..0000000 --- a/node_modules/@babel/template/lib/builder.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createTemplateBuilder; - -var _options = require("./options"); - -var _string = _interopRequireDefault(require("./string")); - -var _literal = _interopRequireDefault(require("./literal")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var NO_PLACEHOLDER = (0, _options.validate)({ - placeholderPattern: false -}); - -function createTemplateBuilder(formatter, defaultOpts) { - var templateFnCache = new WeakMap(); - var templateAstCache = new WeakMap(); - var cachedOpts = defaultOpts || (0, _options.validate)(null); - return Object.assign(function (tpl) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - if (typeof tpl === "string") { - if (args.length > 1) throw new Error("Unexpected extra params."); - return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])))); - } else if (Array.isArray(tpl)) { - var builder = templateFnCache.get(tpl); - - if (!builder) { - builder = (0, _literal.default)(formatter, tpl, cachedOpts); - templateFnCache.set(tpl, builder); - } - - return extendedTrace(builder(args)); - } else if (typeof tpl === "object" && tpl) { - if (args.length > 0) throw new Error("Unexpected extra params."); - return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl))); - } - - throw new Error("Unexpected template param " + typeof tpl); - }, { - ast: function ast(tpl) { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - if (typeof tpl === "string") { - if (args.length > 1) throw new Error("Unexpected extra params."); - return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))(); - } else if (Array.isArray(tpl)) { - var builder = templateAstCache.get(tpl); - - if (!builder) { - builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER)); - templateAstCache.set(tpl, builder); - } - - return builder(args)(); - } - - throw new Error("Unexpected template param " + typeof tpl); - } - }); -} - -function extendedTrace(fn) { - var rootStack = ""; - - try { - throw new Error(); - } catch (error) { - if (error.stack) { - rootStack = error.stack.split("\n").slice(3).join("\n"); - } - } - - return function (arg) { - try { - return fn(arg); - } catch (err) { - err.stack += "\n =============\n" + rootStack; - throw err; - } - }; -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/formatters.js b/node_modules/@babel/template/lib/formatters.js deleted file mode 100644 index 72e5ac1..0000000 --- a/node_modules/@babel/template/lib/formatters.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0; - -function makeStatementFormatter(fn) { - return { - code: function code(str) { - return "/* @babel/template */;\n" + str; - }, - validate: function validate() {}, - unwrap: function unwrap(ast) { - return fn(ast.program.body.slice(1)); - } - }; -} - -var smart = makeStatementFormatter(function (body) { - if (body.length > 1) { - return body; - } else { - return body[0]; - } -}); -exports.smart = smart; -var statements = makeStatementFormatter(function (body) { - return body; -}); -exports.statements = statements; -var statement = makeStatementFormatter(function (body) { - if (body.length === 0) { - throw new Error("Found nothing to return."); - } - - if (body.length > 1) { - throw new Error("Found multiple statements but wanted one"); - } - - return body[0]; -}); -exports.statement = statement; -var expression = { - code: function code(str) { - return "(\n" + str + "\n)"; - }, - validate: function validate(_ref) { - var program = _ref.program; - - if (program.body.length > 1) { - throw new Error("Found multiple statements but wanted one"); - } - - var expression = program.body[0].expression; - - if (expression.start === 0) { - throw new Error("Parse result included parens."); - } - }, - unwrap: function unwrap(ast) { - return ast.program.body[0].expression; - } -}; -exports.expression = expression; -var program = { - code: function code(str) { - return str; - }, - validate: function validate() {}, - unwrap: function unwrap(ast) { - return ast.program; - } -}; -exports.program = program; \ No newline at end of file diff --git a/node_modules/@babel/template/lib/index.js b/node_modules/@babel/template/lib/index.js deleted file mode 100644 index c73a5b2..0000000 --- a/node_modules/@babel/template/lib/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0; - -var formatters = _interopRequireWildcard(require("./formatters")); - -var _builder = _interopRequireDefault(require("./builder")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -var smart = (0, _builder.default)(formatters.smart); -exports.smart = smart; -var statement = (0, _builder.default)(formatters.statement); -exports.statement = statement; -var statements = (0, _builder.default)(formatters.statements); -exports.statements = statements; -var expression = (0, _builder.default)(formatters.expression); -exports.expression = expression; -var program = (0, _builder.default)(formatters.program); -exports.program = program; - -var _default = Object.assign(smart.bind(undefined), { - smart: smart, - statement: statement, - statements: statements, - expression: expression, - program: program, - ast: smart.ast -}); - -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/template/lib/literal.js b/node_modules/@babel/template/lib/literal.js deleted file mode 100644 index 8de5394..0000000 --- a/node_modules/@babel/template/lib/literal.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = literalTemplate; - -var _options = require("./options"); - -var _parse = _interopRequireDefault(require("./parse")); - -var _populate = _interopRequireDefault(require("./populate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function literalTemplate(formatter, tpl, opts) { - var _buildLiteralData = buildLiteralData(formatter, tpl, opts), - metadata = _buildLiteralData.metadata, - names = _buildLiteralData.names; - - return function (arg) { - var defaultReplacements = arg.reduce(function (acc, replacement, i) { - acc[names[i]] = replacement; - return acc; - }, {}); - return function (arg) { - var replacements = (0, _options.normalizeReplacements)(arg); - - if (replacements) { - Object.keys(replacements).forEach(function (key) { - if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) { - throw new Error("Unexpected replacement overlap."); - } - }); - } - - return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements)); - }; - }; -} - -function buildLiteralData(formatter, tpl, opts) { - var names; - var nameSet; - var metadata; - var prefix = ""; - - do { - prefix += "$"; - var result = buildTemplateCode(tpl, prefix); - names = result.names; - nameSet = new Set(names); - metadata = (0, _parse.default)(formatter, formatter.code(result.code), { - parser: opts.parser, - placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])), - placeholderPattern: opts.placeholderPattern, - preserveComments: opts.preserveComments - }); - } while (metadata.placeholders.some(function (placeholder) { - return placeholder.isDuplicate && nameSet.has(placeholder.name); - })); - - return { - metadata: metadata, - names: names - }; -} - -function buildTemplateCode(tpl, prefix) { - var names = []; - var code = tpl[0]; - - for (var i = 1; i < tpl.length; i++) { - var value = "" + prefix + (i - 1); - names.push(value); - code += value + tpl[i]; - } - - return { - names: names, - code: code - }; -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/options.js b/node_modules/@babel/template/lib/options.js deleted file mode 100644 index c575adf..0000000 --- a/node_modules/@babel/template/lib/options.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.merge = merge; -exports.validate = validate; -exports.normalizeReplacements = normalizeReplacements; - -function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } - -function merge(a, b) { - var _b$placeholderWhiteli = b.placeholderWhitelist, - placeholderWhitelist = _b$placeholderWhiteli === void 0 ? a.placeholderWhitelist : _b$placeholderWhiteli, - _b$placeholderPattern = b.placeholderPattern, - placeholderPattern = _b$placeholderPattern === void 0 ? a.placeholderPattern : _b$placeholderPattern, - _b$preserveComments = b.preserveComments, - preserveComments = _b$preserveComments === void 0 ? a.preserveComments : _b$preserveComments; - return { - parser: Object.assign({}, a.parser, b.parser), - placeholderWhitelist: placeholderWhitelist, - placeholderPattern: placeholderPattern, - preserveComments: preserveComments - }; -} - -function validate(opts) { - if (opts != null && typeof opts !== "object") { - throw new Error("Unknown template options."); - } - - var _ref = opts || {}, - placeholderWhitelist = _ref.placeholderWhitelist, - placeholderPattern = _ref.placeholderPattern, - preserveComments = _ref.preserveComments, - parser = _objectWithoutProperties(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments"]); - - if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) { - throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined"); - } - - if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) { - throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined"); - } - - if (preserveComments != null && typeof preserveComments !== "boolean") { - throw new Error("'.preserveComments' must be a boolean, null, or undefined"); - } - - return { - parser: parser, - placeholderWhitelist: placeholderWhitelist || undefined, - placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern, - preserveComments: preserveComments == null ? false : preserveComments - }; -} - -function normalizeReplacements(replacements) { - if (Array.isArray(replacements)) { - return replacements.reduce(function (acc, replacement, i) { - acc["$" + i] = replacement; - return acc; - }, {}); - } else if (typeof replacements === "object" || replacements == null) { - return replacements || undefined; - } - - throw new Error("Template replacements must be an array, object, null, or undefined"); -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/parse.js b/node_modules/@babel/template/lib/parse.js deleted file mode 100644 index fc29824..0000000 --- a/node_modules/@babel/template/lib/parse.js +++ /dev/null @@ -1,156 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parseAndBuildMetadata; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _babylon() { - var data = require("babylon"); - - _babylon = function _babylon() { - return data; - }; - - return data; -} - -function _codeFrame() { - var data = require("@babel/code-frame"); - - _codeFrame = function _codeFrame() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -var PATTERN = /^[_$A-Z0-9]+$/; - -function parseAndBuildMetadata(formatter, code, opts) { - var ast = parseWithCodeFrame(code, opts.parser); - var placeholderWhitelist = opts.placeholderWhitelist, - _opts$placeholderPatt = opts.placeholderPattern, - placeholderPattern = _opts$placeholderPatt === void 0 ? PATTERN : _opts$placeholderPatt, - preserveComments = opts.preserveComments; - t().removePropertiesDeep(ast, { - preserveComments: preserveComments - }); - formatter.validate(ast); - var placeholders = []; - var placeholderNames = new Set(); - t().traverse(ast, placeholderVisitorHandler, { - placeholders: placeholders, - placeholderNames: placeholderNames, - placeholderWhitelist: placeholderWhitelist, - placeholderPattern: placeholderPattern - }); - return { - ast: ast, - placeholders: placeholders, - placeholderNames: placeholderNames - }; -} - -function placeholderVisitorHandler(node, ancestors, state) { - var name; - - if (t().isIdentifier(node) || t().isJSXIdentifier(node)) { - name = node.name; - } else if (t().isStringLiteral(node)) { - name = node.value; - } else { - return; - } - - if ((!state.placeholderPattern || !state.placeholderPattern.test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) { - return; - } - - ancestors = ancestors.slice(); - var _ancestors = ancestors[ancestors.length - 1], - parent = _ancestors.node, - key = _ancestors.key; - var type; - - if (t().isStringLiteral(node)) { - type = "string"; - } else if (t().isNewExpression(parent) && key === "arguments" || t().isCallExpression(parent) && key === "arguments" || t().isFunction(parent) && key === "params") { - type = "param"; - } else if (t().isExpressionStatement(parent)) { - type = "statement"; - ancestors = ancestors.slice(0, -1); - } else { - type = "other"; - } - - state.placeholders.push({ - name: name, - type: type, - resolve: function resolve(ast) { - return resolveAncestors(ast, ancestors); - }, - isDuplicate: state.placeholderNames.has(name) - }); - state.placeholderNames.add(name); -} - -function resolveAncestors(ast, ancestors) { - var parent = ast; - - for (var i = 0; i < ancestors.length - 1; i++) { - var _ancestors$i = ancestors[i], - _key = _ancestors$i.key, - _index = _ancestors$i.index; - - if (_index === undefined) { - parent = parent[_key]; - } else { - parent = parent[_key][_index]; - } - } - - var _ancestors2 = ancestors[ancestors.length - 1], - key = _ancestors2.key, - index = _ancestors2.index; - return { - parent: parent, - key: key, - index: index - }; -} - -function parseWithCodeFrame(code, parserOpts) { - parserOpts = Object.assign({ - allowReturnOutsideFunction: true, - allowSuperOutsideMethod: true, - sourceType: "module" - }, parserOpts); - - try { - return (0, _babylon().parse)(code, parserOpts); - } catch (err) { - var loc = err.loc; - - if (loc) { - err.message += "\n" + (0, _codeFrame().codeFrameColumns)(code, { - start: loc - }); - err.code = "BABEL_TEMPLATE_PARSE_ERROR"; - } - - throw err; - } -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/populate.js b/node_modules/@babel/template/lib/populate.js deleted file mode 100644 index ecc6ac2..0000000 --- a/node_modules/@babel/template/lib/populate.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = populatePlaceholders; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function populatePlaceholders(metadata, replacements) { - var ast = t().cloneNode(metadata.ast); - - if (replacements) { - metadata.placeholders.forEach(function (placeholder) { - if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) { - var placeholderName = placeholder.name; - throw new Error("Error: No substitution given for \"" + placeholderName + "\". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['" + placeholderName + "'])}\n - { placeholderPattern: /^" + placeholderName + "$/ }"); - } - }); - Object.keys(replacements).forEach(function (key) { - if (!metadata.placeholderNames.has(key)) { - throw new Error("Unknown substitution \"" + key + "\" given"); - } - }); - } - - metadata.placeholders.slice().reverse().forEach(function (placeholder) { - try { - applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null); - } catch (e) { - e.message = "@babel/template placeholder \"" + placeholder.name + "\": " + e.message; - throw e; - } - }); - return ast; -} - -function applyReplacement(placeholder, ast, replacement) { - if (placeholder.isDuplicate) { - if (Array.isArray(replacement)) { - replacement = replacement.map(function (node) { - return t().cloneNode(node); - }); - } else if (typeof replacement === "object") { - replacement = t().cloneNode(replacement); - } - } - - var _placeholder$resolve = placeholder.resolve(ast), - parent = _placeholder$resolve.parent, - key = _placeholder$resolve.key, - index = _placeholder$resolve.index; - - if (placeholder.type === "string") { - if (typeof replacement === "string") { - replacement = t().stringLiteral(replacement); - } - - if (!replacement || !t().isStringLiteral(replacement)) { - throw new Error("Expected string substitution"); - } - } else if (placeholder.type === "statement") { - if (index === undefined) { - if (!replacement) { - replacement = t().emptyStatement(); - } else if (Array.isArray(replacement)) { - replacement = t().blockStatement(replacement); - } else if (typeof replacement === "string") { - replacement = t().expressionStatement(t().identifier(replacement)); - } else if (!t().isStatement(replacement)) { - replacement = t().expressionStatement(replacement); - } - } else { - if (replacement && !Array.isArray(replacement)) { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (!t().isStatement(replacement)) { - replacement = t().expressionStatement(replacement); - } - } - } - } else if (placeholder.type === "param") { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (index === undefined) throw new Error("Assertion failure."); - } else { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (Array.isArray(replacement)) { - throw new Error("Cannot replace single expression with an array."); - } - } - - if (index === undefined) { - t().validate(parent, key, replacement); - parent[key] = replacement; - } else { - var items = parent[key].slice(); - - if (placeholder.type === "statement" || placeholder.type === "param") { - if (replacement == null) { - items.splice(index, 1); - } else if (Array.isArray(replacement)) { - items.splice.apply(items, [index, 1].concat(replacement)); - } else { - items[index] = replacement; - } - } else { - items[index] = replacement; - } - - t().validate(parent, key, items); - parent[key] = items; - } -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/string.js b/node_modules/@babel/template/lib/string.js deleted file mode 100644 index d47a282..0000000 --- a/node_modules/@babel/template/lib/string.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = stringTemplate; - -var _options = require("./options"); - -var _parse = _interopRequireDefault(require("./parse")); - -var _populate = _interopRequireDefault(require("./populate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringTemplate(formatter, code, opts) { - code = formatter.code(code); - var metadata; - return function (arg) { - var replacements = (0, _options.normalizeReplacements)(arg); - if (!metadata) metadata = (0, _parse.default)(formatter, code, opts); - return formatter.unwrap((0, _populate.default)(metadata, replacements)); - }; -} \ No newline at end of file diff --git a/node_modules/@babel/template/node_modules/.bin/babylon b/node_modules/@babel/template/node_modules/.bin/babylon deleted file mode 120000 index c2adc01..0000000 --- a/node_modules/@babel/template/node_modules/.bin/babylon +++ /dev/null @@ -1 +0,0 @@ -../babylon/bin/babylon.js \ No newline at end of file diff --git a/node_modules/@babel/template/node_modules/babylon/CHANGELOG.md b/node_modules/@babel/template/node_modules/babylon/CHANGELOG.md deleted file mode 100644 index 1e2bbac..0000000 --- a/node_modules/@babel/template/node_modules/babylon/CHANGELOG.md +++ /dev/null @@ -1,1073 +0,0 @@ -# Changelog - -> **Tags:** -> - :boom: [Breaking Change] -> - :eyeglasses: [Spec Compliancy] -> - :rocket: [New Feature] -> - :bug: [Bug Fix] -> - :memo: [Documentation] -> - :house: [Internal] -> - :nail_care: [Polish] - -> Semver Policy: https://github.com/babel/babylon#semver - -_Note: Gaps between patch versions are faulty, broken or test releases._ - -See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog. - -## 6.17.1 (2017-05-10) - -### :bug: Bug Fix - * Fix typo in flow spread operator error (Brian Ng) - * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) - * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) - * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) - * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) - * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) - * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) - -## 6.17.0 (2017-04-20) - -### :bug: Bug Fix - * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) - * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) - * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) - * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) - * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) - * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) - -## 7.0.0-beta.8 (2017-04-04) - -### New Feature -* Add support for flow type spread (#418) (Conrad Buck) -* Allow statics in flow interfaces (#427) (Brian Ng) - -### Bug Fix -* Fix predicate attachment to match flow parser (#428) (Brian Ng) -* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray) -* Fix rest parameters with array and objects (#424) (Brian Ng) -* Fix number parser (#433) (Alex Kuzmenko) - -### Docs -* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko) - -### Internal -* Use babel-register script when running babel smoke tests (#442) (Brian Ng) - -## 7.0.0-beta.7 (2017-03-22) - -### Spec Compliancy -* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu) - -### Bug Fix - -* Fix push-pop logic in flow (#405) (Daniel Tschinder) - -## 7.0.0-beta.6 (2017-03-21) - -### New Feature -* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons) - -### Polish -* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal) - -### Docs - -* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning) - -## 7.0.0-beta.5 (2017-03-21) - -### Bug Fix -* Throw error if new.target is used outside of a function (#402) (Brian Ng) -* Fix parsing of class properties (#351) (Kevin Gibbons) - -### Other - * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy) - * Optimize travis builds (#419) (Daniel Tschinder) - * Update codecov to 2.0 (#412) (Daniel Tschinder) - * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy) - * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning) - * Upgrade flow to 0.41 (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * Update yarn lock (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot]) - * Add estree test for correct order of directives (Daniel Tschinder) - * Add DoExpression to spec (#364) (Alex Kuzmenko) - * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde) - * Explain how to run only one test (#389) [skip ci] (Aaron Ang) - - ## 7.0.0-beta.4 (2017-03-01) - -* Don't consume async when checking for async func decl (#377) (Brian Ng) -* add `ranges` option [skip ci] (Henry Zhu) -* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine) - -## 7.0.0-beta.3 (2017-02-28) - -- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384) -- Merge changes from 6.x - -## 7.0.0-beta.2 (2017-02-20) - -- estree: correctly change literals in all cases (#368) (Daniel Tschinder) - -## 7.0.0-beta.1 (2017-02-20) - -- Fix negative number literal typeannotations (#366) (Daniel Tschinder) -- Update contributing with more test info [skip ci] (#355) (Brian Ng) - -## 7.0.0-beta.0 (2017-02-15) - -- Reintroduce Variance node (#333) (Daniel Tschinder) -- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick) -- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail) -- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot]) -- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot]) -- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder) -- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi) -- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder) -- Remove classConstructorCall plugin (#291) (Brian Ng) -- Update yarn.lock (Daniel Tschinder) -- Update cross-env to 3.x (Daniel Tschinder) -- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov) -- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens) - -## 6.16.1 (2017-02-23) - -### :bug: Regression - -- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375)) - -Need to modify Babel for this AST node change, so moving to 7.0. - -- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376)) - -[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted. - -## 6.16.0 (2017-02-23) - -### :rocket: New Feature - -***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) - -We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) - -We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. - -To enable `estree` mode simply add the plugin in the config: -```json -{ - "plugins": [ "estree" ] -} -``` - -If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. - -Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) - -Babylon exports a new function to parse a single expression - -```js -import { parseExpression } from 'babylon'; - -const ast = parseExpression('x || y && z', options); -``` - -The returned AST will only consist of the expression. The options are the same as for `parse()` - -Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) - -A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`. -Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... - -Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) - -Added support for function predicates which flow introduced in version 0.33.0 - -```js -declare function is_number(x: mixed): boolean %checks(typeof x === "number"); -``` - -Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) - -Added support for imports within module declarations which flow introduced in version 0.37.0 - -```js -declare module "C" { - import type { DT } from "D"; - declare export type CT = { D: DT }; -} -``` - -### :eyeglasses: Spec Compliancy - -Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) - -This example now correctly throws an error when there is a semicolon after the decorator: - -```js -class A { -@a; -foo(){} -} -``` - -Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) - -Using keywords in imports is not allowed anymore: - -```js -import { default } from "foo"; -import { a as debugger } from "foo"; -``` - -Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) - -In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. - -Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) - -The following code now correctly throws an error - -```js -import type { type a } from "foo"; -``` - -Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) - -Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. - -If you enable the flow plugin you can only define the type of the class properties, but not initialize them. - -Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) - -Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. - -```js -export default async function bar() {}; -``` - -### :nail_care: Polish - -Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) - -### :bug: Bug Fix - -Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) - -Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) - -ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) - -Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) - -Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) - -Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) - -Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) - -Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) - - -### :house: Internal - -Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) - -Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) - -Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) - -chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) - -Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) - -Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) - -Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) - -devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) - -Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) - -Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) - -### :memo: Documentation - -Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) - -Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) - -Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) - -AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) - -## 6.15.0 (2017-01-10) - -### :eyeglasses: Spec Compliancy - -Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) - -This change implements flows new shorthand import syntax -and where previously you had to write this code: - -```js -import {someValue} from "blah"; -import type {someType} from "blah"; -import typeof {someOtherValue} from "blah"; -``` - -you can now write it like this: - -```js -import { - someValue, - type someType, - typeof someOtherValue, -} from "blah"; -``` - -For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. - -flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) - -This change now allows a leading pipe everywhere types can be used: -```js -var f = (x): | 1 | 2 => 1; -``` - -Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) - -Previously babylon parsed the following exports, although they are not valid: -```js -export typeof foo; -export new Foo(); -export function() {}; -export for (;;); -export while(foo); -``` - -### :bug: Bug Fix - -Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) - -This fixes parsing of this case: - -```js -const map = { - [age <= 17] : 'Too young' -}; -``` - -Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) - -The following case produced an invalid AST -```js -
{/* foo */}
-``` - -Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) - -When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. - -Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) - -Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) - -### :house: Internal - -User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) - -Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) - -Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) - -Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) - -Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) - -Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) - -Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) - -chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) - -chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) - -## 6.14.1 (2016-11-17) - -### :bug: Bug Fix - -Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) - -```js -{ - "plugins": ["*"] -} -``` - -Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. - -## 6.14.0 (2016-11-16) - -### :eyeglasses: Spec Compliancy - -Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) - -[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) - -Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). - -``` -class enum {} // throws -class await {} // throws in strict mode (module) -``` - -Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) - -So where you used to have to write - -```js -type A = (x: string, y: boolean) => number; -type B = (z: string) => number; -type C = { [key: string]: number }; -``` - -you can now write (with flow 0.34.0) - -```js -type A = (string, boolean) => number; -type B = string => number; -type C = { [string]: number }; -``` - -Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) - -Supports these form now of specifying array types: - -```js -var a: number[][][][]; -var b: string[][]; -``` - -### :bug: Bug Fix - -Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) - -``` -declare module "foo" { declare module.exports: number } -declare module "foo" { declare module.exports: number; } // also allowed now -``` - -### :house: Internal - - * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) - * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) - * Add node 7 (Daniel Tschinder) - * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) - -## v6.13.1 (2016-10-26) - -### :nail_care: Polish - -- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) - -```js -const babylon = require('babylon'); -const ast = babylon.parse('var foo = "lol";'); -``` - -With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. - -**Without bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) - -**With bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) - -- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) -- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) - -## v6.13.0 (2016-10-21) - -### :eyeglasses: Spec Compliancy - -Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) - -> See https://flowtype.org/docs/variance.html for more information - -```js -type T = { +p: T }; -interface T { -p: T }; -declare class T { +[k:K]: V }; -class T { -[k:K]: V }; -class C2 { +p: T = e }; -``` - -Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) - -```js -({ __proto__: 1, __proto__: 2 }) // Throws an error now -``` - -### :bug: Bug Fix - -Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) - -```js -declare class A { - static: T; -} -``` - -Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) - -```js -var foo = { async, bar }; -``` - -### :nail_care: Polish - -Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) - -> This improves the performance slightly (because of hidden classes) - -### :house: Internal - -Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) - -Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) - -Readd missin .eslinignore for IDEs (Daniel Tschinder) - -Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) - -Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) - -Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) - -## v6.12.0 (2016-10-14) - -### :eyeglasses: Spec Compliancy - -Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) - -#### Dynamic Import - -- Proposal Repo: https://github.com/domenic/proposal-dynamic-import -- Championed by [@domenic](https://github.com/domenic) -- stage-2 -- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) - -> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript - -```js -import(`./section-modules/${link.dataset.entryModule}.js`) -.then(module => { - module.loadPageInto(main); -}) -``` - -Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) - -#### EmptyTypeAnnotation - -Just wasn't covered before. - -```js -type T = empty; -``` - -### :bug: Bug Fix - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing due to sparse array -export const { foo: [ ,, qux7 ] } = bar; -``` - -Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) - -```js -declare class X { - foobar(): void; - static foobar(): void; -} -``` - -Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) - -```js -class Foo { - delete(item: T): T { - return item; - } -} -``` - -Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) - -```js -function *foo() { - const x = (yield 5: any); -} -``` - -### :nail_care: Polish - -Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) - -```js -// Unexpected token, expected ; (1:6) -{ set 1 } -``` - -### :house: Internal - -Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) - -Also run flow, linting, babel tests on seperate instances (add back node 0.10) - -## v6.11.6 (2016-10-12) - -### :bug: Bug Fix/Regression - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing with `Cannot read property 'type' of null` because of null identifiers -export const { foo: [ ,, qux7 ] } = bar; -``` - -## v6.11.5 (2016-10-12) - -### :eyeglasses: Spec Compliancy - -Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:20) -export function foo() {}; -export const { a: [{foo}] } = bar; -``` - -Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:22) -export const foo = 1; -export const [bar, ...foo] = baz; -``` - -### :bug: Bug Fix - -Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) - -```js -// this is ok now -const test = ({async = true}) => {}; -``` - -### :nail_care: Polish - -Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) - -```bash -# So in the case of a missing ending curly (`}`) -Module build failed: SyntaxError: Unexpected token, expected } (30:0) - 28 | } - 29 | -> 30 | - | ^ -``` - -## v6.11.4 (2016-10-03) - -Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) - -## v6.11.3 (2016-10-01) - -### :eyeglasses: Spec Compliancy - -Add static errors for object rest (#149) ([@danez](https://github.com/danez)) - -> https://github.com/sebmarkbage/ecmascript-rest-spread - -Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. - -```js -let { x, y, ...z } = { x: 1, y: 2, z: 3 }; -// x = 1 -// y = 2 -// z = { z: 3 } -``` - -#### New Syntax Errors: - -**SyntaxError**: The rest element has to be the last element when destructuring (1:10) -```bash -> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = { x: 1, y: 2, z: 3 } -# y = 2 -# z = 3 -``` - -Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. - -**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) - -```bash -> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = 1 -# y = { y: 2, z: 3 } -# z = { y: 2, z: 3 } -``` - -Before y and z would just be the same value anyway so there is no reason to need to have both. - -**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) - -```js -let { x, y, ...z, } = obj; -``` - -The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. - ---- - -get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) - -```js -// valid -function something({ set = null, get = null }) {} -``` - -## v6.11.2 (2016-09-23) - -### Bug Fix - -- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo - -```js -// regression with duplicate export check -SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) - 20 | - 21 | export const { rhythm } = typography; -> 22 | export const { TypographyStyle } = typography -``` - -Bail out for now, and make a change to account for destructuring in the next release. - -## 6.11.1 (2016-09-22) - -### Bug Fix -- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez - -```javascript -export toString from './toString'; -``` - -```bash -`toString` has already been exported. Exported identifiers must be unique. (1:7) -> 1 | export toString from './toString'; - | ^ - 2 | -``` - -## 6.11.0 (2016-09-22) - -### Spec Compliancy (will break CI) - -- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo - -```js -// Only one default export allowed per module. (2:9) -export default function() {}; -export { foo as default }; - -// Only one default export allowed per module. (2:0) -export default {}; -export default function() {}; - -// `Foo` has already been exported. Exported identifiers must be unique. (2:0) -export { Foo }; -export class Foo {}; -``` - -### New Feature (Syntax) - -- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 - -```js -// AST -interface ClassProperty <: Node { - type: "ClassProperty"; - key: Identifier; - value: Expression; - computed: boolean; // added -} -``` - -```js -// with "plugins": ["classProperties"] -class Foo { - [x] - ['y'] -} - -class Bar { - [p] - [m] () {} -} - ``` - -### Bug Fix - -- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper - -```js -declare class X { - a: number; - static b: number; // static - c: number; // this was being marked as static in the AST as well -} -``` - -### Polish - -- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 - -```js -// Used to error with: -// SyntaxError: Assigning to rvalue (1:0) - -// Now: -// Invalid left-hand side in assignment expression (1:0) -3 = 4 - -// Invalid left-hand side in for-in statement (1:5) -for (+i in {}); -``` - -### Internal - -- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez -- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo - -## 6.10.0 (2016-09-19) - -> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue. - -### Spec Compliancy - -* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) - -> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors - -More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) - -For example: - -```js -// this errors because it uses destructuring and default parameters -// in a function with a "use strict" directive -function a([ option1, option2 ] = []) { - "use strict"; -} - ``` - -The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. - -### New Feature - -* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) - -Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 - -Looks like: - -```js -var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; -``` - -### Bug Fixes - -* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) -* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) -* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) - -### Misc - -* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) -* Fix Contributing guidelines [skip ci] (Daniel Tschinder) - -## 6.9.2 (2016-09-09) - -The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. - -## 6.9.1 (2016-08-23) - -This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. - -### Bug Fixes - -- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez -- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez -- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper -- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez -- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez - -## 6.9.0 (2016-08-16) - -### New syntax support - -- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer - -(Be aware that React is not going to support this syntax) - -```js -
- {...todos.map(todo => )} -
-``` - -- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez - -```js -declare module "foo" { - declare module.exports: {} -} -``` - -### New Features - -- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain -- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens - -### Bug Fixes - -- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez -- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez -- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi -- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez -- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi -- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez -- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez - -### Internal - -- Add codecoverage to tests @danez -- Fix tests to not save expected output if we expect the test to fail @danez -- Make a shallow clone of babel for testing @danez -- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot -- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot -- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot -- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot - -## 6.8.4 (2016-07-06) - -### Bug Fixes - -- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez - -## 6.8.3 (2016-07-02) - -### Bug Fixes - -- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez - -## 6.8.2 (2016-06-24) - -### Bug Fixes - -- Fix parse error with yielding jsx elements in generators `function* it() { yield ; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal -- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez -- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez -- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez -- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez -- Support negative numeric type literals @kittens -- Remove line terminator restriction after await keyword @kittens -- Remove grouped type arrow restriction as it seems flow no longer has it @kittens -- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin -- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi - -### Documentation - -- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene -- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo - -### Internal - -- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez -- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez -- Upgrade test runner ava @kittens -- Add missing generate-identifier-regex script @kittens -- Rename parser context types @kittens -- Add node v6 to travis testing @hzoo -- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens - -## 6.8.1 (2016-06-06) - -### New Feature - -- Parse type parameter declarations with defaults like `type Foo = T` - -### Bug Fixes -- Type parameter declarations need 1 or more type parameters. -- The existential type `*` is not a valid type parameter. -- The existential type `*` is a primary type - -### Spec Compliancy -- The param list for type parameter declarations now consists of `TypeParameter` nodes -- New `TypeParameter` AST Node (replaces using the `Identifier` node before) - -``` -interface TypeParameter <: Node { - bound: TypeAnnotation; - default: TypeAnnotation; - name: string; - variance: "plus" | "minus"; -} -``` - -## 6.8.0 (2016-05-02) - -#### New Feature - -##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) - -> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). - -Examples: - -```js -class Foo { - constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} -} - -export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} - -var obj = { - method(@foo() x, @bar({ a: 123 }) @baz() y) {} -}; -``` - -##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) - -There is also a new node type, `ForAwaitStatement`. - -> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). - -Example: - -```js -async function f() { - for await (let x of y); -} -``` diff --git a/node_modules/@babel/template/node_modules/babylon/LICENSE b/node_modules/@babel/template/node_modules/babylon/LICENSE deleted file mode 100644 index d4c7fc5..0000000 --- a/node_modules/@babel/template/node_modules/babylon/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@babel/template/node_modules/babylon/README.md b/node_modules/@babel/template/node_modules/babylon/README.md deleted file mode 100644 index c710218..0000000 --- a/node_modules/@babel/template/node_modules/babylon/README.md +++ /dev/null @@ -1,167 +0,0 @@ -

- babylon -

- -

- Babylon is a JavaScript parser used in Babel. -

- - - The latest ECMAScript version enabled by default (ES2017). - - Comment attachment. - - Support for JSX, Flow, Typescript. - - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)). - -## Credits - -Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx), -thanks to the awesome work of [@RReverser](https://github.com/RReverser) and [@marijnh](https://github.com/marijnh). - -## API - -### `babylon.parse(code, [options])` - -### `babylon.parseExpression(code, [options])` - -`parse()` parses the provided `code` as an entire ECMAScript program, while -`parseExpression()` tries to parse a single Expression with performance in -mind. When in doubt, use `.parse()`. - -### Options - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowAwaitOutsideFunction**: By default, `await` use is not allowed - outside of an async function. Set this to `true` to accept such - code. - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowSuperOutsideMethod**: TODO - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - one of `"script"`, `"module"`, or `"unambiguous"`. Defaults to `"script"`. `"unambiguous"` will make Babylon attempt to _guess_, based on the presence of ES6 `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`. - -- **sourceFilename**: Correlate output AST nodes with their source filename. Useful when generating code and source maps from the ASTs of multiple input files. - -- **startLine**: By default, the first line of code parsed is treated as line 1. You can provide a line number to alternatively start with. Useful for integration with other source tools. - -- **plugins**: Array containing the plugins that you want to enable. - -- **strictMode**: TODO - -- **ranges**: Adds a `ranges` property to each node: `[node.start, node.end]` - -- **tokens**: Adds all parsed tokens to a `tokens` property on the `File` node - -### Output - -Babylon generates AST according to [Babel AST format][]. -It is based on [ESTree spec][] with the following deviations: - -> There is now an `estree` plugin which reverts these deviations - -- [Literal][] token is replaced with [StringLiteral][], [NumericLiteral][], [BooleanLiteral][], [NullLiteral][], [RegExpLiteral][] -- [Property][] token is replaced with [ObjectProperty][] and [ObjectMethod][] -- [MethodDefinition][] is replaced with [ClassMethod][] -- [Program][] and [BlockStatement][] contain additional `directives` field with [Directive][] and [DirectiveLiteral][] -- [ClassMethod][], [ObjectProperty][], and [ObjectMethod][] value property's properties in [FunctionExpression][] is coerced/brought into the main method node. - -AST for JSX code is based on [Facebook JSX AST][]. - -[Babel AST format]: https://github.com/babel/babylon/blob/master/ast/spec.md -[ESTree spec]: https://github.com/estree/estree - -[Literal]: https://github.com/estree/estree/blob/master/es5.md#literal -[Property]: https://github.com/estree/estree/blob/master/es5.md#property -[MethodDefinition]: https://github.com/estree/estree/blob/master/es2015.md#methoddefinition - -[StringLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#stringliteral -[NumericLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#numericliteral -[BooleanLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#booleanliteral -[NullLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#nullliteral -[RegExpLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#regexpliteral -[ObjectProperty]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#objectproperty -[ObjectMethod]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#objectmethod -[ClassMethod]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#classmethod -[Program]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#programs -[BlockStatement]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#blockstatement -[Directive]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#directive -[DirectiveLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#directiveliteral -[FunctionExpression]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#functionexpression - -[Facebook JSX AST]: https://github.com/facebook/jsx/blob/master/AST.md - -### Semver - -Babylon follows semver in most situations. The only thing to note is that some spec-compliancy bug fixes may be released under patch versions. - -For example: We push a fix to early error on something like [#107](https://github.com/babel/babylon/pull/107) - multiple default exports per file. That would be considered a bug fix even though it would cause a build to fail. - -### Example - -```javascript -require("babylon").parse("code", { - // parse in strict mode and allow module declarations - sourceType: "module", - - plugins: [ - // enable jsx and flow syntax - "jsx", - "flow" - ] -}); -``` - -### Plugins - -| Name | Code Example | -|------|--------------| -| `estree` ([repo](https://github.com/estree/estree)) | n/a | -| `jsx` ([repo](https://facebook.github.io/jsx/)) | `{s}` | -| `flow` ([repo](https://github.com/facebook/flow)) | `var a: string = "";` | -| `flowComments` ([docs](https://flow.org/en/docs/types/comments/)) | `/*:: type Foo = {...}; */` | -| `typescript` ([repo](https://github.com/Microsoft/TypeScript)) | `var a: string = "";` | -| `doExpressions` | `var a = do { if (true) { 'hi'; } };` | -| `objectRestSpread` ([proposal](https://github.com/tc39/proposal-object-rest-spread)) | `var a = { b, ...c };` | -| `decorators` (Stage 1) and `decorators2` (Stage 2 [proposal](https://github.com/tc39/proposal-decorators)) | `@a class A {}` | -| `classProperties` ([proposal](https://github.com/tc39/proposal-class-public-fields)) | `class A { b = 1; }` | -| `classPrivateProperties` ([proposal](https://github.com/tc39/proposal-private-fields)) | `class A { #b = 1; }` | -| `classPrivateMethods` ([proposal](https://github.com/tc39/proposal-private-methods)) | `class A { #c() {} }` | -| `exportDefaultFrom` ([proposal](https://github.com/leebyron/ecmascript-export-default-from)) | `export v from "mod"` | -| `exportNamespaceFrom` ([proposal](https://github.com/leebyron/ecmascript-export-ns-from)) | `export * as ns from "mod"` | -| `asyncGenerators` ([proposal](https://github.com/tc39/proposal-async-iteration)) | `async function*() {}`, `for await (let a of b) {}` | -| `functionBind` ([proposal](https://github.com/zenparsing/es-function-bind)) | `a::b`, `::console.log` | -| `functionSent` | `function.sent` | -| `dynamicImport` ([proposal](https://github.com/tc39/proposal-dynamic-import)) | `import('./guy').then(a)` | -| `numericSeparator` ([proposal](https://github.com/samuelgoto/proposal-numeric-separator)) | `1_000_000` | -| `optionalChaining` ([proposal](https://github.com/tc39/proposal-optional-chaining)) | `a?.b` | -| `importMeta` ([proposal](https://github.com/tc39/proposal-import-meta)) | `import.meta.url` | -| `bigInt` ([proposal](https://github.com/tc39/proposal-bigint)) | `100n` | -| `optionalCatchBinding` ([proposal](https://github.com/babel/proposals/issues/7)) | `try {throw 0;} catch{do();}` | -| `throwExpressions` ([proposal](https://github.com/babel/proposals/issues/23)) | `() => throw new Error("")` | -| `pipelineOperator` ([proposal](https://github.com/babel/proposals/issues/29)) | `a \|> b` | -| `nullishCoalescingOperator` ([proposal](https://github.com/babel/proposals/issues/14)) | `a ?? b` | - -### FAQ - -#### Will Babylon support a plugin system? - -Previous issues: [#1351](https://github.com/babel/babel/issues/1351), [#6694](https://github.com/babel/babel/issues/6694). - -We currently aren't willing to commit to supporting the API for plugins or the resulting ecosystem (there is already enough work maintaining Babel's own plugin system). It's not clear how to make that API effective, and it would limit out ability to refactor and optimize the codebase. - -Our current recommendation for those that want to create their own custom syntax is for users to fork Babylon. - -To consume your custom parser, you can add to your `.babelrc` via its npm package name or require it if using JavaScript, - -```json -{ - "parserOpts": { - "parser": "custom-fork-of-babylon-on-npm-here" - } -} -``` diff --git a/node_modules/@babel/template/node_modules/babylon/bin/babylon.js b/node_modules/@babel/template/node_modules/babylon/bin/babylon.js deleted file mode 100755 index 440eef3..0000000 --- a/node_modules/@babel/template/node_modules/babylon/bin/babylon.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node -/* eslint no-var: 0 */ - -var babylon = require(".."); -var fs = require("fs"); - -var filename = process.argv[2]; -if (!filename) { - console.error("no filename specified"); - process.exit(0); -} - -var file = fs.readFileSync(filename, "utf8"); -var ast = babylon.parse(file); - -console.log(JSON.stringify(ast, null, " ")); diff --git a/node_modules/@babel/template/node_modules/babylon/lib/index.js b/node_modules/@babel/template/node_modules/babylon/lib/index.js deleted file mode 100644 index 50f49cf..0000000 --- a/node_modules/@babel/template/node_modules/babylon/lib/index.js +++ /dev/null @@ -1,10116 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _AwaitValue(value) { - this.wrapped = value; -} - -function _AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - var wrappedAwait = value instanceof _AwaitValue; - Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { - if (wrappedAwait) { - resume("next", arg); - return; - } - - settle(result.done ? "return" : "normal", arg); - }, function (err) { - resume("throw", err); - }); - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } -} - -if (typeof Symbol === "function" && Symbol.asyncIterator) { - _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; -} - -_AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); -}; - -_AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); -}; - -_AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); -}; - -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; -} - -var defaultOptions = { - sourceType: "script", - sourceFilename: undefined, - startLine: 1, - allowAwaitOutsideFunction: false, - allowReturnOutsideFunction: false, - allowImportExportEverywhere: false, - allowSuperOutsideMethod: false, - plugins: [], - strictMode: null, - ranges: false, - tokens: false -}; -function getOptions(opts) { - var options = {}; - - for (var key in defaultOptions) { - options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; - } - - return options; -} - -var beforeExpr = true; -var startsExpr = true; -var isLoop = true; -var isAssign = true; -var prefix = true; -var postfix = true; -var TokenType = function TokenType(label, conf) { - if (conf === void 0) { - conf = {}; - } - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop === 0 ? 0 : conf.binop || null; - this.updateContext = null; -}; - -var KeywordTokenType = function (_TokenType) { - _inheritsLoose(KeywordTokenType, _TokenType); - - function KeywordTokenType(name, options) { - if (options === void 0) { - options = {}; - } - - options.keyword = name; - return _TokenType.call(this, name, options) || this; - } - - return KeywordTokenType; -}(TokenType); - -var BinopTokenType = function (_TokenType2) { - _inheritsLoose(BinopTokenType, _TokenType2); - - function BinopTokenType(name, prec) { - return _TokenType2.call(this, name, { - beforeExpr: beforeExpr, - binop: prec - }) || this; - } - - return BinopTokenType; -}(TokenType); -var types = { - num: new TokenType("num", { - startsExpr: startsExpr - }), - bigint: new TokenType("bigint", { - startsExpr: startsExpr - }), - regexp: new TokenType("regexp", { - startsExpr: startsExpr - }), - string: new TokenType("string", { - startsExpr: startsExpr - }), - name: new TokenType("name", { - startsExpr: startsExpr - }), - eof: new TokenType("eof"), - bracketL: new TokenType("[", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - braceBarL: new TokenType("{|", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - braceR: new TokenType("}"), - braceBarR: new TokenType("|}"), - parenL: new TokenType("(", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - parenR: new TokenType(")"), - comma: new TokenType(",", { - beforeExpr: beforeExpr - }), - semi: new TokenType(";", { - beforeExpr: beforeExpr - }), - colon: new TokenType(":", { - beforeExpr: beforeExpr - }), - doubleColon: new TokenType("::", { - beforeExpr: beforeExpr - }), - dot: new TokenType("."), - question: new TokenType("?", { - beforeExpr: beforeExpr - }), - questionDot: new TokenType("?."), - arrow: new TokenType("=>", { - beforeExpr: beforeExpr - }), - template: new TokenType("template"), - ellipsis: new TokenType("...", { - beforeExpr: beforeExpr - }), - backQuote: new TokenType("`", { - startsExpr: startsExpr - }), - dollarBraceL: new TokenType("${", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - at: new TokenType("@"), - hash: new TokenType("#"), - eq: new TokenType("=", { - beforeExpr: beforeExpr, - isAssign: isAssign - }), - assign: new TokenType("_=", { - beforeExpr: beforeExpr, - isAssign: isAssign - }), - incDec: new TokenType("++/--", { - prefix: prefix, - postfix: postfix, - startsExpr: startsExpr - }), - bang: new TokenType("!", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - tilde: new TokenType("~", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - pipeline: new BinopTokenType("|>", 0), - nullishCoalescing: new BinopTokenType("??", 1), - logicalOR: new BinopTokenType("||", 1), - logicalAND: new BinopTokenType("&&", 2), - bitwiseOR: new BinopTokenType("|", 3), - bitwiseXOR: new BinopTokenType("^", 4), - bitwiseAND: new BinopTokenType("&", 5), - equality: new BinopTokenType("==/!=", 6), - relational: new BinopTokenType("", 7), - bitShift: new BinopTokenType("<>", 8), - plusMin: new TokenType("+/-", { - beforeExpr: beforeExpr, - binop: 9, - prefix: prefix, - startsExpr: startsExpr - }), - modulo: new BinopTokenType("%", 10), - star: new BinopTokenType("*", 10), - slash: new BinopTokenType("/", 10), - exponent: new TokenType("**", { - beforeExpr: beforeExpr, - binop: 11, - rightAssociative: true - }) -}; -var keywords = { - break: new KeywordTokenType("break"), - case: new KeywordTokenType("case", { - beforeExpr: beforeExpr - }), - catch: new KeywordTokenType("catch"), - continue: new KeywordTokenType("continue"), - debugger: new KeywordTokenType("debugger"), - default: new KeywordTokenType("default", { - beforeExpr: beforeExpr - }), - do: new KeywordTokenType("do", { - isLoop: isLoop, - beforeExpr: beforeExpr - }), - else: new KeywordTokenType("else", { - beforeExpr: beforeExpr - }), - finally: new KeywordTokenType("finally"), - for: new KeywordTokenType("for", { - isLoop: isLoop - }), - function: new KeywordTokenType("function", { - startsExpr: startsExpr - }), - if: new KeywordTokenType("if"), - return: new KeywordTokenType("return", { - beforeExpr: beforeExpr - }), - switch: new KeywordTokenType("switch"), - throw: new KeywordTokenType("throw", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - try: new KeywordTokenType("try"), - var: new KeywordTokenType("var"), - let: new KeywordTokenType("let"), - const: new KeywordTokenType("const"), - while: new KeywordTokenType("while", { - isLoop: isLoop - }), - with: new KeywordTokenType("with"), - new: new KeywordTokenType("new", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - this: new KeywordTokenType("this", { - startsExpr: startsExpr - }), - super: new KeywordTokenType("super", { - startsExpr: startsExpr - }), - class: new KeywordTokenType("class"), - extends: new KeywordTokenType("extends", { - beforeExpr: beforeExpr - }), - export: new KeywordTokenType("export"), - import: new KeywordTokenType("import", { - startsExpr: startsExpr - }), - yield: new KeywordTokenType("yield", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - null: new KeywordTokenType("null", { - startsExpr: startsExpr - }), - true: new KeywordTokenType("true", { - startsExpr: startsExpr - }), - false: new KeywordTokenType("false", { - startsExpr: startsExpr - }), - in: new KeywordTokenType("in", { - beforeExpr: beforeExpr, - binop: 7 - }), - instanceof: new KeywordTokenType("instanceof", { - beforeExpr: beforeExpr, - binop: 7 - }), - typeof: new KeywordTokenType("typeof", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - void: new KeywordTokenType("void", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - delete: new KeywordTokenType("delete", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }) -}; -Object.keys(keywords).forEach(function (name) { - types["_" + name] = keywords[name]; -}); - -function makePredicate(words) { - var wordsArr = words.split(" "); - return function (str) { - return wordsArr.indexOf(str) >= 0; - }; -} - -var reservedWords = { - "6": makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; -var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"); -var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; -var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 257, 0, 11, 39, 8, 0, 22, 0, 12, 39, 3, 3, 55, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 698, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 1, 31, 6124, 20, 754, 9486, 286, 82, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541]; -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 280, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 19719, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239]; - -function isInAstralSet(code, set) { - var pos = 0x10000; - - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } - - return false; -} - -function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes); -} -function isIteratorStart(current, next) { - return current === 64 && next === 64; -} -function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); -function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; -} -var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; -}; -var types$1 = { - braceStatement: new TokContext("{", false), - braceExpression: new TokContext("{", true), - templateQuasi: new TokContext("${", true), - parenStatement: new TokContext("(", false), - parenExpression: new TokContext("(", true), - template: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - functionExpression: new TokContext("function", true) -}; - -types.parenR.updateContext = types.braceR.updateContext = function () { - if (this.state.context.length === 1) { - this.state.exprAllowed = true; - return; - } - - var out = this.state.context.pop(); - - if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) { - this.state.context.pop(); - this.state.exprAllowed = false; - } else if (out === types$1.templateQuasi) { - this.state.exprAllowed = true; - } else { - this.state.exprAllowed = !out.isExpr; - } -}; - -types.name.updateContext = function (prevType) { - if (this.state.value === "of" && this.curContext() === types$1.parenStatement) { - this.state.exprAllowed = !prevType.beforeExpr; - return; - } - - this.state.exprAllowed = false; - - if (prevType === types._let || prevType === types._const || prevType === types._var) { - if (lineBreak.test(this.input.slice(this.state.end))) { - this.state.exprAllowed = true; - } - } - - if (this.state.isIterator) { - this.state.isIterator = false; - } -}; - -types.braceL.updateContext = function (prevType) { - this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); - this.state.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function () { - this.state.context.push(types$1.templateQuasi); - this.state.exprAllowed = true; -}; - -types.parenL.updateContext = function (prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); - this.state.exprAllowed = true; -}; - -types.incDec.updateContext = function () {}; - -types._function.updateContext = function (prevType) { - if (this.state.exprAllowed && !this.braceIsBlock(prevType)) { - this.state.context.push(types$1.functionExpression); - } - - this.state.exprAllowed = false; -}; - -types.backQuote.updateContext = function () { - if (this.curContext() === types$1.template) { - this.state.context.pop(); - } else { - this.state.context.push(types$1.template); - } - - this.state.exprAllowed = false; -}; - -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; -var SourceLocation = function SourceLocation(start, end) { - this.start = start; - this.end = end; -}; -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } - - throw new Error("Unreachable"); -} - -var BaseParser = function () { - function BaseParser() { - this.sawUnambiguousESM = false; - } - - var _proto = BaseParser.prototype; - - _proto.isReservedWord = function isReservedWord(word) { - if (word === "await") { - return this.inModule; - } else { - return reservedWords[6](word); - } - }; - - _proto.hasPlugin = function hasPlugin(name) { - return !!this.plugins[name]; - }; - - return BaseParser; -}(); - -function last(stack) { - return stack[stack.length - 1]; -} - -var CommentsParser = function (_BaseParser) { - _inheritsLoose(CommentsParser, _BaseParser); - - function CommentsParser() { - return _BaseParser.apply(this, arguments) || this; - } - - var _proto = CommentsParser.prototype; - - _proto.addComment = function addComment(comment) { - if (this.filename) comment.loc.filename = this.filename; - this.state.trailingComments.push(comment); - this.state.leadingComments.push(comment); - }; - - _proto.processComment = function processComment(node) { - if (node.type === "Program" && node.body.length > 0) return; - var stack = this.state.commentStack; - var firstChild, lastChild, trailingComments, i, j; - - if (this.state.trailingComments.length > 0) { - if (this.state.trailingComments[0].start >= node.end) { - trailingComments = this.state.trailingComments; - this.state.trailingComments = []; - } else { - this.state.trailingComments.length = 0; - } - } else if (stack.length > 0) { - var lastInStack = last(stack); - - if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) { - trailingComments = lastInStack.trailingComments; - delete lastInStack.trailingComments; - } - } - - if (stack.length > 0 && last(stack).start >= node.start) { - firstChild = stack.pop(); - } - - while (stack.length > 0 && last(stack).start >= node.start) { - lastChild = stack.pop(); - } - - if (!lastChild && firstChild) lastChild = firstChild; - - if (firstChild && this.state.leadingComments.length > 0) { - var lastComment = last(this.state.leadingComments); - - if (firstChild.type === "ObjectProperty") { - if (lastComment.start >= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - - if (this.state.leadingComments.length > 0) { - firstChild.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) { - var lastArg = last(node.arguments); - - if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) { - if (this.state.commentPreviousNode) { - if (this.state.leadingComments.length > 0) { - lastArg.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } - } - - if (lastChild) { - if (lastChild.leadingComments) { - if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) { - node.leadingComments = lastChild.leadingComments; - delete lastChild.leadingComments; - } else { - for (i = lastChild.leadingComments.length - 2; i >= 0; --i) { - if (lastChild.leadingComments[i].end <= node.start) { - node.leadingComments = lastChild.leadingComments.splice(0, i + 1); - break; - } - } - } - } - } else if (this.state.leadingComments.length > 0) { - if (last(this.state.leadingComments).end <= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - } - - if (this.state.leadingComments.length > 0) { - node.leadingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } else { - for (i = 0; i < this.state.leadingComments.length; i++) { - if (this.state.leadingComments[i].end > node.start) { - break; - } - } - - var leadingComments = this.state.leadingComments.slice(0, i); - - if (leadingComments.length) { - node.leadingComments = leadingComments; - } - - trailingComments = this.state.leadingComments.slice(i); - - if (trailingComments.length === 0) { - trailingComments = null; - } - } - } - - this.state.commentPreviousNode = node; - - if (trailingComments) { - if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) { - node.innerComments = trailingComments; - } else { - node.trailingComments = trailingComments; - } - } - - stack.push(node); - }; - - return CommentsParser; -}(BaseParser); - -var LocationParser = function (_CommentsParser) { - _inheritsLoose(LocationParser, _CommentsParser); - - function LocationParser() { - return _CommentsParser.apply(this, arguments) || this; - } - - var _proto = LocationParser.prototype; - - _proto.raise = function raise(pos, message, _temp) { - var _ref = _temp === void 0 ? {} : _temp, - missingPluginNames = _ref.missingPluginNames, - code = _ref.code; - - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; - err.loc = loc; - - if (missingPluginNames) { - err.missingPlugin = missingPluginNames; - } - - if (code !== undefined) { - err.code = code; - } - - throw err; - }; - - return LocationParser; -}(CommentsParser); - -var State = function () { - function State() {} - - var _proto = State.prototype; - - _proto.init = function init(options, input) { - this.strict = options.strictMode === false ? false : options.sourceType === "module"; - this.input = input; - this.potentialArrowAt = -1; - this.noArrowAt = []; - this.noArrowParamsConversionAt = []; - this.inMethod = false; - this.inFunction = false; - this.inParameters = false; - this.maybeInArrowParameters = false; - this.inGenerator = false; - this.inAsync = false; - this.inPropertyName = false; - this.inType = false; - this.inClassProperty = false; - this.noAnonFunctionType = false; - this.hasFlowComment = false; - this.isIterator = false; - this.classLevel = 0; - this.labels = []; - this.decoratorStack = [[]]; - this.yieldInPossibleArrowParameters = null; - this.tokens = []; - this.comments = []; - this.trailingComments = []; - this.leadingComments = []; - this.commentStack = []; - this.commentPreviousNode = null; - this.pos = this.lineStart = 0; - this.curLine = options.startLine; - this.type = types.eof; - this.value = null; - this.start = this.end = this.pos; - this.startLoc = this.endLoc = this.curPosition(); - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - this.context = [types$1.braceStatement]; - this.exprAllowed = true; - this.containsEsc = this.containsOctal = false; - this.octalPosition = null; - this.invalidTemplateEscapePosition = null; - this.exportedIdentifiers = []; - }; - - _proto.curPosition = function curPosition() { - return new Position(this.curLine, this.pos - this.lineStart); - }; - - _proto.clone = function clone(skipArrays) { - var _this = this; - - var state = new State(); - Object.keys(this).forEach(function (key) { - var val = _this[key]; - - if ((!skipArrays || key === "context") && Array.isArray(val)) { - val = val.slice(); - } - - state[key] = val; - }); - return state; - }; - - return State; -}(); - -var _isDigit = function isDigit(code) { - return code >= 48 && code <= 57; -}; - -var VALID_REGEX_FLAGS = "gmsiyu"; -var forbiddenNumericSeparatorSiblings = { - decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], - hex: [46, 88, 95, 120] -}; -var allowedNumericSeparatorSiblings = {}; -allowedNumericSeparatorSiblings.bin = [48, 49]; -allowedNumericSeparatorSiblings.oct = allowedNumericSeparatorSiblings.bin.concat([50, 51, 52, 53, 54, 55]); -allowedNumericSeparatorSiblings.dec = allowedNumericSeparatorSiblings.oct.concat([56, 57]); -allowedNumericSeparatorSiblings.hex = allowedNumericSeparatorSiblings.dec.concat([65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]); -var Token = function Token(state) { - this.type = state.type; - this.value = state.value; - this.start = state.start; - this.end = state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); -}; - -function codePointToString(code) { - if (code <= 0xffff) { - return String.fromCharCode(code); - } else { - return String.fromCharCode((code - 0x10000 >> 10) + 0xd800, (code - 0x10000 & 1023) + 0xdc00); - } -} - -var Tokenizer = function (_LocationParser) { - _inheritsLoose(Tokenizer, _LocationParser); - - function Tokenizer(options, input) { - var _this; - - _this = _LocationParser.call(this) || this; - _this.state = new State(); - - _this.state.init(options, input); - - _this.isLookahead = false; - return _this; - } - - var _proto = Tokenizer.prototype; - - _proto.next = function next() { - if (this.options.tokens && !this.isLookahead) { - this.state.tokens.push(new Token(this.state)); - } - - this.state.lastTokEnd = this.state.end; - this.state.lastTokStart = this.state.start; - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - }; - - _proto.eat = function eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - }; - - _proto.match = function match(type) { - return this.state.type === type; - }; - - _proto.isKeyword = function isKeyword$$1(word) { - return isKeyword(word); - }; - - _proto.lookahead = function lookahead() { - var old = this.state; - this.state = old.clone(true); - this.isLookahead = true; - this.next(); - this.isLookahead = false; - var curr = this.state; - this.state = old; - return curr; - }; - - _proto.setStrict = function setStrict(strict) { - this.state.strict = strict; - if (!this.match(types.num) && !this.match(types.string)) return; - this.state.pos = this.state.start; - - while (this.state.pos < this.state.lineStart) { - this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; - --this.state.curLine; - } - - this.nextToken(); - }; - - _proto.curContext = function curContext() { - return this.state.context[this.state.context.length - 1]; - }; - - _proto.nextToken = function nextToken() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - this.state.containsOctal = false; - this.state.octalPosition = null; - this.state.start = this.state.pos; - this.state.startLoc = this.state.curPosition(); - - if (this.state.pos >= this.input.length) { - this.finishToken(types.eof); - return; - } - - if (curContext.override) { - curContext.override(this); - } else { - this.readToken(this.fullCharCodeAtPos()); - } - }; - - _proto.readToken = function readToken(code) { - if (isIdentifierStart(code) || code === 92) { - this.readWord(); - } else { - this.getTokenFromCode(code); - } - }; - - _proto.fullCharCodeAtPos = function fullCharCodeAtPos() { - var code = this.input.charCodeAt(this.state.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; - var next = this.input.charCodeAt(this.state.pos + 1); - return (code << 10) + next - 0x35fdc00; - }; - - _proto.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "CommentBlock" : "CommentLine", - value: text, - start: start, - end: end, - loc: new SourceLocation(startLoc, endLoc) - }; - - if (!this.isLookahead) { - if (this.options.tokens) this.state.tokens.push(comment); - this.state.comments.push(comment); - this.addComment(comment); - } - }; - - _proto.skipBlockComment = function skipBlockComment() { - var startLoc = this.state.curPosition(); - var start = this.state.pos; - var end = this.input.indexOf("*/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 2; - lineBreakG.lastIndex = start; - var match; - - while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { - ++this.state.curLine; - this.state.lineStart = match.index + match[0].length; - } - - this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - _proto.skipLineComment = function skipLineComment(startSkip) { - var start = this.state.pos; - var startLoc = this.state.curPosition(); - var ch = this.input.charCodeAt(this.state.pos += startSkip); - - if (this.state.pos < this.input.length) { - while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.input.length) { - ch = this.input.charCodeAt(this.state.pos); - } - } - - this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - _proto.skipSpace = function skipSpace() { - loop: while (this.state.pos < this.input.length) { - var ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 32: - case 160: - ++this.state.pos; - break; - - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - - case 10: - case 8232: - case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - - case 47: - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - this.skipBlockComment(); - break; - - case 47: - this.skipLineComment(2); - break; - - default: - break loop; - } - - break; - - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.state.pos; - } else { - break loop; - } - - } - } - }; - - _proto.finishToken = function finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - var prevType = this.state.type; - this.state.type = type; - this.state.value = val; - this.updateContext(prevType); - }; - - _proto.readToken_dot = function readToken_dot() { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next >= 48 && next <= 57) { - this.readNumber(true); - return; - } - - var next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 46 && next2 === 46) { - this.state.pos += 3; - this.finishToken(types.ellipsis); - } else { - ++this.state.pos; - this.finishToken(types.dot); - } - }; - - _proto.readToken_slash = function readToken_slash() { - if (this.state.exprAllowed) { - ++this.state.pos; - this.readRegexp(); - return; - } - - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.slash, 1); - } - }; - - _proto.readToken_mult_modulo = function readToken_mult_modulo(code) { - var type = code === 42 ? types.star : types.modulo; - var width = 1; - var next = this.input.charCodeAt(this.state.pos + 1); - var exprAllowed = this.state.exprAllowed; - - if (code === 42 && next === 42) { - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = types.exponent; - } - - if (next === 61 && !exprAllowed) { - width++; - type = types.assign; - } - - this.finishOp(type, width); - }; - - _proto.readToken_pipe_amp = function readToken_pipe_amp(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (this.input.charCodeAt(this.state.pos + 2) === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); - } - - return; - } - - if (code === 124) { - if (next === 62) { - this.finishOp(types.pipeline, 2); - return; - } else if (next === 125 && this.hasPlugin("flow")) { - this.finishOp(types.braceBarR, 2); - return; - } - } - - if (next === 61) { - this.finishOp(types.assign, 2); - return; - } - - this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); - }; - - _proto.readToken_caret = function readToken_caret() { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.bitwiseXOR, 1); - } - }; - - _proto.readToken_plus_min = function readToken_plus_min(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) { - this.skipLineComment(3); - this.skipSpace(); - this.nextToken(); - return; - } - - this.finishOp(types.incDec, 2); - return; - } - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.plusMin, 1); - } - }; - - _proto.readToken_lt_gt = function readToken_lt_gt(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - var size = 1; - - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; - - if (this.input.charCodeAt(this.state.pos + size) === 61) { - this.finishOp(types.assign, size + 1); - return; - } - - this.finishOp(types.bitShift, size); - return; - } - - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { - this.skipLineComment(4); - this.skipSpace(); - this.nextToken(); - return; - } - - if (next === 61) { - size = 2; - } - - this.finishOp(types.relational, size); - }; - - _proto.readToken_eq_excl = function readToken_eq_excl(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); - return; - } - - if (code === 61 && next === 62) { - this.state.pos += 2; - this.finishToken(types.arrow); - return; - } - - this.finishOp(code === 61 ? types.eq : types.bang, 1); - }; - - _proto.readToken_question = function readToken_question() { - var next = this.input.charCodeAt(this.state.pos + 1); - var next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 63) { - if (next2 === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(types.nullishCoalescing, 2); - } - } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { - this.state.pos += 2; - this.finishToken(types.questionDot); - } else { - ++this.state.pos; - this.finishToken(types.question); - } - }; - - _proto.getTokenFromCode = function getTokenFromCode(code) { - switch (code) { - case 35: - if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) { - ++this.state.pos; - this.finishToken(types.hash); - return; - } else { - this.raise(this.state.pos, "Unexpected character '" + codePointToString(code) + "'"); - } - - case 46: - this.readToken_dot(); - return; - - case 40: - ++this.state.pos; - this.finishToken(types.parenL); - return; - - case 41: - ++this.state.pos; - this.finishToken(types.parenR); - return; - - case 59: - ++this.state.pos; - this.finishToken(types.semi); - return; - - case 44: - ++this.state.pos; - this.finishToken(types.comma); - return; - - case 91: - ++this.state.pos; - this.finishToken(types.bracketL); - return; - - case 93: - ++this.state.pos; - this.finishToken(types.bracketR); - return; - - case 123: - if (this.hasPlugin("flow") && this.input.charCodeAt(this.state.pos + 1) === 124) { - this.finishOp(types.braceBarL, 2); - } else { - ++this.state.pos; - this.finishToken(types.braceL); - } - - return; - - case 125: - ++this.state.pos; - this.finishToken(types.braceR); - return; - - case 58: - if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { - this.finishOp(types.doubleColon, 2); - } else { - ++this.state.pos; - this.finishToken(types.colon); - } - - return; - - case 63: - this.readToken_question(); - return; - - case 64: - ++this.state.pos; - this.finishToken(types.at); - return; - - case 96: - ++this.state.pos; - this.finishToken(types.backQuote); - return; - - case 48: - { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 120 || next === 88) { - this.readRadixNumber(16); - return; - } - - if (next === 111 || next === 79) { - this.readRadixNumber(8); - return; - } - - if (next === 98 || next === 66) { - this.readRadixNumber(2); - return; - } - } - - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - this.readNumber(false); - return; - - case 34: - case 39: - this.readString(code); - return; - - case 47: - this.readToken_slash(); - return; - - case 37: - case 42: - this.readToken_mult_modulo(code); - return; - - case 124: - case 38: - this.readToken_pipe_amp(code); - return; - - case 94: - this.readToken_caret(); - return; - - case 43: - case 45: - this.readToken_plus_min(code); - return; - - case 60: - case 62: - this.readToken_lt_gt(code); - return; - - case 61: - case 33: - this.readToken_eq_excl(code); - return; - - case 126: - this.finishOp(types.tilde, 1); - return; - } - - this.raise(this.state.pos, "Unexpected character '" + codePointToString(code) + "'"); - }; - - _proto.finishOp = function finishOp(type, size) { - var str = this.input.slice(this.state.pos, this.state.pos + size); - this.state.pos += size; - this.finishToken(type, str); - }; - - _proto.readRegexp = function readRegexp() { - var start = this.state.pos; - var escaped, inClass; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(start, "Unterminated regular expression"); - } - - var ch = this.input.charAt(this.state.pos); - - if (lineBreak.test(ch)) { - this.raise(start, "Unterminated regular expression"); - } - - if (escaped) { - escaped = false; - } else { - if (ch === "[") { - inClass = true; - } else if (ch === "]" && inClass) { - inClass = false; - } else if (ch === "/" && !inClass) { - break; - } - - escaped = ch === "\\"; - } - - ++this.state.pos; - } - - var content = this.input.slice(start, this.state.pos); - ++this.state.pos; - var mods = ""; - - while (this.state.pos < this.input.length) { - var char = this.input[this.state.pos]; - var charCode = this.fullCharCodeAtPos(); - - if (VALID_REGEX_FLAGS.indexOf(char) > -1) { - if (mods.indexOf(char) > -1) { - this.raise(this.state.pos + 1, "Duplicate regular expression flag"); - } - - ++this.state.pos; - mods += char; - } else if (isIdentifierChar(charCode) || charCode === 92) { - this.raise(this.state.pos + 1, "Invalid regular expression flag"); - } else { - break; - } - } - - this.finishToken(types.regexp, { - pattern: content, - flags: mods - }); - }; - - _proto.readInt = function readInt(radix, len) { - var start = this.state.pos; - var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - var allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; - var total = 0; - - for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { - var code = this.input.charCodeAt(this.state.pos); - var val = void 0; - - if (this.hasPlugin("numericSeparator")) { - var prev = this.input.charCodeAt(this.state.pos - 1); - var next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 95) { - if (allowedSiblings.indexOf(next) === -1) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - ++this.state.pos; - continue; - } - } - - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - - if (val >= radix) break; - ++this.state.pos; - total = total * radix + val; - } - - if (this.state.pos === start || len != null && this.state.pos - start !== len) { - return null; - } - - return total; - }; - - _proto.readRadixNumber = function readRadixNumber(radix) { - var start = this.state.pos; - var isBigInt = false; - this.state.pos += 2; - var val = this.readInt(radix); - - if (val == null) { - this.raise(this.state.start + 2, "Expected number in radix " + radix); - } - - if (this.hasPlugin("bigInt")) { - if (this.input.charCodeAt(this.state.pos) === 110) { - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - if (isBigInt) { - var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - this.finishToken(types.bigint, str); - return; - } - - this.finishToken(types.num, val); - }; - - _proto.readNumber = function readNumber(startsWithDot) { - var start = this.state.pos; - var octal = this.input.charCodeAt(start) === 48; - var isFloat = false; - var isBigInt = false; - - if (!startsWithDot && this.readInt(10) === null) { - this.raise(start, "Invalid number"); - } - - if (octal && this.state.pos == start + 1) octal = false; - var next = this.input.charCodeAt(this.state.pos); - - if (next === 46 && !octal) { - ++this.state.pos; - this.readInt(10); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if ((next === 69 || next === 101) && !octal) { - next = this.input.charCodeAt(++this.state.pos); - - if (next === 43 || next === 45) { - ++this.state.pos; - } - - if (this.readInt(10) === null) this.raise(start, "Invalid number"); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if (this.hasPlugin("bigInt")) { - if (next === 110) { - if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral"); - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - - if (isBigInt) { - this.finishToken(types.bigint, str); - return; - } - - var val; - - if (isFloat) { - val = parseFloat(str); - } else if (!octal || str.length === 1) { - val = parseInt(str, 10); - } else if (this.state.strict) { - this.raise(start, "Invalid number"); - } else if (/[89]/.test(str)) { - val = parseInt(str, 10); - } else { - val = parseInt(str, 8); - } - - this.finishToken(types.num, val); - }; - - _proto.readCodePoint = function readCodePoint(throwOnInvalid) { - var ch = this.input.charCodeAt(this.state.pos); - var code; - - if (ch === 123) { - var codePos = ++this.state.pos; - code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid); - ++this.state.pos; - - if (code === null) { - --this.state.invalidTemplateEscapePosition; - } else if (code > 0x10ffff) { - if (throwOnInvalid) { - this.raise(codePos, "Code point out of bounds"); - } else { - this.state.invalidTemplateEscapePosition = codePos - 2; - return null; - } - } - } else { - code = this.readHexChar(4, throwOnInvalid); - } - - return code; - }; - - _proto.readString = function readString(quote) { - var out = "", - chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - var ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.readEscapedChar(false); - chunkStart = this.state.pos; - } else { - if (isNewLine(ch)) { - this.raise(this.state.start, "Unterminated string constant"); - } - - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - this.finishToken(types.string, out); - }; - - _proto.readTmplToken = function readTmplToken() { - var out = "", - chunkStart = this.state.pos, - containsInvalid = false; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated template"); - } - - var ch = this.input.charCodeAt(this.state.pos); - - if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { - if (this.state.pos === this.state.start && this.match(types.template)) { - if (ch === 36) { - this.state.pos += 2; - this.finishToken(types.dollarBraceL); - return; - } else { - ++this.state.pos; - this.finishToken(types.backQuote); - return; - } - } - - out += this.input.slice(chunkStart, this.state.pos); - this.finishToken(types.template, containsInvalid ? null : out); - return; - } - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - var escaped = this.readEscapedChar(true); - - if (escaped === null) { - containsInvalid = true; - } else { - out += escaped; - } - - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - ++this.state.pos; - - switch (ch) { - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - out += "\n"; - break; - - default: - out += String.fromCharCode(ch); - break; - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - }; - - _proto.readEscapedChar = function readEscapedChar(inTemplate) { - var throwOnInvalid = !inTemplate; - var ch = this.input.charCodeAt(++this.state.pos); - ++this.state.pos; - - switch (ch) { - case 110: - return "\n"; - - case 114: - return "\r"; - - case 120: - { - var code = this.readHexChar(2, throwOnInvalid); - return code === null ? null : String.fromCharCode(code); - } - - case 117: - { - var _code = this.readCodePoint(throwOnInvalid); - - return _code === null ? null : codePointToString(_code); - } - - case 116: - return "\t"; - - case 98: - return "\b"; - - case 118: - return "\x0B"; - - case 102: - return "\f"; - - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - this.state.lineStart = this.state.pos; - ++this.state.curLine; - return ""; - - default: - if (ch >= 48 && ch <= 55) { - var codePos = this.state.pos - 1; - var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; - var octal = parseInt(octalStr, 8); - - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - - if (octal > 0) { - if (inTemplate) { - this.state.invalidTemplateEscapePosition = codePos; - return null; - } else if (this.state.strict) { - this.raise(codePos, "Octal literal in strict mode"); - } else if (!this.state.containsOctal) { - this.state.containsOctal = true; - this.state.octalPosition = codePos; - } - } - - this.state.pos += octalStr.length - 1; - return String.fromCharCode(octal); - } - - return String.fromCharCode(ch); - } - }; - - _proto.readHexChar = function readHexChar(len, throwOnInvalid) { - var codePos = this.state.pos; - var n = this.readInt(16, len); - - if (n === null) { - if (throwOnInvalid) { - this.raise(codePos, "Bad character escape sequence"); - } else { - this.state.pos = codePos - 1; - this.state.invalidTemplateEscapePosition = codePos - 1; - } - } - - return n; - }; - - _proto.readWord1 = function readWord1() { - this.state.containsEsc = false; - var word = "", - first = true, - chunkStart = this.state.pos; - - while (this.state.pos < this.input.length) { - var ch = this.fullCharCodeAtPos(); - - if (isIdentifierChar(ch)) { - this.state.pos += ch <= 0xffff ? 1 : 2; - } else if (this.state.isIterator && ch === 64) { - this.state.pos += 1; - } else if (ch === 92) { - this.state.containsEsc = true; - word += this.input.slice(chunkStart, this.state.pos); - var escStart = this.state.pos; - - if (this.input.charCodeAt(++this.state.pos) !== 117) { - this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX"); - } - - ++this.state.pos; - var esc = this.readCodePoint(true); - - if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) { - this.raise(escStart, "Invalid Unicode escape"); - } - - word += codePointToString(esc); - chunkStart = this.state.pos; - } else { - break; - } - - first = false; - } - - return word + this.input.slice(chunkStart, this.state.pos); - }; - - _proto.isIterator = function isIterator(word) { - return word === "@@iterator" || word === "@@asyncIterator"; - }; - - _proto.readWord = function readWord() { - var word = this.readWord1(); - var type = types.name; - - if (this.isKeyword(word)) { - if (this.state.containsEsc) { - this.raise(this.state.pos, "Escape sequence in keyword " + word); - } - - type = keywords[word]; - } - - if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) { - this.raise(this.state.pos, "Invalid identifier " + word); - } - - this.finishToken(type, word); - }; - - _proto.braceIsBlock = function braceIsBlock(prevType) { - if (prevType === types.colon) { - var parent = this.curContext(); - - if (parent === types$1.braceStatement || parent === types$1.braceExpression) { - return !parent.isExpr; - } - } - - if (prevType === types._return) { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - } - - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR) { - return true; - } - - if (prevType === types.braceL) { - return this.curContext() === types$1.braceStatement; - } - - if (prevType === types.relational) { - return true; - } - - return !this.state.exprAllowed; - }; - - _proto.updateContext = function updateContext(prevType) { - var type = this.state.type; - var update; - - if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) { - this.state.exprAllowed = false; - } else if (update = type.updateContext) { - update.call(this, prevType); - } else { - this.state.exprAllowed = type.beforeExpr; - } - }; - - return Tokenizer; -}(LocationParser); - -var UtilParser = function (_Tokenizer) { - _inheritsLoose(UtilParser, _Tokenizer); - - function UtilParser() { - return _Tokenizer.apply(this, arguments) || this; - } - - var _proto = UtilParser.prototype; - - _proto.addExtra = function addExtra(node, key, val) { - if (!node) return; - var extra = node.extra = node.extra || {}; - extra[key] = val; - }; - - _proto.isRelational = function isRelational(op) { - return this.match(types.relational) && this.state.value === op; - }; - - _proto.expectRelational = function expectRelational(op) { - if (this.isRelational(op)) { - this.next(); - } else { - this.unexpected(null, types.relational); - } - }; - - _proto.eatRelational = function eatRelational(op) { - if (this.isRelational(op)) { - this.next(); - return true; - } - - return false; - }; - - _proto.isContextual = function isContextual(name) { - return this.match(types.name) && this.state.value === name && !this.state.containsEsc; - }; - - _proto.isLookaheadContextual = function isLookaheadContextual(name) { - var l = this.lookahead(); - return l.type === types.name && l.value === name; - }; - - _proto.eatContextual = function eatContextual(name) { - return this.isContextual(name) && this.eat(types.name); - }; - - _proto.expectContextual = function expectContextual(name, message) { - if (!this.eatContextual(name)) this.unexpected(null, message); - }; - - _proto.canInsertSemicolon = function canInsertSemicolon() { - return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak(); - }; - - _proto.hasPrecedingLineBreak = function hasPrecedingLineBreak() { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - }; - - _proto.isLineTerminator = function isLineTerminator() { - return this.eat(types.semi) || this.canInsertSemicolon(); - }; - - _proto.semicolon = function semicolon() { - if (!this.isLineTerminator()) this.unexpected(null, types.semi); - }; - - _proto.expect = function expect(type, pos) { - this.eat(type) || this.unexpected(pos, type); - }; - - _proto.unexpected = function unexpected(pos, messageOrType) { - if (messageOrType === void 0) { - messageOrType = "Unexpected token"; - } - - if (typeof messageOrType !== "string") { - messageOrType = "Unexpected token, expected \"" + messageOrType.label + "\""; - } - - throw this.raise(pos != null ? pos : this.state.start, messageOrType); - }; - - _proto.expectPlugin = function expectPlugin(name, pos) { - if (!this.hasPlugin(name)) { - throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling the parser plugin: '" + name + "'", { - missingPluginNames: [name] - }); - } - - return true; - }; - - _proto.expectOnePlugin = function expectOnePlugin(names, pos) { - var _this = this; - - if (!names.some(function (n) { - return _this.hasPlugin(n); - })) { - throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling one of the following parser plugin(s): '" + names.join(", ") + "'", { - missingPluginNames: names - }); - } - }; - - return UtilParser; -}(Tokenizer); - -var commentKeys = ["leadingComments", "trailingComments", "innerComments"]; - -var Node = function () { - function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - this.loc = new SourceLocation(loc); - if (parser && parser.options.ranges) this.range = [pos, 0]; - if (parser && parser.filename) this.loc.filename = parser.filename; - } - - var _proto = Node.prototype; - - _proto.__clone = function __clone() { - var _this = this; - - var node2 = new Node(); - Object.keys(this).forEach(function (key) { - if (commentKeys.indexOf(key) < 0) { - node2[key] = _this[key]; - } - }); - return node2; - }; - - return Node; -}(); - -var NodeUtils = function (_UtilParser) { - _inheritsLoose(NodeUtils, _UtilParser); - - function NodeUtils() { - return _UtilParser.apply(this, arguments) || this; - } - - var _proto2 = NodeUtils.prototype; - - _proto2.startNode = function startNode() { - return new Node(this, this.state.start, this.state.startLoc); - }; - - _proto2.startNodeAt = function startNodeAt(pos, loc) { - return new Node(this, pos, loc); - }; - - _proto2.startNodeAtNode = function startNodeAtNode(type) { - return this.startNodeAt(type.start, type.loc.start); - }; - - _proto2.finishNode = function finishNode(node, type) { - return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); - }; - - _proto2.finishNodeAt = function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - this.processComment(node); - return node; - }; - - _proto2.resetStartLocationFromNode = function resetStartLocationFromNode(node, locationNode) { - node.start = locationNode.start; - node.loc.start = locationNode.loc.start; - if (this.options.ranges) node.range[0] = locationNode.range[0]; - }; - - return NodeUtils; -}(UtilParser); - -var LValParser = function (_NodeUtils) { - _inheritsLoose(LValParser, _NodeUtils); - - function LValParser() { - return _NodeUtils.apply(this, arguments) || this; - } - - var _proto = LValParser.prototype; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - - for (var index = 0; index < node.properties.length; index++) { - var prop = node.properties[index]; - var isLast = index === node.properties.length - 1; - this.toAssignableObjectExpressionProp(prop, isBinding, isLast); - } - - break; - - case "ObjectProperty": - this.toAssignable(node.value, isBinding, contextDescription); - break; - - case "SpreadElement": - { - this.checkToRestConversion(node); - node.type = "RestElement"; - var arg = node.argument; - this.toAssignable(arg, isBinding, contextDescription); - break; - } - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding, contextDescription); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - { - var message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(node.start, message); - } - } - } - - return node; - }; - - _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.type === "ObjectMethod") { - var error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods"; - this.raise(prop.key.start, error); - } else if (prop.type === "SpreadElement" && !isLast) { - this.raise(prop.start, "The rest element has to be the last element when destructuring"); - } else { - this.toAssignable(prop, isBinding, "object destructuring pattern"); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - var end = exprList.length; - - if (end) { - var last = exprList[end - 1]; - - if (last && last.type === "RestElement") { - --end; - } else if (last && last.type === "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding, contextDescription); - - if (["Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"].indexOf(arg.type) === -1) { - this.unexpected(arg.start); - } - - --end; - } - } - - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - - if (elt && elt.type === "SpreadElement") { - this.raise(elt.start, "The rest element has to be the last element when destructuring"); - } - - if (elt) this.toAssignable(elt, isBinding, contextDescription); - } - - return exprList; - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - return exprList; - }; - - _proto.parseSpread = function parseSpread(refShorthandDefaultPos, refNeedsArrowPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos); - return this.finishNode(node, "SpreadElement"); - }; - - _proto.parseRest = function parseRest() { - var node = this.startNode(); - this.next(); - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); - }; - - _proto.shouldAllowYieldIdentifier = function shouldAllowYieldIdentifier() { - return this.match(types._yield) && !this.state.strict && !this.state.inGenerator; - }; - - _proto.parseBindingIdentifier = function parseBindingIdentifier() { - return this.parseIdentifier(this.shouldAllowYieldIdentifier()); - }; - - _proto.parseBindingAtom = function parseBindingAtom() { - switch (this.state.type) { - case types._yield: - case types.name: - return this.parseBindingIdentifier(); - - case types.bracketL: - { - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true); - return this.finishNode(node, "ArrayPattern"); - } - - case types.braceL: - return this.parseObj(true); - - default: - throw this.unexpected(); - } - }; - - _proto.parseBindingList = function parseBindingList(close, allowEmpty, allowModifiers) { - var elts = []; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - } - - if (allowEmpty && this.match(types.comma)) { - elts.push(null); - } else if (this.eat(close)) { - break; - } else if (this.match(types.ellipsis)) { - elts.push(this.parseAssignableListItemTypes(this.parseRest())); - this.expect(close); - break; - } else { - var decorators = []; - - if (this.match(types.at) && this.hasPlugin("decorators2")) { - this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters"); - } - - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - - elts.push(this.parseAssignableListItem(allowModifiers, decorators)); - } - } - - return elts; - }; - - _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) { - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - var elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - return param; - }; - - _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) { - startLoc = startLoc || this.state.startLoc; - startPos = startPos || this.state.start; - left = left || this.parseBindingAtom(); - if (!this.eat(types.eq)) return left; - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - switch (expr.type) { - case "Identifier": - this.checkReservedWord(expr.name, expr.start, false, true); - - if (checkClashes) { - var _key = "_" + expr.name; - - if (checkClashes[_key]) { - this.raise(expr.start, "Argument name clash in strict mode"); - } else { - checkClashes[_key] = true; - } - } - - break; - - case "MemberExpression": - if (isBinding) this.raise(expr.start, "Binding member expression"); - break; - - case "ObjectPattern": - for (var _i2 = 0, _expr$properties2 = expr.properties; _i2 < _expr$properties2.length; _i2++) { - var prop = _expr$properties2[_i2]; - if (prop.type === "ObjectProperty") prop = prop.value; - this.checkLVal(prop, isBinding, checkClashes, "object destructuring pattern"); - } - - break; - - case "ArrayPattern": - for (var _i4 = 0, _expr$elements2 = expr.elements; _i4 < _expr$elements2.length; _i4++) { - var elem = _expr$elements2[_i4]; - - if (elem) { - this.checkLVal(elem, isBinding, checkClashes, "array destructuring pattern"); - } - } - - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes, "assignment pattern"); - break; - - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes, "rest element"); - break; - - default: - { - var message = (isBinding ? "Binding invalid" : "Invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(expr.start, message); - } - } - }; - - _proto.checkToRestConversion = function checkToRestConversion(node) { - var validArgumentTypes = ["Identifier", "MemberExpression"]; - - if (validArgumentTypes.indexOf(node.argument.type) !== -1) { - return; - } - - this.raise(node.argument.start, "Invalid rest operator's argument"); - }; - - return LValParser; -}(NodeUtils); - -var ExpressionParser = function (_LValParser) { - _inheritsLoose(ExpressionParser, _LValParser); - - function ExpressionParser() { - return _LValParser.apply(this, arguments) || this; - } - - var _proto = ExpressionParser.prototype; - - _proto.checkPropClash = function checkPropClash(prop, propHash) { - if (prop.computed || prop.kind) return; - var key = prop.key; - var name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - }; - - _proto.getExpression = function getExpression() { - this.nextToken(); - var expr = this.parseExpression(); - - if (!this.match(types.eof)) { - this.unexpected(); - } - - expr.comments = this.state.comments; - return expr; - }; - - _proto.parseExpression = function parseExpression(noIn, refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - - if (this.match(types.comma)) { - var _node = this.startNodeAt(startPos, startLoc); - - _node.expressions = [expr]; - - while (this.eat(types.comma)) { - _node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - } - - this.toReferencedList(_node.expressions); - return this.finishNode(_node, "SequenceExpression"); - } - - return expr; - }; - - _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - - if (this.match(types._yield) && this.state.inGenerator) { - var _left = this.parseYield(); - - if (afterLeftParse) { - _left = afterLeftParse.call(this, _left, startPos, startLoc); - } - - return _left; - } - - var failOnShorthandAssign; - - if (refShorthandDefaultPos) { - failOnShorthandAssign = false; - } else { - refShorthandDefaultPos = { - start: 0 - }; - failOnShorthandAssign = true; - } - - if (this.match(types.parenL) || this.match(types.name) || this.match(types._yield)) { - this.state.potentialArrowAt = this.state.start; - } - - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos); - - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); - } - - if (this.state.type.isAssign) { - var _node2 = this.startNodeAt(startPos, startLoc); - - var operator = this.state.value; - _node2.operator = operator; - - if (operator === "??=") { - this.expectPlugin("nullishCoalescingOperator"); - this.expectPlugin("logicalAssignment"); - } - - if (operator === "||=" || operator === "&&=") { - this.expectPlugin("logicalAssignment"); - } - - _node2.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left; - refShorthandDefaultPos.start = 0; - this.checkLVal(left, undefined, undefined, "assignment expression"); - - if (left.extra && left.extra.parenthesized) { - var errorMsg; - - if (left.type === "ObjectPattern") { - errorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (left.type === "ArrayPattern") { - errorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - - if (errorMsg) { - this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg); - } - } - - this.next(); - _node2.right = this.parseMaybeAssign(noIn); - return this.finishNode(_node2, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - return left; - }; - - _proto.parseMaybeConditional = function parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (this.eat(types.question)) { - var _node3 = this.startNodeAt(startPos, startLoc); - - _node3.test = expr; - _node3.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - _node3.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(_node3, "ConditionalExpression"); - } - - return expr; - }; - - _proto.parseExprOps = function parseExprOps(noIn, refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); - }; - - _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.state.type.binop; - - if (prec != null && (!noIn || !this.match(types._in))) { - if (prec > minPrec) { - var _node4 = this.startNodeAt(leftStartPos, leftStartLoc); - - var operator = this.state.value; - _node4.left = left; - _node4.operator = operator; - - if (operator === "**" && left.type === "UnaryExpression" && left.extra && !left.extra.parenthesizedArgument && !left.extra.parenthesized) { - this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses."); - } - - var op = this.state.type; - - if (op === types.nullishCoalescing) { - this.expectPlugin("nullishCoalescingOperator"); - } else if (op === types.pipeline) { - this.expectPlugin("pipelineOperator"); - } - - this.next(); - var startPos = this.state.start; - var startLoc = this.state.startLoc; - - if (op === types.pipeline) { - this.state.potentialArrowAt = startPos; - } - - _node4.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn); - this.finishNode(_node4, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(_node4, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - - return left; - }; - - _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) { - if (this.state.type.prefix) { - var _node5 = this.startNode(); - - var update = this.match(types.incDec); - _node5.operator = this.state.value; - _node5.prefix = true; - - if (_node5.operator === "throw") { - this.expectPlugin("throwExpressions"); - } - - this.next(); - var argType = this.state.type; - _node5.argument = this.parseMaybeUnary(); - this.addExtra(_node5, "parenthesizedArgument", argType === types.parenL && (!_node5.argument.extra || !_node5.argument.extra.parenthesized)); - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (update) { - this.checkLVal(_node5.argument, undefined, undefined, "prefix operation"); - } else if (this.state.strict && _node5.operator === "delete") { - var arg = _node5.argument; - - if (arg.type === "Identifier") { - this.raise(_node5.start, "Deleting local variable in strict mode"); - } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") { - this.raise(_node5.start, "Deleting a private field is not allowed"); - } - } - - return this.finishNode(_node5, update ? "UpdateExpression" : "UnaryExpression"); - } - - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - - while (this.state.type.postfix && !this.canInsertSemicolon()) { - var _node6 = this.startNodeAt(startPos, startLoc); - - _node6.operator = this.state.value; - _node6.prefix = false; - _node6.argument = expr; - this.checkLVal(expr, undefined, undefined, "postfix operation"); - this.next(); - expr = this.finishNode(_node6, "UpdateExpression"); - } - - return expr; - }; - - _proto.parseExprSubscripts = function parseExprSubscripts(refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseExprAtom(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseSubscripts(expr, startPos, startLoc); - }; - - _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) { - var state = { - optionalChainMember: false, - stop: false - }; - - do { - base = this.parseSubscript(base, startPos, startLoc, noCalls, state); - } while (!state.stop); - - return base; - }; - - _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) { - if (!noCalls && this.eat(types.doubleColon)) { - var _node7 = this.startNodeAt(startPos, startLoc); - - _node7.object = base; - _node7.callee = this.parseNoCallExpr(); - state.stop = true; - return this.parseSubscripts(this.finishNode(_node7, "BindExpression"), startPos, startLoc, noCalls); - } else if (this.match(types.questionDot)) { - this.expectPlugin("optionalChaining"); - state.optionalChainMember = true; - - if (noCalls && this.lookahead().type == types.parenL) { - state.stop = true; - return base; - } - - this.next(); - - var _node8 = this.startNodeAt(startPos, startLoc); - - if (this.eat(types.bracketL)) { - _node8.object = base; - _node8.property = this.parseExpression(); - _node8.computed = true; - _node8.optional = true; - this.expect(types.bracketR); - return this.finishNode(_node8, "OptionalMemberExpression"); - } else if (this.eat(types.parenL)) { - var possibleAsync = this.atPossibleAsync(base); - _node8.callee = base; - _node8.arguments = this.parseCallExpressionArguments(types.parenR, possibleAsync); - _node8.optional = true; - return this.finishNode(_node8, "OptionalCallExpression"); - } else { - _node8.object = base; - _node8.property = this.parseIdentifier(true); - _node8.computed = false; - _node8.optional = true; - return this.finishNode(_node8, "OptionalMemberExpression"); - } - } else if (this.eat(types.dot)) { - var _node9 = this.startNodeAt(startPos, startLoc); - - _node9.object = base; - _node9.property = this.parseMaybePrivateName(); - _node9.computed = false; - - if (state.optionalChainMember) { - _node9.optional = false; - return this.finishNode(_node9, "OptionalMemberExpression"); - } - - return this.finishNode(_node9, "MemberExpression"); - } else if (this.eat(types.bracketL)) { - var _node10 = this.startNodeAt(startPos, startLoc); - - _node10.object = base; - _node10.property = this.parseExpression(); - _node10.computed = true; - this.expect(types.bracketR); - - if (state.optionalChainMember) { - _node10.optional = false; - return this.finishNode(_node10, "OptionalMemberExpression"); - } - - return this.finishNode(_node10, "MemberExpression"); - } else if (!noCalls && this.match(types.parenL)) { - var _possibleAsync = this.atPossibleAsync(base); - - this.next(); - - var _node11 = this.startNodeAt(startPos, startLoc); - - _node11.callee = base; - var refTrailingCommaPos = { - start: -1 - }; - _node11.arguments = this.parseCallExpressionArguments(types.parenR, _possibleAsync, refTrailingCommaPos); - - if (!state.optionalChainMember) { - this.finishCallExpression(_node11); - } else { - this.finishOptionalCallExpression(_node11); - } - - if (_possibleAsync && this.shouldParseAsyncArrow()) { - state.stop = true; - - if (refTrailingCommaPos.start > -1) { - this.raise(refTrailingCommaPos.start, "A trailing comma is not permitted after the rest element"); - } - - return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node11); - } else { - this.toReferencedList(_node11.arguments); - } - - return _node11; - } else if (this.match(types.backQuote)) { - var _node12 = this.startNodeAt(startPos, startLoc); - - _node12.tag = base; - _node12.quasi = this.parseTemplate(true); - - if (state.optionalChainMember) { - this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain"); - } - - return this.finishNode(_node12, "TaggedTemplateExpression"); - } else { - state.stop = true; - return base; - } - }; - - _proto.atPossibleAsync = function atPossibleAsync(base) { - return !this.state.containsEsc && this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon(); - }; - - _proto.finishCallExpression = function finishCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - var importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "CallExpression"); - }; - - _proto.finishOptionalCallExpression = function finishOptionalCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - var importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "OptionalCallExpression"); - }; - - _proto.parseCallExpressionArguments = function parseCallExpressionArguments(close, possibleAsyncArrow, refTrailingCommaPos) { - var elts = []; - var innerParenStart; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(close)) break; - } - - if (this.match(types.parenL) && !innerParenStart) { - innerParenStart = this.state.start; - } - - elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { - start: 0 - } : undefined, possibleAsyncArrow ? { - start: 0 - } : undefined, possibleAsyncArrow ? refTrailingCommaPos : undefined)); - } - - if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) { - this.unexpected(); - } - - return elts; - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.arrow); - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - this.expect(types.arrow); - this.parseArrowExpression(node, call.arguments, true); - this.state.yieldInPossibleArrowParameters = oldYield; - return node; - }; - - _proto.parseNoCallExpr = function parseNoCallExpr() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - }; - - _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) { - var canBeArrow = this.state.potentialArrowAt === this.state.start; - var node; - - switch (this.state.type) { - case types._super: - if (!this.state.inMethod && !this.state.inClassProperty && !this.options.allowSuperOutsideMethod) { - this.raise(this.state.start, "super is only allowed in object methods and classes"); - } - - node = this.startNode(); - this.next(); - - if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) { - this.unexpected(); - } - - if (this.match(types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) { - this.raise(node.start, "super() is only valid inside a class constructor. " + "Make sure the method name is spelled exactly as 'constructor'."); - } - - return this.finishNode(node, "Super"); - - case types._import: - if (this.lookahead().type === types.dot) { - return this.parseImportMetaProperty(); - } - - this.expectPlugin("dynamicImport"); - node = this.startNode(); - this.next(); - - if (!this.match(types.parenL)) { - this.unexpected(null, types.parenL); - } - - return this.finishNode(node, "Import"); - - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); - - case types._yield: - if (this.state.inGenerator) this.unexpected(); - - case types.name: - { - node = this.startNode(); - var allowAwait = this.state.value === "await" && (this.state.inAsync || !this.state.inFunction && this.options.allowAwaitOutsideFunction); - var containsEsc = this.state.containsEsc; - var allowYield = this.shouldAllowYieldIdentifier(); - var id = this.parseIdentifier(allowAwait || allowYield); - - if (id.name === "await") { - if (this.state.inAsync || this.inModule || !this.state.inFunction && this.options.allowAwaitOutsideFunction) { - return this.parseAwait(node); - } - } else if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, false, false, true); - } else if (canBeArrow && id.name === "async" && this.match(types.name)) { - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - var params = [this.parseIdentifier()]; - this.expect(types.arrow); - this.parseArrowExpression(node, params, true); - this.state.yieldInPossibleArrowParameters = oldYield; - return node; - } - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - var _oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - this.parseArrowExpression(node, [id]); - this.state.yieldInPossibleArrowParameters = _oldYield; - return node; - } - - return id; - } - - case types._do: - { - this.expectPlugin("doExpressions"); - - var _node13 = this.startNode(); - - this.next(); - var oldInFunction = this.state.inFunction; - var oldLabels = this.state.labels; - this.state.labels = []; - this.state.inFunction = false; - _node13.body = this.parseBlock(false); - this.state.inFunction = oldInFunction; - this.state.labels = oldLabels; - return this.finishNode(_node13, "DoExpression"); - } - - case types.regexp: - { - var value = this.state.value; - node = this.parseLiteral(value.value, "RegExpLiteral"); - node.pattern = value.pattern; - node.flags = value.flags; - return node; - } - - case types.num: - return this.parseLiteral(this.state.value, "NumericLiteral"); - - case types.bigint: - return this.parseLiteral(this.state.value, "BigIntLiteral"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteral"); - - case types._null: - node = this.startNode(); - this.next(); - return this.finishNode(node, "NullLiteral"); - - case types._true: - case types._false: - return this.parseBooleanLiteral(); - - case types.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos); - this.toReferencedList(node.elements); - return this.finishNode(node, "ArrayExpression"); - - case types.braceL: - return this.parseObj(false, refShorthandDefaultPos); - - case types._function: - return this.parseFunctionExpression(); - - case types.at: - this.parseDecorators(); - - case types._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); - - case types._new: - return this.parseNew(); - - case types.backQuote: - return this.parseTemplate(false); - - case types.doubleColon: - { - node = this.startNode(); - this.next(); - node.object = null; - var callee = node.callee = this.parseNoCallExpr(); - - if (callee.type === "MemberExpression") { - return this.finishNode(node, "BindExpression"); - } else { - throw this.raise(callee.start, "Binding should be performed on object property."); - } - } - - default: - throw this.unexpected(); - } - }; - - _proto.parseBooleanLiteral = function parseBooleanLiteral() { - var node = this.startNode(); - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteral"); - }; - - _proto.parseMaybePrivateName = function parseMaybePrivateName() { - var isPrivate = this.match(types.hash); - - if (isPrivate) { - this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); - - var _node14 = this.startNode(); - - this.next(); - _node14.id = this.parseIdentifier(true); - return this.finishNode(_node14, "PrivateName"); - } else { - return this.parseIdentifier(true); - } - }; - - _proto.parseFunctionExpression = function parseFunctionExpression() { - var node = this.startNode(); - var meta = this.parseIdentifier(true); - - if (this.state.inGenerator && this.eat(types.dot)) { - return this.parseMetaProperty(node, meta, "sent"); - } - - return this.parseFunction(node, false); - }; - - _proto.parseMetaProperty = function parseMetaProperty(node, meta, propertyName) { - node.meta = meta; - - if (meta.name === "function" && propertyName === "sent") { - if (this.isContextual(propertyName)) { - this.expectPlugin("functionSent"); - } else if (!this.hasPlugin("functionSent")) { - this.unexpected(); - } - } - - var containsEsc = this.state.containsEsc; - node.property = this.parseIdentifier(true); - - if (node.property.name !== propertyName || containsEsc) { - this.raise(node.property.start, "The only valid meta property for " + meta.name + " is " + meta.name + "." + propertyName); - } - - return this.finishNode(node, "MetaProperty"); - }; - - _proto.parseImportMetaProperty = function parseImportMetaProperty() { - var node = this.startNode(); - var id = this.parseIdentifier(true); - this.expect(types.dot); - - if (id.name === "import") { - if (this.isContextual("meta")) { - this.expectPlugin("importMeta"); - } else if (!this.hasPlugin("importMeta")) { - this.raise(id.start, "Dynamic imports require a parameter: import('a.js').then"); - } - } - - if (!this.inModule) { - this.raise(id.start, "import.meta may appear only with 'sourceType: \"module\"'", { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - - this.sawUnambiguousESM = true; - return this.parseMetaProperty(node, id, "meta"); - }; - - _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - var node = this.startNodeAt(startPos, startLoc); - this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(startPos, this.state.end)); - node.value = value; - this.next(); - return this.finishNode(node, type); - }; - - _proto.parseParenExpression = function parseParenExpression() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val; - }; - - _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var val; - this.expect(types.parenL); - var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.maybeInArrowParameters = true; - this.state.yieldInPossibleArrowParameters = null; - var innerStartPos = this.state.start; - var innerStartLoc = this.state.startLoc; - var exprList = []; - var refShorthandDefaultPos = { - start: 0 - }; - var refNeedsArrowPos = { - start: 0 - }; - var first = true; - var spreadStart; - var optionalCommaStart; - - while (!this.match(types.parenR)) { - if (first) { - first = false; - } else { - this.expect(types.comma, refNeedsArrowPos.start || null); - - if (this.match(types.parenR)) { - optionalCommaStart = this.state.start; - break; - } - } - - if (this.match(types.ellipsis)) { - var spreadNodeStartPos = this.state.start; - var spreadNodeStartLoc = this.state.startLoc; - spreadStart = this.state.start; - exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartPos, spreadNodeStartLoc)); - - if (this.match(types.comma) && this.lookahead().type === types.parenR) { - this.raise(this.state.start, "A trailing comma is not permitted after the rest element"); - } - - break; - } else { - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos)); - } - } - - var innerEndPos = this.state.start; - var innerEndLoc = this.state.startLoc; - this.expect(types.parenR); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - var arrowNode = this.startNodeAt(startPos, startLoc); - - if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) { - for (var _i2 = 0; _i2 < exprList.length; _i2++) { - var param = exprList[_i2]; - - if (param.extra && param.extra.parenthesized) { - this.unexpected(param.extra.parenStart); - } - } - - this.parseArrowExpression(arrowNode, exprList); - this.state.yieldInPossibleArrowParameters = oldYield; - return arrowNode; - } - - this.state.yieldInPossibleArrowParameters = oldYield; - - if (!exprList.length) { - this.unexpected(this.state.lastTokStart); - } - - if (optionalCommaStart) this.unexpected(optionalCommaStart); - if (spreadStart) this.unexpected(spreadStart); - - if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.toReferencedList(val.expressions); - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - - this.addExtra(val, "parenthesized", true); - this.addExtra(val, "parenStart", startPos); - return val; - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return !this.canInsertSemicolon(); - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.eat(types.arrow)) { - return node; - } - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - return node; - }; - - _proto.parseNew = function parseNew() { - var node = this.startNode(); - var meta = this.parseIdentifier(true); - - if (this.eat(types.dot)) { - var metaProp = this.parseMetaProperty(node, meta, "target"); - - if (!this.state.inFunction && !this.state.inClassProperty) { - var error = "new.target can only be used in functions"; - - if (this.hasPlugin("classProperties")) { - error += " or class properties"; - } - - this.raise(metaProp.start, error); - } - - return metaProp; - } - - node.callee = this.parseNoCallExpr(); - - if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") { - this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed"); - } - - if (this.eat(types.questionDot)) { - this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed"); - } - - this.parseNewArguments(node); - return this.finishNode(node, "NewExpression"); - }; - - _proto.parseNewArguments = function parseNewArguments(node) { - if (this.eat(types.parenL)) { - var args = this.parseExprList(types.parenR); - this.toReferencedList(args); - node.arguments = args; - } else { - node.arguments = []; - } - }; - - _proto.parseTemplateElement = function parseTemplateElement(isTagged) { - var elem = this.startNode(); - - if (this.state.value === null) { - if (!isTagged) { - this.raise(this.state.invalidTemplateEscapePosition || 0, "Invalid escape sequence in template"); - } else { - this.state.invalidTemplateEscapePosition = null; - } - } - - elem.value = { - raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), - cooked: this.state.value - }; - this.next(); - elem.tail = this.match(types.backQuote); - return this.finishNode(elem, "TemplateElement"); - }; - - _proto.parseTemplate = function parseTemplate(isTagged) { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(isTagged); - node.quasis = [curElt]; - - while (!curElt.tail) { - this.expect(types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types.braceR); - node.quasis.push(curElt = this.parseTemplateElement(isTagged)); - } - - this.next(); - return this.finishNode(node, "TemplateLiteral"); - }; - - _proto.parseObj = function parseObj(isPattern, refShorthandDefaultPos) { - var decorators = []; - var propHash = Object.create(null); - var first = true; - var node = this.startNode(); - node.properties = []; - this.next(); - var firstRestLocation = null; - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - if (this.match(types.at)) { - if (this.hasPlugin("decorators2")) { - this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators"); - } else { - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - } - } - - var prop = this.startNode(), - isGenerator = false, - _isAsync = false, - startPos = void 0, - startLoc = void 0; - - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - - if (this.match(types.ellipsis)) { - this.expectPlugin("objectRestSpread"); - prop = this.parseSpread(isPattern ? { - start: 0 - } : undefined); - - if (isPattern) { - this.toAssignable(prop, true, "object pattern"); - } - - node.properties.push(prop); - - if (isPattern) { - var position = this.state.start; - - if (firstRestLocation !== null) { - this.unexpected(firstRestLocation, "Cannot have multiple rest elements when destructuring"); - } else if (this.eat(types.braceR)) { - break; - } else if (this.match(types.comma) && this.lookahead().type === types.braceR) { - this.unexpected(position, "A trailing comma is not permitted after the rest element"); - } else { - firstRestLocation = position; - continue; - } - } else { - continue; - } - } - - prop.method = false; - - if (isPattern || refShorthandDefaultPos) { - startPos = this.state.start; - startLoc = this.state.startLoc; - } - - if (!isPattern) { - isGenerator = this.eat(types.star); - } - - var containsEsc = this.state.containsEsc; - - if (!isPattern && this.isContextual("async")) { - if (isGenerator) this.unexpected(); - var asyncId = this.parseIdentifier(); - - if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) { - prop.key = asyncId; - prop.computed = false; - } else { - _isAsync = true; - - if (this.match(types.star)) { - this.expectPlugin("asyncGenerators"); - this.next(); - isGenerator = true; - } - - this.parsePropertyName(prop); - } - } else { - this.parsePropertyName(prop); - } - - this.parseObjPropValue(prop, startPos, startLoc, isGenerator, _isAsync, isPattern, refShorthandDefaultPos, containsEsc); - this.checkPropClash(prop, propHash); - - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); - } - - node.properties.push(prop); - } - - if (firstRestLocation !== null) { - this.unexpected(firstRestLocation, "The rest element has to be the last element when destructuring"); - } - - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no property"); - } - - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); - }; - - _proto.isGetterOrSetterMethod = function isGetterOrSetterMethod(prop, isPattern) { - return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword); - }; - - _proto.checkGetterSetterParams = function checkGetterSetterParams(method) { - var paramCount = method.kind === "get" ? 0 : 1; - var start = method.start; - - if (method.params.length !== paramCount) { - if (method.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (method.kind === "set" && method.params[0].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - if (isAsync || isGenerator || this.match(types.parenL)) { - if (isPattern) this.unexpected(); - prop.kind = "method"; - prop.method = true; - return this.parseMethod(prop, isGenerator, isAsync, false, "ObjectMethod"); - } - - if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) { - if (isGenerator || isAsync) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - this.parseMethod(prop, false, false, false, "ObjectMethod"); - this.checkGetterSetterParams(prop); - return prop; - } - }; - - _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - prop.shorthand = false; - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - return this.finishNode(prop, "ObjectProperty"); - } - - if (!prop.computed && prop.key.type === "Identifier") { - this.checkReservedWord(prop.key.name, prop.key.start, true, true); - - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else if (this.match(types.eq) && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) { - refShorthandDefaultPos.start = this.state.start; - } - - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else { - prop.value = prop.key.__clone(); - } - - prop.shorthand = true; - return this.finishNode(prop, "ObjectProperty"); - } - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - if (!node) this.unexpected(); - return node; - }; - - _proto.parsePropertyName = function parsePropertyName(prop) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - } else { - var oldInPropertyName = this.state.inPropertyName; - this.state.inPropertyName = true; - prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName(); - - if (prop.key.type !== "PrivateName") { - prop.computed = false; - } - - this.state.inPropertyName = oldInPropertyName; - } - - return prop.key; - }; - - _proto.initFunction = function initFunction(node, isAsync) { - node.id = null; - node.generator = false; - node.async = !!isAsync; - }; - - _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) { - var oldInFunc = this.state.inFunction; - var oldInMethod = this.state.inMethod; - var oldInGenerator = this.state.inGenerator; - this.state.inFunction = true; - this.state.inMethod = node.kind || true; - this.state.inGenerator = isGenerator; - this.initFunction(node, isAsync); - node.generator = !!isGenerator; - var allowModifiers = isConstructor; - this.parseFunctionParams(node, allowModifiers); - this.parseFunctionBodyAndFinish(node, type); - this.state.inFunction = oldInFunc; - this.state.inMethod = oldInMethod; - this.state.inGenerator = oldInGenerator; - return node; - }; - - _proto.parseArrowExpression = function parseArrowExpression(node, params, isAsync) { - if (this.state.yieldInPossibleArrowParameters) { - this.raise(this.state.yieldInPossibleArrowParameters.start, "yield is not allowed in the parameters of an arrow function" + " inside a generator"); - } - - var oldInFunc = this.state.inFunction; - this.state.inFunction = true; - this.initFunction(node, isAsync); - if (params) this.setArrowFunctionParameters(node, params); - var oldInGenerator = this.state.inGenerator; - var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - this.state.inGenerator = false; - this.state.maybeInArrowParameters = false; - this.parseFunctionBody(node, true); - this.state.inGenerator = oldInGenerator; - this.state.inFunction = oldInFunc; - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return this.finishNode(node, "ArrowFunctionExpression"); - }; - - _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) { - node.params = this.toAssignableList(params, true, "arrow function parameters"); - }; - - _proto.isStrictBody = function isStrictBody(node) { - var isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.directives.length) { - for (var _i4 = 0, _node$body$directives2 = node.body.directives; _i4 < _node$body$directives2.length; _i4++) { - var directive = _node$body$directives2[_i4]; - - if (directive.value.value === "use strict") { - return true; - } - } - } - - return false; - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - this.parseFunctionBody(node, allowExpressionBody); - this.finishNode(node, type); - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) { - var isExpression = allowExpression && !this.match(types.braceL); - var oldInParameters = this.state.inParameters; - var oldInAsync = this.state.inAsync; - this.state.inParameters = false; - this.state.inAsync = node.async; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - } else { - var oldInGen = this.state.inGenerator; - var oldInFunc = this.state.inFunction; - var oldLabels = this.state.labels; - this.state.inGenerator = node.generator; - this.state.inFunction = true; - this.state.labels = []; - node.body = this.parseBlock(true); - this.state.inFunction = oldInFunc; - this.state.inGenerator = oldInGen; - this.state.labels = oldLabels; - } - - this.state.inAsync = oldInAsync; - this.checkFunctionNameAndParams(node, allowExpression); - this.state.inParameters = oldInParameters; - }; - - _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) { - var isStrict = this.isStrictBody(node); - var checkLVal = this.state.strict || isStrict || isArrowFunction; - var oldStrict = this.state.strict; - if (isStrict) this.state.strict = isStrict; - - if (checkLVal) { - var nameHash = Object.create(null); - - if (node.id) { - this.checkLVal(node.id, true, undefined, "function name"); - } - - for (var _i6 = 0, _node$params2 = node.params; _i6 < _node$params2.length; _i6++) { - var param = _node$params2[_i6]; - - if (isStrict && param.type !== "Identifier") { - this.raise(param.start, "Non-simple parameter in strict mode"); - } - - this.checkLVal(param, true, nameHash, "function parameter list"); - } - } - - this.state.strict = oldStrict; - }; - - _proto.parseExprList = function parseExprList(close, allowEmpty, refShorthandDefaultPos) { - var elts = []; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(close)) break; - } - - elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos)); - } - - return elts; - }; - - _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, refTrailingCommaPos) { - var elt; - - if (allowEmpty && this.match(types.comma)) { - elt = null; - } else if (this.match(types.ellipsis)) { - var spreadNodeStartPos = this.state.start; - var spreadNodeStartLoc = this.state.startLoc; - elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc); - - if (refTrailingCommaPos && this.match(types.comma)) { - refTrailingCommaPos.start = this.state.start; - } - } else { - elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos); - } - - return elt; - }; - - _proto.parseIdentifier = function parseIdentifier(liberal) { - var node = this.startNode(); - var name = this.parseIdentifierName(node.start, liberal); - node.name = name; - node.loc.identifierName = name; - return this.finishNode(node, "Identifier"); - }; - - _proto.parseIdentifierName = function parseIdentifierName(pos, liberal) { - if (!liberal) { - this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, false); - } - - var name; - - if (this.match(types.name)) { - name = this.state.value; - } else if (this.state.type.keyword) { - name = this.state.type.keyword; - } else { - throw this.unexpected(); - } - - if (!liberal && name === "await" && this.state.inAsync) { - this.raise(pos, "invalid use of await inside of an async function"); - } - - this.next(); - return name; - }; - - _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (this.state.strict && (reservedWords.strict(word) || isBinding && reservedWords.strictBind(word))) { - this.raise(startLoc, word + " is a reserved word in strict mode"); - } - - if (this.state.inGenerator && word === "yield") { - this.raise(startLoc, "yield is a reserved word inside generator functions"); - } - - if (this.state.inClassProperty && word === "arguments") { - this.raise(startLoc, "'arguments' is not allowed in class field initializer"); - } - - if (this.isReservedWord(word) || checkKeywords && this.isKeyword(word)) { - this.raise(startLoc, word + " is a reserved word"); - } - }; - - _proto.parseAwait = function parseAwait(node) { - if (!this.state.inAsync && (this.state.inFunction || !this.options.allowAwaitOutsideFunction)) { - this.unexpected(); - } - - if (this.match(types.star)) { - this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead."); - } - - node.argument = this.parseMaybeUnary(); - return this.finishNode(node, "AwaitExpression"); - }; - - _proto.parseYield = function parseYield() { - var node = this.startNode(); - - if (this.state.inParameters) { - this.raise(node.start, "yield is not allowed in generator parameters"); - } - - if (this.state.maybeInArrowParameters && !this.state.yieldInPossibleArrowParameters) { - this.state.yieldInPossibleArrowParameters = node; - } - - this.next(); - - if (this.match(types.semi) || this.canInsertSemicolon() || !this.match(types.star) && !this.state.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(); - } - - return this.finishNode(node, "YieldExpression"); - }; - - return ExpressionParser; -}(LValParser); - -var empty = []; -var loopLabel = { - kind: "loop" -}; -var switchLabel = { - kind: "switch" -}; - -var StatementParser = function (_ExpressionParser) { - _inheritsLoose(StatementParser, _ExpressionParser); - - function StatementParser() { - return _ExpressionParser.apply(this, arguments) || this; - } - - var _proto = StatementParser.prototype; - - _proto.parseTopLevel = function parseTopLevel(file, program) { - program.sourceType = this.options.sourceType; - this.parseBlockBody(program, true, true, types.eof); - file.program = this.finishNode(program, "Program"); - file.comments = this.state.comments; - if (this.options.tokens) file.tokens = this.state.tokens; - return this.finishNode(file, "File"); - }; - - _proto.stmtToDirective = function stmtToDirective(stmt) { - var expr = stmt.expression; - var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); - var directive = this.startNodeAt(stmt.start, stmt.loc.start); - var raw = this.input.slice(expr.start, expr.end); - var val = directiveLiteral.value = raw.slice(1, -1); - this.addExtra(directiveLiteral, "raw", raw); - this.addExtra(directiveLiteral, "rawValue", val); - directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end); - return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end); - }; - - _proto.parseStatement = function parseStatement(declaration, topLevel) { - if (this.match(types.at)) { - this.parseDecorators(true); - } - - return this.parseStatementContent(declaration, topLevel); - }; - - _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) { - var starttype = this.state.type; - var node = this.startNode(); - - switch (starttype) { - case types._break: - case types._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - - case types._debugger: - return this.parseDebuggerStatement(node); - - case types._do: - return this.parseDoStatement(node); - - case types._for: - return this.parseForStatement(node); - - case types._function: - if (this.lookahead().type === types.dot) break; - if (!declaration) this.unexpected(); - return this.parseFunctionStatement(node); - - case types._class: - if (!declaration) this.unexpected(); - return this.parseClass(node, true); - - case types._if: - return this.parseIfStatement(node); - - case types._return: - return this.parseReturnStatement(node); - - case types._switch: - return this.parseSwitchStatement(node); - - case types._throw: - return this.parseThrowStatement(node); - - case types._try: - return this.parseTryStatement(node); - - case types._let: - case types._const: - if (!declaration) this.unexpected(); - - case types._var: - return this.parseVarStatement(node, starttype); - - case types._while: - return this.parseWhileStatement(node); - - case types._with: - return this.parseWithStatement(node); - - case types.braceL: - return this.parseBlock(); - - case types.semi: - return this.parseEmptyStatement(node); - - case types._export: - case types._import: - { - var nextToken = this.lookahead(); - - if (nextToken.type === types.parenL || nextToken.type === types.dot) { - break; - } - - if (!this.options.allowImportExportEverywhere && !topLevel) { - this.raise(this.state.start, "'import' and 'export' may only appear at the top level"); - } - - this.next(); - var result; - - if (starttype == types._import) { - result = this.parseImport(node); - - if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { - this.sawUnambiguousESM = true; - } - } else { - result = this.parseExport(node); - - if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { - this.sawUnambiguousESM = true; - } - } - - this.assertModuleNodeAllowed(node); - return result; - } - - case types.name: - if (this.isContextual("async")) { - var state = this.state.clone(); - this.next(); - - if (this.match(types._function) && !this.canInsertSemicolon()) { - this.expect(types._function); - return this.parseFunction(node, true, false, true); - } else { - this.state = state; - } - } - - } - - var maybeName = this.state.value; - var expr = this.parseExpression(); - - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) { - return this.parseLabeledStatement(node, maybeName, expr); - } else { - return this.parseExpressionStatement(node, expr); - } - }; - - _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) { - if (!this.options.allowImportExportEverywhere && !this.inModule) { - this.raise(node.start, "'import' and 'export' may appear only with 'sourceType: \"module\"'", { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - }; - - _proto.takeDecorators = function takeDecorators(node) { - var decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (decorators.length) { - node.decorators = decorators; - this.resetStartLocationFromNode(node, decorators[0]); - this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; - } - }; - - _proto.parseDecorators = function parseDecorators(allowExport) { - if (this.hasPlugin("decorators2")) { - allowExport = false; - } - - var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - while (this.match(types.at)) { - var decorator = this.parseDecorator(); - currentContextDecorators.push(decorator); - } - - if (this.match(types._export)) { - if (allowExport) { - return; - } else { - this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead"); - } - } - - if (!this.match(types._class)) { - this.raise(this.state.start, "Leading decorators must be attached to a class declaration"); - } - }; - - _proto.parseDecorator = function parseDecorator() { - this.expectOnePlugin(["decorators", "decorators2"]); - var node = this.startNode(); - this.next(); - - if (this.hasPlugin("decorators2")) { - this.state.decoratorStack.push([]); - - if (this.eat(types.parenL)) { - node.callee = this.parseExpression(); - this.expect(types.parenR); - } else { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseIdentifier(false); - - while (this.eat(types.dot)) { - var _node = this.startNodeAt(startPos, startLoc); - - _node.object = expr; - _node.property = this.parseIdentifier(true); - _node.computed = false; - expr = this.finishNode(_node, "MemberExpression"); - } - - node.callee = expr; - } - - if (this.eat(types.parenL)) { - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - this.toReferencedList(node.arguments); - } - - this.state.decoratorStack.pop(); - } else { - node.callee = this.parseMaybeAssign(); - } - - return this.finishNode(node, "Decorator"); - }; - - _proto.parseBreakContinueStatement = function parseBreakContinueStatement(node, keyword) { - var isBreak = keyword === "break"; - this.next(); - - if (this.isLineTerminator()) { - node.label = null; - } else if (!this.match(types.name)) { - this.unexpected(); - } else { - node.label = this.parseIdentifier(); - this.semicolon(); - } - - var i; - - for (i = 0; i < this.state.labels.length; ++i) { - var lab = this.state.labels[i]; - - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - - if (i === this.state.labels.length) { - this.raise(node.start, "Unsyntactic " + keyword); - } - - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - }; - - _proto.parseDebuggerStatement = function parseDebuggerStatement(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - }; - - _proto.parseDoStatement = function parseDoStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.state.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - this.eat(types.semi); - return this.finishNode(node, "DoWhileStatement"); - }; - - _proto.parseForStatement = function parseForStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - var forAwait = false; - - if (this.state.inAsync && this.isContextual("await")) { - this.expectPlugin("asyncGenerators"); - forAwait = true; - this.next(); - } - - this.expect(types.parenL); - - if (this.match(types.semi)) { - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, null); - } - - if (this.match(types._var) || this.match(types._let) || this.match(types._const)) { - var _init = this.startNode(); - - var varKind = this.state.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - - if (this.match(types._in) || this.isContextual("of")) { - if (_init.declarations.length === 1) { - var declaration = _init.declarations[0]; - var isForInInitializer = varKind === types._var && declaration.init && declaration.id.type != "ObjectPattern" && declaration.id.type != "ArrayPattern" && !this.isContextual("of"); - - if (this.state.strict && isForInInitializer) { - this.raise(this.state.start, "for-in initializer in strict mode"); - } else if (isForInInitializer || !declaration.init) { - return this.parseForIn(node, _init, forAwait); - } - } - } - - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, _init); - } - - var refShorthandDefaultPos = { - start: 0 - }; - var init = this.parseExpression(true, refShorthandDefaultPos); - - if (this.match(types._in) || this.isContextual("of")) { - var description = this.isContextual("of") ? "for-of statement" : "for-in statement"; - this.toAssignable(init, undefined, description); - this.checkLVal(init, undefined, undefined, description); - return this.parseForIn(node, init, forAwait); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, init); - }; - - _proto.parseFunctionStatement = function parseFunctionStatement(node) { - this.next(); - return this.parseFunction(node, true); - }; - - _proto.parseIfStatement = function parseIfStatement(node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(types._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); - }; - - _proto.parseReturnStatement = function parseReturnStatement(node) { - if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) { - this.raise(this.state.start, "'return' outside of function"); - } - - this.next(); - - if (this.isLineTerminator()) { - node.argument = null; - } else { - node.argument = this.parseExpression(); - this.semicolon(); - } - - return this.finishNode(node, "ReturnStatement"); - }; - - _proto.parseSwitchStatement = function parseSwitchStatement(node) { - this.next(); - node.discriminant = this.parseParenExpression(); - var cases = node.cases = []; - this.expect(types.braceL); - this.state.labels.push(switchLabel); - var cur; - - for (var sawDefault; !this.match(types.braceR);) { - if (this.match(types._case) || this.match(types._default)) { - var isCase = this.match(types._case); - if (cur) this.finishNode(cur, "SwitchCase"); - cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { - this.raise(this.state.lastTokStart, "Multiple default clauses"); - } - - sawDefault = true; - cur.test = null; - } - - this.expect(types.colon); - } else { - if (cur) { - cur.consequent.push(this.parseStatement(true)); - } else { - this.unexpected(); - } - } - } - - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); - this.state.labels.pop(); - return this.finishNode(node, "SwitchStatement"); - }; - - _proto.parseThrowStatement = function parseThrowStatement(node) { - this.next(); - - if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) { - this.raise(this.state.lastTokEnd, "Illegal newline after throw"); - } - - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); - }; - - _proto.parseTryStatement = function parseTryStatement(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - - if (this.match(types._catch)) { - var clause = this.startNode(); - this.next(); - - if (this.match(types.parenL)) { - this.expect(types.parenL); - clause.param = this.parseBindingAtom(); - var clashes = Object.create(null); - this.checkLVal(clause.param, true, clashes, "catch clause"); - this.expect(types.parenR); - } else { - this.expectPlugin("optionalCatchBinding"); - clause.param = null; - } - - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - - node.guardedHandlers = empty; - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - - if (!node.handler && !node.finalizer) { - this.raise(node.start, "Missing catch or finally clause"); - } - - return this.finishNode(node, "TryStatement"); - }; - - _proto.parseVarStatement = function parseVarStatement(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); - }; - - _proto.parseWhileStatement = function parseWhileStatement(node) { - this.next(); - node.test = this.parseParenExpression(); - this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, "WhileStatement"); - }; - - _proto.parseWithStatement = function parseWithStatement(node) { - if (this.state.strict) { - this.raise(this.state.start, "'with' in strict mode"); - } - - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); - }; - - _proto.parseEmptyStatement = function parseEmptyStatement(node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); - }; - - _proto.parseLabeledStatement = function parseLabeledStatement(node, maybeName, expr) { - for (var _i2 = 0, _state$labels2 = this.state.labels; _i2 < _state$labels2.length; _i2++) { - var label = _state$labels2[_i2]; - - if (label.name === maybeName) { - this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } - } - - var kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null; - - for (var i = this.state.labels.length - 1; i >= 0; i--) { - var _label = this.state.labels[i]; - - if (_label.statementStart === node.start) { - _label.statementStart = this.state.start; - _label.kind = kind; - } else { - break; - } - } - - this.state.labels.push({ - name: maybeName, - kind: kind, - statementStart: this.state.start - }); - node.body = this.parseStatement(true); - - if (node.body.type == "ClassDeclaration" || node.body.type == "VariableDeclaration" && node.body.kind !== "var" || node.body.type == "FunctionDeclaration" && (this.state.strict || node.body.generator || node.body.async)) { - this.raise(node.body.start, "Invalid labeled declaration"); - } - - this.state.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); - }; - - _proto.parseBlock = function parseBlock(allowDirectives) { - var node = this.startNode(); - this.expect(types.braceL); - this.parseBlockBody(node, allowDirectives, false, types.braceR); - return this.finishNode(node, "BlockStatement"); - }; - - _proto.isValidDirective = function isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; - }; - - _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) { - var body = node.body = []; - var directives = node.directives = []; - this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end); - }; - - _proto.parseBlockOrModuleBlockBody = function parseBlockOrModuleBlockBody(body, directives, topLevel, end) { - var parsedNonDirective = false; - var oldStrict; - var octalPosition; - - while (!this.eat(end)) { - if (!parsedNonDirective && this.state.containsOctal && !octalPosition) { - octalPosition = this.state.octalPosition; - } - - var stmt = this.parseStatement(true, topLevel); - - if (directives && !parsedNonDirective && this.isValidDirective(stmt)) { - var directive = this.stmtToDirective(stmt); - directives.push(directive); - - if (oldStrict === undefined && directive.value.value === "use strict") { - oldStrict = this.state.strict; - this.setStrict(true); - - if (octalPosition) { - this.raise(octalPosition, "Octal literal in strict mode"); - } - } - - continue; - } - - parsedNonDirective = true; - body.push(stmt); - } - - if (oldStrict === false) { - this.setStrict(false); - } - }; - - _proto.parseFor = function parseFor(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.match(types.semi) ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.match(types.parenR) ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, "ForStatement"); - }; - - _proto.parseForIn = function parseForIn(node, init, forAwait) { - var type = this.match(types._in) ? "ForInStatement" : "ForOfStatement"; - - if (forAwait) { - this.eatContextual("of"); - } else { - this.next(); - } - - if (type === "ForOfStatement") { - node.await = !!forAwait; - } - - node.left = init; - node.right = this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, type); - }; - - _proto.parseVar = function parseVar(node, isFor, kind) { - var declarations = node.declarations = []; - node.kind = kind.keyword; - - for (;;) { - var decl = this.startNode(); - this.parseVarHead(decl); - - if (this.eat(types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else { - if (kind === types._const && !(this.match(types._in) || this.isContextual("of"))) { - if (!this.hasPlugin("typescript")) { - this.unexpected(); - } - } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) { - this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value"); - } - - decl.init = null; - } - - declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types.comma)) break; - } - - return node; - }; - - _proto.parseVarHead = function parseVarHead(decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true, undefined, "variable declaration"); - }; - - _proto.parseFunction = function parseFunction(node, isStatement, allowExpressionBody, isAsync, optionalId) { - var oldInFunc = this.state.inFunction; - var oldInMethod = this.state.inMethod; - var oldInGenerator = this.state.inGenerator; - var oldInClassProperty = this.state.inClassProperty; - this.state.inFunction = true; - this.state.inMethod = false; - this.state.inClassProperty = false; - this.initFunction(node, isAsync); - - if (this.match(types.star)) { - if (node.async) { - this.expectPlugin("asyncGenerators"); - } - - node.generator = true; - this.next(); - } - - if (isStatement && !optionalId && !this.match(types.name) && !this.match(types._yield)) { - this.unexpected(); - } - - if (!isStatement) this.state.inGenerator = node.generator; - - if (this.match(types.name) || this.match(types._yield)) { - node.id = this.parseBindingIdentifier(); - } - - if (isStatement) this.state.inGenerator = node.generator; - this.parseFunctionParams(node); - this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression", allowExpressionBody); - this.state.inFunction = oldInFunc; - this.state.inMethod = oldInMethod; - this.state.inGenerator = oldInGenerator; - this.state.inClassProperty = oldInClassProperty; - return node; - }; - - _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { - var oldInParameters = this.state.inParameters; - this.state.inParameters = true; - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, allowModifiers); - this.state.inParameters = oldInParameters; - }; - - _proto.parseClass = function parseClass(node, isStatement, optionalId) { - this.next(); - this.takeDecorators(node); - this.parseClassId(node, isStatement, optionalId); - this.parseClassSuper(node); - this.parseClassBody(node); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR); - }; - - _proto.isClassMethod = function isClassMethod() { - return this.match(types.parenL); - }; - - _proto.isNonstaticConstructor = function isNonstaticConstructor(method) { - return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); - }; - - _proto.parseClassBody = function parseClassBody(node) { - var oldStrict = this.state.strict; - this.state.strict = true; - this.state.classLevel++; - var state = { - hadConstructor: false - }; - var decorators = []; - var classBody = this.startNode(); - classBody.body = []; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (this.eat(types.semi)) { - if (decorators.length > 0) { - this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon"); - } - - continue; - } - - if (this.match(types.at)) { - decorators.push(this.parseDecorator()); - continue; - } - - var member = this.startNode(); - - if (decorators.length) { - member.decorators = decorators; - this.resetStartLocationFromNode(member, decorators[0]); - decorators = []; - } - - this.parseClassMember(classBody, member, state); - - if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { - this.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?"); - } - } - - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no method"); - } - - node.body = this.finishNode(classBody, "ClassBody"); - this.state.classLevel--; - this.state.strict = oldStrict; - }; - - _proto.parseClassMember = function parseClassMember(classBody, member, state) { - var isStatic = false; - var containsEsc = this.state.containsEsc; - - if (this.match(types.name) && this.state.value === "static") { - var key = this.parseIdentifier(true); - - if (this.isClassMethod()) { - var method = member; - method.kind = "method"; - method.computed = false; - method.key = key; - method.static = false; - this.pushClassMethod(classBody, method, false, false, false); - return; - } else if (this.isClassProperty()) { - var prop = member; - prop.computed = false; - prop.key = key; - prop.static = false; - classBody.body.push(this.parseClassProperty(prop)); - return; - } else if (containsEsc) { - throw this.unexpected(); - } - - isStatic = true; - } - - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); - }; - - _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - var publicMethod = member; - var privateMethod = member; - var publicProp = member; - var privateProp = member; - var method = publicMethod; - var publicMember = publicMethod; - member.static = isStatic; - - if (this.eat(types.star)) { - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, true, false); - return; - } - - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be a generator"); - } - - this.pushClassMethod(classBody, publicMethod, true, false, false); - return; - } - - var key = this.parseClassPropertyName(member); - var isPrivate = key.type === "PrivateName"; - var isSimple = key.type === "Identifier"; - this.parsePostMemberNameModifiers(publicMember); - - if (this.isClassMethod()) { - method.kind = "method"; - - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - return; - } - - var isConstructor = this.isNonstaticConstructor(publicMethod); - - if (isConstructor) { - publicMethod.kind = "constructor"; - - if (publicMethod.decorators) { - this.raise(publicMethod.start, "You can't attach decorators to a class constructor"); - } - - if (state.hadConstructor && !this.hasPlugin("typescript")) { - this.raise(key.start, "Duplicate constructor in the same class"); - } - - state.hadConstructor = true; - } - - this.pushClassMethod(classBody, publicMethod, false, false, isConstructor); - } else if (this.isClassProperty()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else if (isSimple && key.name === "async" && !this.isLineTerminator()) { - var isGenerator = this.match(types.star); - - if (isGenerator) { - this.expectPlugin("asyncGenerators"); - this.next(); - } - - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be an async function"); - } - - this.pushClassMethod(classBody, publicMethod, isGenerator, true, false); - } - } else if (isSimple && (key.name === "get" || key.name === "set") && !(this.isLineTerminator() && this.match(types.star))) { - method.kind = key.name; - this.parseClassPropertyName(publicMethod); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't have get/set modifier"); - } - - this.pushClassMethod(classBody, publicMethod, false, false, false); - } - - this.checkGetterSetterParams(publicMethod); - } else if (this.isLineTerminator()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else { - this.unexpected(); - } - }; - - _proto.parseClassPropertyName = function parseClassPropertyName(member) { - var key = this.parsePropertyName(member); - - if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) { - this.raise(key.start, "Classes may not have static property named prototype"); - } - - if (key.type === "PrivateName" && key.id.name === "constructor") { - this.raise(key.start, "Classes may not have a private field named '#constructor'"); - } - - return key; - }; - - _proto.pushClassProperty = function pushClassProperty(classBody, prop) { - if (this.isNonstaticConstructor(prop)) { - this.raise(prop.key.start, "Classes may not have a non-static field named 'constructor'"); - } - - classBody.body.push(this.parseClassProperty(prop)); - }; - - _proto.pushClassPrivateProperty = function pushClassPrivateProperty(classBody, prop) { - this.expectPlugin("classPrivateProperties", prop.key.start); - classBody.body.push(this.parseClassPrivateProperty(prop)); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, "ClassMethod")); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - this.expectPlugin("classPrivateMethods", method.key.start); - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, "ClassPrivateMethod")); - }; - - _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {}; - - _proto.parseAccessModifier = function parseAccessModifier() { - return undefined; - }; - - _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) { - var oldInMethod = this.state.inMethod; - this.state.inMethod = false; - this.state.inClassProperty = true; - node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null; - this.semicolon(); - this.state.inClassProperty = false; - this.state.inMethod = oldInMethod; - return this.finishNode(node, "ClassPrivateProperty"); - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (!node.typeAnnotation) { - this.expectPlugin("classProperties"); - } - - var oldInMethod = this.state.inMethod; - this.state.inMethod = false; - this.state.inClassProperty = true; - - if (this.match(types.eq)) { - this.expectPlugin("classProperties"); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; - } - - this.semicolon(); - this.state.inClassProperty = false; - this.state.inMethod = oldInMethod; - return this.finishNode(node, "ClassProperty"); - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - if (this.match(types.name)) { - node.id = this.parseIdentifier(); - } else { - if (optionalId || !isStatement) { - node.id = null; - } else { - this.unexpected(null, "A class name is required"); - } - } - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; - }; - - _proto.parseExport = function parseExport(node) { - if (this.shouldParseExportStar()) { - this.parseExportStar(node); - if (node.type === "ExportAllDeclaration") return node; - } else if (this.isExportDefaultSpecifier()) { - this.expectPlugin("exportDefaultFrom"); - var specifier = this.startNode(); - specifier.exported = this.parseIdentifier(true); - var specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - node.specifiers = specifiers; - - if (this.match(types.comma) && this.lookahead().type === types.star) { - this.expect(types.comma); - - var _specifier = this.startNode(); - - this.expect(types.star); - this.expectContextual("as"); - _specifier.exported = this.parseIdentifier(); - specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); - } else { - this.parseExportSpecifiersMaybe(node); - } - - this.parseExportFrom(node, true); - } else if (this.eat(types._default)) { - node.declaration = this.parseExportDefaultExpression(); - this.checkExport(node, true, true); - return this.finishNode(node, "ExportDefaultDeclaration"); - } else if (this.shouldParseExportDeclaration()) { - if (this.isContextual("async")) { - var next = this.lookahead(); - - if (next.type !== types._function) { - this.unexpected(next.start, "Unexpected token, expected \"function\""); - } - } - - node.specifiers = []; - node.source = null; - node.declaration = this.parseExportDeclaration(node); - } else { - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - } - - this.checkExport(node, true); - return this.finishNode(node, "ExportNamedDeclaration"); - }; - - _proto.parseExportDefaultExpression = function parseExportDefaultExpression() { - var expr = this.startNode(); - - if (this.eat(types._function)) { - return this.parseFunction(expr, true, false, false, true); - } else if (this.isContextual("async") && this.lookahead().type === types._function) { - this.eatContextual("async"); - this.eat(types._function); - return this.parseFunction(expr, true, false, true, true); - } else if (this.match(types._class)) { - return this.parseClass(expr, true, true); - } else if (this.match(types.at)) { - this.parseDecorators(false); - return this.parseClass(expr, true, true); - } else if (this.match(types._let) || this.match(types._const) || this.match(types._var)) { - return this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export."); - } else { - var res = this.parseMaybeAssign(); - this.semicolon(); - return res; - } - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - return this.parseStatement(true); - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.match(types.name)) { - return this.state.value !== "async"; - } - - if (!this.match(types._default)) { - return false; - } - - var lookahead = this.lookahead(); - return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from"; - }; - - _proto.parseExportSpecifiersMaybe = function parseExportSpecifiersMaybe(node) { - if (this.eat(types.comma)) { - node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); - } - }; - - _proto.parseExportFrom = function parseExportFrom(node, expect) { - if (this.eatContextual("from")) { - node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected(); - this.checkExport(node); - } else { - if (expect) { - this.unexpected(); - } else { - node.source = null; - } - } - - this.semicolon(); - }; - - _proto.shouldParseExportStar = function shouldParseExportStar() { - return this.match(types.star); - }; - - _proto.parseExportStar = function parseExportStar(node) { - this.expect(types.star); - - if (this.isContextual("as")) { - this.parseExportNamespace(node); - } else { - this.parseExportFrom(node, true); - this.finishNode(node, "ExportAllDeclaration"); - } - }; - - _proto.parseExportNamespace = function parseExportNamespace(node) { - this.expectPlugin("exportNamespaceFrom"); - var specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); - this.next(); - specifier.exported = this.parseIdentifier(true); - node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; - this.parseExportSpecifiersMaybe(node); - this.parseExportFrom(node, true); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "let" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isContextual("async") || this.match(types.at) && this.expectPlugin("decorators2"); - }; - - _proto.checkExport = function checkExport(node, checkNames, isDefault) { - if (checkNames) { - if (isDefault) { - this.checkDuplicateExports(node, "default"); - } else if (node.specifiers && node.specifiers.length) { - for (var _i4 = 0, _node$specifiers2 = node.specifiers; _i4 < _node$specifiers2.length; _i4++) { - var specifier = _node$specifiers2[_i4]; - this.checkDuplicateExports(specifier, specifier.exported.name); - } - } else if (node.declaration) { - if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { - var id = node.declaration.id; - if (!id) throw new Error("Assertion failure"); - this.checkDuplicateExports(node, id.name); - } else if (node.declaration.type === "VariableDeclaration") { - for (var _i6 = 0, _node$declaration$dec2 = node.declaration.declarations; _i6 < _node$declaration$dec2.length; _i6++) { - var declaration = _node$declaration$dec2[_i6]; - this.checkDeclaration(declaration.id); - } - } - } - } - - var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (currentContextDecorators.length) { - var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - - if (!node.declaration || !isClass) { - throw this.raise(node.start, "You can only use decorators on an export when exporting a class"); - } - - this.takeDecorators(node.declaration); - } - }; - - _proto.checkDeclaration = function checkDeclaration(node) { - if (node.type === "ObjectPattern") { - for (var _i8 = 0, _node$properties2 = node.properties; _i8 < _node$properties2.length; _i8++) { - var prop = _node$properties2[_i8]; - this.checkDeclaration(prop); - } - } else if (node.type === "ArrayPattern") { - for (var _i10 = 0, _node$elements2 = node.elements; _i10 < _node$elements2.length; _i10++) { - var elem = _node$elements2[_i10]; - - if (elem) { - this.checkDeclaration(elem); - } - } - } else if (node.type === "ObjectProperty") { - this.checkDeclaration(node.value); - } else if (node.type === "RestElement") { - this.checkDeclaration(node.argument); - } else if (node.type === "Identifier") { - this.checkDuplicateExports(node, node.name); - } - }; - - _proto.checkDuplicateExports = function checkDuplicateExports(node, name) { - if (this.state.exportedIdentifiers.indexOf(name) > -1) { - this.raiseDuplicateExportError(node, name); - } - - this.state.exportedIdentifiers.push(name); - }; - - _proto.raiseDuplicateExportError = function raiseDuplicateExportError(node, name) { - throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : "`" + name + "` has already been exported. Exported identifiers must be unique."); - }; - - _proto.parseExportSpecifiers = function parseExportSpecifiers() { - var nodes = []; - var first = true; - var needsFrom; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - var isDefault = this.match(types._default); - if (isDefault && !needsFrom) needsFrom = true; - var node = this.startNode(); - node.local = this.parseIdentifier(isDefault); - node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - - if (needsFrom && !this.isContextual("from")) { - this.unexpected(); - } - - return nodes; - }; - - _proto.parseImport = function parseImport(node) { - if (this.match(types.string)) { - node.specifiers = []; - node.source = this.parseExprAtom(); - } else { - node.specifiers = []; - this.parseImportSpecifiers(node); - this.expectContextual("from"); - node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected(); - } - - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - }; - - _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) { - return this.match(types.name); - }; - - _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = this.parseIdentifier(); - this.checkLVal(specifier.local, true, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - }; - - _proto.parseImportSpecifiers = function parseImportSpecifiers(node) { - var first = true; - - if (this.shouldParseDefaultImport(node)) { - this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); - if (!this.eat(types.comma)) return; - } - - if (this.match(types.star)) { - var specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); - return; - } - - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - if (this.eat(types.colon)) { - this.unexpected(null, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import."); - } - - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - this.parseImportSpecifier(node); - } - }; - - _proto.parseImportSpecifier = function parseImportSpecifier(node) { - var specifier = this.startNode(); - specifier.imported = this.parseIdentifier(true); - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - this.checkReservedWord(specifier.imported.name, specifier.start, true, true); - specifier.local = specifier.imported.__clone(); - } - - this.checkLVal(specifier.local, true, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - }; - - return StatementParser; -}(ExpressionParser); - -var plugins = {}; - -var Parser = function (_StatementParser) { - _inheritsLoose(Parser, _StatementParser); - - function Parser(options, input) { - var _this; - - options = getOptions(options); - _this = _StatementParser.call(this, options, input) || this; - _this.options = options; - _this.inModule = _this.options.sourceType === "module"; - _this.input = input; - _this.plugins = pluginsMap(_this.options.plugins); - _this.filename = options.sourceFilename; - - if (_this.state.pos === 0 && _this.input[0] === "#" && _this.input[1] === "!") { - _this.skipLineComment(2); - } - - return _this; - } - - var _proto = Parser.prototype; - - _proto.parse = function parse() { - var file = this.startNode(); - var program = this.startNode(); - this.nextToken(); - return this.parseTopLevel(file, program); - }; - - return Parser; -}(StatementParser); - -function pluginsMap(pluginList) { - var pluginMap = {}; - - for (var _i2 = 0; _i2 < pluginList.length; _i2++) { - var _name = pluginList[_i2]; - pluginMap[_name] = true; - } - - return pluginMap; -} - -function isSimpleProperty(node) { - return node != null && node.type === "Property" && node.kind === "init" && node.method === false; -} - -var estreePlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.estreeParseRegExpLiteral = function estreeParseRegExpLiteral(_ref) { - var pattern = _ref.pattern, - flags = _ref.flags; - var regex = null; - - try { - regex = new RegExp(pattern, flags); - } catch (e) {} - - var node = this.estreeParseLiteral(regex); - node.regex = { - pattern: pattern, - flags: flags - }; - return node; - }; - - _proto.estreeParseLiteral = function estreeParseLiteral(value) { - return this.parseLiteral(value, "Literal"); - }; - - _proto.directiveToStmt = function directiveToStmt(directive) { - var directiveLiteral = directive.value; - var stmt = this.startNodeAt(directive.start, directive.loc.start); - var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); - expression.value = directiveLiteral.value; - expression.raw = directiveLiteral.extra.raw; - stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end); - stmt.directive = directiveLiteral.extra.raw.slice(1, -1); - return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end); - }; - - _proto.initFunction = function initFunction(node, isAsync) { - _superClass.prototype.initFunction.call(this, node, isAsync); - - node.expression = false; - }; - - _proto.checkDeclaration = function checkDeclaration(node) { - if (isSimpleProperty(node)) { - this.checkDeclaration(node.value); - } else { - _superClass.prototype.checkDeclaration.call(this, node); - } - }; - - _proto.checkGetterSetterParams = function checkGetterSetterParams(method) { - var prop = method; - var paramCount = prop.kind === "get" ? 0 : 1; - var start = prop.start; - - if (prop.value.params.length !== paramCount) { - if (prop.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - var _this = this; - - switch (expr.type) { - case "ObjectPattern": - expr.properties.forEach(function (prop) { - _this.checkLVal(prop.type === "Property" ? prop.value : prop, isBinding, checkClashes, "object destructuring pattern"); - }); - break; - - default: - _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - - } - }; - - _proto.checkPropClash = function checkPropClash(prop, propHash) { - if (prop.computed || !isSimpleProperty(prop)) return; - var key = prop.key; - var name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - }; - - _proto.isStrictBody = function isStrictBody(node) { - var isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.body.length > 0) { - for (var _i2 = 0, _node$body$body2 = node.body.body; _i2 < _node$body$body2.length; _i2++) { - var directive = _node$body$body2[_i2]; - - if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") { - if (directive.expression.value === "use strict") return true; - } else { - break; - } - } - } - - return false; - }; - - _proto.isValidDirective = function isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized); - }; - - _proto.stmtToDirective = function stmtToDirective(stmt) { - var directive = _superClass.prototype.stmtToDirective.call(this, stmt); - - var value = stmt.expression.value; - directive.value.value = value; - return directive; - }; - - _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) { - var _this2 = this; - - _superClass.prototype.parseBlockBody.call(this, node, allowDirectives, topLevel, end); - - var directiveStatements = node.directives.map(function (d) { - return _this2.directiveToStmt(d); - }); - node.body = directiveStatements.concat(node.body); - delete node.directives; - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - this.parseMethod(method, isGenerator, isAsync, isConstructor, "MethodDefinition"); - - if (method.typeParameters) { - method.value.typeParameters = method.typeParameters; - delete method.typeParameters; - } - - classBody.body.push(method); - }; - - _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) { - switch (this.state.type) { - case types.regexp: - return this.estreeParseRegExpLiteral(this.state.value); - - case types.num: - case types.string: - return this.estreeParseLiteral(this.state.value); - - case types._null: - return this.estreeParseLiteral(null); - - case types._true: - return this.estreeParseLiteral(true); - - case types._false: - return this.estreeParseLiteral(false); - - default: - return _superClass.prototype.parseExprAtom.call(this, refShorthandDefaultPos); - } - }; - - _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) { - var node = _superClass.prototype.parseLiteral.call(this, value, type, startPos, startLoc); - - node.raw = node.extra.raw; - delete node.extra; - return node; - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) { - _superClass.prototype.parseFunctionBody.call(this, node, allowExpression); - - node.expression = node.body.type !== "BlockStatement"; - }; - - _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) { - var funcNode = this.startNode(); - funcNode.kind = node.kind; - funcNode = _superClass.prototype.parseMethod.call(this, funcNode, isGenerator, isAsync, isConstructor, "FunctionExpression"); - delete funcNode.kind; - node.value = funcNode; - return this.finishNode(node, type); - }; - - _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - var node = _superClass.prototype.parseObjectMethod.call(this, prop, isGenerator, isAsync, isPattern, containsEsc); - - if (node) { - node.type = "Property"; - if (node.kind === "method") node.kind = "init"; - node.shorthand = false; - } - - return node; - }; - - _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - var node = _superClass.prototype.parseObjectProperty.call(this, prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - - if (node) { - node.kind = "init"; - node.type = "Property"; - } - - return node; - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (isSimpleProperty(node)) { - this.toAssignable(node.value, isBinding, contextDescription); - return node; - } - - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - }; - - _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.kind === "get" || prop.kind === "set") { - this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - } else if (prop.method) { - this.raise(prop.key.start, "Object pattern can't contain methods"); - } else { - _superClass.prototype.toAssignableObjectExpressionProp.call(this, prop, isBinding, isLast); - } - }; - - return _class; - }(superClass); -}); - -var primitiveTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]; - -function isEsModuleType(bodyElement) { - return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); -} - -function hasTypeImportKind(node) { - return node.importKind === "type" || node.importKind === "typeof"; -} - -function isMaybeDefaultImport(state) { - return (state.type === types.name || !!state.type.keyword) && state.value !== "from"; -} - -var exportSuggestions = { - const: "declare export var", - let: "declare export var", - type: "export type", - interface: "export interface" -}; - -function partition(list, test) { - var list1 = []; - var list2 = []; - - for (var i = 0; i < list.length; i++) { - (test(list[i], i, list) ? list1 : list2).push(list[i]); - } - - return [list1, list2]; -} - -var flowPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.flowParseTypeInitialiser = function flowParseTypeInitialiser(tok) { - var oldInType = this.state.inType; - this.state.inType = true; - this.expect(tok || types.colon); - var type = this.flowParseType(); - this.state.inType = oldInType; - return type; - }; - - _proto.flowParsePredicate = function flowParsePredicate() { - var node = this.startNode(); - var moduloLoc = this.state.startLoc; - var moduloPos = this.state.start; - this.expect(types.modulo); - var checksLoc = this.state.startLoc; - this.expectContextual("checks"); - - if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) { - this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here."); - } - - if (this.eat(types.parenL)) { - node.value = this.parseExpression(); - this.expect(types.parenR); - return this.finishNode(node, "DeclaredPredicate"); - } else { - return this.finishNode(node, "InferredPredicate"); - } - }; - - _proto.flowParseTypeAndPredicateInitialiser = function flowParseTypeAndPredicateInitialiser() { - var oldInType = this.state.inType; - this.state.inType = true; - this.expect(types.colon); - var type = null; - var predicate = null; - - if (this.match(types.modulo)) { - this.state.inType = oldInType; - predicate = this.flowParsePredicate(); - } else { - type = this.flowParseType(); - this.state.inType = oldInType; - - if (this.match(types.modulo)) { - predicate = this.flowParsePredicate(); - } - } - - return [type, predicate]; - }; - - _proto.flowParseDeclareClass = function flowParseDeclareClass(node) { - this.next(); - this.flowParseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); - }; - - _proto.flowParseDeclareFunction = function flowParseDeclareFunction(node) { - this.next(); - var id = node.id = this.parseIdentifier(); - var typeNode = this.startNode(); - var typeContainer = this.startNode(); - - if (this.isRelational("<")) { - typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } - - this.expect(types.parenL); - var tmp = this.flowParseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - this.expect(types.parenR); - - var _flowParseTypeAndPred = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.returnType = _flowParseTypeAndPred[0]; - node.predicate = _flowParseTypeAndPred[1]; - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); - this.finishNode(id, id.type); - this.semicolon(); - return this.finishNode(node, "DeclareFunction"); - }; - - _proto.flowParseDeclare = function flowParseDeclare(node, insideModule) { - if (this.match(types._class)) { - return this.flowParseDeclareClass(node); - } else if (this.match(types._function)) { - return this.flowParseDeclareFunction(node); - } else if (this.match(types._var)) { - return this.flowParseDeclareVariable(node); - } else if (this.isContextual("module")) { - if (this.lookahead().type === types.dot) { - return this.flowParseDeclareModuleExports(node); - } else { - if (insideModule) { - this.unexpected(null, "`declare module` cannot be used inside another `declare module`"); - } - - return this.flowParseDeclareModule(node); - } - } else if (this.isContextual("type")) { - return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual("opaque")) { - return this.flowParseDeclareOpaqueType(node); - } else if (this.isContextual("interface")) { - return this.flowParseDeclareInterface(node); - } else if (this.match(types._export)) { - return this.flowParseDeclareExportDeclaration(node, insideModule); - } else { - throw this.unexpected(); - } - }; - - _proto.flowParseDeclareVariable = function flowParseDeclareVariable(node) { - this.next(); - node.id = this.flowParseTypeAnnotatableIdentifier(true); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); - }; - - _proto.flowParseDeclareModule = function flowParseDeclareModule(node) { - var _this = this; - - this.next(); - - if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - node.id = this.parseIdentifier(); - } - - var bodyNode = node.body = this.startNode(); - var body = bodyNode.body = []; - this.expect(types.braceL); - - while (!this.match(types.braceR)) { - var _bodyNode = this.startNode(); - - if (this.match(types._import)) { - var lookahead = this.lookahead(); - - if (lookahead.value !== "type" && lookahead.value !== "typeof") { - this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`"); - } - - this.next(); - this.parseImport(_bodyNode); - } else { - this.expectContextual("declare", "Only declares and type imports are allowed inside declare module"); - _bodyNode = this.flowParseDeclare(_bodyNode, true); - } - - body.push(_bodyNode); - } - - this.expect(types.braceR); - this.finishNode(bodyNode, "BlockStatement"); - var kind = null; - var hasModuleExport = false; - var errorMessage = "Found both `declare module.exports` and `declare export` in the same module. " + "Modules can only have 1 since they are either an ES module or they are a CommonJS module"; - body.forEach(function (bodyElement) { - if (isEsModuleType(bodyElement)) { - if (kind === "CommonJS") { - _this.unexpected(bodyElement.start, errorMessage); - } - - kind = "ES"; - } else if (bodyElement.type === "DeclareModuleExports") { - if (hasModuleExport) { - _this.unexpected(bodyElement.start, "Duplicate `declare module.exports` statement"); - } - - if (kind === "ES") _this.unexpected(bodyElement.start, errorMessage); - kind = "CommonJS"; - hasModuleExport = true; - } - }); - node.kind = kind || "CommonJS"; - return this.finishNode(node, "DeclareModule"); - }; - - _proto.flowParseDeclareExportDeclaration = function flowParseDeclareExportDeclaration(node, insideModule) { - this.expect(types._export); - - if (this.eat(types._default)) { - if (this.match(types._function) || this.match(types._class)) { - node.declaration = this.flowParseDeclare(this.startNode()); - } else { - node.declaration = this.flowParseType(); - this.semicolon(); - } - - node.default = true; - return this.finishNode(node, "DeclareExportDeclaration"); - } else { - if (this.match(types._const) || this.match(types._let) || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) { - var label = this.state.value; - var suggestion = exportSuggestions[label]; - this.unexpected(this.state.start, "`declare export " + label + "` is not supported. Use `" + suggestion + "` instead"); - } - - if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) { - node.declaration = this.flowParseDeclare(this.startNode()); - node.default = false; - return this.finishNode(node, "DeclareExportDeclaration"); - } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) { - node = this.parseExport(node); - - if (node.type === "ExportNamedDeclaration") { - node.type = "ExportDeclaration"; - node.default = false; - delete node.exportKind; - } - - node.type = "Declare" + node.type; - return node; - } - } - - throw this.unexpected(); - }; - - _proto.flowParseDeclareModuleExports = function flowParseDeclareModuleExports(node) { - this.expectContextual("module"); - this.expect(types.dot); - this.expectContextual("exports"); - node.typeAnnotation = this.flowParseTypeAnnotation(); - this.semicolon(); - return this.finishNode(node, "DeclareModuleExports"); - }; - - _proto.flowParseDeclareTypeAlias = function flowParseDeclareTypeAlias(node) { - this.next(); - this.flowParseTypeAlias(node); - return this.finishNode(node, "DeclareTypeAlias"); - }; - - _proto.flowParseDeclareOpaqueType = function flowParseDeclareOpaqueType(node) { - this.next(); - this.flowParseOpaqueType(node, true); - return this.finishNode(node, "DeclareOpaqueType"); - }; - - _proto.flowParseDeclareInterface = function flowParseDeclareInterface(node) { - this.next(); - this.flowParseInterfaceish(node); - return this.finishNode(node, "DeclareInterface"); - }; - - _proto.flowParseInterfaceish = function flowParseInterfaceish(node, isClass) { - node.id = this.flowParseRestrictedIdentifier(!isClass); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.extends = []; - node.implements = []; - node.mixins = []; - - if (this.eat(types._extends)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (!isClass && this.eat(types.comma)); - } - - if (this.isContextual("mixins")) { - this.next(); - - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - if (this.isContextual("implements")) { - this.next(); - - do { - node.implements.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - node.body = this.flowParseObjectType(true, false, false); - }; - - _proto.flowParseInterfaceExtends = function flowParseInterfaceExtends() { - var node = this.startNode(); - node.id = this.flowParseQualifiedTypeIdentifier(); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - - return this.finishNode(node, "InterfaceExtends"); - }; - - _proto.flowParseInterface = function flowParseInterface(node) { - this.flowParseInterfaceish(node); - return this.finishNode(node, "InterfaceDeclaration"); - }; - - _proto.checkReservedType = function checkReservedType(word, startLoc) { - if (primitiveTypes.indexOf(word) > -1) { - this.raise(startLoc, "Cannot overwrite primitive type " + word); - } - }; - - _proto.flowParseRestrictedIdentifier = function flowParseRestrictedIdentifier(liberal) { - this.checkReservedType(this.state.value, this.state.start); - return this.parseIdentifier(liberal); - }; - - _proto.flowParseTypeAlias = function flowParseTypeAlias(node) { - node.id = this.flowParseRestrictedIdentifier(); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.right = this.flowParseTypeInitialiser(types.eq); - this.semicolon(); - return this.finishNode(node, "TypeAlias"); - }; - - _proto.flowParseOpaqueType = function flowParseOpaqueType(node, declare) { - this.expectContextual("type"); - node.id = this.flowParseRestrictedIdentifier(true); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.supertype = null; - - if (this.match(types.colon)) { - node.supertype = this.flowParseTypeInitialiser(types.colon); - } - - node.impltype = null; - - if (!declare) { - node.impltype = this.flowParseTypeInitialiser(types.eq); - } - - this.semicolon(); - return this.finishNode(node, "OpaqueType"); - }; - - _proto.flowParseTypeParameter = function flowParseTypeParameter() { - var node = this.startNode(); - var variance = this.flowParseVariance(); - var ident = this.flowParseTypeAnnotatableIdentifier(); - node.name = ident.name; - node.variance = variance; - node.bound = ident.typeAnnotation; - - if (this.match(types.eq)) { - this.eat(types.eq); - node.default = this.flowParseType(); - } - - return this.finishNode(node, "TypeParameter"); - }; - - _proto.flowParseTypeParameterDeclaration = function flowParseTypeParameterDeclaration() { - var oldInType = this.state.inType; - var node = this.startNode(); - node.params = []; - this.state.inType = true; - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - do { - node.params.push(this.flowParseTypeParameter()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } while (!this.isRelational(">")); - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterDeclaration"); - }; - - _proto.flowParseTypeParameterInstantiation = function flowParseTypeParameterInstantiation() { - var node = this.startNode(); - var oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expectRelational("<"); - - while (!this.isRelational(">")) { - node.params.push(this.flowParseType()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - }; - - _proto.flowParseObjectPropertyKey = function flowParseObjectPropertyKey() { - return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); - }; - - _proto.flowParseObjectTypeIndexer = function flowParseObjectTypeIndexer(node, isStatic, variance) { - node.static = isStatic; - this.expect(types.bracketL); - - if (this.lookahead().type === types.colon) { - node.id = this.flowParseObjectPropertyKey(); - node.key = this.flowParseTypeInitialiser(); - } else { - node.id = null; - node.key = this.flowParseType(); - } - - this.expect(types.bracketR); - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - return this.finishNode(node, "ObjectTypeIndexer"); - }; - - _proto.flowParseObjectTypeMethodish = function flowParseObjectTypeMethodish(node) { - node.params = []; - node.rest = null; - node.typeParameters = null; - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - this.expect(types.parenL); - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - node.params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - node.rest = this.flowParseFunctionTypeParam(); - } - - this.expect(types.parenR); - node.returnType = this.flowParseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeAnnotation"); - }; - - _proto.flowParseObjectTypeCallProperty = function flowParseObjectTypeCallProperty(node, isStatic) { - var valueNode = this.startNode(); - node.static = isStatic; - node.value = this.flowParseObjectTypeMethodish(valueNode); - return this.finishNode(node, "ObjectTypeCallProperty"); - }; - - _proto.flowParseObjectType = function flowParseObjectType(allowStatic, allowExact, allowSpread) { - var oldInType = this.state.inType; - this.state.inType = true; - var nodeStart = this.startNode(); - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - var endDelim; - var exact; - - if (allowExact && this.match(types.braceBarL)) { - this.expect(types.braceBarL); - endDelim = types.braceBarR; - exact = true; - } else { - this.expect(types.braceL); - endDelim = types.braceR; - exact = false; - } - - nodeStart.exact = exact; - - while (!this.match(endDelim)) { - var isStatic = false; - var node = this.startNode(); - - if (allowStatic && this.isContextual("static") && this.lookahead().type !== types.colon) { - this.next(); - isStatic = true; - } - - var variance = this.flowParseVariance(); - - if (this.match(types.bracketL)) { - nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); - } else if (this.match(types.parenL) || this.isRelational("<")) { - if (variance) { - this.unexpected(variance.start); - } - - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); - } else { - var kind = "init"; - - if (this.isContextual("get") || this.isContextual("set")) { - var lookahead = this.lookahead(); - - if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) { - kind = this.state.value; - this.next(); - } - } - - nodeStart.properties.push(this.flowParseObjectTypeProperty(node, isStatic, variance, kind, allowSpread)); - } - - this.flowObjectTypeSemicolon(); - } - - this.expect(endDelim); - var out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); - this.state.inType = oldInType; - return out; - }; - - _proto.flowParseObjectTypeProperty = function flowParseObjectTypeProperty(node, isStatic, variance, kind, allowSpread) { - if (this.match(types.ellipsis)) { - if (!allowSpread) { - this.unexpected(null, "Spread operator cannot appear in class or interface definitions"); - } - - if (variance) { - this.unexpected(variance.start, "Spread properties cannot have variance"); - } - - this.expect(types.ellipsis); - node.argument = this.flowParseType(); - return this.finishNode(node, "ObjectTypeSpreadProperty"); - } else { - node.key = this.flowParseObjectPropertyKey(); - node.static = isStatic; - node.kind = kind; - var optional = false; - - if (this.isRelational("<") || this.match(types.parenL)) { - node.method = true; - - if (variance) { - this.unexpected(variance.start); - } - - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); - - if (kind === "get" || kind === "set") { - this.flowCheckGetterSetterParams(node); - } - } else { - if (kind !== "init") this.unexpected(); - node.method = false; - - if (this.eat(types.question)) { - optional = true; - } - - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - } - - node.optional = optional; - return this.finishNode(node, "ObjectTypeProperty"); - } - }; - - _proto.flowCheckGetterSetterParams = function flowCheckGetterSetterParams(property) { - var paramCount = property.kind === "get" ? 0 : 1; - var start = property.start; - var length = property.value.params.length + (property.value.rest ? 1 : 0); - - if (length !== paramCount) { - if (property.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (property.kind === "set" && property.value.rest) { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.flowObjectTypeSemicolon = function flowObjectTypeSemicolon() { - if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) { - this.unexpected(); - } - }; - - _proto.flowParseQualifiedTypeIdentifier = function flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - var node = id || this.parseIdentifier(); - - while (this.eat(types.dot)) { - var node2 = this.startNodeAt(startPos, startLoc); - node2.qualification = node; - node2.id = this.parseIdentifier(); - node = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - - return node; - }; - - _proto.flowParseGenericType = function flowParseGenericType(startPos, startLoc, id) { - var node = this.startNodeAt(startPos, startLoc); - node.typeParameters = null; - node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } - - return this.finishNode(node, "GenericTypeAnnotation"); - }; - - _proto.flowParseTypeofType = function flowParseTypeofType() { - var node = this.startNode(); - this.expect(types._typeof); - node.argument = this.flowParsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - }; - - _proto.flowParseTupleType = function flowParseTupleType() { - var node = this.startNode(); - node.types = []; - this.expect(types.bracketL); - - while (this.state.pos < this.input.length && !this.match(types.bracketR)) { - node.types.push(this.flowParseType()); - if (this.match(types.bracketR)) break; - this.expect(types.comma); - } - - this.expect(types.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); - }; - - _proto.flowParseFunctionTypeParam = function flowParseFunctionTypeParam() { - var name = null; - var optional = false; - var typeAnnotation = null; - var node = this.startNode(); - var lh = this.lookahead(); - - if (lh.type === types.colon || lh.type === types.question) { - name = this.parseIdentifier(); - - if (this.eat(types.question)) { - optional = true; - } - - typeAnnotation = this.flowParseTypeInitialiser(); - } else { - typeAnnotation = this.flowParseType(); - } - - node.name = name; - node.optional = optional; - node.typeAnnotation = typeAnnotation; - return this.finishNode(node, "FunctionTypeParam"); - }; - - _proto.reinterpretTypeAsFunctionTypeParam = function reinterpretTypeAsFunctionTypeParam(type) { - var node = this.startNodeAt(type.start, type.loc.start); - node.name = null; - node.optional = false; - node.typeAnnotation = type; - return this.finishNode(node, "FunctionTypeParam"); - }; - - _proto.flowParseFunctionTypeParams = function flowParseFunctionTypeParams(params) { - if (params === void 0) { - params = []; - } - - var rest = null; - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - rest = this.flowParseFunctionTypeParam(); - } - - return { - params: params, - rest: rest - }; - }; - - _proto.flowIdentToTypeAnnotation = function flowIdentToTypeAnnotation(startPos, startLoc, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); - - case "void": - return this.finishNode(node, "VoidTypeAnnotation"); - - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); - - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); - - case "empty": - return this.finishNode(node, "EmptyTypeAnnotation"); - - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); - - case "string": - return this.finishNode(node, "StringTypeAnnotation"); - - default: - return this.flowParseGenericType(startPos, startLoc, id); - } - }; - - _proto.flowParsePrimaryType = function flowParsePrimaryType() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var node = this.startNode(); - var tmp; - var type; - var isGroupedType = false; - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - - switch (this.state.type) { - case types.name: - return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); - - case types.braceL: - return this.flowParseObjectType(false, false, true); - - case types.braceBarL: - return this.flowParseObjectType(false, true, true); - - case types.bracketL: - return this.flowParseTupleType(); - - case types.relational: - if (this.state.value === "<") { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(types.parenL); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - break; - - case types.parenL: - this.next(); - - if (!this.match(types.parenR) && !this.match(types.ellipsis)) { - if (this.match(types.name)) { - var token = this.lookahead().type; - isGroupedType = token !== types.question && token !== types.colon; - } else { - isGroupedType = true; - } - } - - if (isGroupedType) { - this.state.noAnonFunctionType = false; - type = this.flowParseType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - - if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) { - this.expect(types.parenR); - return type; - } else { - this.eat(types.comma); - } - } - - if (type) { - tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); - } else { - tmp = this.flowParseFunctionTypeParams(); - } - - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); - - case types._true: - case types._false: - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteralTypeAnnotation"); - - case types.plusMin: - if (this.state.value === "-") { - this.next(); - - if (!this.match(types.num)) { - this.unexpected(null, "Unexpected token, expected \"number\""); - } - - return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start); - } - - this.unexpected(); - - case types.num: - return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); - - case types._null: - this.next(); - return this.finishNode(node, "NullLiteralTypeAnnotation"); - - case types._this: - this.next(); - return this.finishNode(node, "ThisTypeAnnotation"); - - case types.star: - this.next(); - return this.finishNode(node, "ExistsTypeAnnotation"); - - default: - if (this.state.type.keyword === "typeof") { - return this.flowParseTypeofType(); - } - - } - - throw this.unexpected(); - }; - - _proto.flowParsePostfixType = function flowParsePostfixType() { - var startPos = this.state.start, - startLoc = this.state.startLoc; - var type = this.flowParsePrimaryType(); - - while (!this.canInsertSemicolon() && this.match(types.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.elementType = type; - this.expect(types.bracketL); - this.expect(types.bracketR); - type = this.finishNode(node, "ArrayTypeAnnotation"); - } - - return type; - }; - - _proto.flowParsePrefixType = function flowParsePrefixType() { - var node = this.startNode(); - - if (this.eat(types.question)) { - node.typeAnnotation = this.flowParsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } else { - return this.flowParsePostfixType(); - } - }; - - _proto.flowParseAnonFunctionWithoutParens = function flowParseAnonFunctionWithoutParens() { - var param = this.flowParsePrefixType(); - - if (!this.state.noAnonFunctionType && this.eat(types.arrow)) { - var node = this.startNodeAt(param.start, param.loc.start); - node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; - node.rest = null; - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - return param; - }; - - _proto.flowParseIntersectionType = function flowParseIntersectionType() { - var node = this.startNode(); - this.eat(types.bitwiseAND); - var type = this.flowParseAnonFunctionWithoutParens(); - node.types = [type]; - - while (this.eat(types.bitwiseAND)) { - node.types.push(this.flowParseAnonFunctionWithoutParens()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); - }; - - _proto.flowParseUnionType = function flowParseUnionType() { - var node = this.startNode(); - this.eat(types.bitwiseOR); - var type = this.flowParseIntersectionType(); - node.types = [type]; - - while (this.eat(types.bitwiseOR)) { - node.types.push(this.flowParseIntersectionType()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); - }; - - _proto.flowParseType = function flowParseType() { - var oldInType = this.state.inType; - this.state.inType = true; - var type = this.flowParseUnionType(); - this.state.inType = oldInType; - this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType; - return type; - }; - - _proto.flowParseTypeAnnotation = function flowParseTypeAnnotation() { - var node = this.startNode(); - node.typeAnnotation = this.flowParseTypeInitialiser(); - return this.finishNode(node, "TypeAnnotation"); - }; - - _proto.flowParseTypeAnnotatableIdentifier = function flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { - var ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); - - if (this.match(types.colon)) { - ident.typeAnnotation = this.flowParseTypeAnnotation(); - this.finishNode(ident, ident.type); - } - - return ident; - }; - - _proto.typeCastToParameter = function typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end); - }; - - _proto.flowParseVariance = function flowParseVariance() { - var variance = null; - - if (this.match(types.plusMin)) { - variance = this.startNode(); - - if (this.state.value === "+") { - variance.kind = "plus"; - } else { - variance.kind = "minus"; - } - - this.next(); - this.finishNode(variance, "Variance"); - } - - return variance; - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpressionBody) { - var _this2 = this; - - if (allowExpressionBody) { - return this.forwardNoArrowParamsConversionAt(node, function () { - return _superClass.prototype.parseFunctionBody.call(_this2, node, true); - }); - } - - return _superClass.prototype.parseFunctionBody.call(this, node, false); - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - if (!allowExpressionBody && this.match(types.colon)) { - var typeNode = this.startNode(); - - var _flowParseTypeAndPred2 = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.typeAnnotation = _flowParseTypeAndPred2[0]; - node.predicate = _flowParseTypeAndPred2[1]; - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } - - _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody); - }; - - _proto.parseStatement = function parseStatement(declaration, topLevel) { - if (this.state.strict && this.match(types.name) && this.state.value === "interface") { - var node = this.startNode(); - this.next(); - return this.flowParseInterface(node); - } else { - return _superClass.prototype.parseStatement.call(this, declaration, topLevel); - } - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) { - return this.flowParseDeclare(node); - } - } else if (this.match(types.name)) { - if (expr.name === "interface") { - return this.flowParseInterface(node); - } else if (expr.name === "type") { - return this.flowParseTypeAlias(node); - } else if (expr.name === "opaque") { - return this.flowParseOpaqueType(node, false); - } - } - } - - return _superClass.prototype.parseExpressionStatement.call(this, node, expr); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || _superClass.prototype.shouldParseExportDeclaration.call(this); - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value == "opaque")) { - return false; - } - - return _superClass.prototype.isExportDefaultSpecifier.call(this); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - var _this3 = this; - - if (!this.match(types.question)) return expr; - - if (refNeedsArrowPos) { - var _state = this.state.clone(); - - try { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = _state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } else { - throw err; - } - } - } - - this.expect(types.question); - var state = this.state.clone(); - var originalNoArrowAt = this.state.noArrowAt; - var node = this.startNodeAt(startPos, startLoc); - - var _tryParseConditionalC = this.tryParseConditionalConsequent(), - consequent = _tryParseConditionalC.consequent, - failed = _tryParseConditionalC.failed; - - var _getArrowLikeExpressi = this.getArrowLikeExpressions(consequent), - valid = _getArrowLikeExpressi[0], - invalid = _getArrowLikeExpressi[1]; - - if (failed || invalid.length > 0) { - var noArrowAt = originalNoArrowAt.concat(); - - if (invalid.length > 0) { - this.state = state; - this.state.noArrowAt = noArrowAt; - - for (var i = 0; i < invalid.length; i++) { - noArrowAt.push(invalid[i].start); - } - - var _tryParseConditionalC2 = this.tryParseConditionalConsequent(); - - consequent = _tryParseConditionalC2.consequent; - failed = _tryParseConditionalC2.failed; - - var _getArrowLikeExpressi2 = this.getArrowLikeExpressions(consequent); - - valid = _getArrowLikeExpressi2[0]; - invalid = _getArrowLikeExpressi2[1]; - } - - if (failed && valid.length > 1) { - this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."); - } - - if (failed && valid.length === 1) { - this.state = state; - this.state.noArrowAt = noArrowAt.concat(valid[0].start); - - var _tryParseConditionalC3 = this.tryParseConditionalConsequent(); - - consequent = _tryParseConditionalC3.consequent; - failed = _tryParseConditionalC3.failed; - } - - this.getArrowLikeExpressions(consequent, true); - } - - this.state.noArrowAt = originalNoArrowAt; - this.expect(types.colon); - node.test = expr; - node.consequent = consequent; - node.alternate = this.forwardNoArrowParamsConversionAt(node, function () { - return _this3.parseMaybeAssign(noIn, undefined, undefined, undefined); - }); - return this.finishNode(node, "ConditionalExpression"); - }; - - _proto.tryParseConditionalConsequent = function tryParseConditionalConsequent() { - this.state.noArrowParamsConversionAt.push(this.state.start); - var consequent = this.parseMaybeAssign(); - var failed = !this.match(types.colon); - this.state.noArrowParamsConversionAt.pop(); - return { - consequent: consequent, - failed: failed - }; - }; - - _proto.getArrowLikeExpressions = function getArrowLikeExpressions(node, disallowInvalid) { - var _this4 = this; - - var stack = [node]; - var arrows = []; - - while (stack.length !== 0) { - var _node = stack.pop(); - - if (_node.type === "ArrowFunctionExpression") { - if (_node.typeParameters || !_node.returnType) { - this.toAssignableList(_node.params, true, "arrow function parameters"); - - _superClass.prototype.checkFunctionNameAndParams.call(this, _node, true); - } else { - arrows.push(_node); - } - - stack.push(_node.body); - } else if (_node.type === "ConditionalExpression") { - stack.push(_node.consequent); - stack.push(_node.alternate); - } - } - - if (disallowInvalid) { - for (var i = 0; i < arrows.length; i++) { - this.toAssignableList(node.params, true, "arrow function parameters"); - } - - return [arrows, []]; - } - - return partition(arrows, function (node) { - try { - _this4.toAssignableList(node.params, true, "arrow function parameters"); - - return true; - } catch (err) { - return false; - } - }); - }; - - _proto.forwardNoArrowParamsConversionAt = function forwardNoArrowParamsConversionAt(node, parse) { - var result; - - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - this.state.noArrowParamsConversionAt.push(this.state.start); - result = parse(); - this.state.noArrowParamsConversionAt.pop(); - } else { - result = parse(); - } - - return result; - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - } - - if (this.match(types.colon)) { - var typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } - - return node; - }; - - _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) { - if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { - return; - } - - _superClass.prototype.assertModuleNodeAllowed.call(this, node); - }; - - _proto.parseExport = function parseExport(node) { - node = _superClass.prototype.parseExport.call(this, node); - - if (node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") { - node.exportKind = node.exportKind || "value"; - } - - return node; - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - if (this.isContextual("type")) { - node.exportKind = "type"; - var declarationNode = this.startNode(); - this.next(); - - if (this.match(types.braceL)) { - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - return null; - } else { - return this.flowParseTypeAlias(declarationNode); - } - } else if (this.isContextual("opaque")) { - node.exportKind = "type"; - - var _declarationNode = this.startNode(); - - this.next(); - return this.flowParseOpaqueType(_declarationNode, false); - } else if (this.isContextual("interface")) { - node.exportKind = "type"; - - var _declarationNode2 = this.startNode(); - - this.next(); - return this.flowParseInterface(_declarationNode2); - } else { - return _superClass.prototype.parseExportDeclaration.call(this, node); - } - }; - - _proto.shouldParseExportStar = function shouldParseExportStar() { - return _superClass.prototype.shouldParseExportStar.call(this) || this.isContextual("type") && this.lookahead().type === types.star; - }; - - _proto.parseExportStar = function parseExportStar(node) { - if (this.eatContextual("type")) { - node.exportKind = "type"; - } - - return _superClass.prototype.parseExportStar.call(this, node); - }; - - _proto.parseExportNamespace = function parseExportNamespace(node) { - if (node.exportKind === "type") { - this.unexpected(); - } - - return _superClass.prototype.parseExportNamespace.call(this, node); - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - }; - - _proto.isKeyword = function isKeyword$$1(name) { - if (this.state.inType && name === "void") { - return false; - } else { - return _superClass.prototype.isKeyword.call(this, name); - } - }; - - _proto.readToken = function readToken(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else if (isIteratorStart(code, next)) { - this.state.isIterator = true; - return _superClass.prototype.readWord.call(this); - } else { - return _superClass.prototype.readToken.call(this, code); - } - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (node.type === "TypeCastExpression") { - return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription); - } else { - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr.type === "TypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - - return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription); - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr._exprListItem && expr.type === "TypeCastExpression") { - this.raise(expr.start, "Unexpected type cast"); - } - } - - return exprList; - }; - - _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos) { - var container = this.startNode(); - - var node = _superClass.prototype.parseExprListItem.call(this, allowEmpty, refShorthandDefaultPos, refNeedsArrowPos); - - if (this.match(types.colon)) { - container._exprListItem = true; - container.expression = node; - container.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(container, "TypeCastExpression"); - } else { - return node; - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - if (expr.type !== "TypeCastExpression") { - return _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - } - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (this.match(types.colon)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - - return _superClass.prototype.parseClassProperty.call(this, node); - }; - - _proto.isClassMethod = function isClassMethod() { - return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.colon) || _superClass.prototype.isClassProperty.call(this); - }; - - _proto.isNonstaticConstructor = function isNonstaticConstructor(method) { - return !this.match(types.colon) && _superClass.prototype.isNonstaticConstructor.call(this, method); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync); - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - _superClass.prototype.parseClassSuper.call(this, node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.flowParseTypeParameterInstantiation(); - } - - if (this.isContextual("implements")) { - this.next(); - var implemented = node.implements = []; - - do { - var _node2 = this.startNode(); - - _node2.id = this.flowParseRestrictedIdentifier(true); - - if (this.isRelational("<")) { - _node2.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - _node2.typeParameters = null; - } - - implemented.push(this.finishNode(_node2, "ClassImplements")); - } while (this.eat(types.comma)); - } - }; - - _proto.parsePropertyName = function parsePropertyName(node) { - var variance = this.flowParseVariance(); - - var key = _superClass.prototype.parsePropertyName.call(this, node); - - node.variance = variance; - return key; - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - if (prop.variance) { - this.unexpected(prop.variance.start); - } - - delete prop.variance; - var typeParameters; - - if (this.isRelational("<")) { - typeParameters = this.flowParseTypeParameterDeclaration(); - if (!this.match(types.parenL)) this.unexpected(); - } - - _superClass.prototype.parseObjPropValue.call(this, prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); - - if (typeParameters) { - (prop.value || prop).typeParameters = typeParameters; - } - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - if (this.match(types.colon)) { - param.typeAnnotation = this.flowParseTypeAnnotation(); - } - - this.finishNode(param, param.type); - return param; - }; - - _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) { - var node = _superClass.prototype.parseMaybeDefault.call(this, startPos, startLoc, left); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - }; - - _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) { - if (!hasTypeImportKind(node)) { - return _superClass.prototype.shouldParseDefaultImport.call(this, node); - } - - return isMaybeDefaultImport(this.state); - }; - - _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier(); - this.checkLVal(specifier.local, true, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - }; - - _proto.parseImportSpecifiers = function parseImportSpecifiers(node) { - node.importKind = "value"; - var kind = null; - - if (this.match(types._typeof)) { - kind = "typeof"; - } else if (this.isContextual("type")) { - kind = "type"; - } - - if (kind) { - var lh = this.lookahead(); - - if (kind === "type" && lh.type === types.star) { - this.unexpected(lh.start); - } - - if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) { - this.next(); - node.importKind = kind; - } - } - - _superClass.prototype.parseImportSpecifiers.call(this, node); - }; - - _proto.parseImportSpecifier = function parseImportSpecifier(node) { - var specifier = this.startNode(); - var firstIdentLoc = this.state.start; - var firstIdent = this.parseIdentifier(true); - var specifierTypeKind = null; - - if (firstIdent.name === "type") { - specifierTypeKind = "type"; - } else if (firstIdent.name === "typeof") { - specifierTypeKind = "typeof"; - } - - var isBinding = false; - - if (this.isContextual("as") && !this.isLookaheadContextual("as")) { - var as_ident = this.parseIdentifier(true); - - if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) { - specifier.imported = as_ident; - specifier.importKind = specifierTypeKind; - specifier.local = as_ident.__clone(); - } else { - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = this.parseIdentifier(); - } - } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) { - specifier.imported = this.parseIdentifier(true); - specifier.importKind = specifierTypeKind; - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - isBinding = true; - specifier.local = specifier.imported.__clone(); - } - } else { - isBinding = true; - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = specifier.imported.__clone(); - } - - var nodeIsTypeImport = hasTypeImportKind(node); - var specifierIsTypeImport = hasTypeImportKind(specifier); - - if (nodeIsTypeImport && specifierIsTypeImport) { - this.raise(firstIdentLoc, "The `type` and `typeof` keywords on named imports can only be used on regular " + "`import` statements. It cannot be used with `import type` or `import typeof` statements"); - } - - if (nodeIsTypeImport || specifierIsTypeImport) { - this.checkReservedType(specifier.local.name, specifier.local.start); - } - - if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) { - this.checkReservedWord(specifier.local.name, specifier.start, true, true); - } - - this.checkLVal(specifier.local, true, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - }; - - _proto.parseFunctionParams = function parseFunctionParams(node) { - var kind = node.kind; - - if (kind !== "get" && kind !== "set" && this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.parseFunctionParams.call(this, node); - }; - - _proto.parseVarHead = function parseVarHead(decl) { - _superClass.prototype.parseVarHead.call(this, decl); - - if (this.match(types.colon)) { - decl.id.typeAnnotation = this.flowParseTypeAnnotation(); - this.finishNode(decl.id, decl.id.type); - } - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - node.returnType = this.flowParseTypeAnnotation(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - } - - return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call); - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this); - }; - - _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - var _this5 = this; - - var jsxError = null; - - if (types.jsxTagStart && this.match(types.jsxTagStart)) { - var state = this.state.clone(); - - try { - return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - this.state.context.length -= 2; - jsxError = err; - } else { - throw err; - } - } - } - - if (jsxError != null || this.isRelational("<")) { - var arrowExpression; - var typeParameters; - - try { - typeParameters = this.flowParseTypeParameterDeclaration(); - arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, function () { - return _superClass.prototype.parseMaybeAssign.call(_this5, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - }); - arrowExpression.typeParameters = typeParameters; - this.resetStartLocationFromNode(arrowExpression, typeParameters); - } catch (err) { - throw jsxError || err; - } - - if (arrowExpression.type === "ArrowFunctionExpression") { - return arrowExpression; - } else if (jsxError != null) { - throw jsxError; - } else { - this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration"); - } - } - - return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.match(types.colon)) { - var state = this.state.clone(); - - try { - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - var typeNode = this.startNode(); - - var _flowParseTypeAndPred3 = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.typeAnnotation = _flowParseTypeAndPred3[0]; - node.predicate = _flowParseTypeAndPred3[1]; - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(types.arrow)) this.unexpected(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return _superClass.prototype.parseArrow.call(this, node); - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this); - }; - - _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) { - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - node.params = params; - } else { - _superClass.prototype.setArrowFunctionParameters.call(this, node, params); - } - }; - - _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) { - if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - return; - } - - return _superClass.prototype.checkFunctionNameAndParams.call(this, node, isArrowFunction); - }; - - _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) { - return _superClass.prototype.parseParenAndDistinguishExpression.call(this, canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); - }; - - _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { - this.next(); - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) { - var state = this.state.clone(); - var error; - - try { - var _node3 = this.parseAsyncArrowWithTypeParameters(startPos, startLoc); - - if (_node3) return _node3; - } catch (e) { - error = e; - } - - this.state = state; - - try { - return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls); - } catch (e) { - throw error || e; - } - } - - return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls); - }; - - _proto.parseAsyncArrowWithTypeParameters = function parseAsyncArrowWithTypeParameters(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - this.parseFunctionParams(node); - if (!this.parseArrow(node)) return; - return this.parseArrowExpression(node, undefined, true); - }; - - _proto.readToken_mult_modulo = function readToken_mult_modulo(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 42 && next === 47 && this.state.hasFlowComment) { - this.state.hasFlowComment = false; - this.state.pos += 2; - this.nextToken(); - return; - } - - _superClass.prototype.readToken_mult_modulo.call(this, code); - }; - - _proto.skipBlockComment = function skipBlockComment() { - if (this.hasPlugin("flow") && this.hasPlugin("flowComments") && this.skipFlowComment()) { - this.hasFlowCommentCompletion(); - this.state.pos += this.skipFlowComment(); - this.state.hasFlowComment = true; - return; - } - - var end; - - if (this.hasPlugin("flow") && this.state.hasFlowComment) { - end = this.input.indexOf("*-/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 3; - return; - } - - _superClass.prototype.skipBlockComment.call(this); - }; - - _proto.skipFlowComment = function skipFlowComment() { - var ch2 = this.input.charCodeAt(this.state.pos + 2); - var ch3 = this.input.charCodeAt(this.state.pos + 3); - - if (ch2 === 58 && ch3 === 58) { - return 4; - } - - if (this.input.slice(this.state.pos + 2, 14) === "flow-include") { - return 14; - } - - if (ch2 === 58 && ch3 !== 58 && 2) { - return 2; - } - - return false; - }; - - _proto.hasFlowCommentCompletion = function hasFlowCommentCompletion() { - var end = this.input.indexOf("*/", this.state.pos); - - if (end === -1) { - this.raise(this.state.pos, "Unterminated comment"); - } - }; - - return _class; - }(superClass); -}); - -var entities = { - quot: "\"", - amp: "&", - apos: "'", - lt: "<", - gt: ">", - nbsp: "\xA0", - iexcl: "\xA1", - cent: "\xA2", - pound: "\xA3", - curren: "\xA4", - yen: "\xA5", - brvbar: "\xA6", - sect: "\xA7", - uml: "\xA8", - copy: "\xA9", - ordf: "\xAA", - laquo: "\xAB", - not: "\xAC", - shy: "\xAD", - reg: "\xAE", - macr: "\xAF", - deg: "\xB0", - plusmn: "\xB1", - sup2: "\xB2", - sup3: "\xB3", - acute: "\xB4", - micro: "\xB5", - para: "\xB6", - middot: "\xB7", - cedil: "\xB8", - sup1: "\xB9", - ordm: "\xBA", - raquo: "\xBB", - frac14: "\xBC", - frac12: "\xBD", - frac34: "\xBE", - iquest: "\xBF", - Agrave: "\xC0", - Aacute: "\xC1", - Acirc: "\xC2", - Atilde: "\xC3", - Auml: "\xC4", - Aring: "\xC5", - AElig: "\xC6", - Ccedil: "\xC7", - Egrave: "\xC8", - Eacute: "\xC9", - Ecirc: "\xCA", - Euml: "\xCB", - Igrave: "\xCC", - Iacute: "\xCD", - Icirc: "\xCE", - Iuml: "\xCF", - ETH: "\xD0", - Ntilde: "\xD1", - Ograve: "\xD2", - Oacute: "\xD3", - Ocirc: "\xD4", - Otilde: "\xD5", - Ouml: "\xD6", - times: "\xD7", - Oslash: "\xD8", - Ugrave: "\xD9", - Uacute: "\xDA", - Ucirc: "\xDB", - Uuml: "\xDC", - Yacute: "\xDD", - THORN: "\xDE", - szlig: "\xDF", - agrave: "\xE0", - aacute: "\xE1", - acirc: "\xE2", - atilde: "\xE3", - auml: "\xE4", - aring: "\xE5", - aelig: "\xE6", - ccedil: "\xE7", - egrave: "\xE8", - eacute: "\xE9", - ecirc: "\xEA", - euml: "\xEB", - igrave: "\xEC", - iacute: "\xED", - icirc: "\xEE", - iuml: "\xEF", - eth: "\xF0", - ntilde: "\xF1", - ograve: "\xF2", - oacute: "\xF3", - ocirc: "\xF4", - otilde: "\xF5", - ouml: "\xF6", - divide: "\xF7", - oslash: "\xF8", - ugrave: "\xF9", - uacute: "\xFA", - ucirc: "\xFB", - uuml: "\xFC", - yacute: "\xFD", - thorn: "\xFE", - yuml: "\xFF", - OElig: "\u0152", - oelig: "\u0153", - Scaron: "\u0160", - scaron: "\u0161", - Yuml: "\u0178", - fnof: "\u0192", - circ: "\u02C6", - tilde: "\u02DC", - Alpha: "\u0391", - Beta: "\u0392", - Gamma: "\u0393", - Delta: "\u0394", - Epsilon: "\u0395", - Zeta: "\u0396", - Eta: "\u0397", - Theta: "\u0398", - Iota: "\u0399", - Kappa: "\u039A", - Lambda: "\u039B", - Mu: "\u039C", - Nu: "\u039D", - Xi: "\u039E", - Omicron: "\u039F", - Pi: "\u03A0", - Rho: "\u03A1", - Sigma: "\u03A3", - Tau: "\u03A4", - Upsilon: "\u03A5", - Phi: "\u03A6", - Chi: "\u03A7", - Psi: "\u03A8", - Omega: "\u03A9", - alpha: "\u03B1", - beta: "\u03B2", - gamma: "\u03B3", - delta: "\u03B4", - epsilon: "\u03B5", - zeta: "\u03B6", - eta: "\u03B7", - theta: "\u03B8", - iota: "\u03B9", - kappa: "\u03BA", - lambda: "\u03BB", - mu: "\u03BC", - nu: "\u03BD", - xi: "\u03BE", - omicron: "\u03BF", - pi: "\u03C0", - rho: "\u03C1", - sigmaf: "\u03C2", - sigma: "\u03C3", - tau: "\u03C4", - upsilon: "\u03C5", - phi: "\u03C6", - chi: "\u03C7", - psi: "\u03C8", - omega: "\u03C9", - thetasym: "\u03D1", - upsih: "\u03D2", - piv: "\u03D6", - ensp: "\u2002", - emsp: "\u2003", - thinsp: "\u2009", - zwnj: "\u200C", - zwj: "\u200D", - lrm: "\u200E", - rlm: "\u200F", - ndash: "\u2013", - mdash: "\u2014", - lsquo: "\u2018", - rsquo: "\u2019", - sbquo: "\u201A", - ldquo: "\u201C", - rdquo: "\u201D", - bdquo: "\u201E", - dagger: "\u2020", - Dagger: "\u2021", - bull: "\u2022", - hellip: "\u2026", - permil: "\u2030", - prime: "\u2032", - Prime: "\u2033", - lsaquo: "\u2039", - rsaquo: "\u203A", - oline: "\u203E", - frasl: "\u2044", - euro: "\u20AC", - image: "\u2111", - weierp: "\u2118", - real: "\u211C", - trade: "\u2122", - alefsym: "\u2135", - larr: "\u2190", - uarr: "\u2191", - rarr: "\u2192", - darr: "\u2193", - harr: "\u2194", - crarr: "\u21B5", - lArr: "\u21D0", - uArr: "\u21D1", - rArr: "\u21D2", - dArr: "\u21D3", - hArr: "\u21D4", - forall: "\u2200", - part: "\u2202", - exist: "\u2203", - empty: "\u2205", - nabla: "\u2207", - isin: "\u2208", - notin: "\u2209", - ni: "\u220B", - prod: "\u220F", - sum: "\u2211", - minus: "\u2212", - lowast: "\u2217", - radic: "\u221A", - prop: "\u221D", - infin: "\u221E", - ang: "\u2220", - and: "\u2227", - or: "\u2228", - cap: "\u2229", - cup: "\u222A", - int: "\u222B", - there4: "\u2234", - sim: "\u223C", - cong: "\u2245", - asymp: "\u2248", - ne: "\u2260", - equiv: "\u2261", - le: "\u2264", - ge: "\u2265", - sub: "\u2282", - sup: "\u2283", - nsub: "\u2284", - sube: "\u2286", - supe: "\u2287", - oplus: "\u2295", - otimes: "\u2297", - perp: "\u22A5", - sdot: "\u22C5", - lceil: "\u2308", - rceil: "\u2309", - lfloor: "\u230A", - rfloor: "\u230B", - lang: "\u2329", - rang: "\u232A", - loz: "\u25CA", - spades: "\u2660", - clubs: "\u2663", - hearts: "\u2665", - diams: "\u2666" -}; - -var HEX_NUMBER = /^[\da-fA-F]+$/; -var DECIMAL_NUMBER = /^\d+$/; -types$1.j_oTag = new TokContext("...", true, true); -types.jsxName = new TokenType("jsxName"); -types.jsxText = new TokenType("jsxText", { - beforeExpr: true -}); -types.jsxTagStart = new TokenType("jsxTagStart", { - startsExpr: true -}); -types.jsxTagEnd = new TokenType("jsxTagEnd"); - -types.jsxTagStart.updateContext = function () { - this.state.context.push(types$1.j_expr); - this.state.context.push(types$1.j_oTag); - this.state.exprAllowed = false; -}; - -types.jsxTagEnd.updateContext = function (prevType) { - var out = this.state.context.pop(); - - if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) { - this.state.context.pop(); - this.state.exprAllowed = this.curContext() === types$1.j_expr; - } else { - this.state.exprAllowed = true; - } -}; - -function isFragment(object) { - return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; -} - -function getQualifiedJSXName(object) { - if (object.type === "JSXIdentifier") { - return object.name; - } - - if (object.type === "JSXNamespacedName") { - return object.namespace.name + ":" + object.name.name; - } - - if (object.type === "JSXMemberExpression") { - return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); - } - - throw new Error("Node had unexpected type: " + object.type); -} - -var jsxPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.jsxReadToken = function jsxReadToken() { - var out = ""; - var chunkStart = this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated JSX contents"); - } - - var ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 60: - case 123: - if (this.state.pos === this.state.start) { - if (ch === 60 && this.state.exprAllowed) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return this.getTokenFromCode(ch); - } - - out += this.input.slice(chunkStart, this.state.pos); - return this.finishToken(types.jsxText, out); - - case 38: - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - break; - - default: - if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(true); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - - } - } - }; - - _proto.jsxReadNewLine = function jsxReadNewLine(normalizeCRLF) { - var ch = this.input.charCodeAt(this.state.pos); - var out; - ++this.state.pos; - - if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - out = normalizeCRLF ? "\n" : "\r\n"; - } else { - out = String.fromCharCode(ch); - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - return out; - }; - - _proto.jsxReadString = function jsxReadString(quote) { - var out = ""; - var chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - var ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 38) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(false); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - return this.finishToken(types.string, out); - }; - - _proto.jsxReadEntity = function jsxReadEntity() { - var str = ""; - var count = 0; - var entity; - var ch = this.input[this.state.pos]; - var startPos = ++this.state.pos; - - while (this.state.pos < this.input.length && count++ < 10) { - ch = this.input[this.state.pos++]; - - if (ch === ";") { - if (str[0] === "#") { - if (str[1] === "x") { - str = str.substr(2); - - if (HEX_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 16)); - } - } else { - str = str.substr(1); - - if (DECIMAL_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 10)); - } - } - } else { - entity = entities[str]; - } - - break; - } - - str += ch; - } - - if (!entity) { - this.state.pos = startPos; - return "&"; - } - - return entity; - }; - - _proto.jsxReadWord = function jsxReadWord() { - var ch; - var start = this.state.pos; - - do { - ch = this.input.charCodeAt(++this.state.pos); - } while (isIdentifierChar(ch) || ch === 45); - - return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos)); - }; - - _proto.jsxParseIdentifier = function jsxParseIdentifier() { - var node = this.startNode(); - - if (this.match(types.jsxName)) { - node.name = this.state.value; - } else if (this.state.type.keyword) { - node.name = this.state.type.keyword; - } else { - this.unexpected(); - } - - this.next(); - return this.finishNode(node, "JSXIdentifier"); - }; - - _proto.jsxParseNamespacedName = function jsxParseNamespacedName() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var name = this.jsxParseIdentifier(); - if (!this.eat(types.colon)) return name; - var node = this.startNodeAt(startPos, startLoc); - node.namespace = name; - node.name = this.jsxParseIdentifier(); - return this.finishNode(node, "JSXNamespacedName"); - }; - - _proto.jsxParseElementName = function jsxParseElementName() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var node = this.jsxParseNamespacedName(); - - while (this.eat(types.dot)) { - var newNode = this.startNodeAt(startPos, startLoc); - newNode.object = node; - newNode.property = this.jsxParseIdentifier(); - node = this.finishNode(newNode, "JSXMemberExpression"); - } - - return node; - }; - - _proto.jsxParseAttributeValue = function jsxParseAttributeValue() { - var node; - - switch (this.state.type) { - case types.braceL: - node = this.jsxParseExpressionContainer(); - - if (node.expression.type === "JSXEmptyExpression") { - throw this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); - } else { - return node; - } - - case types.jsxTagStart: - case types.string: - return this.parseExprAtom(); - - default: - throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text"); - } - }; - - _proto.jsxParseEmptyExpression = function jsxParseEmptyExpression() { - var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); - return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc); - }; - - _proto.jsxParseSpreadChild = function jsxParseSpreadChild() { - var node = this.startNode(); - this.expect(types.braceL); - this.expect(types.ellipsis); - node.expression = this.parseExpression(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadChild"); - }; - - _proto.jsxParseExpressionContainer = function jsxParseExpressionContainer() { - var node = this.startNode(); - this.next(); - - if (this.match(types.braceR)) { - node.expression = this.jsxParseEmptyExpression(); - } else { - node.expression = this.parseExpression(); - } - - this.expect(types.braceR); - return this.finishNode(node, "JSXExpressionContainer"); - }; - - _proto.jsxParseAttribute = function jsxParseAttribute() { - var node = this.startNode(); - - if (this.eat(types.braceL)) { - this.expect(types.ellipsis); - node.argument = this.parseMaybeAssign(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadAttribute"); - } - - node.name = this.jsxParseNamespacedName(); - node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null; - return this.finishNode(node, "JSXAttribute"); - }; - - _proto.jsxParseOpeningElementAt = function jsxParseOpeningElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningFragment"); - } - - node.attributes = []; - node.name = this.jsxParseElementName(); - - while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) { - node.attributes.push(this.jsxParseAttribute()); - } - - node.selfClosing = this.eat(types.slash); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningElement"); - }; - - _proto.jsxParseClosingElementAt = function jsxParseClosingElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingFragment"); - } - - node.name = this.jsxParseElementName(); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingElement"); - }; - - _proto.jsxParseElementAt = function jsxParseElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - var children = []; - var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); - var closingElement = null; - - if (!openingElement.selfClosing) { - contents: for (;;) { - switch (this.state.type) { - case types.jsxTagStart: - startPos = this.state.start; - startLoc = this.state.startLoc; - this.next(); - - if (this.eat(types.slash)) { - closingElement = this.jsxParseClosingElementAt(startPos, startLoc); - break contents; - } - - children.push(this.jsxParseElementAt(startPos, startLoc)); - break; - - case types.jsxText: - children.push(this.parseExprAtom()); - break; - - case types.braceL: - if (this.lookahead().type === types.ellipsis) { - children.push(this.jsxParseSpreadChild()); - } else { - children.push(this.jsxParseExpressionContainer()); - } - - break; - - default: - throw this.unexpected(); - } - } - - if (isFragment(openingElement) && !isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>"); - } else if (!isFragment(openingElement) && isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } else if (!isFragment(openingElement) && !isFragment(closingElement)) { - if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } - } - } - - if (isFragment(openingElement)) { - node.openingFragment = openingElement; - node.closingFragment = closingElement; - } else { - node.openingElement = openingElement; - node.closingElement = closingElement; - } - - node.children = children; - - if (this.match(types.relational) && this.state.value === "<") { - this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...?"); - } - - return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); - }; - - _proto.jsxParseElement = function jsxParseElement() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - this.next(); - return this.jsxParseElementAt(startPos, startLoc); - }; - - _proto.parseExprAtom = function parseExprAtom(refShortHandDefaultPos) { - if (this.match(types.jsxText)) { - return this.parseLiteral(this.state.value, "JSXText"); - } else if (this.match(types.jsxTagStart)) { - return this.jsxParseElement(); - } else { - return _superClass.prototype.parseExprAtom.call(this, refShortHandDefaultPos); - } - }; - - _proto.readToken = function readToken(code) { - if (this.state.inPropertyName) return _superClass.prototype.readToken.call(this, code); - var context = this.curContext(); - - if (context === types$1.j_expr) { - return this.jsxReadToken(); - } - - if (context === types$1.j_oTag || context === types$1.j_cTag) { - if (isIdentifierStart(code)) { - return this.jsxReadWord(); - } - - if (code === 62) { - ++this.state.pos; - return this.finishToken(types.jsxTagEnd); - } - - if ((code === 34 || code === 39) && context === types$1.j_oTag) { - return this.jsxReadString(code); - } - } - - if (code === 60 && this.state.exprAllowed) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return _superClass.prototype.readToken.call(this, code); - }; - - _proto.updateContext = function updateContext(prevType) { - if (this.match(types.braceL)) { - var curContext = this.curContext(); - - if (curContext === types$1.j_oTag) { - this.state.context.push(types$1.braceExpression); - } else if (curContext === types$1.j_expr) { - this.state.context.push(types$1.templateQuasi); - } else { - _superClass.prototype.updateContext.call(this, prevType); - } - - this.state.exprAllowed = true; - } else if (this.match(types.slash) && prevType === types.jsxTagStart) { - this.state.context.length -= 2; - this.state.context.push(types$1.j_cTag); - this.state.exprAllowed = false; - } else { - return _superClass.prototype.updateContext.call(this, prevType); - } - }; - - return _class; - }(superClass); -}); - -function nonNull(x) { - if (x == null) { - throw new Error("Unexpected " + x + " value."); - } - - return x; -} - -function assert(x) { - if (!x) { - throw new Error("Assert fail"); - } -} - -function keywordTypeFromName(value) { - switch (value) { - case "any": - return "TSAnyKeyword"; - - case "boolean": - return "TSBooleanKeyword"; - - case "never": - return "TSNeverKeyword"; - - case "number": - return "TSNumberKeyword"; - - case "object": - return "TSObjectKeyword"; - - case "string": - return "TSStringKeyword"; - - case "symbol": - return "TSSymbolKeyword"; - - case "undefined": - return "TSUndefinedKeyword"; - - default: - return undefined; - } -} - -var typescriptPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.tsIsIdentifier = function tsIsIdentifier() { - return this.match(types.name); - }; - - _proto.tsNextTokenCanFollowModifier = function tsNextTokenCanFollowModifier() { - this.next(); - return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question); - }; - - _proto.tsParseModifier = function tsParseModifier(allowedModifiers) { - if (!this.match(types.name)) { - return undefined; - } - - var modifier = this.state.value; - - if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { - return modifier; - } - - return undefined; - }; - - _proto.tsIsListTerminator = function tsIsListTerminator(kind) { - switch (kind) { - case "EnumMembers": - case "TypeMembers": - return this.match(types.braceR); - - case "HeritageClauseElement": - return this.match(types.braceL); - - case "TupleElementTypes": - return this.match(types.bracketR); - - case "TypeParametersOrArguments": - return this.isRelational(">"); - } - - throw new Error("Unreachable"); - }; - - _proto.tsParseList = function tsParseList(kind, parseElement) { - var result = []; - - while (!this.tsIsListTerminator(kind)) { - result.push(parseElement()); - } - - return result; - }; - - _proto.tsParseDelimitedList = function tsParseDelimitedList(kind, parseElement) { - return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true)); - }; - - _proto.tsTryParseDelimitedList = function tsTryParseDelimitedList(kind, parseElement) { - return this.tsParseDelimitedListWorker(kind, parseElement, false); - }; - - _proto.tsParseDelimitedListWorker = function tsParseDelimitedListWorker(kind, parseElement, expectSuccess) { - var result = []; - - while (true) { - if (this.tsIsListTerminator(kind)) { - break; - } - - var element = parseElement(); - - if (element == null) { - return undefined; - } - - result.push(element); - - if (this.eat(types.comma)) { - continue; - } - - if (this.tsIsListTerminator(kind)) { - break; - } - - if (expectSuccess) { - this.expect(types.comma); - } - - return undefined; - } - - return result; - }; - - _proto.tsParseBracketedList = function tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) { - if (!skipFirstToken) { - if (bracket) { - this.expect(types.bracketL); - } else { - this.expectRelational("<"); - } - } - - var result = this.tsParseDelimitedList(kind, parseElement); - - if (bracket) { - this.expect(types.bracketR); - } else { - this.expectRelational(">"); - } - - return result; - }; - - _proto.tsParseEntityName = function tsParseEntityName(allowReservedWords) { - var entity = this.parseIdentifier(); - - while (this.eat(types.dot)) { - var node = this.startNodeAtNode(entity); - node.left = entity; - node.right = this.parseIdentifier(allowReservedWords); - entity = this.finishNode(node, "TSQualifiedName"); - } - - return entity; - }; - - _proto.tsParseTypeReference = function tsParseTypeReference() { - var node = this.startNode(); - node.typeName = this.tsParseEntityName(false); - - if (!this.hasPrecedingLineBreak() && this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSTypeReference"); - }; - - _proto.tsParseThisTypePredicate = function tsParseThisTypePredicate(lhs) { - this.next(); - var node = this.startNode(); - node.parameterName = lhs; - node.typeAnnotation = this.tsParseTypeAnnotation(false); - return this.finishNode(node, "TSTypePredicate"); - }; - - _proto.tsParseThisTypeNode = function tsParseThisTypeNode() { - var node = this.startNode(); - this.next(); - return this.finishNode(node, "TSThisType"); - }; - - _proto.tsParseTypeQuery = function tsParseTypeQuery() { - var node = this.startNode(); - this.expect(types._typeof); - node.exprName = this.tsParseEntityName(true); - return this.finishNode(node, "TSTypeQuery"); - }; - - _proto.tsParseTypeParameter = function tsParseTypeParameter() { - var node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsEatThenParseType(types._extends); - node.default = this.tsEatThenParseType(types.eq); - return this.finishNode(node, "TSTypeParameter"); - }; - - _proto.tsTryParseTypeParameters = function tsTryParseTypeParameters() { - if (this.isRelational("<")) { - return this.tsParseTypeParameters(); - } - }; - - _proto.tsParseTypeParameters = function tsParseTypeParameters() { - var node = this.startNode(); - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true); - return this.finishNode(node, "TSTypeParameterDeclaration"); - }; - - _proto.tsFillSignature = function tsFillSignature(returnToken, signature) { - var returnTokenRequired = returnToken === types.arrow; - signature.typeParameters = this.tsTryParseTypeParameters(); - this.expect(types.parenL); - signature.parameters = this.tsParseBindingListForSignature(); - - if (returnTokenRequired) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } else if (this.match(returnToken)) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } - }; - - _proto.tsParseBindingListForSignature = function tsParseBindingListForSignature() { - var _this = this; - - return this.parseBindingList(types.parenR).map(function (pattern) { - if (pattern.type !== "Identifier" && pattern.type !== "RestElement") { - throw _this.unexpected(pattern.start, "Name in a signature must be an Identifier."); - } - - return pattern; - }); - }; - - _proto.tsParseTypeMemberSemicolon = function tsParseTypeMemberSemicolon() { - if (!this.eat(types.comma)) { - this.semicolon(); - } - }; - - _proto.tsParseSignatureMember = function tsParseSignatureMember(kind) { - var node = this.startNode(); - - if (kind === "TSConstructSignatureDeclaration") { - this.expect(types._new); - } - - this.tsFillSignature(types.colon, node); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, kind); - }; - - _proto.tsIsUnambiguouslyIndexSignature = function tsIsUnambiguouslyIndexSignature() { - this.next(); - return this.eat(types.name) && this.match(types.colon); - }; - - _proto.tsTryParseIndexSignature = function tsTryParseIndexSignature(node) { - if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { - return undefined; - } - - this.expect(types.bracketL); - var id = this.parseIdentifier(); - this.expect(types.colon); - id.typeAnnotation = this.tsParseTypeAnnotation(false); - this.expect(types.bracketR); - node.parameters = [id]; - var type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, "TSIndexSignature"); - }; - - _proto.tsParsePropertyOrMethodSignature = function tsParsePropertyOrMethodSignature(node, readonly) { - this.parsePropertyName(node); - if (this.eat(types.question)) node.optional = true; - var nodeAny = node; - - if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) { - var method = nodeAny; - this.tsFillSignature(types.colon, method); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(method, "TSMethodSignature"); - } else { - var property = nodeAny; - if (readonly) property.readonly = true; - var type = this.tsTryParseTypeAnnotation(); - if (type) property.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(property, "TSPropertySignature"); - } - }; - - _proto.tsParseTypeMember = function tsParseTypeMember() { - if (this.match(types.parenL) || this.isRelational("<")) { - return this.tsParseSignatureMember("TSCallSignatureDeclaration"); - } - - if (this.match(types._new) && this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this))) { - return this.tsParseSignatureMember("TSConstructSignatureDeclaration"); - } - - var node = this.startNode(); - var readonly = !!this.tsParseModifier(["readonly"]); - var idx = this.tsTryParseIndexSignature(node); - - if (idx) { - if (readonly) node.readonly = true; - return idx; - } - - return this.tsParsePropertyOrMethodSignature(node, readonly); - }; - - _proto.tsIsStartOfConstructSignature = function tsIsStartOfConstructSignature() { - this.next(); - return this.match(types.parenL) || this.isRelational("<"); - }; - - _proto.tsParseTypeLiteral = function tsParseTypeLiteral() { - var node = this.startNode(); - node.members = this.tsParseObjectTypeMembers(); - return this.finishNode(node, "TSTypeLiteral"); - }; - - _proto.tsParseObjectTypeMembers = function tsParseObjectTypeMembers() { - this.expect(types.braceL); - var members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); - this.expect(types.braceR); - return members; - }; - - _proto.tsIsStartOfMappedType = function tsIsStartOfMappedType() { - this.next(); - - if (this.eat(types.plusMin)) { - return this.isContextual("readonly"); - } - - if (this.isContextual("readonly")) { - this.next(); - } - - if (!this.match(types.bracketL)) { - return false; - } - - this.next(); - - if (!this.tsIsIdentifier()) { - return false; - } - - this.next(); - return this.match(types._in); - }; - - _proto.tsParseMappedTypeParameter = function tsParseMappedTypeParameter() { - var node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsExpectThenParseType(types._in); - return this.finishNode(node, "TSTypeParameter"); - }; - - _proto.tsParseMappedType = function tsParseMappedType() { - var node = this.startNode(); - this.expect(types.braceL); - - if (this.match(types.plusMin)) { - node.readonly = this.state.value; - this.next(); - this.expectContextual("readonly"); - } else if (this.eatContextual("readonly")) { - node.readonly = true; - } - - this.expect(types.bracketL); - node.typeParameter = this.tsParseMappedTypeParameter(); - this.expect(types.bracketR); - - if (this.match(types.plusMin)) { - node.optional = this.state.value; - this.next(); - this.expect(types.question); - } else if (this.eat(types.question)) { - node.optional = true; - } - - node.typeAnnotation = this.tsTryParseType(); - this.semicolon(); - this.expect(types.braceR); - return this.finishNode(node, "TSMappedType"); - }; - - _proto.tsParseTupleType = function tsParseTupleType() { - var node = this.startNode(); - node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseType.bind(this), true, false); - return this.finishNode(node, "TSTupleType"); - }; - - _proto.tsParseParenthesizedType = function tsParseParenthesizedType() { - var node = this.startNode(); - this.expect(types.parenL); - node.typeAnnotation = this.tsParseType(); - this.expect(types.parenR); - return this.finishNode(node, "TSParenthesizedType"); - }; - - _proto.tsParseFunctionOrConstructorType = function tsParseFunctionOrConstructorType(type) { - var node = this.startNode(); - - if (type === "TSConstructorType") { - this.expect(types._new); - } - - this.tsFillSignature(types.arrow, node); - return this.finishNode(node, type); - }; - - _proto.tsParseLiteralTypeNode = function tsParseLiteralTypeNode() { - var _this2 = this; - - var node = this.startNode(); - - node.literal = function () { - switch (_this2.state.type) { - case types.num: - return _this2.parseLiteral(_this2.state.value, "NumericLiteral"); - - case types.string: - return _this2.parseLiteral(_this2.state.value, "StringLiteral"); - - case types._true: - case types._false: - return _this2.parseBooleanLiteral(); - - default: - throw _this2.unexpected(); - } - }(); - - return this.finishNode(node, "TSLiteralType"); - }; - - _proto.tsParseNonArrayType = function tsParseNonArrayType() { - switch (this.state.type) { - case types.name: - case types._void: - case types._null: - { - var type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value); - - if (type !== undefined && this.lookahead().type !== types.dot) { - var node = this.startNode(); - this.next(); - return this.finishNode(node, type); - } - - return this.tsParseTypeReference(); - } - - case types.string: - case types.num: - case types._true: - case types._false: - return this.tsParseLiteralTypeNode(); - - case types.plusMin: - if (this.state.value === "-") { - var _node = this.startNode(); - - this.next(); - - if (!this.match(types.num)) { - throw this.unexpected(); - } - - _node.literal = this.parseLiteral(-this.state.value, "NumericLiteral", _node.start, _node.loc.start); - return this.finishNode(_node, "TSLiteralType"); - } - - break; - - case types._this: - { - var thisKeyword = this.tsParseThisTypeNode(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - return this.tsParseThisTypePredicate(thisKeyword); - } else { - return thisKeyword; - } - } - - case types._typeof: - return this.tsParseTypeQuery(); - - case types.braceL: - return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); - - case types.bracketL: - return this.tsParseTupleType(); - - case types.parenL: - return this.tsParseParenthesizedType(); - } - - throw this.unexpected(); - }; - - _proto.tsParseArrayTypeOrHigher = function tsParseArrayTypeOrHigher() { - var type = this.tsParseNonArrayType(); - - while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) { - if (this.match(types.bracketR)) { - var node = this.startNodeAtNode(type); - node.elementType = type; - this.expect(types.bracketR); - type = this.finishNode(node, "TSArrayType"); - } else { - var _node2 = this.startNodeAtNode(type); - - _node2.objectType = type; - _node2.indexType = this.tsParseType(); - this.expect(types.bracketR); - type = this.finishNode(_node2, "TSIndexedAccessType"); - } - } - - return type; - }; - - _proto.tsParseTypeOperator = function tsParseTypeOperator(operator) { - var node = this.startNode(); - this.expectContextual(operator); - node.operator = operator; - node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); - return this.finishNode(node, "TSTypeOperator"); - }; - - _proto.tsParseInferType = function tsParseInferType() { - var node = this.startNode(); - this.expectContextual("infer"); - var typeParameter = this.startNode(); - typeParameter.name = this.parseIdentifierName(typeParameter.start); - node.typeParameter = this.finishNode(typeParameter, "TypeParameter"); - return this.finishNode(node, "TSInferType"); - }; - - _proto.tsParseTypeOperatorOrHigher = function tsParseTypeOperatorOrHigher() { - var _this3 = this; - - var operator = ["keyof", "unique"].find(function (kw) { - return _this3.isContextual(kw); - }); - return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); - }; - - _proto.tsParseUnionOrIntersectionType = function tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { - this.eat(operator); - var type = parseConstituentType(); - - if (this.match(operator)) { - var types$$1 = [type]; - - while (this.eat(operator)) { - types$$1.push(parseConstituentType()); - } - - var node = this.startNodeAtNode(type); - node.types = types$$1; - type = this.finishNode(node, kind); - } - - return type; - }; - - _proto.tsParseIntersectionTypeOrHigher = function tsParseIntersectionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND); - }; - - _proto.tsParseUnionTypeOrHigher = function tsParseUnionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR); - }; - - _proto.tsIsStartOfFunctionType = function tsIsStartOfFunctionType() { - if (this.isRelational("<")) { - return true; - } - - return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); - }; - - _proto.tsSkipParameterStart = function tsSkipParameterStart() { - if (this.match(types.name) || this.match(types._this)) { - this.next(); - return true; - } - - return false; - }; - - _proto.tsIsUnambiguouslyStartOfFunctionType = function tsIsUnambiguouslyStartOfFunctionType() { - this.next(); - - if (this.match(types.parenR) || this.match(types.ellipsis)) { - return true; - } - - if (this.tsSkipParameterStart()) { - if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) { - return true; - } - - if (this.match(types.parenR)) { - this.next(); - - if (this.match(types.arrow)) { - return true; - } - } - } - - return false; - }; - - _proto.tsParseTypeOrTypePredicateAnnotation = function tsParseTypeOrTypePredicateAnnotation(returnToken) { - var _this4 = this; - - return this.tsInType(function () { - var t = _this4.startNode(); - - _this4.expect(returnToken); - - var typePredicateVariable = _this4.tsIsIdentifier() && _this4.tsTryParse(_this4.tsParseTypePredicatePrefix.bind(_this4)); - - if (!typePredicateVariable) { - return _this4.tsParseTypeAnnotation(false, t); - } - - var type = _this4.tsParseTypeAnnotation(false); - - var node = _this4.startNodeAtNode(typePredicateVariable); - - node.parameterName = typePredicateVariable; - node.typeAnnotation = type; - t.typeAnnotation = _this4.finishNode(node, "TSTypePredicate"); - return _this4.finishNode(t, "TSTypeAnnotation"); - }); - }; - - _proto.tsTryParseTypeOrTypePredicateAnnotation = function tsTryParseTypeOrTypePredicateAnnotation() { - return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined; - }; - - _proto.tsTryParseTypeAnnotation = function tsTryParseTypeAnnotation() { - return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined; - }; - - _proto.tsTryParseType = function tsTryParseType() { - return this.tsEatThenParseType(types.colon); - }; - - _proto.tsParseTypePredicatePrefix = function tsParseTypePredicatePrefix() { - var id = this.parseIdentifier(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - this.next(); - return id; - } - }; - - _proto.tsParseTypeAnnotation = function tsParseTypeAnnotation(eatColon, t) { - var _this5 = this; - - if (eatColon === void 0) { - eatColon = true; - } - - if (t === void 0) { - t = this.startNode(); - } - - this.tsInType(function () { - if (eatColon) _this5.expect(types.colon); - t.typeAnnotation = _this5.tsParseType(); - }); - return this.finishNode(t, "TSTypeAnnotation"); - }; - - _proto.tsParseType = function tsParseType() { - assert(this.state.inType); - var type = this.tsParseNonConditionalType(); - - if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) { - return type; - } - - var node = this.startNodeAtNode(type); - node.checkType = type; - node.extendsType = this.tsParseNonConditionalType(); - this.expect(types.question); - node.trueType = this.tsParseType(); - this.expect(types.colon); - node.falseType = this.tsParseType(); - return this.finishNode(node, "TSConditionalType"); - }; - - _proto.tsParseNonConditionalType = function tsParseNonConditionalType() { - if (this.tsIsStartOfFunctionType()) { - return this.tsParseFunctionOrConstructorType("TSFunctionType"); - } - - if (this.match(types._new)) { - return this.tsParseFunctionOrConstructorType("TSConstructorType"); - } - - return this.tsParseUnionTypeOrHigher(); - }; - - _proto.tsParseTypeAssertion = function tsParseTypeAssertion() { - var _this6 = this; - - var node = this.startNode(); - node.typeAnnotation = this.tsInType(function () { - return _this6.tsParseType(); - }); - this.expectRelational(">"); - node.expression = this.parseMaybeUnary(); - return this.finishNode(node, "TSTypeAssertion"); - }; - - _proto.tsTryParseTypeArgumentsInExpression = function tsTryParseTypeArgumentsInExpression() { - var _this7 = this; - - return this.tsTryParseAndCatch(function () { - var res = _this7.tsParseTypeArguments(); - - _this7.expect(types.parenL); - - return res; - }); - }; - - _proto.tsParseHeritageClause = function tsParseHeritageClause() { - return this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); - }; - - _proto.tsParseExpressionWithTypeArguments = function tsParseExpressionWithTypeArguments() { - var node = this.startNode(); - node.expression = this.tsParseEntityName(false); - - if (this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSExpressionWithTypeArguments"); - }; - - _proto.tsParseInterfaceDeclaration = function tsParseInterfaceDeclaration(node) { - node.id = this.parseIdentifier(); - node.typeParameters = this.tsTryParseTypeParameters(); - - if (this.eat(types._extends)) { - node.extends = this.tsParseHeritageClause(); - } - - var body = this.startNode(); - body.body = this.tsParseObjectTypeMembers(); - node.body = this.finishNode(body, "TSInterfaceBody"); - return this.finishNode(node, "TSInterfaceDeclaration"); - }; - - _proto.tsParseTypeAliasDeclaration = function tsParseTypeAliasDeclaration(node) { - node.id = this.parseIdentifier(); - node.typeParameters = this.tsTryParseTypeParameters(); - node.typeAnnotation = this.tsExpectThenParseType(types.eq); - this.semicolon(); - return this.finishNode(node, "TSTypeAliasDeclaration"); - }; - - _proto.tsInType = function tsInType(cb) { - var oldInType = this.state.inType; - this.state.inType = true; - - try { - return cb(); - } finally { - this.state.inType = oldInType; - } - }; - - _proto.tsEatThenParseType = function tsEatThenParseType(token) { - return !this.match(token) ? undefined : this.tsNextThenParseType(); - }; - - _proto.tsExpectThenParseType = function tsExpectThenParseType(token) { - var _this8 = this; - - return this.tsDoThenParseType(function () { - return _this8.expect(token); - }); - }; - - _proto.tsNextThenParseType = function tsNextThenParseType() { - var _this9 = this; - - return this.tsDoThenParseType(function () { - return _this9.next(); - }); - }; - - _proto.tsDoThenParseType = function tsDoThenParseType(cb) { - var _this10 = this; - - return this.tsInType(function () { - cb(); - return _this10.tsParseType(); - }); - }; - - _proto.tsParseEnumMember = function tsParseEnumMember() { - var node = this.startNode(); - node.id = this.match(types.string) ? this.parseLiteral(this.state.value, "StringLiteral") : this.parseIdentifier(true); - - if (this.eat(types.eq)) { - node.initializer = this.parseMaybeAssign(); - } - - return this.finishNode(node, "TSEnumMember"); - }; - - _proto.tsParseEnumDeclaration = function tsParseEnumDeclaration(node, isConst) { - if (isConst) node.const = true; - node.id = this.parseIdentifier(); - this.expect(types.braceL); - node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); - this.expect(types.braceR); - return this.finishNode(node, "TSEnumDeclaration"); - }; - - _proto.tsParseModuleBlock = function tsParseModuleBlock() { - var node = this.startNode(); - this.expect(types.braceL); - this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR); - return this.finishNode(node, "TSModuleBlock"); - }; - - _proto.tsParseModuleOrNamespaceDeclaration = function tsParseModuleOrNamespaceDeclaration(node) { - node.id = this.parseIdentifier(); - - if (this.eat(types.dot)) { - var inner = this.startNode(); - this.tsParseModuleOrNamespaceDeclaration(inner); - node.body = inner; - } else { - node.body = this.tsParseModuleBlock(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - }; - - _proto.tsParseAmbientExternalModuleDeclaration = function tsParseAmbientExternalModuleDeclaration(node) { - if (this.isContextual("global")) { - node.global = true; - node.id = this.parseIdentifier(); - } else if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - this.unexpected(); - } - - if (this.match(types.braceL)) { - node.body = this.tsParseModuleBlock(); - } else { - this.semicolon(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - }; - - _proto.tsParseImportEqualsDeclaration = function tsParseImportEqualsDeclaration(node, isExport) { - node.isExport = isExport || false; - node.id = this.parseIdentifier(); - this.expect(types.eq); - node.moduleReference = this.tsParseModuleReference(); - this.semicolon(); - return this.finishNode(node, "TSImportEqualsDeclaration"); - }; - - _proto.tsIsExternalModuleReference = function tsIsExternalModuleReference() { - return this.isContextual("require") && this.lookahead().type === types.parenL; - }; - - _proto.tsParseModuleReference = function tsParseModuleReference() { - return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); - }; - - _proto.tsParseExternalModuleReference = function tsParseExternalModuleReference() { - var node = this.startNode(); - this.expectContextual("require"); - this.expect(types.parenL); - - if (!this.match(types.string)) { - throw this.unexpected(); - } - - node.expression = this.parseLiteral(this.state.value, "StringLiteral"); - this.expect(types.parenR); - return this.finishNode(node, "TSExternalModuleReference"); - }; - - _proto.tsLookAhead = function tsLookAhead(f) { - var state = this.state.clone(); - var res = f(); - this.state = state; - return res; - }; - - _proto.tsTryParseAndCatch = function tsTryParseAndCatch(f) { - var state = this.state.clone(); - - try { - return f(); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - return undefined; - } - - throw e; - } - }; - - _proto.tsTryParse = function tsTryParse(f) { - var state = this.state.clone(); - var result = f(); - - if (result !== undefined && result !== false) { - return result; - } else { - this.state = state; - return undefined; - } - }; - - _proto.nodeWithSamePosition = function nodeWithSamePosition(original, type) { - var node = this.startNodeAtNode(original); - node.type = type; - node.end = original.end; - node.loc.end = original.loc.end; - - if (original.leadingComments) { - node.leadingComments = original.leadingComments; - } - - if (original.trailingComments) { - node.trailingComments = original.trailingComments; - } - - if (original.innerComments) node.innerComments = original.innerComments; - return node; - }; - - _proto.tsTryParseDeclare = function tsTryParseDeclare(nany) { - switch (this.state.type) { - case types._function: - this.next(); - return this.parseFunction(nany, true); - - case types._class: - return this.parseClass(nany, true, false); - - case types._const: - if (this.match(types._const) && this.isLookaheadContextual("enum")) { - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(nany, true); - } - - case types._var: - case types._let: - return this.parseVarStatement(nany, this.state.type); - - case types.name: - { - var value = this.state.value; - - if (value === "global") { - return this.tsParseAmbientExternalModuleDeclaration(nany); - } else { - return this.tsParseDeclaration(nany, value, true); - } - } - } - }; - - _proto.tsTryParseExportDeclaration = function tsTryParseExportDeclaration() { - return this.tsParseDeclaration(this.startNode(), this.state.value, true); - }; - - _proto.tsParseExpressionStatement = function tsParseExpressionStatement(node, expr) { - switch (expr.name) { - case "declare": - { - var declaration = this.tsTryParseDeclare(node); - - if (declaration) { - declaration.declare = true; - return declaration; - } - - break; - } - - case "global": - if (this.match(types.braceL)) { - var mod = node; - mod.global = true; - mod.id = expr; - mod.body = this.tsParseModuleBlock(); - return this.finishNode(mod, "TSModuleDeclaration"); - } - - break; - - default: - return this.tsParseDeclaration(node, expr.name, false); - } - }; - - _proto.tsParseDeclaration = function tsParseDeclaration(node, value, next) { - switch (value) { - case "abstract": - if (next || this.match(types._class)) { - var cls = node; - cls.abstract = true; - if (next) this.next(); - return this.parseClass(cls, true, false); - } - - break; - - case "enum": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseEnumDeclaration(node, false); - } - - break; - - case "interface": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseInterfaceDeclaration(node); - } - - break; - - case "module": - if (next) this.next(); - - if (this.match(types.string)) { - return this.tsParseAmbientExternalModuleDeclaration(node); - } else if (next || this.match(types.name)) { - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "namespace": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "type": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseTypeAliasDeclaration(node); - } - - break; - } - }; - - _proto.tsTryParseGenericAsyncArrowFunction = function tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { - var _this11 = this; - - var res = this.tsTryParseAndCatch(function () { - var node = _this11.startNodeAt(startPos, startLoc); - - node.typeParameters = _this11.tsParseTypeParameters(); - - _superClass.prototype.parseFunctionParams.call(_this11, node); - - node.returnType = _this11.tsTryParseTypeOrTypePredicateAnnotation(); - - _this11.expect(types.arrow); - - return node; - }); - - if (!res) { - return undefined; - } - - res.id = null; - res.generator = false; - res.expression = true; - res.async = true; - this.parseFunctionBody(res, true); - return this.finishNode(res, "ArrowFunctionExpression"); - }; - - _proto.tsParseTypeArguments = function tsParseTypeArguments() { - var _this12 = this; - - var node = this.startNode(); - node.params = this.tsInType(function () { - _this12.expectRelational("<"); - - return _this12.tsParseDelimitedList("TypeParametersOrArguments", _this12.tsParseType.bind(_this12)); - }); - this.expectRelational(">"); - return this.finishNode(node, "TSTypeParameterInstantiation"); - }; - - _proto.tsIsDeclarationStart = function tsIsDeclarationStart() { - if (this.match(types.name)) { - switch (this.state.value) { - case "abstract": - case "declare": - case "enum": - case "interface": - case "module": - case "namespace": - case "type": - return true; - } - } - - return false; - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.tsIsDeclarationStart()) return false; - return _superClass.prototype.isExportDefaultSpecifier.call(this); - }; - - _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) { - var accessibility; - var readonly = false; - - if (allowModifiers) { - accessibility = this.parseAccessModifier(); - readonly = !!this.tsParseModifier(["readonly"]); - } - - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - var elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (accessibility || readonly) { - var pp = this.startNodeAtNode(elt); - - if (decorators.length) { - pp.decorators = decorators; - } - - if (accessibility) pp.accessibility = accessibility; - if (readonly) pp.readonly = readonly; - - if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { - throw this.raise(pp.start, "A parameter property may not be declared using a binding pattern."); - } - - pp.parameter = elt; - return this.finishNode(pp, "TSParameterProperty"); - } else { - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - } - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - if (!allowExpressionBody && this.match(types.colon)) { - node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - } - - var bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined; - - if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) { - this.finishNode(node, bodilessType); - return; - } - - _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody); - }; - - _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) { - if (!this.hasPrecedingLineBreak() && this.eat(types.bang)) { - var nonNullExpression = this.startNodeAt(startPos, startLoc); - nonNullExpression.expression = base; - return this.finishNode(nonNullExpression, "TSNonNullExpression"); - } - - if (!noCalls && this.isRelational("<")) { - if (this.atPossibleAsync(base)) { - var asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); - - if (asyncArrowFn) { - return asyncArrowFn; - } - } - - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - var typeArguments = this.tsTryParseTypeArgumentsInExpression(); - - if (typeArguments) { - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.typeParameters = typeArguments; - return this.finishCallExpression(node); - } - } - - return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state); - }; - - _proto.parseNewArguments = function parseNewArguments(node) { - var _this13 = this; - - if (this.isRelational("<")) { - var typeParameters = this.tsTryParseAndCatch(function () { - var args = _this13.tsParseTypeArguments(); - - if (!_this13.match(types.parenL)) _this13.unexpected(); - return args; - }); - - if (typeParameters) { - node.typeParameters = typeParameters; - } - } - - _superClass.prototype.parseNewArguments.call(this, node); - }; - - _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) { - var node = this.startNodeAt(leftStartPos, leftStartLoc); - node.expression = left; - node.typeAnnotation = this.tsNextThenParseType(); - this.finishNode(node, "TSAsExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - - return _superClass.prototype.parseExprOp.call(this, left, leftStartPos, leftStartLoc, minPrec, noIn); - }; - - _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {}; - - _proto.checkDuplicateExports = function checkDuplicateExports() {}; - - _proto.parseImport = function parseImport(node) { - if (this.match(types.name) && this.lookahead().type === types.eq) { - return this.tsParseImportEqualsDeclaration(node); - } - - return _superClass.prototype.parseImport.call(this, node); - }; - - _proto.parseExport = function parseExport(node) { - if (this.match(types._import)) { - this.expect(types._import); - return this.tsParseImportEqualsDeclaration(node, true); - } else if (this.eat(types.eq)) { - var assign = node; - assign.expression = this.parseExpression(); - this.semicolon(); - return this.finishNode(assign, "TSExportAssignment"); - } else if (this.eatContextual("as")) { - var decl = node; - this.expectContextual("namespace"); - decl.id = this.parseIdentifier(); - this.semicolon(); - return this.finishNode(decl, "TSNamespaceExportDeclaration"); - } else { - return _superClass.prototype.parseExport.call(this, node); - } - }; - - _proto.parseExportDefaultExpression = function parseExportDefaultExpression() { - if (this.isContextual("abstract") && this.lookahead().type === types._class) { - var cls = this.startNode(); - this.next(); - this.parseClass(cls, true, true); - cls.abstract = true; - return cls; - } - - return _superClass.prototype.parseExportDefaultExpression.call(this); - }; - - _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) { - if (this.state.type === types._const) { - var ahead = this.lookahead(); - - if (ahead.type === types.name && ahead.value === "enum") { - var node = this.startNode(); - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(node, true); - } - } - - return _superClass.prototype.parseStatementContent.call(this, declaration, topLevel); - }; - - _proto.parseAccessModifier = function parseAccessModifier() { - return this.tsParseModifier(["public", "protected", "private"]); - }; - - _proto.parseClassMember = function parseClassMember(classBody, member, state) { - var accessibility = this.parseAccessModifier(); - if (accessibility) member.accessibility = accessibility; - - _superClass.prototype.parseClassMember.call(this, classBody, member, state); - }; - - _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - var methodOrProp = member; - var prop = member; - var propOrIdx = member; - var abstract = false, - readonly = false; - var mod = this.tsParseModifier(["abstract", "readonly"]); - - switch (mod) { - case "readonly": - readonly = true; - abstract = !!this.tsParseModifier(["abstract"]); - break; - - case "abstract": - abstract = true; - readonly = !!this.tsParseModifier(["readonly"]); - break; - } - - if (abstract) methodOrProp.abstract = true; - if (readonly) propOrIdx.readonly = true; - - if (!abstract && !isStatic && !methodOrProp.accessibility) { - var idx = this.tsTryParseIndexSignature(member); - - if (idx) { - classBody.body.push(idx); - return; - } - } - - if (readonly) { - methodOrProp.static = isStatic; - this.parseClassPropertyName(prop); - this.parsePostMemberNameModifiers(methodOrProp); - this.pushClassProperty(classBody, prop); - return; - } - - _superClass.prototype.parseClassMemberWithIsStatic.call(this, classBody, member, state, isStatic); - }; - - _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) { - var optional = this.eat(types.question); - if (optional) methodOrProp.optional = true; - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - var decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined; - return decl || _superClass.prototype.parseExpressionStatement.call(this, node, expr); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - if (this.tsIsDeclarationStart()) return true; - return _superClass.prototype.shouldParseExportDeclaration.call(this); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (!refNeedsArrowPos || !this.match(types.question)) { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc, refNeedsArrowPos); - } - - var state = this.state.clone(); - - try { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - } - - if (this.match(types.colon)) { - var typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TSTypeCastExpression"); - } - - return node; - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - var isDeclare = this.eatContextual("declare"); - var declaration; - - if (this.match(types.name)) { - declaration = this.tsTryParseExportDeclaration(); - } - - if (!declaration) { - declaration = _superClass.prototype.parseExportDeclaration.call(this, node); - } - - if (declaration && isDeclare) { - declaration.declare = true; - } - - return declaration; - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - var _superClass$prototype; - - if ((!isStatement || optionalId) && this.isContextual("implements")) { - return; - } - - (_superClass$prototype = _superClass.prototype.parseClassId).call.apply(_superClass$prototype, [this].concat(Array.prototype.slice.call(arguments))); - - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (!node.optional && this.eat(types.bang)) { - node.definite = true; - } - - var type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - return _superClass.prototype.parseClassProperty.call(this, node); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - - _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - - _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync); - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - _superClass.prototype.parseClassSuper.call(this, node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.tsParseTypeArguments(); - } - - if (this.eatContextual("implements")) { - node.implements = this.tsParseHeritageClause(); - } - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop) { - var _superClass$prototype2; - - if (this.isRelational("<")) { - throw new Error("TODO"); - } - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - (_superClass$prototype2 = _superClass.prototype.parseObjPropValue).call.apply(_superClass$prototype2, [this, prop].concat(args)); - }; - - _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - - _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers); - }; - - _proto.parseVarHead = function parseVarHead(decl) { - _superClass.prototype.parseVarHead.call(this, decl); - - if (decl.id.type === "Identifier" && this.eat(types.bang)) { - decl.definite = true; - } - - var type = this.tsTryParseTypeAnnotation(); - - if (type) { - decl.id.typeAnnotation = type; - this.finishNode(decl.id, decl.id.type); - } - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - node.returnType = this.tsParseTypeAnnotation(); - } - - return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call); - }; - - _proto.parseMaybeAssign = function parseMaybeAssign() { - var jsxError; - - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - if (this.match(types.jsxTagStart)) { - var context = this.curContext(); - assert(context === types$1.j_oTag); - assert(this.state.context[this.state.context.length - 2] === types$1.j_expr); - - var _state = this.state.clone(); - - try { - var _superClass$prototype3; - - return (_superClass$prototype3 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype3, [this].concat(args)); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = _state; - assert(this.curContext() === types$1.j_oTag); - this.state.context.pop(); - assert(this.curContext() === types$1.j_expr); - this.state.context.pop(); - jsxError = err; - } - } - - if (jsxError === undefined && !this.isRelational("<")) { - var _superClass$prototype4; - - return (_superClass$prototype4 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype4, [this].concat(args)); - } - - var arrowExpression; - var typeParameters; - var state = this.state.clone(); - - try { - var _superClass$prototype5; - - typeParameters = this.tsParseTypeParameters(); - arrowExpression = (_superClass$prototype5 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype5, [this].concat(args)); - - if (arrowExpression.type !== "ArrowFunctionExpression") { - this.unexpected(); - } - } catch (err) { - var _superClass$prototype6; - - if (!(err instanceof SyntaxError)) { - throw err; - } - - if (jsxError) { - throw jsxError; - } - - assert(!this.hasPlugin("jsx")); - this.state = state; - return (_superClass$prototype6 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype6, [this].concat(args)); - } - - if (typeParameters && typeParameters.params.length !== 0) { - this.resetStartLocationFromNode(arrowExpression, typeParameters.params[0]); - } - - arrowExpression.typeParameters = typeParameters; - return arrowExpression; - }; - - _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) { - if (!this.hasPlugin("jsx") && this.eatRelational("<")) { - return this.tsParseTypeAssertion(); - } else { - return _superClass.prototype.parseMaybeUnary.call(this, refShorthandDefaultPos); - } - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.match(types.colon)) { - var state = this.state.clone(); - - try { - var returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(types.arrow)) this.unexpected(); - node.returnType = returnType; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return _superClass.prototype.parseArrow.call(this, node); - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - var type = this.tsTryParseTypeAnnotation(); - if (type) param.typeAnnotation = type; - return this.finishNode(param, param.type); - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - switch (node.type) { - case "TSTypeCastExpression": - return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription); - - case "TSParameterProperty": - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - - case "TSAsExpression": - node.expression = this.toAssignable(node.expression, isBinding, contextDescription); - return node; - - default: - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - switch (expr.type) { - case "TSTypeCastExpression": - return; - - case "TSParameterProperty": - this.checkLVal(expr.parameter, isBinding, checkClashes, "parameter property"); - return; - - case "TSAsExpression": - this.checkLVal(expr.expression, isBinding, checkClashes, contextDescription); - return; - - default: - _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - - return; - } - }; - - _proto.parseBindingAtom = function parseBindingAtom() { - switch (this.state.type) { - case types._this: - return this.parseIdentifier(true); - - default: - return _superClass.prototype.parseBindingAtom.call(this); - } - }; - - _proto.isClassMethod = function isClassMethod() { - return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.bang) || this.match(types.colon) || _superClass.prototype.isClassProperty.call(this); - }; - - _proto.parseMaybeDefault = function parseMaybeDefault() { - var _superClass$prototype7; - - for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - var node = (_superClass$prototype7 = _superClass.prototype.parseMaybeDefault).call.apply(_superClass$prototype7, [this].concat(args)); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - }; - - _proto.readToken = function readToken(code) { - if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else { - return _superClass.prototype.readToken.call(this, code); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr.type === "TSTypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - - return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription); - }; - - _proto.typeCastToParameter = function typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end); - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") { - this.raise(expr.start, "Did not expect a type annotation here."); - } - } - - return exprList; - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this); - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this); - }; - - return _class; - }(superClass); -}); - -plugins.estree = estreePlugin; -plugins.flow = flowPlugin; -plugins.jsx = jsxPlugin; -plugins.typescript = typescriptPlugin; -function parse(input, options) { - if (options && options.sourceType === "unambiguous") { - options = Object.assign({}, options); - - try { - options.sourceType = "module"; - var parser = getParser(options, input); - var ast = parser.parse(); - if (!parser.sawUnambiguousESM) ast.program.sourceType = "script"; - return ast; - } catch (moduleError) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (scriptError) {} - - throw moduleError; - } - } else { - return getParser(options, input).parse(); - } -} -function parseExpression(input, options) { - var parser = getParser(options, input); - - if (parser.options.strictMode) { - parser.state.strict = true; - } - - return parser.getExpression(); -} -function getParser(options, input) { - var cls = options && options.plugins ? getParserClass(options.plugins) : Parser; - return new cls(options, input); -} - -var parserClassCache = {}; - -function getParserClass(pluginsFromOptions) { - if (pluginsFromOptions.indexOf("decorators") >= 0 && pluginsFromOptions.indexOf("decorators2") >= 0) { - throw new Error("Cannot use decorators and decorators2 plugin together"); - } - - var pluginList = pluginsFromOptions.filter(function (p) { - return p === "estree" || p === "flow" || p === "jsx" || p === "typescript"; - }); - - if (pluginList.indexOf("flow") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "flow"; - }); - pluginList.push("flow"); - } - - if (pluginList.indexOf("flow") >= 0 && pluginList.indexOf("typescript") >= 0) { - throw new Error("Cannot combine flow and typescript plugins."); - } - - if (pluginList.indexOf("typescript") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "typescript"; - }); - pluginList.push("typescript"); - } - - if (pluginList.indexOf("estree") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "estree"; - }); - pluginList.unshift("estree"); - } - - var key = pluginList.join("/"); - var cls = parserClassCache[key]; - - if (!cls) { - cls = Parser; - - for (var _i2 = 0, _pluginList2 = pluginList; _i2 < _pluginList2.length; _i2++) { - var plugin = _pluginList2[_i2]; - cls = plugins[plugin](cls); - } - - parserClassCache[key] = cls; - } - - return cls; -} - -exports.parse = parse; -exports.parseExpression = parseExpression; -exports.tokTypes = types; diff --git a/node_modules/@babel/template/node_modules/babylon/package.json b/node_modules/@babel/template/node_modules/babylon/package.json deleted file mode 100644 index f57b38f..0000000 --- a/node_modules/@babel/template/node_modules/babylon/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "babylon@7.0.0-beta.46", - "_id": "babylon@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-WFJlg2WatdkXRFMpk7BN/Uzzkjkcjk+WaqnrSCpay+RYl4ypW9ZetZyT9kNt22IH/BQNst3M6PaaBn9IXsUNrg==", - "_location": "/@babel/template/babylon", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "babylon@7.0.0-beta.46", - "name": "babylon", - "escapedName": "babylon", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/template" - ], - "_resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.46.tgz", - "_shasum": "b6ddaba81bbb130313932757ff9c195d527088b6", - "_spec": "babylon@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/template", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bin": { - "babylon": "./bin/babylon.js" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A JavaScript parser", - "devDependencies": { - "@babel/helper-fixtures": "7.0.0-beta.46", - "charcodes": "0.1.0", - "unicode-10.0.0": "^0.7.4" - }, - "engines": { - "node": ">=6.0.0" - }, - "files": [ - "bin", - "lib" - ], - "homepage": "https://babeljs.io/", - "keywords": [ - "babel", - "javascript", - "parser", - "tc39", - "ecmascript", - "babylon" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "babylon", - "publishConfig": { - "tag": "next" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babylon" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/template/package.json b/node_modules/@babel/template/package.json deleted file mode 100644 index 58b0ca8..0000000 --- a/node_modules/@babel/template/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "_from": "@babel/template@7.0.0-beta.46", - "_id": "@babel/template@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-3/qi4m0l6G/vZbEwtqfzJk73mYtuE7nvAO1zT3/ZrTAHy4sHf2vaF9Eh1w+Tau263Yrkh0bjVQPb9zw6G+GeMQ==", - "_location": "/@babel/template", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/template@7.0.0-beta.46", - "name": "@babel/template", - "escapedName": "@babel%2ftemplate", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/helper-function-name", - "/@babel/helpers" - ], - "_resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.46.tgz", - "_shasum": "8b23982411d5b5dbfa479437bfe414adb1411bb9", - "_spec": "@babel/template@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/code-frame": "7.0.0-beta.46", - "@babel/types": "7.0.0-beta.46", - "babylon": "7.0.0-beta.46", - "lodash": "^4.2.0" - }, - "deprecated": false, - "description": "Generate an AST from a string template.", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/template", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-template" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/traverse/README.md b/node_modules/@babel/traverse/README.md deleted file mode 100644 index a25ffe7..0000000 --- a/node_modules/@babel/traverse/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# @babel/traverse - -> @babel/traverse maintains the overall tree state, and is responsible for replacing, removing, and adding nodes. - -## Install - -```sh -$ npm install --save @babel/traverse -``` - -## Usage - -We can use it alongside Babylon to traverse and update nodes: - -```js -import * as babylon from "babylon"; -import traverse from "@babel/traverse"; - -const code = `function square(n) { - return n * n; -}`; - -const ast = babylon.parse(code); - -traverse(ast, { - enter(path) { - if (path.isIdentifier({ name: "n" })) { - path.node.name = "x"; - } - } -}); -``` -[:book: **Read the full docs here**](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-traverse) diff --git a/node_modules/@babel/traverse/lib/context.js b/node_modules/@babel/traverse/lib/context.js deleted file mode 100644 index 5129e33..0000000 --- a/node_modules/@babel/traverse/lib/context.js +++ /dev/null @@ -1,192 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _path2 = _interopRequireDefault(require("./path")); - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var testing = process.env.NODE_ENV === "test"; - -var TraversalContext = function () { - function TraversalContext(scope, opts, state, parentPath) { - this.queue = null; - this.parentPath = parentPath; - this.scope = scope; - this.state = state; - this.opts = opts; - } - - var _proto = TraversalContext.prototype; - - _proto.shouldVisit = function shouldVisit(node) { - var opts = this.opts; - if (opts.enter || opts.exit) return true; - if (opts[node.type]) return true; - var keys = t().VISITOR_KEYS[node.type]; - if (!keys || !keys.length) return false; - - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var key = _ref; - if (node[key]) return true; - } - - return false; - }; - - _proto.create = function create(node, obj, key, listKey) { - return _path2.default.get({ - parentPath: this.parentPath, - parent: node, - container: obj, - key: key, - listKey: listKey - }); - }; - - _proto.maybeQueue = function maybeQueue(path, notPriority) { - if (this.trap) { - throw new Error("Infinite cycle detected"); - } - - if (this.queue) { - if (notPriority) { - this.queue.push(path); - } else { - this.priorityQueue.push(path); - } - } - }; - - _proto.visitMultiple = function visitMultiple(container, parent, listKey) { - if (container.length === 0) return false; - var queue = []; - - for (var key = 0; key < container.length; key++) { - var node = container[key]; - - if (node && this.shouldVisit(node)) { - queue.push(this.create(parent, container, key, listKey)); - } - } - - return this.visitQueue(queue); - }; - - _proto.visitSingle = function visitSingle(node, key) { - if (this.shouldVisit(node[key])) { - return this.visitQueue([this.create(node, node, key)]); - } else { - return false; - } - }; - - _proto.visitQueue = function visitQueue(queue) { - this.queue = queue; - this.priorityQueue = []; - var visited = []; - var stop = false; - - for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var path = _ref2; - path.resync(); - - if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { - path.pushContext(this); - } - - if (path.key === null) continue; - - if (testing && queue.length >= 10000) { - this.trap = true; - } - - if (visited.indexOf(path.node) >= 0) continue; - visited.push(path.node); - - if (path.visit()) { - stop = true; - break; - } - - if (this.priorityQueue.length) { - stop = this.visitQueue(this.priorityQueue); - this.priorityQueue = []; - this.queue = queue; - if (stop) break; - } - } - - for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var _path = _ref3; - - _path.popContext(); - } - - this.queue = null; - return stop; - }; - - _proto.visit = function visit(node, key) { - var nodes = node[key]; - if (!nodes) return false; - - if (Array.isArray(nodes)) { - return this.visitMultiple(nodes, node, key); - } else { - return this.visitSingle(node, key); - } - }; - - return TraversalContext; -}(); - -exports.default = TraversalContext; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/hub.js b/node_modules/@babel/traverse/lib/hub.js deleted file mode 100644 index dcd6d63..0000000 --- a/node_modules/@babel/traverse/lib/hub.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var Hub = function Hub(file) { - this.file = file; -}; - -exports.default = Hub; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/index.js b/node_modules/@babel/traverse/lib/index.js deleted file mode 100644 index 9333bdd..0000000 --- a/node_modules/@babel/traverse/lib/index.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverse; -Object.defineProperty(exports, "NodePath", { - enumerable: true, - get: function get() { - return _path.default; - } -}); -Object.defineProperty(exports, "Scope", { - enumerable: true, - get: function get() { - return _scope.default; - } -}); -Object.defineProperty(exports, "Hub", { - enumerable: true, - get: function get() { - return _hub.default; - } -}); -exports.visitors = void 0; - -var _context = _interopRequireDefault(require("./context")); - -var visitors = _interopRequireWildcard(require("./visitors")); - -exports.visitors = visitors; - -function _includes() { - var data = _interopRequireDefault(require("lodash/includes")); - - _includes = function _includes() { - return data; - }; - - return data; -} - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -var cache = _interopRequireWildcard(require("./cache")); - -var _path = _interopRequireDefault(require("./path")); - -var _scope = _interopRequireDefault(require("./scope")); - -var _hub = _interopRequireDefault(require("./hub")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function traverse(parent, opts, scope, state, parentPath) { - if (!parent) return; - if (!opts) opts = {}; - - if (!opts.noScope && !scope) { - if (parent.type !== "Program" && parent.type !== "File") { - throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + ("Instead of that you tried to traverse a " + parent.type + " node without ") + "passing scope and parentPath."); - } - } - - visitors.explode(opts); - traverse.node(parent, opts, scope, state, parentPath); -} - -traverse.visitors = visitors; -traverse.verify = visitors.verify; -traverse.explode = visitors.explode; - -traverse.cheap = function (node, enter) { - return t().traverseFast(node, enter); -}; - -traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { - var keys = t().VISITOR_KEYS[node.type]; - if (!keys) return; - var context = new _context.default(scope, opts, state, parentPath); - - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var key = _ref; - if (skipKeys && skipKeys[key]) continue; - if (context.visit(node, key)) return; - } -}; - -traverse.clearNode = function (node, opts) { - t().removeProperties(node, opts); - cache.path.delete(node); -}; - -traverse.removeProperties = function (tree, opts) { - t().traverseFast(tree, traverse.clearNode, opts); - return tree; -}; - -function hasBlacklistedType(path, state) { - if (path.node.type === state.type) { - state.has = true; - path.stop(); - } -} - -traverse.hasType = function (tree, type, blacklistTypes) { - if ((0, _includes().default)(blacklistTypes, tree.type)) return false; - if (tree.type === type) return true; - var state = { - has: false, - type: type - }; - traverse(tree, { - noScope: true, - blacklist: blacklistTypes, - enter: hasBlacklistedType - }, null, state); - return state.has; -}; - -traverse.cache = cache; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/ancestry.js b/node_modules/@babel/traverse/lib/path/ancestry.js deleted file mode 100644 index 5cee726..0000000 --- a/node_modules/@babel/traverse/lib/path/ancestry.js +++ /dev/null @@ -1,202 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.findParent = findParent; -exports.find = find; -exports.getFunctionParent = getFunctionParent; -exports.getStatementParent = getStatementParent; -exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom; -exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom; -exports.getAncestry = getAncestry; -exports.isAncestor = isAncestor; -exports.isDescendant = isDescendant; -exports.inType = inType; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -var _index = _interopRequireDefault(require("./index")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function findParent(callback) { - var path = this; - - while (path = path.parentPath) { - if (callback(path)) return path; - } - - return null; -} - -function find(callback) { - var path = this; - - do { - if (callback(path)) return path; - } while (path = path.parentPath); - - return null; -} - -function getFunctionParent() { - return this.findParent(function (p) { - return p.isFunction(); - }); -} - -function getStatementParent() { - var path = this; - - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { - break; - } else { - path = path.parentPath; - } - } while (path); - - if (path && (path.isProgram() || path.isFile())) { - throw new Error("File/Program node, we can't possibly find a statement parent to this"); - } - - return path; -} - -function getEarliestCommonAncestorFrom(paths) { - return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) { - var earliest; - var keys = t().VISITOR_KEYS[deepest.type]; - var _arr = ancestries; - - for (var _i = 0; _i < _arr.length; _i++) { - var ancestry = _arr[_i]; - var path = ancestry[i + 1]; - - if (!earliest) { - earliest = path; - continue; - } - - if (path.listKey && earliest.listKey === path.listKey) { - if (path.key < earliest.key) { - earliest = path; - continue; - } - } - - var earliestKeyIndex = keys.indexOf(earliest.parentKey); - var currentKeyIndex = keys.indexOf(path.parentKey); - - if (earliestKeyIndex > currentKeyIndex) { - earliest = path; - } - } - - return earliest; - }); -} - -function getDeepestCommonAncestorFrom(paths, filter) { - var _this = this; - - if (!paths.length) { - return this; - } - - if (paths.length === 1) { - return paths[0]; - } - - var minDepth = Infinity; - var lastCommonIndex, lastCommon; - var ancestries = paths.map(function (path) { - var ancestry = []; - - do { - ancestry.unshift(path); - } while ((path = path.parentPath) && path !== _this); - - if (ancestry.length < minDepth) { - minDepth = ancestry.length; - } - - return ancestry; - }); - var first = ancestries[0]; - - depthLoop: for (var i = 0; i < minDepth; i++) { - var shouldMatch = first[i]; - var _arr2 = ancestries; - - for (var _i2 = 0; _i2 < _arr2.length; _i2++) { - var ancestry = _arr2[_i2]; - - if (ancestry[i] !== shouldMatch) { - break depthLoop; - } - } - - lastCommonIndex = i; - lastCommon = shouldMatch; - } - - if (lastCommon) { - if (filter) { - return filter(lastCommon, lastCommonIndex, ancestries); - } else { - return lastCommon; - } - } else { - throw new Error("Couldn't find intersection"); - } -} - -function getAncestry() { - var path = this; - var paths = []; - - do { - paths.push(path); - } while (path = path.parentPath); - - return paths; -} - -function isAncestor(maybeDescendant) { - return maybeDescendant.isDescendant(this); -} - -function isDescendant(maybeAncestor) { - return !!this.findParent(function (parent) { - return parent === maybeAncestor; - }); -} - -function inType() { - var path = this; - - while (path) { - var _arr3 = arguments; - - for (var _i3 = 0; _i3 < _arr3.length; _i3++) { - var type = _arr3[_i3]; - if (path.node.type === type) return true; - } - - path = path.parentPath; - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/context.js b/node_modules/@babel/traverse/lib/path/context.js deleted file mode 100644 index 8de28a0..0000000 --- a/node_modules/@babel/traverse/lib/path/context.js +++ /dev/null @@ -1,273 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.call = call; -exports._call = _call; -exports.isBlacklisted = isBlacklisted; -exports.visit = visit; -exports.skip = skip; -exports.skipKey = skipKey; -exports.stop = stop; -exports.setScope = setScope; -exports.setContext = setContext; -exports.resync = resync; -exports._resyncParent = _resyncParent; -exports._resyncKey = _resyncKey; -exports._resyncList = _resyncList; -exports._resyncRemoved = _resyncRemoved; -exports.popContext = popContext; -exports.pushContext = pushContext; -exports.setup = setup; -exports.setKey = setKey; -exports.requeue = requeue; -exports._getQueueContexts = _getQueueContexts; - -var _index = _interopRequireDefault(require("../index")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function call(key) { - var opts = this.opts; - this.debug(key); - - if (this.node) { - if (this._call(opts[key])) return true; - } - - if (this.node) { - return this._call(opts[this.node.type] && opts[this.node.type][key]); - } - - return false; -} - -function _call(fns) { - if (!fns) return false; - - for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var fn = _ref; - if (!fn) continue; - var node = this.node; - if (!node) return true; - var ret = fn.call(this.state, this, this.state); - - if (ret && typeof ret === "object" && typeof ret.then === "function") { - throw new Error("You appear to be using a plugin with an async traversal visitor, " + "which your current version of Babel does not support." + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version."); - } - - if (ret) { - throw new Error("Unexpected return value from visitor method " + fn); - } - - if (this.node !== node) return true; - if (this.shouldStop || this.shouldSkip || this.removed) return true; - } - - return false; -} - -function isBlacklisted() { - var blacklist = this.opts.blacklist; - return blacklist && blacklist.indexOf(this.node.type) > -1; -} - -function visit() { - if (!this.node) { - return false; - } - - if (this.isBlacklisted()) { - return false; - } - - if (this.opts.shouldSkip && this.opts.shouldSkip(this)) { - return false; - } - - if (this.call("enter") || this.shouldSkip) { - this.debug("Skip..."); - return this.shouldStop; - } - - this.debug("Recursing into..."); - - _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); - - this.call("exit"); - return this.shouldStop; -} - -function skip() { - this.shouldSkip = true; -} - -function skipKey(key) { - this.skipKeys[key] = true; -} - -function stop() { - this.shouldStop = true; - this.shouldSkip = true; -} - -function setScope() { - if (this.opts && this.opts.noScope) return; - var path = this.parentPath; - var target; - - while (path && !target) { - if (path.opts && path.opts.noScope) return; - target = path.scope; - path = path.parentPath; - } - - this.scope = this.getScope(target); - if (this.scope) this.scope.init(); -} - -function setContext(context) { - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.skipKeys = {}; - - if (context) { - this.context = context; - this.state = context.state; - this.opts = context.opts; - } - - this.setScope(); - return this; -} - -function resync() { - if (this.removed) return; - - this._resyncParent(); - - this._resyncList(); - - this._resyncKey(); -} - -function _resyncParent() { - if (this.parentPath) { - this.parent = this.parentPath.node; - } -} - -function _resyncKey() { - if (!this.container) return; - if (this.node === this.container[this.key]) return; - - if (Array.isArray(this.container)) { - for (var i = 0; i < this.container.length; i++) { - if (this.container[i] === this.node) { - return this.setKey(i); - } - } - } else { - for (var key in this.container) { - if (this.container[key] === this.node) { - return this.setKey(key); - } - } - } - - this.key = null; -} - -function _resyncList() { - if (!this.parent || !this.inList) return; - var newContainer = this.parent[this.listKey]; - if (this.container === newContainer) return; - this.container = newContainer || null; -} - -function _resyncRemoved() { - if (this.key == null || !this.container || this.container[this.key] !== this.node) { - this._markRemoved(); - } -} - -function popContext() { - this.contexts.pop(); - - if (this.contexts.length > 0) { - this.setContext(this.contexts[this.contexts.length - 1]); - } else { - this.setContext(undefined); - } -} - -function pushContext(context) { - this.contexts.push(context); - this.setContext(context); -} - -function setup(parentPath, container, listKey, key) { - this.inList = !!listKey; - this.listKey = listKey; - this.parentKey = listKey || key; - this.container = container; - this.parentPath = parentPath || this.parentPath; - this.setKey(key); -} - -function setKey(key) { - this.key = key; - this.node = this.container[this.key]; - this.type = this.node && this.node.type; -} - -function requeue(pathToQueue) { - if (pathToQueue === void 0) { - pathToQueue = this; - } - - if (pathToQueue.removed) return; - var contexts = this.contexts; - - for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var context = _ref2; - context.maybeQueue(pathToQueue); - } -} - -function _getQueueContexts() { - var path = this; - var contexts = this.contexts; - - while (!contexts.length) { - path = path.parentPath; - if (!path) break; - contexts = path.contexts; - } - - return contexts; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/conversion.js b/node_modules/@babel/traverse/lib/path/conversion.js deleted file mode 100644 index 6168f58..0000000 --- a/node_modules/@babel/traverse/lib/path/conversion.js +++ /dev/null @@ -1,472 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.toComputedKey = toComputedKey; -exports.ensureBlock = ensureBlock; -exports.arrowFunctionToShadowed = arrowFunctionToShadowed; -exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment; -exports.arrowFunctionToExpression = arrowFunctionToExpression; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _helperFunctionName() { - var data = _interopRequireDefault(require("@babel/helper-function-name")); - - _helperFunctionName = function _helperFunctionName() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function toComputedKey() { - var node = this.node; - var key; - - if (this.isMemberExpression()) { - key = node.property; - } else if (this.isProperty() || this.isMethod()) { - key = node.key; - } else { - throw new ReferenceError("todo"); - } - - if (!node.computed) { - if (t().isIdentifier(key)) key = t().stringLiteral(key.name); - } - - return key; -} - -function ensureBlock() { - var body = this.get("body"); - var bodyNode = body.node; - - if (Array.isArray(body)) { - throw new Error("Can't convert array path to a block statement"); - } - - if (!bodyNode) { - throw new Error("Can't convert node without a body"); - } - - if (body.isBlockStatement()) { - return bodyNode; - } - - var statements = []; - var stringPath = "body"; - var key; - var listKey; - - if (body.isStatement()) { - listKey = "body"; - key = 0; - statements.push(body.node); - } else { - stringPath += ".body.0"; - - if (this.isFunction()) { - key = "argument"; - statements.push(t().returnStatement(body.node)); - } else { - key = "expression"; - statements.push(t().expressionStatement(body.node)); - } - } - - this.node.body = t().blockStatement(statements); - var parentPath = this.get(stringPath); - body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key); - return this.node; -} - -function arrowFunctionToShadowed() { - if (!this.isArrowFunctionExpression()) return; - this.arrowFunctionToExpression(); -} - -function unwrapFunctionEnvironment() { - if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) { - throw this.buildCodeFrameError("Can only unwrap the environment of a function."); - } - - hoistFunctionEnvironment(this); -} - -function arrowFunctionToExpression(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - _ref$allowInsertArrow = _ref.allowInsertArrow, - allowInsertArrow = _ref$allowInsertArrow === void 0 ? true : _ref$allowInsertArrow, - _ref$specCompliant = _ref.specCompliant, - specCompliant = _ref$specCompliant === void 0 ? false : _ref$specCompliant; - - if (!this.isArrowFunctionExpression()) { - throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression."); - } - - var thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow); - this.ensureBlock(); - this.node.type = "FunctionExpression"; - - if (specCompliant) { - var checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId"); - - if (checkBinding) { - this.parentPath.scope.push({ - id: checkBinding, - init: t().objectExpression([]) - }); - } - - this.get("body").unshiftContainer("body", t().expressionStatement(t().callExpression(this.hub.file.addHelper("newArrowCheck"), [t().thisExpression(), checkBinding ? t().identifier(checkBinding.name) : t().identifier(thisBinding)]))); - this.replaceWith(t().callExpression(t().memberExpression((0, _helperFunctionName().default)(this, true) || this.node, t().identifier("bind")), [checkBinding ? t().identifier(checkBinding.name) : t().thisExpression()])); - } -} - -function hoistFunctionEnvironment(fnPath, specCompliant, allowInsertArrow) { - if (specCompliant === void 0) { - specCompliant = false; - } - - if (allowInsertArrow === void 0) { - allowInsertArrow = true; - } - - var thisEnvFn = fnPath.findParent(function (p) { - return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({ - static: false - }); - }); - var inConstructor = thisEnvFn && thisEnvFn.node.kind === "constructor"; - - if (thisEnvFn.isClassProperty()) { - throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property"); - } - - var _getScopeInformation = getScopeInformation(fnPath), - thisPaths = _getScopeInformation.thisPaths, - argumentsPaths = _getScopeInformation.argumentsPaths, - newTargetPaths = _getScopeInformation.newTargetPaths, - superProps = _getScopeInformation.superProps, - superCalls = _getScopeInformation.superCalls; - - if (inConstructor && superCalls.length > 0) { - if (!allowInsertArrow) { - throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow"); - } - - var allSuperCalls = []; - thisEnvFn.traverse({ - Function: function Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - ClassProperty: function ClassProperty(child) { - if (child.node.static) return; - child.skip(); - }, - CallExpression: function CallExpression(child) { - if (!child.get("callee").isSuper()) return; - allSuperCalls.push(child); - } - }); - var superBinding = getSuperBinding(thisEnvFn); - allSuperCalls.forEach(function (superCall) { - var callee = t().identifier(superBinding); - callee.loc = superCall.node.callee.loc; - superCall.get("callee").replaceWith(callee); - }); - } - - var thisBinding; - - if (thisPaths.length > 0 || specCompliant) { - thisBinding = getThisBinding(thisEnvFn, inConstructor); - - if (!specCompliant || inConstructor && hasSuperClass(thisEnvFn)) { - thisPaths.forEach(function (thisChild) { - var thisRef = thisChild.isJSX() ? t().jsxIdentifier(thisBinding) : t().identifier(thisBinding); - thisRef.loc = thisChild.node.loc; - thisChild.replaceWith(thisRef); - }); - if (specCompliant) thisBinding = null; - } - } - - if (argumentsPaths.length > 0) { - var argumentsBinding = getBinding(thisEnvFn, "arguments", function () { - return t().identifier("arguments"); - }); - argumentsPaths.forEach(function (argumentsChild) { - var argsRef = t().identifier(argumentsBinding); - argsRef.loc = argumentsChild.node.loc; - argumentsChild.replaceWith(argsRef); - }); - } - - if (newTargetPaths.length > 0) { - var newTargetBinding = getBinding(thisEnvFn, "newtarget", function () { - return t().metaProperty(t().identifier("new"), t().identifier("target")); - }); - newTargetPaths.forEach(function (targetChild) { - var targetRef = t().identifier(newTargetBinding); - targetRef.loc = targetChild.node.loc; - targetChild.replaceWith(targetRef); - }); - } - - if (superProps.length > 0) { - if (!allowInsertArrow) { - throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage"); - } - - var flatSuperProps = superProps.reduce(function (acc, superProp) { - return acc.concat(standardizeSuperProperty(superProp)); - }, []); - flatSuperProps.forEach(function (superProp) { - var key = superProp.node.computed ? "" : superProp.get("property").node.name; - - if (superProp.parentPath.isCallExpression({ - callee: superProp.node - })) { - var _superBinding = getSuperPropCallBinding(thisEnvFn, key); - - if (superProp.node.computed) { - var prop = superProp.get("property").node; - superProp.replaceWith(t().identifier(_superBinding)); - superProp.parentPath.node.arguments.unshift(prop); - } else { - superProp.replaceWith(t().identifier(_superBinding)); - } - } else { - var isAssignment = superProp.parentPath.isAssignmentExpression({ - left: superProp.node - }); - - var _superBinding2 = getSuperPropBinding(thisEnvFn, isAssignment, key); - - var args = []; - - if (superProp.node.computed) { - args.push(superProp.get("property").node); - } - - if (isAssignment) { - var value = superProp.parentPath.node.right; - args.push(value); - superProp.parentPath.replaceWith(t().callExpression(t().identifier(_superBinding2), args)); - } else { - superProp.replaceWith(t().callExpression(t().identifier(_superBinding2), args)); - } - } - }); - } - - return thisBinding; -} - -function standardizeSuperProperty(superProp) { - if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") { - var assignmentPath = superProp.parentPath; - var op = assignmentPath.node.operator.slice(0, -1); - var value = assignmentPath.node.right; - assignmentPath.node.operator = "="; - - if (superProp.node.computed) { - var tmp = superProp.scope.generateDeclaredUidIdentifier("tmp"); - assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, t().assignmentExpression("=", tmp, superProp.node.property), true)); - assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(tmp.name), true), value)); - } else { - assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, superProp.node.property)); - assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(superProp.node.property.name)), value)); - } - - return [assignmentPath.get("left"), assignmentPath.get("right").get("left")]; - } else if (superProp.parentPath.isUpdateExpression()) { - var updateExpr = superProp.parentPath; - - var _tmp = superProp.scope.generateDeclaredUidIdentifier("tmp"); - - var computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null; - var parts = [t().assignmentExpression("=", _tmp, t().memberExpression(superProp.node.object, computedKey ? t().assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t().assignmentExpression("=", t().memberExpression(superProp.node.object, computedKey ? t().identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t().binaryExpression("+", t().identifier(_tmp.name), t().numericLiteral(1)))]; - - if (!superProp.parentPath.node.prefix) { - parts.push(t().identifier(_tmp.name)); - } - - updateExpr.replaceWith(t().sequenceExpression(parts)); - var left = updateExpr.get("expressions.0.right"); - var right = updateExpr.get("expressions.1.left"); - return [left, right]; - } - - return [superProp]; -} - -function hasSuperClass(thisEnvFn) { - return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass; -} - -function getThisBinding(thisEnvFn, inConstructor) { - return getBinding(thisEnvFn, "this", function (thisBinding) { - if (!inConstructor || !hasSuperClass(thisEnvFn)) return t().thisExpression(); - var supers = new WeakSet(); - thisEnvFn.traverse({ - Function: function Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - ClassProperty: function ClassProperty(child) { - if (child.node.static) return; - child.skip(); - }, - CallExpression: function CallExpression(child) { - if (!child.get("callee").isSuper()) return; - if (supers.has(child.node)) return; - supers.add(child.node); - child.replaceWith(t().assignmentExpression("=", t().identifier(thisBinding), child.node)); - } - }); - }); -} - -function getSuperBinding(thisEnvFn) { - return getBinding(thisEnvFn, "supercall", function () { - var argsBinding = thisEnvFn.scope.generateUidIdentifier("args"); - return t().arrowFunctionExpression([t().restElement(argsBinding)], t().callExpression(t().super(), [t().spreadElement(t().identifier(argsBinding.name))])); - }); -} - -function getSuperPropCallBinding(thisEnvFn, propName) { - return getBinding(thisEnvFn, "superprop_call:" + (propName || ""), function () { - var argsBinding = thisEnvFn.scope.generateUidIdentifier("args"); - var argsList = [t().restElement(argsBinding)]; - var fnBody; - - if (propName) { - fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(propName)), [t().spreadElement(t().identifier(argsBinding.name))]); - } else { - var method = thisEnvFn.scope.generateUidIdentifier("prop"); - argsList.unshift(method); - fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(method.name), true), [t().spreadElement(t().identifier(argsBinding.name))]); - } - - return t().arrowFunctionExpression(argsList, fnBody); - }); -} - -function getSuperPropBinding(thisEnvFn, isAssignment, propName) { - var op = isAssignment ? "set" : "get"; - return getBinding(thisEnvFn, "superprop_" + op + ":" + (propName || ""), function () { - var argsList = []; - var fnBody; - - if (propName) { - fnBody = t().memberExpression(t().super(), t().identifier(propName)); - } else { - var method = thisEnvFn.scope.generateUidIdentifier("prop"); - argsList.unshift(method); - fnBody = t().memberExpression(t().super(), t().identifier(method.name), true); - } - - if (isAssignment) { - var valueIdent = thisEnvFn.scope.generateUidIdentifier("value"); - argsList.push(valueIdent); - fnBody = t().assignmentExpression("=", fnBody, t().identifier(valueIdent.name)); - } - - return t().arrowFunctionExpression(argsList, fnBody); - }); -} - -function getBinding(thisEnvFn, key, init) { - var cacheKey = "binding:" + key; - var data = thisEnvFn.getData(cacheKey); - - if (!data) { - var id = thisEnvFn.scope.generateUidIdentifier(key); - data = id.name; - thisEnvFn.setData(cacheKey, data); - thisEnvFn.scope.push({ - id: id, - init: init(data) - }); - } - - return data; -} - -function getScopeInformation(fnPath) { - var thisPaths = []; - var argumentsPaths = []; - var newTargetPaths = []; - var superProps = []; - var superCalls = []; - fnPath.traverse({ - ClassProperty: function ClassProperty(child) { - if (child.node.static) return; - child.skip(); - }, - Function: function Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - ThisExpression: function ThisExpression(child) { - thisPaths.push(child); - }, - JSXIdentifier: function JSXIdentifier(child) { - if (child.node.name !== "this") return; - - if (!child.parentPath.isJSXMemberExpression({ - object: child.node - }) && !child.parentPath.isJSXOpeningElement({ - name: child.node - })) { - return; - } - - thisPaths.push(child); - }, - CallExpression: function CallExpression(child) { - if (child.get("callee").isSuper()) superCalls.push(child); - }, - MemberExpression: function MemberExpression(child) { - if (child.get("object").isSuper()) superProps.push(child); - }, - ReferencedIdentifier: function ReferencedIdentifier(child) { - if (child.node.name !== "arguments") return; - argumentsPaths.push(child); - }, - MetaProperty: function MetaProperty(child) { - if (!child.get("meta").isIdentifier({ - name: "new" - })) return; - if (!child.get("property").isIdentifier({ - name: "target" - })) return; - newTargetPaths.push(child); - } - }); - return { - thisPaths: thisPaths, - argumentsPaths: argumentsPaths, - newTargetPaths: newTargetPaths, - superProps: superProps, - superCalls: superCalls - }; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/evaluation.js b/node_modules/@babel/traverse/lib/path/evaluation.js deleted file mode 100644 index fb5ce8d..0000000 --- a/node_modules/@babel/traverse/lib/path/evaluation.js +++ /dev/null @@ -1,451 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.evaluateTruthy = evaluateTruthy; -exports.evaluate = evaluate; -var VALID_CALLEES = ["String", "Number", "Math"]; -var INVALID_METHODS = ["random"]; - -function evaluateTruthy() { - var res = this.evaluate(); - if (res.confident) return !!res.value; -} - -function deopt(path, state) { - if (!state.confident) return; - state.deoptPath = path; - state.confident = false; -} - -function evaluateCached(path, state) { - var node = path.node; - var seen = state.seen; - - if (seen.has(node)) { - var existing = seen.get(node); - - if (existing.resolved) { - return existing.value; - } else { - deopt(path, state); - return; - } - } else { - var item = { - resolved: false - }; - seen.set(node, item); - - var val = _evaluate(path, state); - - if (state.confident) { - item.resolved = true; - item.value = val; - } - - return val; - } -} - -function _evaluate(path, state) { - if (!state.confident) return; - var node = path.node; - - if (path.isSequenceExpression()) { - var exprs = path.get("expressions"); - return evaluateCached(exprs[exprs.length - 1], state); - } - - if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) { - return node.value; - } - - if (path.isNullLiteral()) { - return null; - } - - if (path.isTemplateLiteral()) { - return evaluateQuasis(path, node.quasis, state); - } - - if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) { - var object = path.get("tag.object"); - var name = object.node.name; - var property = path.get("tag.property"); - - if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name, true) && property.isIdentifier && property.node.name === "raw") { - return evaluateQuasis(path, node.quasi.quasis, state, true); - } - } - - if (path.isConditionalExpression()) { - var testResult = evaluateCached(path.get("test"), state); - if (!state.confident) return; - - if (testResult) { - return evaluateCached(path.get("consequent"), state); - } else { - return evaluateCached(path.get("alternate"), state); - } - } - - if (path.isExpressionWrapper()) { - return evaluateCached(path.get("expression"), state); - } - - if (path.isMemberExpression() && !path.parentPath.isCallExpression({ - callee: node - })) { - var _property = path.get("property"); - - var _object = path.get("object"); - - if (_object.isLiteral() && _property.isIdentifier()) { - var value = _object.node.value; - var type = typeof value; - - if (type === "number" || type === "string") { - return value[_property.node.name]; - } - } - } - - if (path.isReferencedIdentifier()) { - var binding = path.scope.getBinding(node.name); - - if (binding && binding.constantViolations.length > 0) { - return deopt(binding.path, state); - } - - if (binding && path.node.start < binding.path.node.end) { - return deopt(binding.path, state); - } - - if (binding && binding.hasValue) { - return binding.value; - } else { - if (node.name === "undefined") { - return binding ? deopt(binding.path, state) : undefined; - } else if (node.name === "Infinity") { - return binding ? deopt(binding.path, state) : Infinity; - } else if (node.name === "NaN") { - return binding ? deopt(binding.path, state) : NaN; - } - - var resolved = path.resolve(); - - if (resolved === path) { - return deopt(path, state); - } else { - return evaluateCached(resolved, state); - } - } - } - - if (path.isUnaryExpression({ - prefix: true - })) { - if (node.operator === "void") { - return undefined; - } - - var argument = path.get("argument"); - - if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) { - return "function"; - } - - var arg = evaluateCached(argument, state); - if (!state.confident) return; - - switch (node.operator) { - case "!": - return !arg; - - case "+": - return +arg; - - case "-": - return -arg; - - case "~": - return ~arg; - - case "typeof": - return typeof arg; - } - } - - if (path.isArrayExpression()) { - var arr = []; - var elems = path.get("elements"); - - for (var _iterator = elems, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var elem = _ref; - var elemValue = elem.evaluate(); - - if (elemValue.confident) { - arr.push(elemValue.value); - } else { - return deopt(elem, state); - } - } - - return arr; - } - - if (path.isObjectExpression()) { - var obj = {}; - var props = path.get("properties"); - - for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var prop = _ref2; - - if (prop.isObjectMethod() || prop.isSpreadElement()) { - return deopt(prop, state); - } - - var keyPath = prop.get("key"); - var key = keyPath; - - if (prop.node.computed) { - key = key.evaluate(); - - if (!key.confident) { - return deopt(keyPath, state); - } - - key = key.value; - } else if (key.isIdentifier()) { - key = key.node.name; - } else { - key = key.node.value; - } - - var valuePath = prop.get("value"); - - var _value = valuePath.evaluate(); - - if (!_value.confident) { - return deopt(valuePath, state); - } - - _value = _value.value; - obj[key] = _value; - } - - return obj; - } - - if (path.isLogicalExpression()) { - var wasConfident = state.confident; - var left = evaluateCached(path.get("left"), state); - var leftConfident = state.confident; - state.confident = wasConfident; - var right = evaluateCached(path.get("right"), state); - var rightConfident = state.confident; - state.confident = leftConfident && rightConfident; - - switch (node.operator) { - case "||": - if (left && leftConfident) { - state.confident = true; - return left; - } - - if (!state.confident) return; - return left || right; - - case "&&": - if (!left && leftConfident || !right && rightConfident) { - state.confident = true; - } - - if (!state.confident) return; - return left && right; - } - } - - if (path.isBinaryExpression()) { - var _left = evaluateCached(path.get("left"), state); - - if (!state.confident) return; - - var _right = evaluateCached(path.get("right"), state); - - if (!state.confident) return; - - switch (node.operator) { - case "-": - return _left - _right; - - case "+": - return _left + _right; - - case "/": - return _left / _right; - - case "*": - return _left * _right; - - case "%": - return _left % _right; - - case "**": - return Math.pow(_left, _right); - - case "<": - return _left < _right; - - case ">": - return _left > _right; - - case "<=": - return _left <= _right; - - case ">=": - return _left >= _right; - - case "==": - return _left == _right; - - case "!=": - return _left != _right; - - case "===": - return _left === _right; - - case "!==": - return _left !== _right; - - case "|": - return _left | _right; - - case "&": - return _left & _right; - - case "^": - return _left ^ _right; - - case "<<": - return _left << _right; - - case ">>": - return _left >> _right; - - case ">>>": - return _left >>> _right; - } - } - - if (path.isCallExpression()) { - var callee = path.get("callee"); - var context; - var func; - - if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) { - func = global[node.callee.name]; - } - - if (callee.isMemberExpression()) { - var _object2 = callee.get("object"); - - var _property2 = callee.get("property"); - - if (_object2.isIdentifier() && _property2.isIdentifier() && VALID_CALLEES.indexOf(_object2.node.name) >= 0 && INVALID_METHODS.indexOf(_property2.node.name) < 0) { - context = global[_object2.node.name]; - func = context[_property2.node.name]; - } - - if (_object2.isLiteral() && _property2.isIdentifier()) { - var _type = typeof _object2.node.value; - - if (_type === "string" || _type === "number") { - context = _object2.node.value; - func = context[_property2.node.name]; - } - } - } - - if (func) { - var args = path.get("arguments").map(function (arg) { - return evaluateCached(arg, state); - }); - if (!state.confident) return; - return func.apply(context, args); - } - } - - deopt(path, state); -} - -function evaluateQuasis(path, quasis, state, raw) { - if (raw === void 0) { - raw = false; - } - - var str = ""; - var i = 0; - var exprs = path.get("expressions"); - - for (var _iterator3 = quasis, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref3; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref3 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref3 = _i3.value; - } - - var elem = _ref3; - if (!state.confident) break; - str += raw ? elem.value.raw : elem.value.cooked; - var expr = exprs[i++]; - if (expr) str += String(evaluateCached(expr, state)); - } - - if (!state.confident) return; - return str; -} - -function evaluate() { - var state = { - confident: true, - deoptPath: null, - seen: new Map() - }; - var value = evaluateCached(this, state); - if (!state.confident) value = undefined; - return { - confident: state.confident, - deopt: state.deoptPath, - value: value - }; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/index.js b/node_modules/@babel/traverse/lib/path/index.js deleted file mode 100644 index 2c59903..0000000 --- a/node_modules/@babel/traverse/lib/path/index.js +++ /dev/null @@ -1,246 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var virtualTypes = _interopRequireWildcard(require("./lib/virtual-types")); - -function _debug2() { - var data = _interopRequireDefault(require("debug")); - - _debug2 = function _debug2() { - return data; - }; - - return data; -} - -function _invariant() { - var data = _interopRequireDefault(require("invariant")); - - _invariant = function _invariant() { - return data; - }; - - return data; -} - -var _index = _interopRequireDefault(require("../index")); - -var _scope = _interopRequireDefault(require("../scope")); - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -var _cache = require("../cache"); - -function _generator() { - var data = _interopRequireDefault(require("@babel/generator")); - - _generator = function _generator() { - return data; - }; - - return data; -} - -var NodePath_ancestry = _interopRequireWildcard(require("./ancestry")); - -var NodePath_inference = _interopRequireWildcard(require("./inference")); - -var NodePath_replacement = _interopRequireWildcard(require("./replacement")); - -var NodePath_evaluation = _interopRequireWildcard(require("./evaluation")); - -var NodePath_conversion = _interopRequireWildcard(require("./conversion")); - -var NodePath_introspection = _interopRequireWildcard(require("./introspection")); - -var NodePath_context = _interopRequireWildcard(require("./context")); - -var NodePath_removal = _interopRequireWildcard(require("./removal")); - -var NodePath_modification = _interopRequireWildcard(require("./modification")); - -var NodePath_family = _interopRequireWildcard(require("./family")); - -var NodePath_comments = _interopRequireWildcard(require("./comments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -var _debug = (0, _debug2().default)("babel"); - -var NodePath = function () { - function NodePath(hub, parent) { - this.parent = parent; - this.hub = hub; - this.contexts = []; - this.data = {}; - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.state = null; - this.opts = null; - this.skipKeys = null; - this.parentPath = null; - this.context = null; - this.container = null; - this.listKey = null; - this.inList = false; - this.parentKey = null; - this.key = null; - this.node = null; - this.scope = null; - this.type = null; - this.typeAnnotation = null; - } - - NodePath.get = function get(_ref) { - var hub = _ref.hub, - parentPath = _ref.parentPath, - parent = _ref.parent, - container = _ref.container, - listKey = _ref.listKey, - key = _ref.key; - - if (!hub && parentPath) { - hub = parentPath.hub; - } - - (0, _invariant().default)(parent, "To get a node path the parent needs to exist"); - var targetNode = container[key]; - var paths = _cache.path.get(parent) || []; - - if (!_cache.path.has(parent)) { - _cache.path.set(parent, paths); - } - - var path; - - for (var i = 0; i < paths.length; i++) { - var pathCheck = paths[i]; - - if (pathCheck.node === targetNode) { - path = pathCheck; - break; - } - } - - if (!path) { - path = new NodePath(hub, parent); - paths.push(path); - } - - path.setup(parentPath, container, listKey, key); - return path; - }; - - var _proto = NodePath.prototype; - - _proto.getScope = function getScope(scope) { - return this.isScope() ? new _scope.default(this) : scope; - }; - - _proto.setData = function setData(key, val) { - return this.data[key] = val; - }; - - _proto.getData = function getData(key, def) { - var val = this.data[key]; - if (!val && def) val = this.data[key] = def; - return val; - }; - - _proto.buildCodeFrameError = function buildCodeFrameError(msg, Error) { - if (Error === void 0) { - Error = SyntaxError; - } - - return this.hub.file.buildCodeFrameError(this.node, msg, Error); - }; - - _proto.traverse = function traverse(visitor, state) { - (0, _index.default)(this.node, visitor, this.scope, state, this); - }; - - _proto.set = function set(key, node) { - t().validate(this.node, key, node); - this.node[key] = node; - }; - - _proto.getPathLocation = function getPathLocation() { - var parts = []; - var path = this; - - do { - var key = path.key; - if (path.inList) key = path.listKey + "[" + key + "]"; - parts.unshift(key); - } while (path = path.parentPath); - - return parts.join("."); - }; - - _proto.debug = function debug(message) { - if (!_debug.enabled) return; - - _debug(this.getPathLocation() + " " + this.type + ": " + message); - }; - - _proto.toString = function toString() { - return (0, _generator().default)(this.node).code; - }; - - return NodePath; -}(); - -exports.default = NodePath; -Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments); -var _arr = t().TYPES; - -var _loop2 = function _loop2() { - var type = _arr[_i]; - var typeKey = "is" + type; - var fn = t()[typeKey]; - - NodePath.prototype[typeKey] = function (opts) { - return fn(this.node, opts); - }; - - NodePath.prototype["assert" + type] = function (opts) { - if (!fn(this.node, opts)) { - throw new TypeError("Expected node path of type " + type); - } - }; -}; - -for (var _i = 0; _i < _arr.length; _i++) { - _loop2(); -} - -var _loop = function _loop(type) { - if (type[0] === "_") return "continue"; - if (t().TYPES.indexOf(type) < 0) t().TYPES.push(type); - var virtualType = virtualTypes[type]; - - NodePath.prototype["is" + type] = function (opts) { - return virtualType.checkPath(this, opts); - }; -}; - -for (var type in virtualTypes) { - var _ret = _loop(type); - - if (_ret === "continue") continue; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/inference/index.js b/node_modules/@babel/traverse/lib/path/inference/index.js deleted file mode 100644 index 80c8d0d..0000000 --- a/node_modules/@babel/traverse/lib/path/inference/index.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getTypeAnnotation = getTypeAnnotation; -exports._getTypeAnnotation = _getTypeAnnotation; -exports.isBaseType = isBaseType; -exports.couldBeBaseType = couldBeBaseType; -exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; -exports.isGenericType = isGenericType; - -var inferers = _interopRequireWildcard(require("./inferers")); - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function getTypeAnnotation() { - if (this.typeAnnotation) return this.typeAnnotation; - var type = this._getTypeAnnotation() || t().anyTypeAnnotation(); - if (t().isTypeAnnotation(type)) type = type.typeAnnotation; - return this.typeAnnotation = type; -} - -function _getTypeAnnotation() { - var node = this.node; - - if (!node) { - if (this.key === "init" && this.parentPath.isVariableDeclarator()) { - var declar = this.parentPath.parentPath; - var declarParent = declar.parentPath; - - if (declar.key === "left" && declarParent.isForInStatement()) { - return t().stringTypeAnnotation(); - } - - if (declar.key === "left" && declarParent.isForOfStatement()) { - return t().anyTypeAnnotation(); - } - - return t().voidTypeAnnotation(); - } else { - return; - } - } - - if (node.typeAnnotation) { - return node.typeAnnotation; - } - - var inferer = inferers[node.type]; - - if (inferer) { - return inferer.call(this, node); - } - - inferer = inferers[this.parentPath.type]; - - if (inferer && inferer.validParent) { - return this.parentPath.getTypeAnnotation(); - } -} - -function isBaseType(baseName, soft) { - return _isBaseType(baseName, this.getTypeAnnotation(), soft); -} - -function _isBaseType(baseName, type, soft) { - if (baseName === "string") { - return t().isStringTypeAnnotation(type); - } else if (baseName === "number") { - return t().isNumberTypeAnnotation(type); - } else if (baseName === "boolean") { - return t().isBooleanTypeAnnotation(type); - } else if (baseName === "any") { - return t().isAnyTypeAnnotation(type); - } else if (baseName === "mixed") { - return t().isMixedTypeAnnotation(type); - } else if (baseName === "empty") { - return t().isEmptyTypeAnnotation(type); - } else if (baseName === "void") { - return t().isVoidTypeAnnotation(type); - } else { - if (soft) { - return false; - } else { - throw new Error("Unknown base type " + baseName); - } - } -} - -function couldBeBaseType(name) { - var type = this.getTypeAnnotation(); - if (t().isAnyTypeAnnotation(type)) return true; - - if (t().isUnionTypeAnnotation(type)) { - var _arr = type.types; - - for (var _i = 0; _i < _arr.length; _i++) { - var type2 = _arr[_i]; - - if (t().isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { - return true; - } - } - - return false; - } else { - return _isBaseType(name, type, true); - } -} - -function baseTypeStrictlyMatches(right) { - var left = this.getTypeAnnotation(); - right = right.getTypeAnnotation(); - - if (!t().isAnyTypeAnnotation(left) && t().isFlowBaseAnnotation(left)) { - return right.type === left.type; - } -} - -function isGenericType(genericName) { - var type = this.getTypeAnnotation(); - return t().isGenericTypeAnnotation(type) && t().isIdentifier(type.id, { - name: genericName - }); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js b/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js deleted file mode 100644 index c9b6e95..0000000 --- a/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +++ /dev/null @@ -1,185 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _default(node) { - if (!this.isReferenced()) return; - var binding = this.scope.getBinding(node.name); - - if (binding) { - if (binding.identifier.typeAnnotation) { - return binding.identifier.typeAnnotation; - } else { - return getTypeAnnotationBindingConstantViolations(binding, this, node.name); - } - } - - if (node.name === "undefined") { - return t().voidTypeAnnotation(); - } else if (node.name === "NaN" || node.name === "Infinity") { - return t().numberTypeAnnotation(); - } else if (node.name === "arguments") {} -} - -function getTypeAnnotationBindingConstantViolations(binding, path, name) { - var types = []; - var functionConstantViolations = []; - var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); - var testType = getConditionalAnnotation(binding, path, name); - - if (testType) { - var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); - constantViolations = constantViolations.filter(function (path) { - return testConstantViolations.indexOf(path) < 0; - }); - types.push(testType.typeAnnotation); - } - - if (constantViolations.length) { - constantViolations = constantViolations.concat(functionConstantViolations); - var _arr = constantViolations; - - for (var _i = 0; _i < _arr.length; _i++) { - var violation = _arr[_i]; - types.push(violation.getTypeAnnotation()); - } - } - - if (types.length) { - return t().createUnionTypeAnnotation(types); - } -} - -function getConstantViolationsBefore(binding, path, functions) { - var violations = binding.constantViolations.slice(); - violations.unshift(binding.path); - return violations.filter(function (violation) { - violation = violation.resolve(); - - var status = violation._guessExecutionStatusRelativeTo(path); - - if (functions && status === "function") functions.push(violation); - return status === "before"; - }); -} - -function inferAnnotationFromBinaryExpression(name, path) { - var operator = path.node.operator; - var right = path.get("right").resolve(); - var left = path.get("left").resolve(); - var target; - - if (left.isIdentifier({ - name: name - })) { - target = right; - } else if (right.isIdentifier({ - name: name - })) { - target = left; - } - - if (target) { - if (operator === "===") { - return target.getTypeAnnotation(); - } - - if (t().BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t().numberTypeAnnotation(); - } - - return; - } - - if (operator !== "===" && operator !== "==") return; - var typeofPath; - var typePath; - - if (left.isUnaryExpression({ - operator: "typeof" - })) { - typeofPath = left; - typePath = right; - } else if (right.isUnaryExpression({ - operator: "typeof" - })) { - typeofPath = right; - typePath = left; - } - - if (!typeofPath) return; - if (!typeofPath.get("argument").isIdentifier({ - name: name - })) return; - typePath = typePath.resolve(); - if (!typePath.isLiteral()) return; - var typeValue = typePath.node.value; - if (typeof typeValue !== "string") return; - return t().createTypeAnnotationBasedOnTypeof(typeValue); -} - -function getParentConditionalPath(binding, path, name) { - var parentPath; - - while (parentPath = path.parentPath) { - if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { - if (path.key === "test") { - return; - } - - return parentPath; - } - - if (parentPath.isFunction()) { - if (parentPath.parentPath.scope.getBinding(name) !== binding) return; - } - - path = parentPath; - } -} - -function getConditionalAnnotation(binding, path, name) { - var ifStatement = getParentConditionalPath(binding, path, name); - if (!ifStatement) return; - var test = ifStatement.get("test"); - var paths = [test]; - var types = []; - - for (var i = 0; i < paths.length; i++) { - var _path = paths[i]; - - if (_path.isLogicalExpression()) { - if (_path.node.operator === "&&") { - paths.push(_path.get("left")); - paths.push(_path.get("right")); - } - } else if (_path.isBinaryExpression()) { - var type = inferAnnotationFromBinaryExpression(name, _path); - if (type) types.push(type); - } - } - - if (types.length) { - return { - typeAnnotation: t().createUnionTypeAnnotation(types), - ifStatement: ifStatement - }; - } - - return getConditionalAnnotation(ifStatement, name); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/introspection.js b/node_modules/@babel/traverse/lib/path/introspection.js deleted file mode 100644 index 8e268bb..0000000 --- a/node_modules/@babel/traverse/lib/path/introspection.js +++ /dev/null @@ -1,418 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.matchesPattern = matchesPattern; -exports.has = has; -exports.isStatic = isStatic; -exports.isnt = isnt; -exports.equals = equals; -exports.isNodeType = isNodeType; -exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression; -exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement; -exports.isCompletionRecord = isCompletionRecord; -exports.isStatementOrBlock = isStatementOrBlock; -exports.referencesImport = referencesImport; -exports.getSource = getSource; -exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore; -exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo; -exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions; -exports.resolve = resolve; -exports._resolve = _resolve; -exports.isConstantExpression = isConstantExpression; -exports.isInStrictMode = isInStrictMode; -exports.is = void 0; - -function _includes() { - var data = _interopRequireDefault(require("lodash/includes")); - - _includes = function _includes() { - return data; - }; - - return data; -} - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function matchesPattern(pattern, allowPartial) { - return t().matchesPattern(this.node, pattern, allowPartial); -} - -function has(key) { - var val = this.node && this.node[key]; - - if (val && Array.isArray(val)) { - return !!val.length; - } else { - return !!val; - } -} - -function isStatic() { - return this.scope.isStatic(this.node); -} - -var is = has; -exports.is = is; - -function isnt(key) { - return !this.has(key); -} - -function equals(key, value) { - return this.node[key] === value; -} - -function isNodeType(type) { - return t().isType(this.type, type); -} - -function canHaveVariableDeclarationOrExpression() { - return (this.key === "init" || this.key === "left") && this.parentPath.isFor(); -} - -function canSwapBetweenExpressionAndStatement(replacement) { - if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) { - return false; - } - - if (this.isExpression()) { - return t().isBlockStatement(replacement); - } else if (this.isBlockStatement()) { - return t().isExpression(replacement); - } - - return false; -} - -function isCompletionRecord(allowInsideFunction) { - var path = this; - var first = true; - - do { - var container = path.container; - - if (path.isFunction() && !first) { - return !!allowInsideFunction; - } - - first = false; - - if (Array.isArray(container) && path.key !== container.length - 1) { - return false; - } - } while ((path = path.parentPath) && !path.isProgram()); - - return true; -} - -function isStatementOrBlock() { - if (this.parentPath.isLabeledStatement() || t().isBlockStatement(this.container)) { - return false; - } else { - return (0, _includes().default)(t().STATEMENT_OR_BLOCK_KEYS, this.key); - } -} - -function referencesImport(moduleSource, importName) { - if (!this.isReferencedIdentifier()) return false; - var binding = this.scope.getBinding(this.node.name); - if (!binding || binding.kind !== "module") return false; - var path = binding.path; - var parent = path.parentPath; - if (!parent.isImportDeclaration()) return false; - - if (parent.node.source.value === moduleSource) { - if (!importName) return true; - } else { - return false; - } - - if (path.isImportDefaultSpecifier() && importName === "default") { - return true; - } - - if (path.isImportNamespaceSpecifier() && importName === "*") { - return true; - } - - if (path.isImportSpecifier() && path.node.imported.name === importName) { - return true; - } - - return false; -} - -function getSource() { - var node = this.node; - - if (node.end) { - return this.hub.file.code.slice(node.start, node.end); - } else { - return ""; - } -} - -function willIMaybeExecuteBefore(target) { - return this._guessExecutionStatusRelativeTo(target) !== "after"; -} - -function _guessExecutionStatusRelativeTo(target) { - var targetFuncParent = target.scope.getFunctionParent() || target.scope.getProgramParent(); - var selfFuncParent = this.scope.getFunctionParent() || target.scope.getProgramParent(); - - if (targetFuncParent.node !== selfFuncParent.node) { - var status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent); - - if (status) { - return status; - } else { - target = targetFuncParent.path; - } - } - - var targetPaths = target.getAncestry(); - if (targetPaths.indexOf(this) >= 0) return "after"; - var selfPaths = this.getAncestry(); - var commonPath; - var targetIndex; - var selfIndex; - - for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) { - var selfPath = selfPaths[selfIndex]; - targetIndex = targetPaths.indexOf(selfPath); - - if (targetIndex >= 0) { - commonPath = selfPath; - break; - } - } - - if (!commonPath) { - return "before"; - } - - var targetRelationship = targetPaths[targetIndex - 1]; - var selfRelationship = selfPaths[selfIndex - 1]; - - if (!targetRelationship || !selfRelationship) { - return "before"; - } - - if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) { - return targetRelationship.key > selfRelationship.key ? "before" : "after"; - } - - var keys = t().VISITOR_KEYS[commonPath.type]; - var targetKeyPosition = keys.indexOf(targetRelationship.key); - var selfKeyPosition = keys.indexOf(selfRelationship.key); - return targetKeyPosition > selfKeyPosition ? "before" : "after"; -} - -function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) { - var targetFuncPath = targetFuncParent.path; - if (!targetFuncPath.isFunctionDeclaration()) return; - var binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name); - if (!binding.references) return "before"; - var referencePaths = binding.referencePaths; - - for (var _iterator = referencePaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var path = _ref; - - if (path.key !== "callee" || !path.parentPath.isCallExpression()) { - return; - } - } - - var allStatus; - - for (var _iterator2 = referencePaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _path = _ref2; - var childOfFunction = !!_path.find(function (path) { - return path.node === targetFuncPath.node; - }); - if (childOfFunction) continue; - - var status = this._guessExecutionStatusRelativeTo(_path); - - if (allStatus) { - if (allStatus !== status) return; - } else { - allStatus = status; - } - } - - return allStatus; -} - -function resolve(dangerous, resolved) { - return this._resolve(dangerous, resolved) || this; -} - -function _resolve(dangerous, resolved) { - if (resolved && resolved.indexOf(this) >= 0) return; - resolved = resolved || []; - resolved.push(this); - - if (this.isVariableDeclarator()) { - if (this.get("id").isIdentifier()) { - return this.get("init").resolve(dangerous, resolved); - } else {} - } else if (this.isReferencedIdentifier()) { - var binding = this.scope.getBinding(this.node.name); - if (!binding) return; - if (!binding.constant) return; - if (binding.kind === "module") return; - - if (binding.path !== this) { - var ret = binding.path.resolve(dangerous, resolved); - if (this.find(function (parent) { - return parent.node === ret.node; - })) return; - return ret; - } - } else if (this.isTypeCastExpression()) { - return this.get("expression").resolve(dangerous, resolved); - } else if (dangerous && this.isMemberExpression()) { - var targetKey = this.toComputedKey(); - if (!t().isLiteral(targetKey)) return; - var targetName = targetKey.value; - var target = this.get("object").resolve(dangerous, resolved); - - if (target.isObjectExpression()) { - var props = target.get("properties"); - var _arr = props; - - for (var _i3 = 0; _i3 < _arr.length; _i3++) { - var prop = _arr[_i3]; - if (!prop.isProperty()) continue; - var key = prop.get("key"); - var match = prop.isnt("computed") && key.isIdentifier({ - name: targetName - }); - match = match || key.isLiteral({ - value: targetName - }); - if (match) return prop.get("value").resolve(dangerous, resolved); - } - } else if (target.isArrayExpression() && !isNaN(+targetName)) { - var elems = target.get("elements"); - var elem = elems[targetName]; - if (elem) return elem.resolve(dangerous, resolved); - } - } -} - -function isConstantExpression() { - if (this.isIdentifier()) { - var binding = this.scope.getBinding(this.node.name); - - if (!binding) { - return false; - } - - return binding.constant && binding.path.get("init").isConstantExpression(); - } - - if (this.isLiteral()) { - if (this.isRegExpLiteral()) { - return false; - } - - if (this.isTemplateLiteral()) { - return this.get("expressions").every(function (expression) { - return expression.isConstantExpression(); - }); - } - - return true; - } - - if (this.isUnaryExpression()) { - if (this.get("operator").node !== "void") { - return false; - } - - return this.get("argument").isConstantExpression(); - } - - if (this.isBinaryExpression()) { - return this.get("left").isConstantExpression() && this.get("right").isConstantExpression(); - } - - return false; -} - -function isInStrictMode() { - var start = this.isProgram() ? this : this.parentPath; - var strictParent = start.find(function (path) { - if (path.isProgram({ - sourceType: "module" - })) return true; - if (path.isClass()) return true; - if (!path.isProgram() && !path.isFunction()) return false; - - if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) { - return false; - } - - var node = path.node; - if (path.isFunction()) node = node.body; - - for (var _iterator3 = node.directives, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref3; - - if (_isArray3) { - if (_i4 >= _iterator3.length) break; - _ref3 = _iterator3[_i4++]; - } else { - _i4 = _iterator3.next(); - if (_i4.done) break; - _ref3 = _i4.value; - } - - var directive = _ref3; - - if (directive.value.value === "use strict") { - return true; - } - } - }); - return !!strictParent; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/lib/hoister.js b/node_modules/@babel/traverse/lib/path/lib/hoister.js deleted file mode 100644 index 3b01f7c..0000000 --- a/node_modules/@babel/traverse/lib/path/lib/hoister.js +++ /dev/null @@ -1,196 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -var referenceVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - if (path.isJSXIdentifier() && t().react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) { - return; - } - - if (path.node.name === "this") { - var scope = path.scope; - - do { - if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) { - break; - } - } while (scope = scope.parent); - - if (scope) state.breakOnScopePaths.push(scope.path); - } - - var binding = path.scope.getBinding(path.node.name); - if (!binding) return; - if (binding !== state.scope.getBinding(path.node.name)) return; - state.bindings[path.node.name] = binding; - } -}; - -var PathHoister = function () { - function PathHoister(path, scope) { - this.breakOnScopePaths = []; - this.bindings = {}; - this.scopes = []; - this.scope = scope; - this.path = path; - this.attachAfter = false; - } - - var _proto = PathHoister.prototype; - - _proto.isCompatibleScope = function isCompatibleScope(scope) { - for (var key in this.bindings) { - var binding = this.bindings[key]; - - if (!scope.bindingIdentifierEquals(key, binding.identifier)) { - return false; - } - } - - return true; - }; - - _proto.getCompatibleScopes = function getCompatibleScopes() { - var scope = this.path.scope; - - do { - if (this.isCompatibleScope(scope)) { - this.scopes.push(scope); - } else { - break; - } - - if (this.breakOnScopePaths.indexOf(scope.path) >= 0) { - break; - } - } while (scope = scope.parent); - }; - - _proto.getAttachmentPath = function getAttachmentPath() { - var path = this._getAttachmentPath(); - - if (!path) return; - var targetScope = path.scope; - - if (targetScope.path === path) { - targetScope = path.scope.parent; - } - - if (targetScope.path.isProgram() || targetScope.path.isFunction()) { - for (var name in this.bindings) { - if (!targetScope.hasOwnBinding(name)) continue; - var binding = this.bindings[name]; - - if (binding.kind === "param" || binding.path.parentKey === "params") { - continue; - } - - var bindingParentPath = this.getAttachmentParentForPath(binding.path); - - if (bindingParentPath.key >= path.key) { - this.attachAfter = true; - path = binding.path; - var _arr = binding.constantViolations; - - for (var _i = 0; _i < _arr.length; _i++) { - var violationPath = _arr[_i]; - - if (this.getAttachmentParentForPath(violationPath).key > path.key) { - path = violationPath; - } - } - } - } - } - - return path; - }; - - _proto._getAttachmentPath = function _getAttachmentPath() { - var scopes = this.scopes; - var scope = scopes.pop(); - if (!scope) return; - - if (scope.path.isFunction()) { - if (this.hasOwnParamBindings(scope)) { - if (this.scope === scope) return; - var bodies = scope.path.get("body").get("body"); - - for (var i = 0; i < bodies.length; i++) { - if (bodies[i].node._blockHoist) continue; - return bodies[i]; - } - } else { - return this.getNextScopeAttachmentParent(); - } - } else if (scope.path.isProgram()) { - return this.getNextScopeAttachmentParent(); - } - }; - - _proto.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() { - var scope = this.scopes.pop(); - if (scope) return this.getAttachmentParentForPath(scope.path); - }; - - _proto.getAttachmentParentForPath = function getAttachmentParentForPath(path) { - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { - return path; - } - } while (path = path.parentPath); - }; - - _proto.hasOwnParamBindings = function hasOwnParamBindings(scope) { - for (var name in this.bindings) { - if (!scope.hasOwnBinding(name)) continue; - var binding = this.bindings[name]; - if (binding.kind === "param" && binding.constant) return true; - } - - return false; - }; - - _proto.run = function run() { - this.path.traverse(referenceVisitor, this); - this.getCompatibleScopes(); - var attachTo = this.getAttachmentPath(); - if (!attachTo) return; - if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return; - var uid = attachTo.scope.generateUidIdentifier("ref"); - var declarator = t().variableDeclarator(uid, this.path.node); - var insertFn = this.attachAfter ? "insertAfter" : "insertBefore"; - - var _attachTo$insertFn = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t().variableDeclaration("var", [declarator])]), - attached = _attachTo$insertFn[0]; - - var parent = this.path.parentPath; - - if (parent.isJSXElement() && this.path.container === parent.node.children) { - uid = t().JSXExpressionContainer(uid); - } - - this.path.replaceWith(t().cloneNode(uid)); - return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init"); - }; - - return PathHoister; -}(); - -exports.default = PathHoister; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js b/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js deleted file mode 100644 index 584e02f..0000000 --- a/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hooks = void 0; -var hooks = [function (self, parent) { - var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement(); - - if (removeParent) { - parent.remove(); - return true; - } -}, function (self, parent) { - if (parent.isSequenceExpression() && parent.node.expressions.length === 1) { - parent.replaceWith(parent.node.expressions[0]); - return true; - } -}, function (self, parent) { - if (parent.isBinary()) { - if (self.key === "left") { - parent.replaceWith(parent.node.right); - } else { - parent.replaceWith(parent.node.left); - } - - return true; - } -}, function (self, parent) { - if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) { - self.replaceWith({ - type: "BlockStatement", - body: [] - }); - return true; - } -}]; -exports.hooks = hooks; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/lib/virtual-types.js b/node_modules/@babel/traverse/lib/path/lib/virtual-types.js deleted file mode 100644 index bb73dd4..0000000 --- a/node_modules/@babel/traverse/lib/path/lib/virtual-types.js +++ /dev/null @@ -1,182 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0; - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -var ReferencedIdentifier = { - types: ["Identifier", "JSXIdentifier"], - checkPath: function checkPath(_ref, opts) { - var node = _ref.node, - parent = _ref.parent; - - if (!t().isIdentifier(node, opts) && !t().isJSXMemberExpression(parent, opts)) { - if (t().isJSXIdentifier(node, opts)) { - if (t().react.isCompatTag(node.name)) return false; - } else { - return false; - } - } - - return t().isReferenced(node, parent); - } -}; -exports.ReferencedIdentifier = ReferencedIdentifier; -var ReferencedMemberExpression = { - types: ["MemberExpression"], - checkPath: function checkPath(_ref2) { - var node = _ref2.node, - parent = _ref2.parent; - return t().isMemberExpression(node) && t().isReferenced(node, parent); - } -}; -exports.ReferencedMemberExpression = ReferencedMemberExpression; -var BindingIdentifier = { - types: ["Identifier"], - checkPath: function checkPath(_ref3) { - var node = _ref3.node, - parent = _ref3.parent; - return t().isIdentifier(node) && t().isBinding(node, parent); - } -}; -exports.BindingIdentifier = BindingIdentifier; -var Statement = { - types: ["Statement"], - checkPath: function checkPath(_ref4) { - var node = _ref4.node, - parent = _ref4.parent; - - if (t().isStatement(node)) { - if (t().isVariableDeclaration(node)) { - if (t().isForXStatement(parent, { - left: node - })) return false; - if (t().isForStatement(parent, { - init: node - })) return false; - } - - return true; - } else { - return false; - } - } -}; -exports.Statement = Statement; -var Expression = { - types: ["Expression"], - checkPath: function checkPath(path) { - if (path.isIdentifier()) { - return path.isReferencedIdentifier(); - } else { - return t().isExpression(path.node); - } - } -}; -exports.Expression = Expression; -var Scope = { - types: ["Scopable"], - checkPath: function checkPath(path) { - return t().isScope(path.node, path.parent); - } -}; -exports.Scope = Scope; -var Referenced = { - checkPath: function checkPath(path) { - return t().isReferenced(path.node, path.parent); - } -}; -exports.Referenced = Referenced; -var BlockScoped = { - checkPath: function checkPath(path) { - return t().isBlockScoped(path.node); - } -}; -exports.BlockScoped = BlockScoped; -var Var = { - types: ["VariableDeclaration"], - checkPath: function checkPath(path) { - return t().isVar(path.node); - } -}; -exports.Var = Var; -var User = { - checkPath: function checkPath(path) { - return path.node && !!path.node.loc; - } -}; -exports.User = User; -var Generated = { - checkPath: function checkPath(path) { - return !path.isUser(); - } -}; -exports.Generated = Generated; -var Pure = { - checkPath: function checkPath(path, opts) { - return path.scope.isPure(path.node, opts); - } -}; -exports.Pure = Pure; -var Flow = { - types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], - checkPath: function checkPath(_ref5) { - var node = _ref5.node; - - if (t().isFlow(node)) { - return true; - } else if (t().isImportDeclaration(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else if (t().isExportDeclaration(node)) { - return node.exportKind === "type"; - } else if (t().isImportSpecifier(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else { - return false; - } - } -}; -exports.Flow = Flow; -var RestProperty = { - types: ["RestElement"], - checkPath: function checkPath(path) { - return path.parentPath && path.parentPath.isObjectPattern(); - } -}; -exports.RestProperty = RestProperty; -var SpreadProperty = { - types: ["RestElement"], - checkPath: function checkPath(path) { - return path.parentPath && path.parentPath.isObjectExpression(); - } -}; -exports.SpreadProperty = SpreadProperty; -var ExistentialTypeParam = { - types: ["ExistsTypeAnnotation"] -}; -exports.ExistentialTypeParam = ExistentialTypeParam; -var NumericLiteralTypeAnnotation = { - types: ["NumberLiteralTypeAnnotation"] -}; -exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation; -var ForAwaitStatement = { - types: ["ForOfStatement"], - checkPath: function checkPath(_ref6) { - var node = _ref6.node; - return node.await === true; - } -}; -exports.ForAwaitStatement = ForAwaitStatement; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/modification.js b/node_modules/@babel/traverse/lib/path/modification.js deleted file mode 100644 index 2b35917..0000000 --- a/node_modules/@babel/traverse/lib/path/modification.js +++ /dev/null @@ -1,236 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.insertBefore = insertBefore; -exports._containerInsert = _containerInsert; -exports._containerInsertBefore = _containerInsertBefore; -exports._containerInsertAfter = _containerInsertAfter; -exports.insertAfter = insertAfter; -exports.updateSiblingKeys = updateSiblingKeys; -exports._verifyNodeList = _verifyNodeList; -exports.unshiftContainer = unshiftContainer; -exports.pushContainer = pushContainer; -exports.hoist = hoist; - -var _cache = require("../cache"); - -var _hoister = _interopRequireDefault(require("./lib/hoister")); - -var _index = _interopRequireDefault(require("./index")); - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function insertBefore(nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - var parentPath = this.parentPath; - - if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { - return parentPath.insertBefore(nodes); - } else if (this.isNodeType("Expression") && this.listKey !== "params" && this.listKey !== "arguments" || parentPath.isForStatement() && this.key === "init") { - if (this.node) nodes.push(this.node); - return this.replaceExpressionWithStatements(nodes); - } else if (Array.isArray(this.container)) { - return this._containerInsertBefore(nodes); - } else if (this.isStatementOrBlock()) { - var shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null); - this.replaceWith(t().blockStatement(shouldInsertCurrentNode ? [this.node] : [])); - return this.unshiftContainer("body", nodes); - } else { - throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); - } -} - -function _containerInsert(from, nodes) { - var _container; - - this.updateSiblingKeys(from, nodes.length); - var paths = []; - - (_container = this.container).splice.apply(_container, [from, 0].concat(nodes)); - - for (var i = 0; i < nodes.length; i++) { - var to = from + i; - var path = this.getSibling(to); - paths.push(path); - - if (this.context && this.context.queue) { - path.pushContext(this.context); - } - } - - var contexts = this._getQueueContexts(); - - for (var _i = 0; _i < paths.length; _i++) { - var _path = paths[_i]; - - _path.setScope(); - - _path.debug("Inserted."); - - for (var _iterator = contexts, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i2 >= _iterator.length) break; - _ref = _iterator[_i2++]; - } else { - _i2 = _iterator.next(); - if (_i2.done) break; - _ref = _i2.value; - } - - var context = _ref; - context.maybeQueue(_path, true); - } - } - - return paths; -} - -function _containerInsertBefore(nodes) { - return this._containerInsert(this.key, nodes); -} - -function _containerInsertAfter(nodes) { - return this._containerInsert(this.key + 1, nodes); -} - -function insertAfter(nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - var parentPath = this.parentPath; - - if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { - return parentPath.insertAfter(nodes); - } else if (this.isNodeType("Expression") || parentPath.isForStatement() && this.key === "init") { - if (this.node) { - var scope = this.scope; - - if (parentPath.isMethod({ - computed: true, - key: this.node - })) { - scope = scope.parent; - } - - var temp = scope.generateDeclaredUidIdentifier(); - nodes.unshift(t().expressionStatement(t().assignmentExpression("=", t().cloneNode(temp), this.node))); - nodes.push(t().expressionStatement(t().cloneNode(temp))); - } - - return this.replaceExpressionWithStatements(nodes); - } else if (Array.isArray(this.container)) { - return this._containerInsertAfter(nodes); - } else if (this.isStatementOrBlock()) { - var shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null); - this.replaceWith(t().blockStatement(shouldInsertCurrentNode ? [this.node] : [])); - return this.pushContainer("body", nodes); - } else { - throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); - } -} - -function updateSiblingKeys(fromIndex, incrementBy) { - if (!this.parent) return; - - var paths = _cache.path.get(this.parent); - - for (var i = 0; i < paths.length; i++) { - var path = paths[i]; - - if (path.key >= fromIndex) { - path.key += incrementBy; - } - } -} - -function _verifyNodeList(nodes) { - if (!nodes) { - return []; - } - - if (nodes.constructor !== Array) { - nodes = [nodes]; - } - - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var msg = void 0; - - if (!node) { - msg = "has falsy node"; - } else if (typeof node !== "object") { - msg = "contains a non-object node"; - } else if (!node.type) { - msg = "without a type"; - } else if (node instanceof _index.default) { - msg = "has a NodePath when it expected a raw object"; - } - - if (msg) { - var type = Array.isArray(node) ? "array" : typeof node; - throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type); - } - } - - return nodes; -} - -function unshiftContainer(listKey, nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - var path = _index.default.get({ - parentPath: this, - parent: this.node, - container: this.node[listKey], - listKey: listKey, - key: 0 - }); - - return path.insertBefore(nodes); -} - -function pushContainer(listKey, nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - var container = this.node[listKey]; - - var path = _index.default.get({ - parentPath: this, - parent: this.node, - container: container, - listKey: listKey, - key: container.length - }); - - return path.replaceWithMultiple(nodes); -} - -function hoist(scope) { - if (scope === void 0) { - scope = this.scope; - } - - var hoister = new _hoister.default(this, scope); - return hoister.run(); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/replacement.js b/node_modules/@babel/traverse/lib/path/replacement.js deleted file mode 100644 index 2710fd7..0000000 --- a/node_modules/@babel/traverse/lib/path/replacement.js +++ /dev/null @@ -1,276 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.replaceWithMultiple = replaceWithMultiple; -exports.replaceWithSourceString = replaceWithSourceString; -exports.replaceWith = replaceWith; -exports._replaceWith = _replaceWith; -exports.replaceExpressionWithStatements = replaceExpressionWithStatements; -exports.replaceInline = replaceInline; - -function _codeFrame() { - var data = require("@babel/code-frame"); - - _codeFrame = function _codeFrame() { - return data; - }; - - return data; -} - -var _index = _interopRequireDefault(require("../index")); - -var _index2 = _interopRequireDefault(require("./index")); - -function _babylon() { - var data = require("babylon"); - - _babylon = function _babylon() { - return data; - }; - - return data; -} - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var hoistVariablesVisitor = { - Function: function Function(path) { - path.skip(); - }, - VariableDeclaration: function VariableDeclaration(path) { - if (path.node.kind !== "var") return; - var bindings = path.getBindingIdentifiers(); - - for (var key in bindings) { - path.scope.push({ - id: bindings[key] - }); - } - - var exprs = []; - var _arr = path.node.declarations; - - for (var _i = 0; _i < _arr.length; _i++) { - var declar = _arr[_i]; - - if (declar.init) { - exprs.push(t().expressionStatement(t().assignmentExpression("=", declar.id, declar.init))); - } - } - - path.replaceWithMultiple(exprs); - } -}; - -function replaceWithMultiple(nodes) { - this.resync(); - nodes = this._verifyNodeList(nodes); - t().inheritLeadingComments(nodes[0], this.node); - t().inheritTrailingComments(nodes[nodes.length - 1], this.node); - this.node = this.container[this.key] = null; - var paths = this.insertAfter(nodes); - - if (this.node) { - this.requeue(); - } else { - this.remove(); - } - - return paths; -} - -function replaceWithSourceString(replacement) { - this.resync(); - - try { - replacement = "(" + replacement + ")"; - replacement = (0, _babylon().parse)(replacement); - } catch (err) { - var loc = err.loc; - - if (loc) { - err.message += " - make sure this is an expression.\n" + (0, _codeFrame().codeFrameColumns)(replacement, { - start: { - line: loc.line, - column: loc.column + 1 - } - }); - err.code = "BABEL_REPLACE_SOURCE_ERROR"; - } - - throw err; - } - - replacement = replacement.program.body[0].expression; - - _index.default.removeProperties(replacement); - - return this.replaceWith(replacement); -} - -function replaceWith(replacement) { - this.resync(); - - if (this.removed) { - throw new Error("You can't replace this node, we've already removed it"); - } - - if (replacement instanceof _index2.default) { - replacement = replacement.node; - } - - if (!replacement) { - throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); - } - - if (this.node === replacement) { - return [this]; - } - - if (this.isProgram() && !t().isProgram(replacement)) { - throw new Error("You can only replace a Program root node with another Program node"); - } - - if (Array.isArray(replacement)) { - throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); - } - - if (typeof replacement === "string") { - throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); - } - - var nodePath = ""; - - if (this.isNodeType("Statement") && t().isExpression(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) { - replacement = t().expressionStatement(replacement); - nodePath = "expression"; - } - } - - if (this.isNodeType("Expression") && t().isStatement(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { - return this.replaceExpressionWithStatements([replacement]); - } - } - - var oldNode = this.node; - - if (oldNode) { - t().inheritsComments(replacement, oldNode); - t().removeComments(oldNode); - } - - this._replaceWith(replacement); - - this.type = replacement.type; - this.setScope(); - this.requeue(); - return [nodePath ? this.get(nodePath) : this]; -} - -function _replaceWith(node) { - if (!this.container) { - throw new ReferenceError("Container is falsy"); - } - - if (this.inList) { - t().validate(this.parent, this.key, [node]); - } else { - t().validate(this.parent, this.key, node); - } - - this.debug("Replace with " + (node && node.type)); - this.node = this.container[this.key] = node; -} - -function replaceExpressionWithStatements(nodes) { - this.resync(); - var toSequenceExpression = t().toSequenceExpression(nodes, this.scope); - - if (toSequenceExpression) { - return this.replaceWith(toSequenceExpression)[0].get("expressions"); - } - - var container = t().arrowFunctionExpression([], t().blockStatement(nodes)); - this.replaceWith(t().callExpression(container, [])); - this.traverse(hoistVariablesVisitor); - var completionRecords = this.get("callee").getCompletionRecords(); - - for (var _iterator = completionRecords, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i2 >= _iterator.length) break; - _ref = _iterator[_i2++]; - } else { - _i2 = _iterator.next(); - if (_i2.done) break; - _ref = _i2.value; - } - - var path = _ref; - if (!path.isExpressionStatement()) continue; - var loop = path.findParent(function (path) { - return path.isLoop(); - }); - - if (loop) { - var uid = loop.getData("expressionReplacementReturnUid"); - - if (!uid) { - var _callee = this.get("callee"); - - uid = _callee.scope.generateDeclaredUidIdentifier("ret"); - - _callee.get("body").pushContainer("body", t().returnStatement(t().cloneNode(uid))); - - loop.setData("expressionReplacementReturnUid", uid); - } else { - uid = t().identifier(uid.name); - } - - path.get("expression").replaceWith(t().assignmentExpression("=", t().cloneNode(uid), path.node.expression)); - } else { - path.replaceWith(t().returnStatement(path.node.expression)); - } - } - - var callee = this.get("callee"); - callee.arrowFunctionToExpression(); - return callee.get("body.body"); -} - -function replaceInline(nodes) { - this.resync(); - - if (Array.isArray(nodes)) { - if (Array.isArray(this.container)) { - nodes = this._verifyNodeList(nodes); - - var paths = this._containerInsertAfter(nodes); - - this.remove(); - return paths; - } else { - return this.replaceWithMultiple(nodes); - } - } else { - return this.replaceWith(nodes); - } -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/scope/binding.js b/node_modules/@babel/traverse/lib/scope/binding.js deleted file mode 100644 index 1441a8b..0000000 --- a/node_modules/@babel/traverse/lib/scope/binding.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var Binding = function () { - function Binding(_ref) { - var identifier = _ref.identifier, - scope = _ref.scope, - path = _ref.path, - kind = _ref.kind; - this.identifier = identifier; - this.scope = scope; - this.path = path; - this.kind = kind; - this.constantViolations = []; - this.constant = true; - this.referencePaths = []; - this.referenced = false; - this.references = 0; - this.clearValue(); - } - - var _proto = Binding.prototype; - - _proto.deoptValue = function deoptValue() { - this.clearValue(); - this.hasDeoptedValue = true; - }; - - _proto.setValue = function setValue(value) { - if (this.hasDeoptedValue) return; - this.hasValue = true; - this.value = value; - }; - - _proto.clearValue = function clearValue() { - this.hasDeoptedValue = false; - this.hasValue = false; - this.value = null; - }; - - _proto.reassign = function reassign(path) { - this.constant = false; - - if (this.constantViolations.indexOf(path) !== -1) { - return; - } - - this.constantViolations.push(path); - }; - - _proto.reference = function reference(path) { - if (this.referencePaths.indexOf(path) !== -1) { - return; - } - - this.referenced = true; - this.references++; - this.referencePaths.push(path); - }; - - _proto.dereference = function dereference() { - this.references--; - this.referenced = !!this.references; - }; - - return Binding; -}(); - -exports.default = Binding; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/scope/index.js b/node_modules/@babel/traverse/lib/scope/index.js deleted file mode 100644 index d7eeb60..0000000 --- a/node_modules/@babel/traverse/lib/scope/index.js +++ /dev/null @@ -1,1019 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _includes() { - var data = _interopRequireDefault(require("lodash/includes")); - - _includes = function _includes() { - return data; - }; - - return data; -} - -function _repeat() { - var data = _interopRequireDefault(require("lodash/repeat")); - - _repeat = function _repeat() { - return data; - }; - - return data; -} - -var _renamer = _interopRequireDefault(require("./lib/renamer")); - -var _index = _interopRequireDefault(require("../index")); - -function _defaults() { - var data = _interopRequireDefault(require("lodash/defaults")); - - _defaults = function _defaults() { - return data; - }; - - return data; -} - -var _binding2 = _interopRequireDefault(require("./binding")); - -function _globals() { - var data = _interopRequireDefault(require("globals")); - - _globals = function _globals() { - return data; - }; - - return data; -} - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -var _cache = require("../cache"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function gatherNodeParts(node, parts) { - if (t().isModuleDeclaration(node)) { - if (node.source) { - gatherNodeParts(node.source, parts); - } else if (node.specifiers && node.specifiers.length) { - var _arr = node.specifiers; - - for (var _i = 0; _i < _arr.length; _i++) { - var specifier = _arr[_i]; - gatherNodeParts(specifier, parts); - } - } else if (node.declaration) { - gatherNodeParts(node.declaration, parts); - } - } else if (t().isModuleSpecifier(node)) { - gatherNodeParts(node.local, parts); - } else if (t().isMemberExpression(node)) { - gatherNodeParts(node.object, parts); - gatherNodeParts(node.property, parts); - } else if (t().isIdentifier(node)) { - parts.push(node.name); - } else if (t().isLiteral(node)) { - parts.push(node.value); - } else if (t().isCallExpression(node)) { - gatherNodeParts(node.callee, parts); - } else if (t().isObjectExpression(node) || t().isObjectPattern(node)) { - var _arr2 = node.properties; - - for (var _i2 = 0; _i2 < _arr2.length; _i2++) { - var prop = _arr2[_i2]; - gatherNodeParts(prop.key || prop.argument, parts); - } - } else if (t().isPrivateName(node)) { - gatherNodeParts(node.id, parts); - } else if (t().isThisExpression(node)) { - parts.push("this"); - } else if (t().isSuper(node)) { - parts.push("super"); - } -} - -var collectorVisitor = { - For: function For(path) { - var _arr3 = t().FOR_INIT_KEYS; - - for (var _i3 = 0; _i3 < _arr3.length; _i3++) { - var key = _arr3[_i3]; - var declar = path.get(key); - - if (declar.isVar()) { - var parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent(); - parentScope.registerBinding("var", declar); - } - } - }, - Declaration: function Declaration(path) { - if (path.isBlockScoped()) return; - - if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) { - return; - } - - var parent = path.scope.getFunctionParent() || path.scope.getProgramParent(); - parent.registerDeclaration(path); - }, - ReferencedIdentifier: function ReferencedIdentifier(path, state) { - state.references.push(path); - }, - ForXStatement: function ForXStatement(path, state) { - var left = path.get("left"); - - if (left.isPattern() || left.isIdentifier()) { - state.constantViolations.push(path); - } - }, - ExportDeclaration: { - exit: function exit(path) { - var node = path.node, - scope = path.scope; - var declar = node.declaration; - - if (t().isClassDeclaration(declar) || t().isFunctionDeclaration(declar)) { - var _id = declar.id; - if (!_id) return; - var binding = scope.getBinding(_id.name); - if (binding) binding.reference(path); - } else if (t().isVariableDeclaration(declar)) { - var _arr4 = declar.declarations; - - for (var _i4 = 0; _i4 < _arr4.length; _i4++) { - var decl = _arr4[_i4]; - var ids = t().getBindingIdentifiers(decl); - - for (var name in ids) { - var _binding = scope.getBinding(name); - - if (_binding) _binding.reference(path); - } - } - } - } - }, - LabeledStatement: function LabeledStatement(path) { - path.scope.getProgramParent().addGlobal(path.node); - path.scope.getBlockParent().registerDeclaration(path); - }, - AssignmentExpression: function AssignmentExpression(path, state) { - state.assignments.push(path); - }, - UpdateExpression: function UpdateExpression(path, state) { - state.constantViolations.push(path); - }, - UnaryExpression: function UnaryExpression(path, state) { - if (path.node.operator === "delete") { - state.constantViolations.push(path); - } - }, - BlockScoped: function BlockScoped(path) { - var scope = path.scope; - if (scope.path === path) scope = scope.parent; - scope.getBlockParent().registerDeclaration(path); - }, - ClassDeclaration: function ClassDeclaration(path) { - var id = path.node.id; - if (!id) return; - var name = id.name; - path.scope.bindings[name] = path.scope.getBinding(name); - }, - Block: function Block(path) { - var paths = path.get("body"); - var _arr5 = paths; - - for (var _i5 = 0; _i5 < _arr5.length; _i5++) { - var bodyPath = _arr5[_i5]; - - if (bodyPath.isFunctionDeclaration()) { - path.scope.getBlockParent().registerDeclaration(bodyPath); - } - } - } -}; -var uid = 0; - -var Scope = function () { - function Scope(path) { - var node = path.node; - - var cached = _cache.scope.get(node); - - if (cached && cached.path === path) { - return cached; - } - - _cache.scope.set(node, this); - - this.uid = uid++; - this.block = node; - this.path = path; - this.labels = new Map(); - } - - var _proto = Scope.prototype; - - _proto.traverse = function traverse(node, opts, state) { - (0, _index.default)(node, opts, this, state, this.path); - }; - - _proto.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier(name) { - var id = this.generateUidIdentifier(name); - this.push({ - id: id - }); - return t().cloneNode(id); - }; - - _proto.generateUidIdentifier = function generateUidIdentifier(name) { - return t().identifier(this.generateUid(name)); - }; - - _proto.generateUid = function generateUid(name) { - if (name === void 0) { - name = "temp"; - } - - name = t().toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); - var uid; - var i = 0; - - do { - uid = this._generateUid(name, i); - i++; - } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); - - var program = this.getProgramParent(); - program.references[uid] = true; - program.uids[uid] = true; - return uid; - }; - - _proto._generateUid = function _generateUid(name, i) { - var id = name; - if (i > 1) id += i; - return "_" + id; - }; - - _proto.generateUidBasedOnNode = function generateUidBasedOnNode(parent, defaultName) { - var node = parent; - - if (t().isAssignmentExpression(parent)) { - node = parent.left; - } else if (t().isVariableDeclarator(parent)) { - node = parent.id; - } else if (t().isObjectProperty(node) || t().isObjectMethod(node)) { - node = node.key; - } - - var parts = []; - gatherNodeParts(node, parts); - var id = parts.join("$"); - id = id.replace(/^_/, "") || defaultName || "ref"; - return this.generateUid(id.slice(0, 20)); - }; - - _proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) { - return t().identifier(this.generateUidBasedOnNode(parent, defaultName)); - }; - - _proto.isStatic = function isStatic(node) { - if (t().isThisExpression(node) || t().isSuper(node)) { - return true; - } - - if (t().isIdentifier(node)) { - var binding = this.getBinding(node.name); - - if (binding) { - return binding.constant; - } else { - return this.hasBinding(node.name); - } - } - - return false; - }; - - _proto.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) { - if (this.isStatic(node)) { - return null; - } else { - var _id2 = this.generateUidIdentifierBasedOnNode(node); - - if (!dontPush) { - this.push({ - id: _id2 - }); - return t().cloneNode(_id2); - } - - return _id2; - } - }; - - _proto.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) { - if (kind === "param") return; - if (local.kind === "local") return; - if (kind === "hoisted" && local.kind === "let") return; - var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const"); - - if (duplicate) { - throw this.hub.file.buildCodeFrameError(id, "Duplicate declaration \"" + name + "\"", TypeError); - } - }; - - _proto.rename = function rename(oldName, newName, block) { - var binding = this.getBinding(oldName); - - if (binding) { - newName = newName || this.generateUidIdentifier(oldName).name; - return new _renamer.default(binding, oldName, newName).rename(block); - } - }; - - _proto._renameFromMap = function _renameFromMap(map, oldName, newName, value) { - if (map[oldName]) { - map[newName] = value; - map[oldName] = null; - } - }; - - _proto.dump = function dump() { - var sep = (0, _repeat().default)("-", 60); - console.log(sep); - var scope = this; - - do { - console.log("#", scope.block.type); - - for (var name in scope.bindings) { - var binding = scope.bindings[name]; - console.log(" -", name, { - constant: binding.constant, - references: binding.references, - violations: binding.constantViolations.length, - kind: binding.kind - }); - } - } while (scope = scope.parent); - - console.log(sep); - }; - - _proto.toArray = function toArray(node, i) { - var file = this.hub.file; - - if (t().isIdentifier(node)) { - var binding = this.getBinding(node.name); - - if (binding && binding.constant && binding.path.isGenericType("Array")) { - return node; - } - } - - if (t().isArrayExpression(node)) { - return node; - } - - if (t().isIdentifier(node, { - name: "arguments" - })) { - return t().callExpression(t().memberExpression(t().memberExpression(t().memberExpression(t().identifier("Array"), t().identifier("prototype")), t().identifier("slice")), t().identifier("call")), [node]); - } - - var helperName; - var args = [node]; - - if (i === true) { - helperName = "toConsumableArray"; - } else if (i) { - args.push(t().numericLiteral(i)); - helperName = "slicedToArray"; - } else { - helperName = "toArray"; - } - - return t().callExpression(file.addHelper(helperName), args); - }; - - _proto.hasLabel = function hasLabel(name) { - return !!this.getLabel(name); - }; - - _proto.getLabel = function getLabel(name) { - return this.labels.get(name); - }; - - _proto.registerLabel = function registerLabel(path) { - this.labels.set(path.node.label.name, path); - }; - - _proto.registerDeclaration = function registerDeclaration(path) { - if (path.isFlow()) return; - - if (path.isLabeledStatement()) { - this.registerLabel(path); - } else if (path.isFunctionDeclaration()) { - this.registerBinding("hoisted", path.get("id"), path); - } else if (path.isVariableDeclaration()) { - var declarations = path.get("declarations"); - var _arr6 = declarations; - - for (var _i6 = 0; _i6 < _arr6.length; _i6++) { - var declar = _arr6[_i6]; - this.registerBinding(path.node.kind, declar); - } - } else if (path.isClassDeclaration()) { - this.registerBinding("let", path); - } else if (path.isImportDeclaration()) { - var specifiers = path.get("specifiers"); - var _arr7 = specifiers; - - for (var _i7 = 0; _i7 < _arr7.length; _i7++) { - var specifier = _arr7[_i7]; - this.registerBinding("module", specifier); - } - } else if (path.isExportDeclaration()) { - var _declar = path.get("declaration"); - - if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) { - this.registerDeclaration(_declar); - } - } else { - this.registerBinding("unknown", path); - } - }; - - _proto.buildUndefinedNode = function buildUndefinedNode() { - if (this.hasBinding("undefined")) { - return t().unaryExpression("void", t().numericLiteral(0), true); - } else { - return t().identifier("undefined"); - } - }; - - _proto.registerConstantViolation = function registerConstantViolation(path) { - var ids = path.getBindingIdentifiers(); - - for (var name in ids) { - var binding = this.getBinding(name); - if (binding) binding.reassign(path); - } - }; - - _proto.registerBinding = function registerBinding(kind, path, bindingPath) { - if (bindingPath === void 0) { - bindingPath = path; - } - - if (!kind) throw new ReferenceError("no `kind`"); - - if (path.isVariableDeclaration()) { - var declarators = path.get("declarations"); - - for (var _iterator = declarators, _isArray = Array.isArray(_iterator), _i8 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i8 >= _iterator.length) break; - _ref = _iterator[_i8++]; - } else { - _i8 = _iterator.next(); - if (_i8.done) break; - _ref = _i8.value; - } - - var declar = _ref; - this.registerBinding(kind, declar); - } - - return; - } - - var parent = this.getProgramParent(); - var ids = path.getBindingIdentifiers(true); - - for (var name in ids) { - var _arr8 = ids[name]; - - for (var _i9 = 0; _i9 < _arr8.length; _i9++) { - var _id3 = _arr8[_i9]; - var local = this.getOwnBinding(name); - - if (local) { - if (local.identifier === _id3) continue; - this.checkBlockScopedCollisions(local, kind, name, _id3); - } - - parent.references[name] = true; - - if (local) { - this.registerConstantViolation(bindingPath); - } else { - this.bindings[name] = new _binding2.default({ - identifier: _id3, - scope: this, - path: bindingPath, - kind: kind - }); - } - } - } - }; - - _proto.addGlobal = function addGlobal(node) { - this.globals[node.name] = node; - }; - - _proto.hasUid = function hasUid(name) { - var scope = this; - - do { - if (scope.uids[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - _proto.hasGlobal = function hasGlobal(name) { - var scope = this; - - do { - if (scope.globals[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - _proto.hasReference = function hasReference(name) { - var scope = this; - - do { - if (scope.references[name]) return true; - } while (scope = scope.parent); - - return false; - }; - - _proto.isPure = function isPure(node, constantsOnly) { - if (t().isIdentifier(node)) { - var binding = this.getBinding(node.name); - if (!binding) return false; - if (constantsOnly) return binding.constant; - return true; - } else if (t().isClass(node)) { - if (node.superClass && !this.isPure(node.superClass, constantsOnly)) { - return false; - } - - return this.isPure(node.body, constantsOnly); - } else if (t().isClassBody(node)) { - for (var _iterator2 = node.body, _isArray2 = Array.isArray(_iterator2), _i10 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i10 >= _iterator2.length) break; - _ref2 = _iterator2[_i10++]; - } else { - _i10 = _iterator2.next(); - if (_i10.done) break; - _ref2 = _i10.value; - } - - var method = _ref2; - if (!this.isPure(method, constantsOnly)) return false; - } - - return true; - } else if (t().isBinary(node)) { - return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); - } else if (t().isArrayExpression(node)) { - var _arr9 = node.elements; - - for (var _i11 = 0; _i11 < _arr9.length; _i11++) { - var elem = _arr9[_i11]; - if (!this.isPure(elem, constantsOnly)) return false; - } - - return true; - } else if (t().isObjectExpression(node)) { - var _arr10 = node.properties; - - for (var _i12 = 0; _i12 < _arr10.length; _i12++) { - var prop = _arr10[_i12]; - if (!this.isPure(prop, constantsOnly)) return false; - } - - return true; - } else if (t().isClassMethod(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - if (node.kind === "get" || node.kind === "set") return false; - return true; - } else if (t().isProperty(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - return this.isPure(node.value, constantsOnly); - } else if (t().isUnaryExpression(node)) { - return this.isPure(node.argument, constantsOnly); - } else if (t().isTaggedTemplateExpression(node)) { - return t().matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly); - } else if (t().isTemplateLiteral(node)) { - var _arr11 = node.expressions; - - for (var _i13 = 0; _i13 < _arr11.length; _i13++) { - var expression = _arr11[_i13]; - if (!this.isPure(expression, constantsOnly)) return false; - } - - return true; - } else { - return t().isPureish(node); - } - }; - - _proto.setData = function setData(key, val) { - return this.data[key] = val; - }; - - _proto.getData = function getData(key) { - var scope = this; - - do { - var data = scope.data[key]; - if (data != null) return data; - } while (scope = scope.parent); - }; - - _proto.removeData = function removeData(key) { - var scope = this; - - do { - var data = scope.data[key]; - if (data != null) scope.data[key] = null; - } while (scope = scope.parent); - }; - - _proto.init = function init() { - if (!this.references) this.crawl(); - }; - - _proto.crawl = function crawl() { - var path = this.path; - this.references = Object.create(null); - this.bindings = Object.create(null); - this.globals = Object.create(null); - this.uids = Object.create(null); - this.data = Object.create(null); - - if (path.isLoop()) { - var _arr12 = t().FOR_INIT_KEYS; - - for (var _i14 = 0; _i14 < _arr12.length; _i14++) { - var key = _arr12[_i14]; - var node = path.get(key); - if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); - } - } - - if (path.isFunctionExpression() && path.has("id")) { - if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { - this.registerBinding("local", path.get("id"), path); - } - } - - if (path.isClassExpression() && path.has("id")) { - if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { - this.registerBinding("local", path); - } - } - - if (path.isFunction()) { - var params = path.get("params"); - - for (var _iterator3 = params, _isArray3 = Array.isArray(_iterator3), _i15 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref3; - - if (_isArray3) { - if (_i15 >= _iterator3.length) break; - _ref3 = _iterator3[_i15++]; - } else { - _i15 = _iterator3.next(); - if (_i15.done) break; - _ref3 = _i15.value; - } - - var param = _ref3; - this.registerBinding("param", param); - } - } - - if (path.isCatchClause()) { - this.registerBinding("let", path); - } - - var parent = this.getProgramParent(); - if (parent.crawling) return; - var state = { - references: [], - constantViolations: [], - assignments: [] - }; - this.crawling = true; - path.traverse(collectorVisitor, state); - this.crawling = false; - - for (var _iterator4 = state.assignments, _isArray4 = Array.isArray(_iterator4), _i16 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { - var _ref4; - - if (_isArray4) { - if (_i16 >= _iterator4.length) break; - _ref4 = _iterator4[_i16++]; - } else { - _i16 = _iterator4.next(); - if (_i16.done) break; - _ref4 = _i16.value; - } - - var _path = _ref4; - - var ids = _path.getBindingIdentifiers(); - - var programParent = void 0; - - for (var name in ids) { - if (_path.scope.getBinding(name)) continue; - programParent = programParent || _path.scope.getProgramParent(); - programParent.addGlobal(ids[name]); - } - - _path.scope.registerConstantViolation(_path); - } - - for (var _iterator5 = state.references, _isArray5 = Array.isArray(_iterator5), _i17 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { - var _ref5; - - if (_isArray5) { - if (_i17 >= _iterator5.length) break; - _ref5 = _iterator5[_i17++]; - } else { - _i17 = _iterator5.next(); - if (_i17.done) break; - _ref5 = _i17.value; - } - - var ref = _ref5; - var binding = ref.scope.getBinding(ref.node.name); - - if (binding) { - binding.reference(ref); - } else { - ref.scope.getProgramParent().addGlobal(ref.node); - } - } - - for (var _iterator6 = state.constantViolations, _isArray6 = Array.isArray(_iterator6), _i18 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { - var _ref6; - - if (_isArray6) { - if (_i18 >= _iterator6.length) break; - _ref6 = _iterator6[_i18++]; - } else { - _i18 = _iterator6.next(); - if (_i18.done) break; - _ref6 = _i18.value; - } - - var _path2 = _ref6; - - _path2.scope.registerConstantViolation(_path2); - } - }; - - _proto.push = function push(opts) { - var path = this.path; - - if (!path.isBlockStatement() && !path.isProgram()) { - path = this.getBlockParent().path; - } - - if (path.isSwitchStatement()) { - path = (this.getFunctionParent() || this.getProgramParent()).path; - } - - if (path.isLoop() || path.isCatchClause() || path.isFunction()) { - path.ensureBlock(); - path = path.get("body"); - } - - var unique = opts.unique; - var kind = opts.kind || "var"; - var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; - var dataKey = "declaration:" + kind + ":" + blockHoist; - var declarPath = !unique && path.getData(dataKey); - - if (!declarPath) { - var declar = t().variableDeclaration(kind, []); - declar._blockHoist = blockHoist; - - var _path$unshiftContaine = path.unshiftContainer("body", [declar]); - - declarPath = _path$unshiftContaine[0]; - if (!unique) path.setData(dataKey, declarPath); - } - - var declarator = t().variableDeclarator(opts.id, opts.init); - declarPath.node.declarations.push(declarator); - this.registerBinding(kind, declarPath.get("declarations").pop()); - }; - - _proto.getProgramParent = function getProgramParent() { - var scope = this; - - do { - if (scope.path.isProgram()) { - return scope; - } - } while (scope = scope.parent); - - throw new Error("Couldn't find a Program"); - }; - - _proto.getFunctionParent = function getFunctionParent() { - var scope = this; - - do { - if (scope.path.isFunctionParent()) { - return scope; - } - } while (scope = scope.parent); - - return null; - }; - - _proto.getBlockParent = function getBlockParent() { - var scope = this; - - do { - if (scope.path.isBlockParent()) { - return scope; - } - } while (scope = scope.parent); - - throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); - }; - - _proto.getAllBindings = function getAllBindings() { - var ids = Object.create(null); - var scope = this; - - do { - (0, _defaults().default)(ids, scope.bindings); - scope = scope.parent; - } while (scope); - - return ids; - }; - - _proto.getAllBindingsOfKind = function getAllBindingsOfKind() { - var ids = Object.create(null); - var _arr13 = arguments; - - for (var _i19 = 0; _i19 < _arr13.length; _i19++) { - var kind = _arr13[_i19]; - var scope = this; - - do { - for (var name in scope.bindings) { - var binding = scope.bindings[name]; - if (binding.kind === kind) ids[name] = binding; - } - - scope = scope.parent; - } while (scope); - } - - return ids; - }; - - _proto.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) { - return this.getBindingIdentifier(name) === node; - }; - - _proto.getBinding = function getBinding(name) { - var scope = this; - - do { - var binding = scope.getOwnBinding(name); - if (binding) return binding; - } while (scope = scope.parent); - }; - - _proto.getOwnBinding = function getOwnBinding(name) { - return this.bindings[name]; - }; - - _proto.getBindingIdentifier = function getBindingIdentifier(name) { - var info = this.getBinding(name); - return info && info.identifier; - }; - - _proto.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) { - var binding = this.bindings[name]; - return binding && binding.identifier; - }; - - _proto.hasOwnBinding = function hasOwnBinding(name) { - return !!this.getOwnBinding(name); - }; - - _proto.hasBinding = function hasBinding(name, noGlobals) { - if (!name) return false; - if (this.hasOwnBinding(name)) return true; - if (this.parentHasBinding(name, noGlobals)) return true; - if (this.hasUid(name)) return true; - if (!noGlobals && (0, _includes().default)(Scope.globals, name)) return true; - if (!noGlobals && (0, _includes().default)(Scope.contextVariables, name)) return true; - return false; - }; - - _proto.parentHasBinding = function parentHasBinding(name, noGlobals) { - return this.parent && this.parent.hasBinding(name, noGlobals); - }; - - _proto.moveBindingTo = function moveBindingTo(name, scope) { - var info = this.getBinding(name); - - if (info) { - info.scope.removeOwnBinding(name); - info.scope = scope; - scope.bindings[name] = info; - } - }; - - _proto.removeOwnBinding = function removeOwnBinding(name) { - delete this.bindings[name]; - }; - - _proto.removeBinding = function removeBinding(name) { - var info = this.getBinding(name); - - if (info) { - info.scope.removeOwnBinding(name); - } - - var scope = this; - - do { - if (scope.uids[name]) { - scope.uids[name] = false; - } - } while (scope = scope.parent); - }; - - _createClass(Scope, [{ - key: "parent", - get: function get() { - var parent = this.path.findParent(function (p) { - return p.isScope(); - }); - return parent && parent.scope; - } - }, { - key: "parentBlock", - get: function get() { - return this.path.parent; - } - }, { - key: "hub", - get: function get() { - return this.path.hub; - } - }]); - - return Scope; -}(); - -exports.default = Scope; -Scope.globals = Object.keys(_globals().default.builtin); -Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/scope/lib/renamer.js b/node_modules/@babel/traverse/lib/scope/lib/renamer.js deleted file mode 100644 index 4c2660e..0000000 --- a/node_modules/@babel/traverse/lib/scope/lib/renamer.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _binding = _interopRequireDefault(require("../binding")); - -function _helperSplitExportDeclaration() { - var data = _interopRequireDefault(require("@babel/helper-split-export-declaration")); - - _helperSplitExportDeclaration = function _helperSplitExportDeclaration() { - return data; - }; - - return data; -} - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var renameVisitor = { - ReferencedIdentifier: function ReferencedIdentifier(_ref, state) { - var node = _ref.node; - - if (node.name === state.oldName) { - node.name = state.newName; - } - }, - Scope: function Scope(path, state) { - if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { - path.skip(); - } - }, - "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) { - var ids = path.getOuterBindingIdentifiers(); - - for (var name in ids) { - if (name === state.oldName) ids[name].name = state.newName; - } - } -}; - -var Renamer = function () { - function Renamer(binding, oldName, newName) { - this.newName = newName; - this.oldName = oldName; - this.binding = binding; - } - - var _proto = Renamer.prototype; - - _proto.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) { - var maybeExportDeclar = parentDeclar.parentPath; - - if (!maybeExportDeclar.isExportDeclaration()) { - return; - } - - if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) { - return; - } - - (0, _helperSplitExportDeclaration().default)(maybeExportDeclar); - }; - - _proto.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) { - return; - if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; - if (this.binding.kind !== "hoisted") return; - path.node.id = t().identifier(this.oldName); - path.node._blockHoist = 3; - path.replaceWith(t().variableDeclaration("let", [t().variableDeclarator(t().identifier(this.newName), t().toExpression(path.node))])); - }; - - _proto.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) { - return; - if (!path.isFunctionExpression() && !path.isClassExpression()) return; - if (this.binding.kind !== "local") return; - path.node.id = t().identifier(this.oldName); - this.binding.scope.parent.push({ - id: t().identifier(this.newName) - }); - path.replaceWith(t().assignmentExpression("=", t().identifier(this.newName), path.node)); - }; - - _proto.rename = function rename(block) { - var binding = this.binding, - oldName = this.oldName, - newName = this.newName; - var scope = binding.scope, - path = binding.path; - var parentDeclar = path.find(function (path) { - return path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression(); - }); - - if (parentDeclar) { - this.maybeConvertFromExportDeclaration(parentDeclar); - } - - scope.traverse(block || scope.block, renameVisitor, this); - - if (!block) { - scope.removeOwnBinding(oldName); - scope.bindings[newName] = binding; - this.binding.identifier.name = newName; - } - - if (binding.type === "hoisted") {} - - if (parentDeclar) { - this.maybeConvertFromClassFunctionDeclaration(parentDeclar); - this.maybeConvertFromClassFunctionExpression(parentDeclar); - } - }; - - return Renamer; -}(); - -exports.default = Renamer; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/visitors.js b/node_modules/@babel/traverse/lib/visitors.js deleted file mode 100644 index 1ccf6ac..0000000 --- a/node_modules/@babel/traverse/lib/visitors.js +++ /dev/null @@ -1,312 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.explode = explode; -exports.verify = verify; -exports.merge = merge; - -var virtualTypes = _interopRequireWildcard(require("./path/lib/virtual-types")); - -function t() { - var data = _interopRequireWildcard(require("@babel/types")); - - t = function t() { - return data; - }; - - return data; -} - -function _clone() { - var data = _interopRequireDefault(require("lodash/clone")); - - _clone = function _clone() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function explode(visitor) { - if (visitor._exploded) return visitor; - visitor._exploded = true; - - for (var nodeType in visitor) { - if (shouldIgnoreKey(nodeType)) continue; - var parts = nodeType.split("|"); - if (parts.length === 1) continue; - var fns = visitor[nodeType]; - delete visitor[nodeType]; - - for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var part = _ref; - visitor[part] = fns; - } - } - - verify(visitor); - delete visitor.__esModule; - ensureEntranceObjects(visitor); - ensureCallbackArrays(visitor); - - var _arr = Object.keys(visitor); - - for (var _i2 = 0; _i2 < _arr.length; _i2++) { - var _nodeType3 = _arr[_i2]; - if (shouldIgnoreKey(_nodeType3)) continue; - var wrapper = virtualTypes[_nodeType3]; - if (!wrapper) continue; - var _fns2 = visitor[_nodeType3]; - - for (var type in _fns2) { - _fns2[type] = wrapCheck(wrapper, _fns2[type]); - } - - delete visitor[_nodeType3]; - - if (wrapper.types) { - var _arr2 = wrapper.types; - - for (var _i4 = 0; _i4 < _arr2.length; _i4++) { - var _type = _arr2[_i4]; - - if (visitor[_type]) { - mergePair(visitor[_type], _fns2); - } else { - visitor[_type] = _fns2; - } - } - } else { - mergePair(visitor, _fns2); - } - } - - for (var _nodeType in visitor) { - if (shouldIgnoreKey(_nodeType)) continue; - var _fns = visitor[_nodeType]; - - var aliases = t().FLIPPED_ALIAS_KEYS[_nodeType]; - - var deprecratedKey = t().DEPRECATED_KEYS[_nodeType]; - - if (deprecratedKey) { - console.trace("Visitor defined for " + _nodeType + " but it has been renamed to " + deprecratedKey); - aliases = [deprecratedKey]; - } - - if (!aliases) continue; - delete visitor[_nodeType]; - - for (var _iterator2 = aliases, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i3 >= _iterator2.length) break; - _ref2 = _iterator2[_i3++]; - } else { - _i3 = _iterator2.next(); - if (_i3.done) break; - _ref2 = _i3.value; - } - - var alias = _ref2; - var existing = visitor[alias]; - - if (existing) { - mergePair(existing, _fns); - } else { - visitor[alias] = (0, _clone().default)(_fns); - } - } - } - - for (var _nodeType2 in visitor) { - if (shouldIgnoreKey(_nodeType2)) continue; - ensureCallbackArrays(visitor[_nodeType2]); - } - - return visitor; -} - -function verify(visitor) { - if (visitor._verified) return; - - if (typeof visitor === "function") { - throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?"); - } - - for (var nodeType in visitor) { - if (nodeType === "enter" || nodeType === "exit") { - validateVisitorMethods(nodeType, visitor[nodeType]); - } - - if (shouldIgnoreKey(nodeType)) continue; - - if (t().TYPES.indexOf(nodeType) < 0) { - throw new Error("You gave us a visitor for the node type " + nodeType + " but it's not a valid type"); - } - - var visitors = visitor[nodeType]; - - if (typeof visitors === "object") { - for (var visitorKey in visitors) { - if (visitorKey === "enter" || visitorKey === "exit") { - validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]); - } else { - throw new Error("You passed `traverse()` a visitor object with the property " + (nodeType + " that has the invalid property " + visitorKey)); - } - } - } - } - - visitor._verified = true; -} - -function validateVisitorMethods(path, val) { - var fns = [].concat(val); - - for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i5 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref3; - - if (_isArray3) { - if (_i5 >= _iterator3.length) break; - _ref3 = _iterator3[_i5++]; - } else { - _i5 = _iterator3.next(); - if (_i5.done) break; - _ref3 = _i5.value; - } - - var fn = _ref3; - - if (typeof fn !== "function") { - throw new TypeError("Non-function found defined in " + path + " with type " + typeof fn); - } - } -} - -function merge(visitors, states, wrapper) { - if (states === void 0) { - states = []; - } - - var rootVisitor = {}; - - for (var i = 0; i < visitors.length; i++) { - var visitor = visitors[i]; - var state = states[i]; - explode(visitor); - - for (var type in visitor) { - var visitorType = visitor[type]; - - if (state || wrapper) { - visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper); - } - - var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {}; - mergePair(nodeVisitor, visitorType); - } - } - - return rootVisitor; -} - -function wrapWithStateOrWrapper(oldVisitor, state, wrapper) { - var newVisitor = {}; - - var _loop = function _loop(key) { - var fns = oldVisitor[key]; - if (!Array.isArray(fns)) return "continue"; - fns = fns.map(function (fn) { - var newFn = fn; - - if (state) { - newFn = function newFn(path) { - return fn.call(state, path, state); - }; - } - - if (wrapper) { - newFn = wrapper(state.key, key, newFn); - } - - return newFn; - }); - newVisitor[key] = fns; - }; - - for (var key in oldVisitor) { - var _ret = _loop(key); - - if (_ret === "continue") continue; - } - - return newVisitor; -} - -function ensureEntranceObjects(obj) { - for (var key in obj) { - if (shouldIgnoreKey(key)) continue; - var fns = obj[key]; - - if (typeof fns === "function") { - obj[key] = { - enter: fns - }; - } - } -} - -function ensureCallbackArrays(obj) { - if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter]; - if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; -} - -function wrapCheck(wrapper, fn) { - var newFn = function newFn(path) { - if (wrapper.checkPath(path)) { - return fn.apply(this, arguments); - } - }; - - newFn.toString = function () { - return fn.toString(); - }; - - return newFn; -} - -function shouldIgnoreKey(key) { - if (key[0] === "_") return true; - if (key === "enter" || key === "exit" || key === "shouldSkip") return true; - - if (key === "blacklist" || key === "noScope" || key === "skipKeys") { - return true; - } - - return false; -} - -function mergePair(dest, src) { - for (var key in src) { - dest[key] = [].concat(dest[key] || [], src[key]); - } -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/node_modules/.bin/babylon b/node_modules/@babel/traverse/node_modules/.bin/babylon deleted file mode 120000 index c2adc01..0000000 --- a/node_modules/@babel/traverse/node_modules/.bin/babylon +++ /dev/null @@ -1 +0,0 @@ -../babylon/bin/babylon.js \ No newline at end of file diff --git a/node_modules/@babel/traverse/node_modules/babylon/CHANGELOG.md b/node_modules/@babel/traverse/node_modules/babylon/CHANGELOG.md deleted file mode 100644 index 1e2bbac..0000000 --- a/node_modules/@babel/traverse/node_modules/babylon/CHANGELOG.md +++ /dev/null @@ -1,1073 +0,0 @@ -# Changelog - -> **Tags:** -> - :boom: [Breaking Change] -> - :eyeglasses: [Spec Compliancy] -> - :rocket: [New Feature] -> - :bug: [Bug Fix] -> - :memo: [Documentation] -> - :house: [Internal] -> - :nail_care: [Polish] - -> Semver Policy: https://github.com/babel/babylon#semver - -_Note: Gaps between patch versions are faulty, broken or test releases._ - -See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog. - -## 6.17.1 (2017-05-10) - -### :bug: Bug Fix - * Fix typo in flow spread operator error (Brian Ng) - * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) - * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) - * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) - * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) - * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) - * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) - -## 6.17.0 (2017-04-20) - -### :bug: Bug Fix - * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) - * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) - * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) - * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) - * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) - * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) - -## 7.0.0-beta.8 (2017-04-04) - -### New Feature -* Add support for flow type spread (#418) (Conrad Buck) -* Allow statics in flow interfaces (#427) (Brian Ng) - -### Bug Fix -* Fix predicate attachment to match flow parser (#428) (Brian Ng) -* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray) -* Fix rest parameters with array and objects (#424) (Brian Ng) -* Fix number parser (#433) (Alex Kuzmenko) - -### Docs -* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko) - -### Internal -* Use babel-register script when running babel smoke tests (#442) (Brian Ng) - -## 7.0.0-beta.7 (2017-03-22) - -### Spec Compliancy -* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu) - -### Bug Fix - -* Fix push-pop logic in flow (#405) (Daniel Tschinder) - -## 7.0.0-beta.6 (2017-03-21) - -### New Feature -* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons) - -### Polish -* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal) - -### Docs - -* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning) - -## 7.0.0-beta.5 (2017-03-21) - -### Bug Fix -* Throw error if new.target is used outside of a function (#402) (Brian Ng) -* Fix parsing of class properties (#351) (Kevin Gibbons) - -### Other - * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy) - * Optimize travis builds (#419) (Daniel Tschinder) - * Update codecov to 2.0 (#412) (Daniel Tschinder) - * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy) - * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning) - * Upgrade flow to 0.41 (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * Update yarn lock (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot]) - * Add estree test for correct order of directives (Daniel Tschinder) - * Add DoExpression to spec (#364) (Alex Kuzmenko) - * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde) - * Explain how to run only one test (#389) [skip ci] (Aaron Ang) - - ## 7.0.0-beta.4 (2017-03-01) - -* Don't consume async when checking for async func decl (#377) (Brian Ng) -* add `ranges` option [skip ci] (Henry Zhu) -* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine) - -## 7.0.0-beta.3 (2017-02-28) - -- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384) -- Merge changes from 6.x - -## 7.0.0-beta.2 (2017-02-20) - -- estree: correctly change literals in all cases (#368) (Daniel Tschinder) - -## 7.0.0-beta.1 (2017-02-20) - -- Fix negative number literal typeannotations (#366) (Daniel Tschinder) -- Update contributing with more test info [skip ci] (#355) (Brian Ng) - -## 7.0.0-beta.0 (2017-02-15) - -- Reintroduce Variance node (#333) (Daniel Tschinder) -- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick) -- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail) -- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot]) -- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot]) -- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder) -- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi) -- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder) -- Remove classConstructorCall plugin (#291) (Brian Ng) -- Update yarn.lock (Daniel Tschinder) -- Update cross-env to 3.x (Daniel Tschinder) -- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov) -- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens) - -## 6.16.1 (2017-02-23) - -### :bug: Regression - -- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375)) - -Need to modify Babel for this AST node change, so moving to 7.0. - -- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376)) - -[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted. - -## 6.16.0 (2017-02-23) - -### :rocket: New Feature - -***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) - -We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) - -We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. - -To enable `estree` mode simply add the plugin in the config: -```json -{ - "plugins": [ "estree" ] -} -``` - -If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. - -Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) - -Babylon exports a new function to parse a single expression - -```js -import { parseExpression } from 'babylon'; - -const ast = parseExpression('x || y && z', options); -``` - -The returned AST will only consist of the expression. The options are the same as for `parse()` - -Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) - -A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`. -Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... - -Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) - -Added support for function predicates which flow introduced in version 0.33.0 - -```js -declare function is_number(x: mixed): boolean %checks(typeof x === "number"); -``` - -Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) - -Added support for imports within module declarations which flow introduced in version 0.37.0 - -```js -declare module "C" { - import type { DT } from "D"; - declare export type CT = { D: DT }; -} -``` - -### :eyeglasses: Spec Compliancy - -Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) - -This example now correctly throws an error when there is a semicolon after the decorator: - -```js -class A { -@a; -foo(){} -} -``` - -Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) - -Using keywords in imports is not allowed anymore: - -```js -import { default } from "foo"; -import { a as debugger } from "foo"; -``` - -Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) - -In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. - -Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) - -The following code now correctly throws an error - -```js -import type { type a } from "foo"; -``` - -Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) - -Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. - -If you enable the flow plugin you can only define the type of the class properties, but not initialize them. - -Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) - -Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. - -```js -export default async function bar() {}; -``` - -### :nail_care: Polish - -Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) - -### :bug: Bug Fix - -Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) - -Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) - -ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) - -Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) - -Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) - -Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) - -Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) - -Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) - - -### :house: Internal - -Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) - -Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) - -Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) - -chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) - -Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) - -Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) - -Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) - -devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) - -Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) - -Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) - -### :memo: Documentation - -Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) - -Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) - -Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) - -AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) - -## 6.15.0 (2017-01-10) - -### :eyeglasses: Spec Compliancy - -Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) - -This change implements flows new shorthand import syntax -and where previously you had to write this code: - -```js -import {someValue} from "blah"; -import type {someType} from "blah"; -import typeof {someOtherValue} from "blah"; -``` - -you can now write it like this: - -```js -import { - someValue, - type someType, - typeof someOtherValue, -} from "blah"; -``` - -For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. - -flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) - -This change now allows a leading pipe everywhere types can be used: -```js -var f = (x): | 1 | 2 => 1; -``` - -Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) - -Previously babylon parsed the following exports, although they are not valid: -```js -export typeof foo; -export new Foo(); -export function() {}; -export for (;;); -export while(foo); -``` - -### :bug: Bug Fix - -Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) - -This fixes parsing of this case: - -```js -const map = { - [age <= 17] : 'Too young' -}; -``` - -Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) - -The following case produced an invalid AST -```js -
{/* foo */}
-``` - -Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) - -When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. - -Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) - -Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) - -### :house: Internal - -User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) - -Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) - -Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) - -Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) - -Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) - -Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) - -Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) - -chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) - -chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) - -## 6.14.1 (2016-11-17) - -### :bug: Bug Fix - -Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) - -```js -{ - "plugins": ["*"] -} -``` - -Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. - -## 6.14.0 (2016-11-16) - -### :eyeglasses: Spec Compliancy - -Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) - -[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) - -Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). - -``` -class enum {} // throws -class await {} // throws in strict mode (module) -``` - -Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) - -So where you used to have to write - -```js -type A = (x: string, y: boolean) => number; -type B = (z: string) => number; -type C = { [key: string]: number }; -``` - -you can now write (with flow 0.34.0) - -```js -type A = (string, boolean) => number; -type B = string => number; -type C = { [string]: number }; -``` - -Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) - -Supports these form now of specifying array types: - -```js -var a: number[][][][]; -var b: string[][]; -``` - -### :bug: Bug Fix - -Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) - -``` -declare module "foo" { declare module.exports: number } -declare module "foo" { declare module.exports: number; } // also allowed now -``` - -### :house: Internal - - * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) - * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) - * Add node 7 (Daniel Tschinder) - * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) - -## v6.13.1 (2016-10-26) - -### :nail_care: Polish - -- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) - -```js -const babylon = require('babylon'); -const ast = babylon.parse('var foo = "lol";'); -``` - -With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. - -**Without bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) - -**With bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) - -- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) -- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) - -## v6.13.0 (2016-10-21) - -### :eyeglasses: Spec Compliancy - -Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) - -> See https://flowtype.org/docs/variance.html for more information - -```js -type T = { +p: T }; -interface T { -p: T }; -declare class T { +[k:K]: V }; -class T { -[k:K]: V }; -class C2 { +p: T = e }; -``` - -Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) - -```js -({ __proto__: 1, __proto__: 2 }) // Throws an error now -``` - -### :bug: Bug Fix - -Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) - -```js -declare class A { - static: T; -} -``` - -Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) - -```js -var foo = { async, bar }; -``` - -### :nail_care: Polish - -Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) - -> This improves the performance slightly (because of hidden classes) - -### :house: Internal - -Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) - -Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) - -Readd missin .eslinignore for IDEs (Daniel Tschinder) - -Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) - -Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) - -Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) - -## v6.12.0 (2016-10-14) - -### :eyeglasses: Spec Compliancy - -Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) - -#### Dynamic Import - -- Proposal Repo: https://github.com/domenic/proposal-dynamic-import -- Championed by [@domenic](https://github.com/domenic) -- stage-2 -- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) - -> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript - -```js -import(`./section-modules/${link.dataset.entryModule}.js`) -.then(module => { - module.loadPageInto(main); -}) -``` - -Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) - -#### EmptyTypeAnnotation - -Just wasn't covered before. - -```js -type T = empty; -``` - -### :bug: Bug Fix - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing due to sparse array -export const { foo: [ ,, qux7 ] } = bar; -``` - -Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) - -```js -declare class X { - foobar(): void; - static foobar(): void; -} -``` - -Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) - -```js -class Foo { - delete(item: T): T { - return item; - } -} -``` - -Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) - -```js -function *foo() { - const x = (yield 5: any); -} -``` - -### :nail_care: Polish - -Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) - -```js -// Unexpected token, expected ; (1:6) -{ set 1 } -``` - -### :house: Internal - -Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) - -Also run flow, linting, babel tests on seperate instances (add back node 0.10) - -## v6.11.6 (2016-10-12) - -### :bug: Bug Fix/Regression - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing with `Cannot read property 'type' of null` because of null identifiers -export const { foo: [ ,, qux7 ] } = bar; -``` - -## v6.11.5 (2016-10-12) - -### :eyeglasses: Spec Compliancy - -Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:20) -export function foo() {}; -export const { a: [{foo}] } = bar; -``` - -Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:22) -export const foo = 1; -export const [bar, ...foo] = baz; -``` - -### :bug: Bug Fix - -Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) - -```js -// this is ok now -const test = ({async = true}) => {}; -``` - -### :nail_care: Polish - -Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) - -```bash -# So in the case of a missing ending curly (`}`) -Module build failed: SyntaxError: Unexpected token, expected } (30:0) - 28 | } - 29 | -> 30 | - | ^ -``` - -## v6.11.4 (2016-10-03) - -Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) - -## v6.11.3 (2016-10-01) - -### :eyeglasses: Spec Compliancy - -Add static errors for object rest (#149) ([@danez](https://github.com/danez)) - -> https://github.com/sebmarkbage/ecmascript-rest-spread - -Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. - -```js -let { x, y, ...z } = { x: 1, y: 2, z: 3 }; -// x = 1 -// y = 2 -// z = { z: 3 } -``` - -#### New Syntax Errors: - -**SyntaxError**: The rest element has to be the last element when destructuring (1:10) -```bash -> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = { x: 1, y: 2, z: 3 } -# y = 2 -# z = 3 -``` - -Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. - -**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) - -```bash -> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = 1 -# y = { y: 2, z: 3 } -# z = { y: 2, z: 3 } -``` - -Before y and z would just be the same value anyway so there is no reason to need to have both. - -**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) - -```js -let { x, y, ...z, } = obj; -``` - -The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. - ---- - -get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) - -```js -// valid -function something({ set = null, get = null }) {} -``` - -## v6.11.2 (2016-09-23) - -### Bug Fix - -- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo - -```js -// regression with duplicate export check -SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) - 20 | - 21 | export const { rhythm } = typography; -> 22 | export const { TypographyStyle } = typography -``` - -Bail out for now, and make a change to account for destructuring in the next release. - -## 6.11.1 (2016-09-22) - -### Bug Fix -- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez - -```javascript -export toString from './toString'; -``` - -```bash -`toString` has already been exported. Exported identifiers must be unique. (1:7) -> 1 | export toString from './toString'; - | ^ - 2 | -``` - -## 6.11.0 (2016-09-22) - -### Spec Compliancy (will break CI) - -- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo - -```js -// Only one default export allowed per module. (2:9) -export default function() {}; -export { foo as default }; - -// Only one default export allowed per module. (2:0) -export default {}; -export default function() {}; - -// `Foo` has already been exported. Exported identifiers must be unique. (2:0) -export { Foo }; -export class Foo {}; -``` - -### New Feature (Syntax) - -- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 - -```js -// AST -interface ClassProperty <: Node { - type: "ClassProperty"; - key: Identifier; - value: Expression; - computed: boolean; // added -} -``` - -```js -// with "plugins": ["classProperties"] -class Foo { - [x] - ['y'] -} - -class Bar { - [p] - [m] () {} -} - ``` - -### Bug Fix - -- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper - -```js -declare class X { - a: number; - static b: number; // static - c: number; // this was being marked as static in the AST as well -} -``` - -### Polish - -- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 - -```js -// Used to error with: -// SyntaxError: Assigning to rvalue (1:0) - -// Now: -// Invalid left-hand side in assignment expression (1:0) -3 = 4 - -// Invalid left-hand side in for-in statement (1:5) -for (+i in {}); -``` - -### Internal - -- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez -- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo - -## 6.10.0 (2016-09-19) - -> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue. - -### Spec Compliancy - -* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) - -> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors - -More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) - -For example: - -```js -// this errors because it uses destructuring and default parameters -// in a function with a "use strict" directive -function a([ option1, option2 ] = []) { - "use strict"; -} - ``` - -The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. - -### New Feature - -* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) - -Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 - -Looks like: - -```js -var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; -``` - -### Bug Fixes - -* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) -* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) -* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) - -### Misc - -* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) -* Fix Contributing guidelines [skip ci] (Daniel Tschinder) - -## 6.9.2 (2016-09-09) - -The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. - -## 6.9.1 (2016-08-23) - -This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. - -### Bug Fixes - -- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez -- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez -- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper -- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez -- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez - -## 6.9.0 (2016-08-16) - -### New syntax support - -- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer - -(Be aware that React is not going to support this syntax) - -```js -
- {...todos.map(todo => )} -
-``` - -- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez - -```js -declare module "foo" { - declare module.exports: {} -} -``` - -### New Features - -- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain -- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens - -### Bug Fixes - -- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez -- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez -- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi -- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez -- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi -- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez -- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez - -### Internal - -- Add codecoverage to tests @danez -- Fix tests to not save expected output if we expect the test to fail @danez -- Make a shallow clone of babel for testing @danez -- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot -- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot -- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot -- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot - -## 6.8.4 (2016-07-06) - -### Bug Fixes - -- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez - -## 6.8.3 (2016-07-02) - -### Bug Fixes - -- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez - -## 6.8.2 (2016-06-24) - -### Bug Fixes - -- Fix parse error with yielding jsx elements in generators `function* it() { yield ; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal -- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez -- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez -- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez -- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez -- Support negative numeric type literals @kittens -- Remove line terminator restriction after await keyword @kittens -- Remove grouped type arrow restriction as it seems flow no longer has it @kittens -- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin -- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi - -### Documentation - -- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene -- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo - -### Internal - -- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez -- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez -- Upgrade test runner ava @kittens -- Add missing generate-identifier-regex script @kittens -- Rename parser context types @kittens -- Add node v6 to travis testing @hzoo -- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens - -## 6.8.1 (2016-06-06) - -### New Feature - -- Parse type parameter declarations with defaults like `type Foo = T` - -### Bug Fixes -- Type parameter declarations need 1 or more type parameters. -- The existential type `*` is not a valid type parameter. -- The existential type `*` is a primary type - -### Spec Compliancy -- The param list for type parameter declarations now consists of `TypeParameter` nodes -- New `TypeParameter` AST Node (replaces using the `Identifier` node before) - -``` -interface TypeParameter <: Node { - bound: TypeAnnotation; - default: TypeAnnotation; - name: string; - variance: "plus" | "minus"; -} -``` - -## 6.8.0 (2016-05-02) - -#### New Feature - -##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) - -> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). - -Examples: - -```js -class Foo { - constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} -} - -export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} - -var obj = { - method(@foo() x, @bar({ a: 123 }) @baz() y) {} -}; -``` - -##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) - -There is also a new node type, `ForAwaitStatement`. - -> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). - -Example: - -```js -async function f() { - for await (let x of y); -} -``` diff --git a/node_modules/@babel/traverse/node_modules/babylon/LICENSE b/node_modules/@babel/traverse/node_modules/babylon/LICENSE deleted file mode 100644 index d4c7fc5..0000000 --- a/node_modules/@babel/traverse/node_modules/babylon/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@babel/traverse/node_modules/babylon/README.md b/node_modules/@babel/traverse/node_modules/babylon/README.md deleted file mode 100644 index c710218..0000000 --- a/node_modules/@babel/traverse/node_modules/babylon/README.md +++ /dev/null @@ -1,167 +0,0 @@ -

- babylon -

- -

- Babylon is a JavaScript parser used in Babel. -

- - - The latest ECMAScript version enabled by default (ES2017). - - Comment attachment. - - Support for JSX, Flow, Typescript. - - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)). - -## Credits - -Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx), -thanks to the awesome work of [@RReverser](https://github.com/RReverser) and [@marijnh](https://github.com/marijnh). - -## API - -### `babylon.parse(code, [options])` - -### `babylon.parseExpression(code, [options])` - -`parse()` parses the provided `code` as an entire ECMAScript program, while -`parseExpression()` tries to parse a single Expression with performance in -mind. When in doubt, use `.parse()`. - -### Options - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowAwaitOutsideFunction**: By default, `await` use is not allowed - outside of an async function. Set this to `true` to accept such - code. - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowSuperOutsideMethod**: TODO - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - one of `"script"`, `"module"`, or `"unambiguous"`. Defaults to `"script"`. `"unambiguous"` will make Babylon attempt to _guess_, based on the presence of ES6 `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`. - -- **sourceFilename**: Correlate output AST nodes with their source filename. Useful when generating code and source maps from the ASTs of multiple input files. - -- **startLine**: By default, the first line of code parsed is treated as line 1. You can provide a line number to alternatively start with. Useful for integration with other source tools. - -- **plugins**: Array containing the plugins that you want to enable. - -- **strictMode**: TODO - -- **ranges**: Adds a `ranges` property to each node: `[node.start, node.end]` - -- **tokens**: Adds all parsed tokens to a `tokens` property on the `File` node - -### Output - -Babylon generates AST according to [Babel AST format][]. -It is based on [ESTree spec][] with the following deviations: - -> There is now an `estree` plugin which reverts these deviations - -- [Literal][] token is replaced with [StringLiteral][], [NumericLiteral][], [BooleanLiteral][], [NullLiteral][], [RegExpLiteral][] -- [Property][] token is replaced with [ObjectProperty][] and [ObjectMethod][] -- [MethodDefinition][] is replaced with [ClassMethod][] -- [Program][] and [BlockStatement][] contain additional `directives` field with [Directive][] and [DirectiveLiteral][] -- [ClassMethod][], [ObjectProperty][], and [ObjectMethod][] value property's properties in [FunctionExpression][] is coerced/brought into the main method node. - -AST for JSX code is based on [Facebook JSX AST][]. - -[Babel AST format]: https://github.com/babel/babylon/blob/master/ast/spec.md -[ESTree spec]: https://github.com/estree/estree - -[Literal]: https://github.com/estree/estree/blob/master/es5.md#literal -[Property]: https://github.com/estree/estree/blob/master/es5.md#property -[MethodDefinition]: https://github.com/estree/estree/blob/master/es2015.md#methoddefinition - -[StringLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#stringliteral -[NumericLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#numericliteral -[BooleanLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#booleanliteral -[NullLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#nullliteral -[RegExpLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#regexpliteral -[ObjectProperty]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#objectproperty -[ObjectMethod]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#objectmethod -[ClassMethod]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#classmethod -[Program]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#programs -[BlockStatement]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#blockstatement -[Directive]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#directive -[DirectiveLiteral]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#directiveliteral -[FunctionExpression]: https://github.com/babel/babel/tree/master/packages/babylon/ast/spec.md#functionexpression - -[Facebook JSX AST]: https://github.com/facebook/jsx/blob/master/AST.md - -### Semver - -Babylon follows semver in most situations. The only thing to note is that some spec-compliancy bug fixes may be released under patch versions. - -For example: We push a fix to early error on something like [#107](https://github.com/babel/babylon/pull/107) - multiple default exports per file. That would be considered a bug fix even though it would cause a build to fail. - -### Example - -```javascript -require("babylon").parse("code", { - // parse in strict mode and allow module declarations - sourceType: "module", - - plugins: [ - // enable jsx and flow syntax - "jsx", - "flow" - ] -}); -``` - -### Plugins - -| Name | Code Example | -|------|--------------| -| `estree` ([repo](https://github.com/estree/estree)) | n/a | -| `jsx` ([repo](https://facebook.github.io/jsx/)) | `{s}` | -| `flow` ([repo](https://github.com/facebook/flow)) | `var a: string = "";` | -| `flowComments` ([docs](https://flow.org/en/docs/types/comments/)) | `/*:: type Foo = {...}; */` | -| `typescript` ([repo](https://github.com/Microsoft/TypeScript)) | `var a: string = "";` | -| `doExpressions` | `var a = do { if (true) { 'hi'; } };` | -| `objectRestSpread` ([proposal](https://github.com/tc39/proposal-object-rest-spread)) | `var a = { b, ...c };` | -| `decorators` (Stage 1) and `decorators2` (Stage 2 [proposal](https://github.com/tc39/proposal-decorators)) | `@a class A {}` | -| `classProperties` ([proposal](https://github.com/tc39/proposal-class-public-fields)) | `class A { b = 1; }` | -| `classPrivateProperties` ([proposal](https://github.com/tc39/proposal-private-fields)) | `class A { #b = 1; }` | -| `classPrivateMethods` ([proposal](https://github.com/tc39/proposal-private-methods)) | `class A { #c() {} }` | -| `exportDefaultFrom` ([proposal](https://github.com/leebyron/ecmascript-export-default-from)) | `export v from "mod"` | -| `exportNamespaceFrom` ([proposal](https://github.com/leebyron/ecmascript-export-ns-from)) | `export * as ns from "mod"` | -| `asyncGenerators` ([proposal](https://github.com/tc39/proposal-async-iteration)) | `async function*() {}`, `for await (let a of b) {}` | -| `functionBind` ([proposal](https://github.com/zenparsing/es-function-bind)) | `a::b`, `::console.log` | -| `functionSent` | `function.sent` | -| `dynamicImport` ([proposal](https://github.com/tc39/proposal-dynamic-import)) | `import('./guy').then(a)` | -| `numericSeparator` ([proposal](https://github.com/samuelgoto/proposal-numeric-separator)) | `1_000_000` | -| `optionalChaining` ([proposal](https://github.com/tc39/proposal-optional-chaining)) | `a?.b` | -| `importMeta` ([proposal](https://github.com/tc39/proposal-import-meta)) | `import.meta.url` | -| `bigInt` ([proposal](https://github.com/tc39/proposal-bigint)) | `100n` | -| `optionalCatchBinding` ([proposal](https://github.com/babel/proposals/issues/7)) | `try {throw 0;} catch{do();}` | -| `throwExpressions` ([proposal](https://github.com/babel/proposals/issues/23)) | `() => throw new Error("")` | -| `pipelineOperator` ([proposal](https://github.com/babel/proposals/issues/29)) | `a \|> b` | -| `nullishCoalescingOperator` ([proposal](https://github.com/babel/proposals/issues/14)) | `a ?? b` | - -### FAQ - -#### Will Babylon support a plugin system? - -Previous issues: [#1351](https://github.com/babel/babel/issues/1351), [#6694](https://github.com/babel/babel/issues/6694). - -We currently aren't willing to commit to supporting the API for plugins or the resulting ecosystem (there is already enough work maintaining Babel's own plugin system). It's not clear how to make that API effective, and it would limit out ability to refactor and optimize the codebase. - -Our current recommendation for those that want to create their own custom syntax is for users to fork Babylon. - -To consume your custom parser, you can add to your `.babelrc` via its npm package name or require it if using JavaScript, - -```json -{ - "parserOpts": { - "parser": "custom-fork-of-babylon-on-npm-here" - } -} -``` diff --git a/node_modules/@babel/traverse/node_modules/babylon/bin/babylon.js b/node_modules/@babel/traverse/node_modules/babylon/bin/babylon.js deleted file mode 100755 index 440eef3..0000000 --- a/node_modules/@babel/traverse/node_modules/babylon/bin/babylon.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node -/* eslint no-var: 0 */ - -var babylon = require(".."); -var fs = require("fs"); - -var filename = process.argv[2]; -if (!filename) { - console.error("no filename specified"); - process.exit(0); -} - -var file = fs.readFileSync(filename, "utf8"); -var ast = babylon.parse(file); - -console.log(JSON.stringify(ast, null, " ")); diff --git a/node_modules/@babel/traverse/node_modules/babylon/lib/index.js b/node_modules/@babel/traverse/node_modules/babylon/lib/index.js deleted file mode 100644 index 50f49cf..0000000 --- a/node_modules/@babel/traverse/node_modules/babylon/lib/index.js +++ /dev/null @@ -1,10116 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _AwaitValue(value) { - this.wrapped = value; -} - -function _AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - var wrappedAwait = value instanceof _AwaitValue; - Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { - if (wrappedAwait) { - resume("next", arg); - return; - } - - settle(result.done ? "return" : "normal", arg); - }, function (err) { - resume("throw", err); - }); - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } -} - -if (typeof Symbol === "function" && Symbol.asyncIterator) { - _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; -} - -_AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); -}; - -_AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); -}; - -_AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); -}; - -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; -} - -var defaultOptions = { - sourceType: "script", - sourceFilename: undefined, - startLine: 1, - allowAwaitOutsideFunction: false, - allowReturnOutsideFunction: false, - allowImportExportEverywhere: false, - allowSuperOutsideMethod: false, - plugins: [], - strictMode: null, - ranges: false, - tokens: false -}; -function getOptions(opts) { - var options = {}; - - for (var key in defaultOptions) { - options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; - } - - return options; -} - -var beforeExpr = true; -var startsExpr = true; -var isLoop = true; -var isAssign = true; -var prefix = true; -var postfix = true; -var TokenType = function TokenType(label, conf) { - if (conf === void 0) { - conf = {}; - } - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop === 0 ? 0 : conf.binop || null; - this.updateContext = null; -}; - -var KeywordTokenType = function (_TokenType) { - _inheritsLoose(KeywordTokenType, _TokenType); - - function KeywordTokenType(name, options) { - if (options === void 0) { - options = {}; - } - - options.keyword = name; - return _TokenType.call(this, name, options) || this; - } - - return KeywordTokenType; -}(TokenType); - -var BinopTokenType = function (_TokenType2) { - _inheritsLoose(BinopTokenType, _TokenType2); - - function BinopTokenType(name, prec) { - return _TokenType2.call(this, name, { - beforeExpr: beforeExpr, - binop: prec - }) || this; - } - - return BinopTokenType; -}(TokenType); -var types = { - num: new TokenType("num", { - startsExpr: startsExpr - }), - bigint: new TokenType("bigint", { - startsExpr: startsExpr - }), - regexp: new TokenType("regexp", { - startsExpr: startsExpr - }), - string: new TokenType("string", { - startsExpr: startsExpr - }), - name: new TokenType("name", { - startsExpr: startsExpr - }), - eof: new TokenType("eof"), - bracketL: new TokenType("[", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - braceBarL: new TokenType("{|", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - braceR: new TokenType("}"), - braceBarR: new TokenType("|}"), - parenL: new TokenType("(", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - parenR: new TokenType(")"), - comma: new TokenType(",", { - beforeExpr: beforeExpr - }), - semi: new TokenType(";", { - beforeExpr: beforeExpr - }), - colon: new TokenType(":", { - beforeExpr: beforeExpr - }), - doubleColon: new TokenType("::", { - beforeExpr: beforeExpr - }), - dot: new TokenType("."), - question: new TokenType("?", { - beforeExpr: beforeExpr - }), - questionDot: new TokenType("?."), - arrow: new TokenType("=>", { - beforeExpr: beforeExpr - }), - template: new TokenType("template"), - ellipsis: new TokenType("...", { - beforeExpr: beforeExpr - }), - backQuote: new TokenType("`", { - startsExpr: startsExpr - }), - dollarBraceL: new TokenType("${", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - at: new TokenType("@"), - hash: new TokenType("#"), - eq: new TokenType("=", { - beforeExpr: beforeExpr, - isAssign: isAssign - }), - assign: new TokenType("_=", { - beforeExpr: beforeExpr, - isAssign: isAssign - }), - incDec: new TokenType("++/--", { - prefix: prefix, - postfix: postfix, - startsExpr: startsExpr - }), - bang: new TokenType("!", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - tilde: new TokenType("~", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - pipeline: new BinopTokenType("|>", 0), - nullishCoalescing: new BinopTokenType("??", 1), - logicalOR: new BinopTokenType("||", 1), - logicalAND: new BinopTokenType("&&", 2), - bitwiseOR: new BinopTokenType("|", 3), - bitwiseXOR: new BinopTokenType("^", 4), - bitwiseAND: new BinopTokenType("&", 5), - equality: new BinopTokenType("==/!=", 6), - relational: new BinopTokenType("", 7), - bitShift: new BinopTokenType("<>", 8), - plusMin: new TokenType("+/-", { - beforeExpr: beforeExpr, - binop: 9, - prefix: prefix, - startsExpr: startsExpr - }), - modulo: new BinopTokenType("%", 10), - star: new BinopTokenType("*", 10), - slash: new BinopTokenType("/", 10), - exponent: new TokenType("**", { - beforeExpr: beforeExpr, - binop: 11, - rightAssociative: true - }) -}; -var keywords = { - break: new KeywordTokenType("break"), - case: new KeywordTokenType("case", { - beforeExpr: beforeExpr - }), - catch: new KeywordTokenType("catch"), - continue: new KeywordTokenType("continue"), - debugger: new KeywordTokenType("debugger"), - default: new KeywordTokenType("default", { - beforeExpr: beforeExpr - }), - do: new KeywordTokenType("do", { - isLoop: isLoop, - beforeExpr: beforeExpr - }), - else: new KeywordTokenType("else", { - beforeExpr: beforeExpr - }), - finally: new KeywordTokenType("finally"), - for: new KeywordTokenType("for", { - isLoop: isLoop - }), - function: new KeywordTokenType("function", { - startsExpr: startsExpr - }), - if: new KeywordTokenType("if"), - return: new KeywordTokenType("return", { - beforeExpr: beforeExpr - }), - switch: new KeywordTokenType("switch"), - throw: new KeywordTokenType("throw", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - try: new KeywordTokenType("try"), - var: new KeywordTokenType("var"), - let: new KeywordTokenType("let"), - const: new KeywordTokenType("const"), - while: new KeywordTokenType("while", { - isLoop: isLoop - }), - with: new KeywordTokenType("with"), - new: new KeywordTokenType("new", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - this: new KeywordTokenType("this", { - startsExpr: startsExpr - }), - super: new KeywordTokenType("super", { - startsExpr: startsExpr - }), - class: new KeywordTokenType("class"), - extends: new KeywordTokenType("extends", { - beforeExpr: beforeExpr - }), - export: new KeywordTokenType("export"), - import: new KeywordTokenType("import", { - startsExpr: startsExpr - }), - yield: new KeywordTokenType("yield", { - beforeExpr: beforeExpr, - startsExpr: startsExpr - }), - null: new KeywordTokenType("null", { - startsExpr: startsExpr - }), - true: new KeywordTokenType("true", { - startsExpr: startsExpr - }), - false: new KeywordTokenType("false", { - startsExpr: startsExpr - }), - in: new KeywordTokenType("in", { - beforeExpr: beforeExpr, - binop: 7 - }), - instanceof: new KeywordTokenType("instanceof", { - beforeExpr: beforeExpr, - binop: 7 - }), - typeof: new KeywordTokenType("typeof", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - void: new KeywordTokenType("void", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }), - delete: new KeywordTokenType("delete", { - beforeExpr: beforeExpr, - prefix: prefix, - startsExpr: startsExpr - }) -}; -Object.keys(keywords).forEach(function (name) { - types["_" + name] = keywords[name]; -}); - -function makePredicate(words) { - var wordsArr = words.split(" "); - return function (str) { - return wordsArr.indexOf(str) >= 0; - }; -} - -var reservedWords = { - "6": makePredicate("enum await"), - strict: makePredicate("implements interface let package private protected public static yield"), - strictBind: makePredicate("eval arguments") -}; -var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"); -var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; -var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 785, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 25, 391, 63, 32, 0, 257, 0, 11, 39, 8, 0, 22, 0, 12, 39, 3, 3, 55, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 698, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 65, 1, 31, 6124, 20, 754, 9486, 286, 82, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541]; -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 10, 2, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 87, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 423, 9, 280, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 19719, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239]; - -function isInAstralSet(code, set) { - var pos = 0x10000; - - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } - - return false; -} - -function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes); -} -function isIteratorStart(current, next) { - return current === 64 && next === 64; -} -function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code < 91) return true; - if (code < 97) return code === 95; - if (code < 123) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); -function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; -} -var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -var TokContext = function TokContext(token, isExpr, preserveSpace, override) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; -}; -var types$1 = { - braceStatement: new TokContext("{", false), - braceExpression: new TokContext("{", true), - templateQuasi: new TokContext("${", true), - parenStatement: new TokContext("(", false), - parenExpression: new TokContext("(", true), - template: new TokContext("`", true, true, function (p) { - return p.readTmplToken(); - }), - functionExpression: new TokContext("function", true) -}; - -types.parenR.updateContext = types.braceR.updateContext = function () { - if (this.state.context.length === 1) { - this.state.exprAllowed = true; - return; - } - - var out = this.state.context.pop(); - - if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) { - this.state.context.pop(); - this.state.exprAllowed = false; - } else if (out === types$1.templateQuasi) { - this.state.exprAllowed = true; - } else { - this.state.exprAllowed = !out.isExpr; - } -}; - -types.name.updateContext = function (prevType) { - if (this.state.value === "of" && this.curContext() === types$1.parenStatement) { - this.state.exprAllowed = !prevType.beforeExpr; - return; - } - - this.state.exprAllowed = false; - - if (prevType === types._let || prevType === types._const || prevType === types._var) { - if (lineBreak.test(this.input.slice(this.state.end))) { - this.state.exprAllowed = true; - } - } - - if (this.state.isIterator) { - this.state.isIterator = false; - } -}; - -types.braceL.updateContext = function (prevType) { - this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); - this.state.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function () { - this.state.context.push(types$1.templateQuasi); - this.state.exprAllowed = true; -}; - -types.parenL.updateContext = function (prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); - this.state.exprAllowed = true; -}; - -types.incDec.updateContext = function () {}; - -types._function.updateContext = function (prevType) { - if (this.state.exprAllowed && !this.braceIsBlock(prevType)) { - this.state.context.push(types$1.functionExpression); - } - - this.state.exprAllowed = false; -}; - -types.backQuote.updateContext = function () { - if (this.curContext() === types$1.template) { - this.state.context.pop(); - } else { - this.state.context.push(types$1.template); - } - - this.state.exprAllowed = false; -}; - -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; -var SourceLocation = function SourceLocation(start, end) { - this.start = start; - this.end = end; -}; -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur); - } - } - - throw new Error("Unreachable"); -} - -var BaseParser = function () { - function BaseParser() { - this.sawUnambiguousESM = false; - } - - var _proto = BaseParser.prototype; - - _proto.isReservedWord = function isReservedWord(word) { - if (word === "await") { - return this.inModule; - } else { - return reservedWords[6](word); - } - }; - - _proto.hasPlugin = function hasPlugin(name) { - return !!this.plugins[name]; - }; - - return BaseParser; -}(); - -function last(stack) { - return stack[stack.length - 1]; -} - -var CommentsParser = function (_BaseParser) { - _inheritsLoose(CommentsParser, _BaseParser); - - function CommentsParser() { - return _BaseParser.apply(this, arguments) || this; - } - - var _proto = CommentsParser.prototype; - - _proto.addComment = function addComment(comment) { - if (this.filename) comment.loc.filename = this.filename; - this.state.trailingComments.push(comment); - this.state.leadingComments.push(comment); - }; - - _proto.processComment = function processComment(node) { - if (node.type === "Program" && node.body.length > 0) return; - var stack = this.state.commentStack; - var firstChild, lastChild, trailingComments, i, j; - - if (this.state.trailingComments.length > 0) { - if (this.state.trailingComments[0].start >= node.end) { - trailingComments = this.state.trailingComments; - this.state.trailingComments = []; - } else { - this.state.trailingComments.length = 0; - } - } else if (stack.length > 0) { - var lastInStack = last(stack); - - if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) { - trailingComments = lastInStack.trailingComments; - delete lastInStack.trailingComments; - } - } - - if (stack.length > 0 && last(stack).start >= node.start) { - firstChild = stack.pop(); - } - - while (stack.length > 0 && last(stack).start >= node.start) { - lastChild = stack.pop(); - } - - if (!lastChild && firstChild) lastChild = firstChild; - - if (firstChild && this.state.leadingComments.length > 0) { - var lastComment = last(this.state.leadingComments); - - if (firstChild.type === "ObjectProperty") { - if (lastComment.start >= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - - if (this.state.leadingComments.length > 0) { - firstChild.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) { - var lastArg = last(node.arguments); - - if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) { - if (this.state.commentPreviousNode) { - if (this.state.leadingComments.length > 0) { - lastArg.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } - } - - if (lastChild) { - if (lastChild.leadingComments) { - if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) { - node.leadingComments = lastChild.leadingComments; - delete lastChild.leadingComments; - } else { - for (i = lastChild.leadingComments.length - 2; i >= 0; --i) { - if (lastChild.leadingComments[i].end <= node.start) { - node.leadingComments = lastChild.leadingComments.splice(0, i + 1); - break; - } - } - } - } - } else if (this.state.leadingComments.length > 0) { - if (last(this.state.leadingComments).end <= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - } - - if (this.state.leadingComments.length > 0) { - node.leadingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } else { - for (i = 0; i < this.state.leadingComments.length; i++) { - if (this.state.leadingComments[i].end > node.start) { - break; - } - } - - var leadingComments = this.state.leadingComments.slice(0, i); - - if (leadingComments.length) { - node.leadingComments = leadingComments; - } - - trailingComments = this.state.leadingComments.slice(i); - - if (trailingComments.length === 0) { - trailingComments = null; - } - } - } - - this.state.commentPreviousNode = node; - - if (trailingComments) { - if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) { - node.innerComments = trailingComments; - } else { - node.trailingComments = trailingComments; - } - } - - stack.push(node); - }; - - return CommentsParser; -}(BaseParser); - -var LocationParser = function (_CommentsParser) { - _inheritsLoose(LocationParser, _CommentsParser); - - function LocationParser() { - return _CommentsParser.apply(this, arguments) || this; - } - - var _proto = LocationParser.prototype; - - _proto.raise = function raise(pos, message, _temp) { - var _ref = _temp === void 0 ? {} : _temp, - missingPluginNames = _ref.missingPluginNames, - code = _ref.code; - - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; - err.loc = loc; - - if (missingPluginNames) { - err.missingPlugin = missingPluginNames; - } - - if (code !== undefined) { - err.code = code; - } - - throw err; - }; - - return LocationParser; -}(CommentsParser); - -var State = function () { - function State() {} - - var _proto = State.prototype; - - _proto.init = function init(options, input) { - this.strict = options.strictMode === false ? false : options.sourceType === "module"; - this.input = input; - this.potentialArrowAt = -1; - this.noArrowAt = []; - this.noArrowParamsConversionAt = []; - this.inMethod = false; - this.inFunction = false; - this.inParameters = false; - this.maybeInArrowParameters = false; - this.inGenerator = false; - this.inAsync = false; - this.inPropertyName = false; - this.inType = false; - this.inClassProperty = false; - this.noAnonFunctionType = false; - this.hasFlowComment = false; - this.isIterator = false; - this.classLevel = 0; - this.labels = []; - this.decoratorStack = [[]]; - this.yieldInPossibleArrowParameters = null; - this.tokens = []; - this.comments = []; - this.trailingComments = []; - this.leadingComments = []; - this.commentStack = []; - this.commentPreviousNode = null; - this.pos = this.lineStart = 0; - this.curLine = options.startLine; - this.type = types.eof; - this.value = null; - this.start = this.end = this.pos; - this.startLoc = this.endLoc = this.curPosition(); - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - this.context = [types$1.braceStatement]; - this.exprAllowed = true; - this.containsEsc = this.containsOctal = false; - this.octalPosition = null; - this.invalidTemplateEscapePosition = null; - this.exportedIdentifiers = []; - }; - - _proto.curPosition = function curPosition() { - return new Position(this.curLine, this.pos - this.lineStart); - }; - - _proto.clone = function clone(skipArrays) { - var _this = this; - - var state = new State(); - Object.keys(this).forEach(function (key) { - var val = _this[key]; - - if ((!skipArrays || key === "context") && Array.isArray(val)) { - val = val.slice(); - } - - state[key] = val; - }); - return state; - }; - - return State; -}(); - -var _isDigit = function isDigit(code) { - return code >= 48 && code <= 57; -}; - -var VALID_REGEX_FLAGS = "gmsiyu"; -var forbiddenNumericSeparatorSiblings = { - decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], - hex: [46, 88, 95, 120] -}; -var allowedNumericSeparatorSiblings = {}; -allowedNumericSeparatorSiblings.bin = [48, 49]; -allowedNumericSeparatorSiblings.oct = allowedNumericSeparatorSiblings.bin.concat([50, 51, 52, 53, 54, 55]); -allowedNumericSeparatorSiblings.dec = allowedNumericSeparatorSiblings.oct.concat([56, 57]); -allowedNumericSeparatorSiblings.hex = allowedNumericSeparatorSiblings.dec.concat([65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]); -var Token = function Token(state) { - this.type = state.type; - this.value = state.value; - this.start = state.start; - this.end = state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); -}; - -function codePointToString(code) { - if (code <= 0xffff) { - return String.fromCharCode(code); - } else { - return String.fromCharCode((code - 0x10000 >> 10) + 0xd800, (code - 0x10000 & 1023) + 0xdc00); - } -} - -var Tokenizer = function (_LocationParser) { - _inheritsLoose(Tokenizer, _LocationParser); - - function Tokenizer(options, input) { - var _this; - - _this = _LocationParser.call(this) || this; - _this.state = new State(); - - _this.state.init(options, input); - - _this.isLookahead = false; - return _this; - } - - var _proto = Tokenizer.prototype; - - _proto.next = function next() { - if (this.options.tokens && !this.isLookahead) { - this.state.tokens.push(new Token(this.state)); - } - - this.state.lastTokEnd = this.state.end; - this.state.lastTokStart = this.state.start; - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - }; - - _proto.eat = function eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - }; - - _proto.match = function match(type) { - return this.state.type === type; - }; - - _proto.isKeyword = function isKeyword$$1(word) { - return isKeyword(word); - }; - - _proto.lookahead = function lookahead() { - var old = this.state; - this.state = old.clone(true); - this.isLookahead = true; - this.next(); - this.isLookahead = false; - var curr = this.state; - this.state = old; - return curr; - }; - - _proto.setStrict = function setStrict(strict) { - this.state.strict = strict; - if (!this.match(types.num) && !this.match(types.string)) return; - this.state.pos = this.state.start; - - while (this.state.pos < this.state.lineStart) { - this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; - --this.state.curLine; - } - - this.nextToken(); - }; - - _proto.curContext = function curContext() { - return this.state.context[this.state.context.length - 1]; - }; - - _proto.nextToken = function nextToken() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - this.state.containsOctal = false; - this.state.octalPosition = null; - this.state.start = this.state.pos; - this.state.startLoc = this.state.curPosition(); - - if (this.state.pos >= this.input.length) { - this.finishToken(types.eof); - return; - } - - if (curContext.override) { - curContext.override(this); - } else { - this.readToken(this.fullCharCodeAtPos()); - } - }; - - _proto.readToken = function readToken(code) { - if (isIdentifierStart(code) || code === 92) { - this.readWord(); - } else { - this.getTokenFromCode(code); - } - }; - - _proto.fullCharCodeAtPos = function fullCharCodeAtPos() { - var code = this.input.charCodeAt(this.state.pos); - if (code <= 0xd7ff || code >= 0xe000) return code; - var next = this.input.charCodeAt(this.state.pos + 1); - return (code << 10) + next - 0x35fdc00; - }; - - _proto.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "CommentBlock" : "CommentLine", - value: text, - start: start, - end: end, - loc: new SourceLocation(startLoc, endLoc) - }; - - if (!this.isLookahead) { - if (this.options.tokens) this.state.tokens.push(comment); - this.state.comments.push(comment); - this.addComment(comment); - } - }; - - _proto.skipBlockComment = function skipBlockComment() { - var startLoc = this.state.curPosition(); - var start = this.state.pos; - var end = this.input.indexOf("*/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 2; - lineBreakG.lastIndex = start; - var match; - - while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { - ++this.state.curLine; - this.state.lineStart = match.index + match[0].length; - } - - this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - _proto.skipLineComment = function skipLineComment(startSkip) { - var start = this.state.pos; - var startLoc = this.state.curPosition(); - var ch = this.input.charCodeAt(this.state.pos += startSkip); - - if (this.state.pos < this.input.length) { - while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.input.length) { - ch = this.input.charCodeAt(this.state.pos); - } - } - - this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); - }; - - _proto.skipSpace = function skipSpace() { - loop: while (this.state.pos < this.input.length) { - var ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 32: - case 160: - ++this.state.pos; - break; - - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - - case 10: - case 8232: - case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - - case 47: - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - this.skipBlockComment(); - break; - - case 47: - this.skipLineComment(2); - break; - - default: - break loop; - } - - break; - - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.state.pos; - } else { - break loop; - } - - } - } - }; - - _proto.finishToken = function finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - var prevType = this.state.type; - this.state.type = type; - this.state.value = val; - this.updateContext(prevType); - }; - - _proto.readToken_dot = function readToken_dot() { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next >= 48 && next <= 57) { - this.readNumber(true); - return; - } - - var next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 46 && next2 === 46) { - this.state.pos += 3; - this.finishToken(types.ellipsis); - } else { - ++this.state.pos; - this.finishToken(types.dot); - } - }; - - _proto.readToken_slash = function readToken_slash() { - if (this.state.exprAllowed) { - ++this.state.pos; - this.readRegexp(); - return; - } - - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.slash, 1); - } - }; - - _proto.readToken_mult_modulo = function readToken_mult_modulo(code) { - var type = code === 42 ? types.star : types.modulo; - var width = 1; - var next = this.input.charCodeAt(this.state.pos + 1); - var exprAllowed = this.state.exprAllowed; - - if (code === 42 && next === 42) { - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = types.exponent; - } - - if (next === 61 && !exprAllowed) { - width++; - type = types.assign; - } - - this.finishOp(type, width); - }; - - _proto.readToken_pipe_amp = function readToken_pipe_amp(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (this.input.charCodeAt(this.state.pos + 2) === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); - } - - return; - } - - if (code === 124) { - if (next === 62) { - this.finishOp(types.pipeline, 2); - return; - } else if (next === 125 && this.hasPlugin("flow")) { - this.finishOp(types.braceBarR, 2); - return; - } - } - - if (next === 61) { - this.finishOp(types.assign, 2); - return; - } - - this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); - }; - - _proto.readToken_caret = function readToken_caret() { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.bitwiseXOR, 1); - } - }; - - _proto.readToken_plus_min = function readToken_plus_min(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) { - this.skipLineComment(3); - this.skipSpace(); - this.nextToken(); - return; - } - - this.finishOp(types.incDec, 2); - return; - } - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.plusMin, 1); - } - }; - - _proto.readToken_lt_gt = function readToken_lt_gt(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - var size = 1; - - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; - - if (this.input.charCodeAt(this.state.pos + size) === 61) { - this.finishOp(types.assign, size + 1); - return; - } - - this.finishOp(types.bitShift, size); - return; - } - - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { - this.skipLineComment(4); - this.skipSpace(); - this.nextToken(); - return; - } - - if (next === 61) { - size = 2; - } - - this.finishOp(types.relational, size); - }; - - _proto.readToken_eq_excl = function readToken_eq_excl(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); - return; - } - - if (code === 61 && next === 62) { - this.state.pos += 2; - this.finishToken(types.arrow); - return; - } - - this.finishOp(code === 61 ? types.eq : types.bang, 1); - }; - - _proto.readToken_question = function readToken_question() { - var next = this.input.charCodeAt(this.state.pos + 1); - var next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 63) { - if (next2 === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(types.nullishCoalescing, 2); - } - } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { - this.state.pos += 2; - this.finishToken(types.questionDot); - } else { - ++this.state.pos; - this.finishToken(types.question); - } - }; - - _proto.getTokenFromCode = function getTokenFromCode(code) { - switch (code) { - case 35: - if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) { - ++this.state.pos; - this.finishToken(types.hash); - return; - } else { - this.raise(this.state.pos, "Unexpected character '" + codePointToString(code) + "'"); - } - - case 46: - this.readToken_dot(); - return; - - case 40: - ++this.state.pos; - this.finishToken(types.parenL); - return; - - case 41: - ++this.state.pos; - this.finishToken(types.parenR); - return; - - case 59: - ++this.state.pos; - this.finishToken(types.semi); - return; - - case 44: - ++this.state.pos; - this.finishToken(types.comma); - return; - - case 91: - ++this.state.pos; - this.finishToken(types.bracketL); - return; - - case 93: - ++this.state.pos; - this.finishToken(types.bracketR); - return; - - case 123: - if (this.hasPlugin("flow") && this.input.charCodeAt(this.state.pos + 1) === 124) { - this.finishOp(types.braceBarL, 2); - } else { - ++this.state.pos; - this.finishToken(types.braceL); - } - - return; - - case 125: - ++this.state.pos; - this.finishToken(types.braceR); - return; - - case 58: - if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { - this.finishOp(types.doubleColon, 2); - } else { - ++this.state.pos; - this.finishToken(types.colon); - } - - return; - - case 63: - this.readToken_question(); - return; - - case 64: - ++this.state.pos; - this.finishToken(types.at); - return; - - case 96: - ++this.state.pos; - this.finishToken(types.backQuote); - return; - - case 48: - { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 120 || next === 88) { - this.readRadixNumber(16); - return; - } - - if (next === 111 || next === 79) { - this.readRadixNumber(8); - return; - } - - if (next === 98 || next === 66) { - this.readRadixNumber(2); - return; - } - } - - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - this.readNumber(false); - return; - - case 34: - case 39: - this.readString(code); - return; - - case 47: - this.readToken_slash(); - return; - - case 37: - case 42: - this.readToken_mult_modulo(code); - return; - - case 124: - case 38: - this.readToken_pipe_amp(code); - return; - - case 94: - this.readToken_caret(); - return; - - case 43: - case 45: - this.readToken_plus_min(code); - return; - - case 60: - case 62: - this.readToken_lt_gt(code); - return; - - case 61: - case 33: - this.readToken_eq_excl(code); - return; - - case 126: - this.finishOp(types.tilde, 1); - return; - } - - this.raise(this.state.pos, "Unexpected character '" + codePointToString(code) + "'"); - }; - - _proto.finishOp = function finishOp(type, size) { - var str = this.input.slice(this.state.pos, this.state.pos + size); - this.state.pos += size; - this.finishToken(type, str); - }; - - _proto.readRegexp = function readRegexp() { - var start = this.state.pos; - var escaped, inClass; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(start, "Unterminated regular expression"); - } - - var ch = this.input.charAt(this.state.pos); - - if (lineBreak.test(ch)) { - this.raise(start, "Unterminated regular expression"); - } - - if (escaped) { - escaped = false; - } else { - if (ch === "[") { - inClass = true; - } else if (ch === "]" && inClass) { - inClass = false; - } else if (ch === "/" && !inClass) { - break; - } - - escaped = ch === "\\"; - } - - ++this.state.pos; - } - - var content = this.input.slice(start, this.state.pos); - ++this.state.pos; - var mods = ""; - - while (this.state.pos < this.input.length) { - var char = this.input[this.state.pos]; - var charCode = this.fullCharCodeAtPos(); - - if (VALID_REGEX_FLAGS.indexOf(char) > -1) { - if (mods.indexOf(char) > -1) { - this.raise(this.state.pos + 1, "Duplicate regular expression flag"); - } - - ++this.state.pos; - mods += char; - } else if (isIdentifierChar(charCode) || charCode === 92) { - this.raise(this.state.pos + 1, "Invalid regular expression flag"); - } else { - break; - } - } - - this.finishToken(types.regexp, { - pattern: content, - flags: mods - }); - }; - - _proto.readInt = function readInt(radix, len) { - var start = this.state.pos; - var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - var allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; - var total = 0; - - for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) { - var code = this.input.charCodeAt(this.state.pos); - var val = void 0; - - if (this.hasPlugin("numericSeparator")) { - var prev = this.input.charCodeAt(this.state.pos - 1); - var next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 95) { - if (allowedSiblings.indexOf(next) === -1) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - ++this.state.pos; - continue; - } - } - - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - - if (val >= radix) break; - ++this.state.pos; - total = total * radix + val; - } - - if (this.state.pos === start || len != null && this.state.pos - start !== len) { - return null; - } - - return total; - }; - - _proto.readRadixNumber = function readRadixNumber(radix) { - var start = this.state.pos; - var isBigInt = false; - this.state.pos += 2; - var val = this.readInt(radix); - - if (val == null) { - this.raise(this.state.start + 2, "Expected number in radix " + radix); - } - - if (this.hasPlugin("bigInt")) { - if (this.input.charCodeAt(this.state.pos) === 110) { - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - if (isBigInt) { - var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - this.finishToken(types.bigint, str); - return; - } - - this.finishToken(types.num, val); - }; - - _proto.readNumber = function readNumber(startsWithDot) { - var start = this.state.pos; - var octal = this.input.charCodeAt(start) === 48; - var isFloat = false; - var isBigInt = false; - - if (!startsWithDot && this.readInt(10) === null) { - this.raise(start, "Invalid number"); - } - - if (octal && this.state.pos == start + 1) octal = false; - var next = this.input.charCodeAt(this.state.pos); - - if (next === 46 && !octal) { - ++this.state.pos; - this.readInt(10); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if ((next === 69 || next === 101) && !octal) { - next = this.input.charCodeAt(++this.state.pos); - - if (next === 43 || next === 45) { - ++this.state.pos; - } - - if (this.readInt(10) === null) this.raise(start, "Invalid number"); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if (this.hasPlugin("bigInt")) { - if (next === 110) { - if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral"); - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - - if (isBigInt) { - this.finishToken(types.bigint, str); - return; - } - - var val; - - if (isFloat) { - val = parseFloat(str); - } else if (!octal || str.length === 1) { - val = parseInt(str, 10); - } else if (this.state.strict) { - this.raise(start, "Invalid number"); - } else if (/[89]/.test(str)) { - val = parseInt(str, 10); - } else { - val = parseInt(str, 8); - } - - this.finishToken(types.num, val); - }; - - _proto.readCodePoint = function readCodePoint(throwOnInvalid) { - var ch = this.input.charCodeAt(this.state.pos); - var code; - - if (ch === 123) { - var codePos = ++this.state.pos; - code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid); - ++this.state.pos; - - if (code === null) { - --this.state.invalidTemplateEscapePosition; - } else if (code > 0x10ffff) { - if (throwOnInvalid) { - this.raise(codePos, "Code point out of bounds"); - } else { - this.state.invalidTemplateEscapePosition = codePos - 2; - return null; - } - } - } else { - code = this.readHexChar(4, throwOnInvalid); - } - - return code; - }; - - _proto.readString = function readString(quote) { - var out = "", - chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - var ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.readEscapedChar(false); - chunkStart = this.state.pos; - } else { - if (isNewLine(ch)) { - this.raise(this.state.start, "Unterminated string constant"); - } - - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - this.finishToken(types.string, out); - }; - - _proto.readTmplToken = function readTmplToken() { - var out = "", - chunkStart = this.state.pos, - containsInvalid = false; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated template"); - } - - var ch = this.input.charCodeAt(this.state.pos); - - if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { - if (this.state.pos === this.state.start && this.match(types.template)) { - if (ch === 36) { - this.state.pos += 2; - this.finishToken(types.dollarBraceL); - return; - } else { - ++this.state.pos; - this.finishToken(types.backQuote); - return; - } - } - - out += this.input.slice(chunkStart, this.state.pos); - this.finishToken(types.template, containsInvalid ? null : out); - return; - } - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - var escaped = this.readEscapedChar(true); - - if (escaped === null) { - containsInvalid = true; - } else { - out += escaped; - } - - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - ++this.state.pos; - - switch (ch) { - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - out += "\n"; - break; - - default: - out += String.fromCharCode(ch); - break; - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - }; - - _proto.readEscapedChar = function readEscapedChar(inTemplate) { - var throwOnInvalid = !inTemplate; - var ch = this.input.charCodeAt(++this.state.pos); - ++this.state.pos; - - switch (ch) { - case 110: - return "\n"; - - case 114: - return "\r"; - - case 120: - { - var code = this.readHexChar(2, throwOnInvalid); - return code === null ? null : String.fromCharCode(code); - } - - case 117: - { - var _code = this.readCodePoint(throwOnInvalid); - - return _code === null ? null : codePointToString(_code); - } - - case 116: - return "\t"; - - case 98: - return "\b"; - - case 118: - return "\x0B"; - - case 102: - return "\f"; - - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - this.state.lineStart = this.state.pos; - ++this.state.curLine; - return ""; - - default: - if (ch >= 48 && ch <= 55) { - var codePos = this.state.pos - 1; - var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; - var octal = parseInt(octalStr, 8); - - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - - if (octal > 0) { - if (inTemplate) { - this.state.invalidTemplateEscapePosition = codePos; - return null; - } else if (this.state.strict) { - this.raise(codePos, "Octal literal in strict mode"); - } else if (!this.state.containsOctal) { - this.state.containsOctal = true; - this.state.octalPosition = codePos; - } - } - - this.state.pos += octalStr.length - 1; - return String.fromCharCode(octal); - } - - return String.fromCharCode(ch); - } - }; - - _proto.readHexChar = function readHexChar(len, throwOnInvalid) { - var codePos = this.state.pos; - var n = this.readInt(16, len); - - if (n === null) { - if (throwOnInvalid) { - this.raise(codePos, "Bad character escape sequence"); - } else { - this.state.pos = codePos - 1; - this.state.invalidTemplateEscapePosition = codePos - 1; - } - } - - return n; - }; - - _proto.readWord1 = function readWord1() { - this.state.containsEsc = false; - var word = "", - first = true, - chunkStart = this.state.pos; - - while (this.state.pos < this.input.length) { - var ch = this.fullCharCodeAtPos(); - - if (isIdentifierChar(ch)) { - this.state.pos += ch <= 0xffff ? 1 : 2; - } else if (this.state.isIterator && ch === 64) { - this.state.pos += 1; - } else if (ch === 92) { - this.state.containsEsc = true; - word += this.input.slice(chunkStart, this.state.pos); - var escStart = this.state.pos; - - if (this.input.charCodeAt(++this.state.pos) !== 117) { - this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX"); - } - - ++this.state.pos; - var esc = this.readCodePoint(true); - - if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) { - this.raise(escStart, "Invalid Unicode escape"); - } - - word += codePointToString(esc); - chunkStart = this.state.pos; - } else { - break; - } - - first = false; - } - - return word + this.input.slice(chunkStart, this.state.pos); - }; - - _proto.isIterator = function isIterator(word) { - return word === "@@iterator" || word === "@@asyncIterator"; - }; - - _proto.readWord = function readWord() { - var word = this.readWord1(); - var type = types.name; - - if (this.isKeyword(word)) { - if (this.state.containsEsc) { - this.raise(this.state.pos, "Escape sequence in keyword " + word); - } - - type = keywords[word]; - } - - if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) { - this.raise(this.state.pos, "Invalid identifier " + word); - } - - this.finishToken(type, word); - }; - - _proto.braceIsBlock = function braceIsBlock(prevType) { - if (prevType === types.colon) { - var parent = this.curContext(); - - if (parent === types$1.braceStatement || parent === types$1.braceExpression) { - return !parent.isExpr; - } - } - - if (prevType === types._return) { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - } - - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR) { - return true; - } - - if (prevType === types.braceL) { - return this.curContext() === types$1.braceStatement; - } - - if (prevType === types.relational) { - return true; - } - - return !this.state.exprAllowed; - }; - - _proto.updateContext = function updateContext(prevType) { - var type = this.state.type; - var update; - - if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) { - this.state.exprAllowed = false; - } else if (update = type.updateContext) { - update.call(this, prevType); - } else { - this.state.exprAllowed = type.beforeExpr; - } - }; - - return Tokenizer; -}(LocationParser); - -var UtilParser = function (_Tokenizer) { - _inheritsLoose(UtilParser, _Tokenizer); - - function UtilParser() { - return _Tokenizer.apply(this, arguments) || this; - } - - var _proto = UtilParser.prototype; - - _proto.addExtra = function addExtra(node, key, val) { - if (!node) return; - var extra = node.extra = node.extra || {}; - extra[key] = val; - }; - - _proto.isRelational = function isRelational(op) { - return this.match(types.relational) && this.state.value === op; - }; - - _proto.expectRelational = function expectRelational(op) { - if (this.isRelational(op)) { - this.next(); - } else { - this.unexpected(null, types.relational); - } - }; - - _proto.eatRelational = function eatRelational(op) { - if (this.isRelational(op)) { - this.next(); - return true; - } - - return false; - }; - - _proto.isContextual = function isContextual(name) { - return this.match(types.name) && this.state.value === name && !this.state.containsEsc; - }; - - _proto.isLookaheadContextual = function isLookaheadContextual(name) { - var l = this.lookahead(); - return l.type === types.name && l.value === name; - }; - - _proto.eatContextual = function eatContextual(name) { - return this.isContextual(name) && this.eat(types.name); - }; - - _proto.expectContextual = function expectContextual(name, message) { - if (!this.eatContextual(name)) this.unexpected(null, message); - }; - - _proto.canInsertSemicolon = function canInsertSemicolon() { - return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak(); - }; - - _proto.hasPrecedingLineBreak = function hasPrecedingLineBreak() { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - }; - - _proto.isLineTerminator = function isLineTerminator() { - return this.eat(types.semi) || this.canInsertSemicolon(); - }; - - _proto.semicolon = function semicolon() { - if (!this.isLineTerminator()) this.unexpected(null, types.semi); - }; - - _proto.expect = function expect(type, pos) { - this.eat(type) || this.unexpected(pos, type); - }; - - _proto.unexpected = function unexpected(pos, messageOrType) { - if (messageOrType === void 0) { - messageOrType = "Unexpected token"; - } - - if (typeof messageOrType !== "string") { - messageOrType = "Unexpected token, expected \"" + messageOrType.label + "\""; - } - - throw this.raise(pos != null ? pos : this.state.start, messageOrType); - }; - - _proto.expectPlugin = function expectPlugin(name, pos) { - if (!this.hasPlugin(name)) { - throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling the parser plugin: '" + name + "'", { - missingPluginNames: [name] - }); - } - - return true; - }; - - _proto.expectOnePlugin = function expectOnePlugin(names, pos) { - var _this = this; - - if (!names.some(function (n) { - return _this.hasPlugin(n); - })) { - throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling one of the following parser plugin(s): '" + names.join(", ") + "'", { - missingPluginNames: names - }); - } - }; - - return UtilParser; -}(Tokenizer); - -var commentKeys = ["leadingComments", "trailingComments", "innerComments"]; - -var Node = function () { - function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - this.loc = new SourceLocation(loc); - if (parser && parser.options.ranges) this.range = [pos, 0]; - if (parser && parser.filename) this.loc.filename = parser.filename; - } - - var _proto = Node.prototype; - - _proto.__clone = function __clone() { - var _this = this; - - var node2 = new Node(); - Object.keys(this).forEach(function (key) { - if (commentKeys.indexOf(key) < 0) { - node2[key] = _this[key]; - } - }); - return node2; - }; - - return Node; -}(); - -var NodeUtils = function (_UtilParser) { - _inheritsLoose(NodeUtils, _UtilParser); - - function NodeUtils() { - return _UtilParser.apply(this, arguments) || this; - } - - var _proto2 = NodeUtils.prototype; - - _proto2.startNode = function startNode() { - return new Node(this, this.state.start, this.state.startLoc); - }; - - _proto2.startNodeAt = function startNodeAt(pos, loc) { - return new Node(this, pos, loc); - }; - - _proto2.startNodeAtNode = function startNodeAtNode(type) { - return this.startNodeAt(type.start, type.loc.start); - }; - - _proto2.finishNode = function finishNode(node, type) { - return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); - }; - - _proto2.finishNodeAt = function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - this.processComment(node); - return node; - }; - - _proto2.resetStartLocationFromNode = function resetStartLocationFromNode(node, locationNode) { - node.start = locationNode.start; - node.loc.start = locationNode.loc.start; - if (this.options.ranges) node.range[0] = locationNode.range[0]; - }; - - return NodeUtils; -}(UtilParser); - -var LValParser = function (_NodeUtils) { - _inheritsLoose(LValParser, _NodeUtils); - - function LValParser() { - return _NodeUtils.apply(this, arguments) || this; - } - - var _proto = LValParser.prototype; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - - for (var index = 0; index < node.properties.length; index++) { - var prop = node.properties[index]; - var isLast = index === node.properties.length - 1; - this.toAssignableObjectExpressionProp(prop, isBinding, isLast); - } - - break; - - case "ObjectProperty": - this.toAssignable(node.value, isBinding, contextDescription); - break; - - case "SpreadElement": - { - this.checkToRestConversion(node); - node.type = "RestElement"; - var arg = node.argument; - this.toAssignable(arg, isBinding, contextDescription); - break; - } - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding, contextDescription); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - { - var message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(node.start, message); - } - } - } - - return node; - }; - - _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.type === "ObjectMethod") { - var error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods"; - this.raise(prop.key.start, error); - } else if (prop.type === "SpreadElement" && !isLast) { - this.raise(prop.start, "The rest element has to be the last element when destructuring"); - } else { - this.toAssignable(prop, isBinding, "object destructuring pattern"); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - var end = exprList.length; - - if (end) { - var last = exprList[end - 1]; - - if (last && last.type === "RestElement") { - --end; - } else if (last && last.type === "SpreadElement") { - last.type = "RestElement"; - var arg = last.argument; - this.toAssignable(arg, isBinding, contextDescription); - - if (["Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"].indexOf(arg.type) === -1) { - this.unexpected(arg.start); - } - - --end; - } - } - - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - - if (elt && elt.type === "SpreadElement") { - this.raise(elt.start, "The rest element has to be the last element when destructuring"); - } - - if (elt) this.toAssignable(elt, isBinding, contextDescription); - } - - return exprList; - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - return exprList; - }; - - _proto.parseSpread = function parseSpread(refShorthandDefaultPos, refNeedsArrowPos) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos); - return this.finishNode(node, "SpreadElement"); - }; - - _proto.parseRest = function parseRest() { - var node = this.startNode(); - this.next(); - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); - }; - - _proto.shouldAllowYieldIdentifier = function shouldAllowYieldIdentifier() { - return this.match(types._yield) && !this.state.strict && !this.state.inGenerator; - }; - - _proto.parseBindingIdentifier = function parseBindingIdentifier() { - return this.parseIdentifier(this.shouldAllowYieldIdentifier()); - }; - - _proto.parseBindingAtom = function parseBindingAtom() { - switch (this.state.type) { - case types._yield: - case types.name: - return this.parseBindingIdentifier(); - - case types.bracketL: - { - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true); - return this.finishNode(node, "ArrayPattern"); - } - - case types.braceL: - return this.parseObj(true); - - default: - throw this.unexpected(); - } - }; - - _proto.parseBindingList = function parseBindingList(close, allowEmpty, allowModifiers) { - var elts = []; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - } - - if (allowEmpty && this.match(types.comma)) { - elts.push(null); - } else if (this.eat(close)) { - break; - } else if (this.match(types.ellipsis)) { - elts.push(this.parseAssignableListItemTypes(this.parseRest())); - this.expect(close); - break; - } else { - var decorators = []; - - if (this.match(types.at) && this.hasPlugin("decorators2")) { - this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters"); - } - - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - - elts.push(this.parseAssignableListItem(allowModifiers, decorators)); - } - } - - return elts; - }; - - _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) { - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - var elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - return param; - }; - - _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) { - startLoc = startLoc || this.state.startLoc; - startPos = startPos || this.state.start; - left = left || this.parseBindingAtom(); - if (!this.eat(types.eq)) return left; - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - switch (expr.type) { - case "Identifier": - this.checkReservedWord(expr.name, expr.start, false, true); - - if (checkClashes) { - var _key = "_" + expr.name; - - if (checkClashes[_key]) { - this.raise(expr.start, "Argument name clash in strict mode"); - } else { - checkClashes[_key] = true; - } - } - - break; - - case "MemberExpression": - if (isBinding) this.raise(expr.start, "Binding member expression"); - break; - - case "ObjectPattern": - for (var _i2 = 0, _expr$properties2 = expr.properties; _i2 < _expr$properties2.length; _i2++) { - var prop = _expr$properties2[_i2]; - if (prop.type === "ObjectProperty") prop = prop.value; - this.checkLVal(prop, isBinding, checkClashes, "object destructuring pattern"); - } - - break; - - case "ArrayPattern": - for (var _i4 = 0, _expr$elements2 = expr.elements; _i4 < _expr$elements2.length; _i4++) { - var elem = _expr$elements2[_i4]; - - if (elem) { - this.checkLVal(elem, isBinding, checkClashes, "array destructuring pattern"); - } - } - - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes, "assignment pattern"); - break; - - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes, "rest element"); - break; - - default: - { - var message = (isBinding ? "Binding invalid" : "Invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(expr.start, message); - } - } - }; - - _proto.checkToRestConversion = function checkToRestConversion(node) { - var validArgumentTypes = ["Identifier", "MemberExpression"]; - - if (validArgumentTypes.indexOf(node.argument.type) !== -1) { - return; - } - - this.raise(node.argument.start, "Invalid rest operator's argument"); - }; - - return LValParser; -}(NodeUtils); - -var ExpressionParser = function (_LValParser) { - _inheritsLoose(ExpressionParser, _LValParser); - - function ExpressionParser() { - return _LValParser.apply(this, arguments) || this; - } - - var _proto = ExpressionParser.prototype; - - _proto.checkPropClash = function checkPropClash(prop, propHash) { - if (prop.computed || prop.kind) return; - var key = prop.key; - var name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - }; - - _proto.getExpression = function getExpression() { - this.nextToken(); - var expr = this.parseExpression(); - - if (!this.match(types.eof)) { - this.unexpected(); - } - - expr.comments = this.state.comments; - return expr; - }; - - _proto.parseExpression = function parseExpression(noIn, refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - - if (this.match(types.comma)) { - var _node = this.startNodeAt(startPos, startLoc); - - _node.expressions = [expr]; - - while (this.eat(types.comma)) { - _node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - } - - this.toReferencedList(_node.expressions); - return this.finishNode(_node, "SequenceExpression"); - } - - return expr; - }; - - _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - - if (this.match(types._yield) && this.state.inGenerator) { - var _left = this.parseYield(); - - if (afterLeftParse) { - _left = afterLeftParse.call(this, _left, startPos, startLoc); - } - - return _left; - } - - var failOnShorthandAssign; - - if (refShorthandDefaultPos) { - failOnShorthandAssign = false; - } else { - refShorthandDefaultPos = { - start: 0 - }; - failOnShorthandAssign = true; - } - - if (this.match(types.parenL) || this.match(types.name) || this.match(types._yield)) { - this.state.potentialArrowAt = this.state.start; - } - - var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos); - - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); - } - - if (this.state.type.isAssign) { - var _node2 = this.startNodeAt(startPos, startLoc); - - var operator = this.state.value; - _node2.operator = operator; - - if (operator === "??=") { - this.expectPlugin("nullishCoalescingOperator"); - this.expectPlugin("logicalAssignment"); - } - - if (operator === "||=" || operator === "&&=") { - this.expectPlugin("logicalAssignment"); - } - - _node2.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left; - refShorthandDefaultPos.start = 0; - this.checkLVal(left, undefined, undefined, "assignment expression"); - - if (left.extra && left.extra.parenthesized) { - var errorMsg; - - if (left.type === "ObjectPattern") { - errorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (left.type === "ArrayPattern") { - errorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - - if (errorMsg) { - this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg); - } - } - - this.next(); - _node2.right = this.parseMaybeAssign(noIn); - return this.finishNode(_node2, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - return left; - }; - - _proto.parseMaybeConditional = function parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseExprOps(noIn, refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (this.eat(types.question)) { - var _node3 = this.startNodeAt(startPos, startLoc); - - _node3.test = expr; - _node3.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - _node3.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(_node3, "ConditionalExpression"); - } - - return expr; - }; - - _proto.parseExprOps = function parseExprOps(noIn, refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseMaybeUnary(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); - }; - - _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.state.type.binop; - - if (prec != null && (!noIn || !this.match(types._in))) { - if (prec > minPrec) { - var _node4 = this.startNodeAt(leftStartPos, leftStartLoc); - - var operator = this.state.value; - _node4.left = left; - _node4.operator = operator; - - if (operator === "**" && left.type === "UnaryExpression" && left.extra && !left.extra.parenthesizedArgument && !left.extra.parenthesized) { - this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses."); - } - - var op = this.state.type; - - if (op === types.nullishCoalescing) { - this.expectPlugin("nullishCoalescingOperator"); - } else if (op === types.pipeline) { - this.expectPlugin("pipelineOperator"); - } - - this.next(); - var startPos = this.state.start; - var startLoc = this.state.startLoc; - - if (op === types.pipeline) { - this.state.potentialArrowAt = startPos; - } - - _node4.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn); - this.finishNode(_node4, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(_node4, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - - return left; - }; - - _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) { - if (this.state.type.prefix) { - var _node5 = this.startNode(); - - var update = this.match(types.incDec); - _node5.operator = this.state.value; - _node5.prefix = true; - - if (_node5.operator === "throw") { - this.expectPlugin("throwExpressions"); - } - - this.next(); - var argType = this.state.type; - _node5.argument = this.parseMaybeUnary(); - this.addExtra(_node5, "parenthesizedArgument", argType === types.parenL && (!_node5.argument.extra || !_node5.argument.extra.parenthesized)); - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (update) { - this.checkLVal(_node5.argument, undefined, undefined, "prefix operation"); - } else if (this.state.strict && _node5.operator === "delete") { - var arg = _node5.argument; - - if (arg.type === "Identifier") { - this.raise(_node5.start, "Deleting local variable in strict mode"); - } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") { - this.raise(_node5.start, "Deleting a private field is not allowed"); - } - } - - return this.finishNode(_node5, update ? "UpdateExpression" : "UnaryExpression"); - } - - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - - while (this.state.type.postfix && !this.canInsertSemicolon()) { - var _node6 = this.startNodeAt(startPos, startLoc); - - _node6.operator = this.state.value; - _node6.prefix = false; - _node6.argument = expr; - this.checkLVal(expr, undefined, undefined, "postfix operation"); - this.next(); - expr = this.finishNode(_node6, "UpdateExpression"); - } - - return expr; - }; - - _proto.parseExprSubscripts = function parseExprSubscripts(refShorthandDefaultPos) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var potentialArrowAt = this.state.potentialArrowAt; - var expr = this.parseExprAtom(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseSubscripts(expr, startPos, startLoc); - }; - - _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) { - var state = { - optionalChainMember: false, - stop: false - }; - - do { - base = this.parseSubscript(base, startPos, startLoc, noCalls, state); - } while (!state.stop); - - return base; - }; - - _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) { - if (!noCalls && this.eat(types.doubleColon)) { - var _node7 = this.startNodeAt(startPos, startLoc); - - _node7.object = base; - _node7.callee = this.parseNoCallExpr(); - state.stop = true; - return this.parseSubscripts(this.finishNode(_node7, "BindExpression"), startPos, startLoc, noCalls); - } else if (this.match(types.questionDot)) { - this.expectPlugin("optionalChaining"); - state.optionalChainMember = true; - - if (noCalls && this.lookahead().type == types.parenL) { - state.stop = true; - return base; - } - - this.next(); - - var _node8 = this.startNodeAt(startPos, startLoc); - - if (this.eat(types.bracketL)) { - _node8.object = base; - _node8.property = this.parseExpression(); - _node8.computed = true; - _node8.optional = true; - this.expect(types.bracketR); - return this.finishNode(_node8, "OptionalMemberExpression"); - } else if (this.eat(types.parenL)) { - var possibleAsync = this.atPossibleAsync(base); - _node8.callee = base; - _node8.arguments = this.parseCallExpressionArguments(types.parenR, possibleAsync); - _node8.optional = true; - return this.finishNode(_node8, "OptionalCallExpression"); - } else { - _node8.object = base; - _node8.property = this.parseIdentifier(true); - _node8.computed = false; - _node8.optional = true; - return this.finishNode(_node8, "OptionalMemberExpression"); - } - } else if (this.eat(types.dot)) { - var _node9 = this.startNodeAt(startPos, startLoc); - - _node9.object = base; - _node9.property = this.parseMaybePrivateName(); - _node9.computed = false; - - if (state.optionalChainMember) { - _node9.optional = false; - return this.finishNode(_node9, "OptionalMemberExpression"); - } - - return this.finishNode(_node9, "MemberExpression"); - } else if (this.eat(types.bracketL)) { - var _node10 = this.startNodeAt(startPos, startLoc); - - _node10.object = base; - _node10.property = this.parseExpression(); - _node10.computed = true; - this.expect(types.bracketR); - - if (state.optionalChainMember) { - _node10.optional = false; - return this.finishNode(_node10, "OptionalMemberExpression"); - } - - return this.finishNode(_node10, "MemberExpression"); - } else if (!noCalls && this.match(types.parenL)) { - var _possibleAsync = this.atPossibleAsync(base); - - this.next(); - - var _node11 = this.startNodeAt(startPos, startLoc); - - _node11.callee = base; - var refTrailingCommaPos = { - start: -1 - }; - _node11.arguments = this.parseCallExpressionArguments(types.parenR, _possibleAsync, refTrailingCommaPos); - - if (!state.optionalChainMember) { - this.finishCallExpression(_node11); - } else { - this.finishOptionalCallExpression(_node11); - } - - if (_possibleAsync && this.shouldParseAsyncArrow()) { - state.stop = true; - - if (refTrailingCommaPos.start > -1) { - this.raise(refTrailingCommaPos.start, "A trailing comma is not permitted after the rest element"); - } - - return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node11); - } else { - this.toReferencedList(_node11.arguments); - } - - return _node11; - } else if (this.match(types.backQuote)) { - var _node12 = this.startNodeAt(startPos, startLoc); - - _node12.tag = base; - _node12.quasi = this.parseTemplate(true); - - if (state.optionalChainMember) { - this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain"); - } - - return this.finishNode(_node12, "TaggedTemplateExpression"); - } else { - state.stop = true; - return base; - } - }; - - _proto.atPossibleAsync = function atPossibleAsync(base) { - return !this.state.containsEsc && this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon(); - }; - - _proto.finishCallExpression = function finishCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - var importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "CallExpression"); - }; - - _proto.finishOptionalCallExpression = function finishOptionalCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - var importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "OptionalCallExpression"); - }; - - _proto.parseCallExpressionArguments = function parseCallExpressionArguments(close, possibleAsyncArrow, refTrailingCommaPos) { - var elts = []; - var innerParenStart; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(close)) break; - } - - if (this.match(types.parenL) && !innerParenStart) { - innerParenStart = this.state.start; - } - - elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { - start: 0 - } : undefined, possibleAsyncArrow ? { - start: 0 - } : undefined, possibleAsyncArrow ? refTrailingCommaPos : undefined)); - } - - if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) { - this.unexpected(); - } - - return elts; - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.arrow); - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - this.expect(types.arrow); - this.parseArrowExpression(node, call.arguments, true); - this.state.yieldInPossibleArrowParameters = oldYield; - return node; - }; - - _proto.parseNoCallExpr = function parseNoCallExpr() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - }; - - _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) { - var canBeArrow = this.state.potentialArrowAt === this.state.start; - var node; - - switch (this.state.type) { - case types._super: - if (!this.state.inMethod && !this.state.inClassProperty && !this.options.allowSuperOutsideMethod) { - this.raise(this.state.start, "super is only allowed in object methods and classes"); - } - - node = this.startNode(); - this.next(); - - if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) { - this.unexpected(); - } - - if (this.match(types.parenL) && this.state.inMethod !== "constructor" && !this.options.allowSuperOutsideMethod) { - this.raise(node.start, "super() is only valid inside a class constructor. " + "Make sure the method name is spelled exactly as 'constructor'."); - } - - return this.finishNode(node, "Super"); - - case types._import: - if (this.lookahead().type === types.dot) { - return this.parseImportMetaProperty(); - } - - this.expectPlugin("dynamicImport"); - node = this.startNode(); - this.next(); - - if (!this.match(types.parenL)) { - this.unexpected(null, types.parenL); - } - - return this.finishNode(node, "Import"); - - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); - - case types._yield: - if (this.state.inGenerator) this.unexpected(); - - case types.name: - { - node = this.startNode(); - var allowAwait = this.state.value === "await" && (this.state.inAsync || !this.state.inFunction && this.options.allowAwaitOutsideFunction); - var containsEsc = this.state.containsEsc; - var allowYield = this.shouldAllowYieldIdentifier(); - var id = this.parseIdentifier(allowAwait || allowYield); - - if (id.name === "await") { - if (this.state.inAsync || this.inModule || !this.state.inFunction && this.options.allowAwaitOutsideFunction) { - return this.parseAwait(node); - } - } else if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, false, false, true); - } else if (canBeArrow && id.name === "async" && this.match(types.name)) { - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - var params = [this.parseIdentifier()]; - this.expect(types.arrow); - this.parseArrowExpression(node, params, true); - this.state.yieldInPossibleArrowParameters = oldYield; - return node; - } - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - var _oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; - this.parseArrowExpression(node, [id]); - this.state.yieldInPossibleArrowParameters = _oldYield; - return node; - } - - return id; - } - - case types._do: - { - this.expectPlugin("doExpressions"); - - var _node13 = this.startNode(); - - this.next(); - var oldInFunction = this.state.inFunction; - var oldLabels = this.state.labels; - this.state.labels = []; - this.state.inFunction = false; - _node13.body = this.parseBlock(false); - this.state.inFunction = oldInFunction; - this.state.labels = oldLabels; - return this.finishNode(_node13, "DoExpression"); - } - - case types.regexp: - { - var value = this.state.value; - node = this.parseLiteral(value.value, "RegExpLiteral"); - node.pattern = value.pattern; - node.flags = value.flags; - return node; - } - - case types.num: - return this.parseLiteral(this.state.value, "NumericLiteral"); - - case types.bigint: - return this.parseLiteral(this.state.value, "BigIntLiteral"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteral"); - - case types._null: - node = this.startNode(); - this.next(); - return this.finishNode(node, "NullLiteral"); - - case types._true: - case types._false: - return this.parseBooleanLiteral(); - - case types.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos); - this.toReferencedList(node.elements); - return this.finishNode(node, "ArrayExpression"); - - case types.braceL: - return this.parseObj(false, refShorthandDefaultPos); - - case types._function: - return this.parseFunctionExpression(); - - case types.at: - this.parseDecorators(); - - case types._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); - - case types._new: - return this.parseNew(); - - case types.backQuote: - return this.parseTemplate(false); - - case types.doubleColon: - { - node = this.startNode(); - this.next(); - node.object = null; - var callee = node.callee = this.parseNoCallExpr(); - - if (callee.type === "MemberExpression") { - return this.finishNode(node, "BindExpression"); - } else { - throw this.raise(callee.start, "Binding should be performed on object property."); - } - } - - default: - throw this.unexpected(); - } - }; - - _proto.parseBooleanLiteral = function parseBooleanLiteral() { - var node = this.startNode(); - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteral"); - }; - - _proto.parseMaybePrivateName = function parseMaybePrivateName() { - var isPrivate = this.match(types.hash); - - if (isPrivate) { - this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); - - var _node14 = this.startNode(); - - this.next(); - _node14.id = this.parseIdentifier(true); - return this.finishNode(_node14, "PrivateName"); - } else { - return this.parseIdentifier(true); - } - }; - - _proto.parseFunctionExpression = function parseFunctionExpression() { - var node = this.startNode(); - var meta = this.parseIdentifier(true); - - if (this.state.inGenerator && this.eat(types.dot)) { - return this.parseMetaProperty(node, meta, "sent"); - } - - return this.parseFunction(node, false); - }; - - _proto.parseMetaProperty = function parseMetaProperty(node, meta, propertyName) { - node.meta = meta; - - if (meta.name === "function" && propertyName === "sent") { - if (this.isContextual(propertyName)) { - this.expectPlugin("functionSent"); - } else if (!this.hasPlugin("functionSent")) { - this.unexpected(); - } - } - - var containsEsc = this.state.containsEsc; - node.property = this.parseIdentifier(true); - - if (node.property.name !== propertyName || containsEsc) { - this.raise(node.property.start, "The only valid meta property for " + meta.name + " is " + meta.name + "." + propertyName); - } - - return this.finishNode(node, "MetaProperty"); - }; - - _proto.parseImportMetaProperty = function parseImportMetaProperty() { - var node = this.startNode(); - var id = this.parseIdentifier(true); - this.expect(types.dot); - - if (id.name === "import") { - if (this.isContextual("meta")) { - this.expectPlugin("importMeta"); - } else if (!this.hasPlugin("importMeta")) { - this.raise(id.start, "Dynamic imports require a parameter: import('a.js').then"); - } - } - - if (!this.inModule) { - this.raise(id.start, "import.meta may appear only with 'sourceType: \"module\"'", { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - - this.sawUnambiguousESM = true; - return this.parseMetaProperty(node, id, "meta"); - }; - - _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - var node = this.startNodeAt(startPos, startLoc); - this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(startPos, this.state.end)); - node.value = value; - this.next(); - return this.finishNode(node, type); - }; - - _proto.parseParenExpression = function parseParenExpression() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val; - }; - - _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var val; - this.expect(types.parenL); - var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - var oldYield = this.state.yieldInPossibleArrowParameters; - this.state.maybeInArrowParameters = true; - this.state.yieldInPossibleArrowParameters = null; - var innerStartPos = this.state.start; - var innerStartLoc = this.state.startLoc; - var exprList = []; - var refShorthandDefaultPos = { - start: 0 - }; - var refNeedsArrowPos = { - start: 0 - }; - var first = true; - var spreadStart; - var optionalCommaStart; - - while (!this.match(types.parenR)) { - if (first) { - first = false; - } else { - this.expect(types.comma, refNeedsArrowPos.start || null); - - if (this.match(types.parenR)) { - optionalCommaStart = this.state.start; - break; - } - } - - if (this.match(types.ellipsis)) { - var spreadNodeStartPos = this.state.start; - var spreadNodeStartLoc = this.state.startLoc; - spreadStart = this.state.start; - exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartPos, spreadNodeStartLoc)); - - if (this.match(types.comma) && this.lookahead().type === types.parenR) { - this.raise(this.state.start, "A trailing comma is not permitted after the rest element"); - } - - break; - } else { - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos)); - } - } - - var innerEndPos = this.state.start; - var innerEndLoc = this.state.startLoc; - this.expect(types.parenR); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - var arrowNode = this.startNodeAt(startPos, startLoc); - - if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) { - for (var _i2 = 0; _i2 < exprList.length; _i2++) { - var param = exprList[_i2]; - - if (param.extra && param.extra.parenthesized) { - this.unexpected(param.extra.parenStart); - } - } - - this.parseArrowExpression(arrowNode, exprList); - this.state.yieldInPossibleArrowParameters = oldYield; - return arrowNode; - } - - this.state.yieldInPossibleArrowParameters = oldYield; - - if (!exprList.length) { - this.unexpected(this.state.lastTokStart); - } - - if (optionalCommaStart) this.unexpected(optionalCommaStart); - if (spreadStart) this.unexpected(spreadStart); - - if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.toReferencedList(val.expressions); - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - - this.addExtra(val, "parenthesized", true); - this.addExtra(val, "parenStart", startPos); - return val; - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return !this.canInsertSemicolon(); - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.eat(types.arrow)) { - return node; - } - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - return node; - }; - - _proto.parseNew = function parseNew() { - var node = this.startNode(); - var meta = this.parseIdentifier(true); - - if (this.eat(types.dot)) { - var metaProp = this.parseMetaProperty(node, meta, "target"); - - if (!this.state.inFunction && !this.state.inClassProperty) { - var error = "new.target can only be used in functions"; - - if (this.hasPlugin("classProperties")) { - error += " or class properties"; - } - - this.raise(metaProp.start, error); - } - - return metaProp; - } - - node.callee = this.parseNoCallExpr(); - - if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") { - this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed"); - } - - if (this.eat(types.questionDot)) { - this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed"); - } - - this.parseNewArguments(node); - return this.finishNode(node, "NewExpression"); - }; - - _proto.parseNewArguments = function parseNewArguments(node) { - if (this.eat(types.parenL)) { - var args = this.parseExprList(types.parenR); - this.toReferencedList(args); - node.arguments = args; - } else { - node.arguments = []; - } - }; - - _proto.parseTemplateElement = function parseTemplateElement(isTagged) { - var elem = this.startNode(); - - if (this.state.value === null) { - if (!isTagged) { - this.raise(this.state.invalidTemplateEscapePosition || 0, "Invalid escape sequence in template"); - } else { - this.state.invalidTemplateEscapePosition = null; - } - } - - elem.value = { - raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), - cooked: this.state.value - }; - this.next(); - elem.tail = this.match(types.backQuote); - return this.finishNode(elem, "TemplateElement"); - }; - - _proto.parseTemplate = function parseTemplate(isTagged) { - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement(isTagged); - node.quasis = [curElt]; - - while (!curElt.tail) { - this.expect(types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types.braceR); - node.quasis.push(curElt = this.parseTemplateElement(isTagged)); - } - - this.next(); - return this.finishNode(node, "TemplateLiteral"); - }; - - _proto.parseObj = function parseObj(isPattern, refShorthandDefaultPos) { - var decorators = []; - var propHash = Object.create(null); - var first = true; - var node = this.startNode(); - node.properties = []; - this.next(); - var firstRestLocation = null; - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - if (this.match(types.at)) { - if (this.hasPlugin("decorators2")) { - this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators"); - } else { - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - } - } - - var prop = this.startNode(), - isGenerator = false, - _isAsync = false, - startPos = void 0, - startLoc = void 0; - - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - - if (this.match(types.ellipsis)) { - this.expectPlugin("objectRestSpread"); - prop = this.parseSpread(isPattern ? { - start: 0 - } : undefined); - - if (isPattern) { - this.toAssignable(prop, true, "object pattern"); - } - - node.properties.push(prop); - - if (isPattern) { - var position = this.state.start; - - if (firstRestLocation !== null) { - this.unexpected(firstRestLocation, "Cannot have multiple rest elements when destructuring"); - } else if (this.eat(types.braceR)) { - break; - } else if (this.match(types.comma) && this.lookahead().type === types.braceR) { - this.unexpected(position, "A trailing comma is not permitted after the rest element"); - } else { - firstRestLocation = position; - continue; - } - } else { - continue; - } - } - - prop.method = false; - - if (isPattern || refShorthandDefaultPos) { - startPos = this.state.start; - startLoc = this.state.startLoc; - } - - if (!isPattern) { - isGenerator = this.eat(types.star); - } - - var containsEsc = this.state.containsEsc; - - if (!isPattern && this.isContextual("async")) { - if (isGenerator) this.unexpected(); - var asyncId = this.parseIdentifier(); - - if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) { - prop.key = asyncId; - prop.computed = false; - } else { - _isAsync = true; - - if (this.match(types.star)) { - this.expectPlugin("asyncGenerators"); - this.next(); - isGenerator = true; - } - - this.parsePropertyName(prop); - } - } else { - this.parsePropertyName(prop); - } - - this.parseObjPropValue(prop, startPos, startLoc, isGenerator, _isAsync, isPattern, refShorthandDefaultPos, containsEsc); - this.checkPropClash(prop, propHash); - - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); - } - - node.properties.push(prop); - } - - if (firstRestLocation !== null) { - this.unexpected(firstRestLocation, "The rest element has to be the last element when destructuring"); - } - - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no property"); - } - - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); - }; - - _proto.isGetterOrSetterMethod = function isGetterOrSetterMethod(prop, isPattern) { - return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword); - }; - - _proto.checkGetterSetterParams = function checkGetterSetterParams(method) { - var paramCount = method.kind === "get" ? 0 : 1; - var start = method.start; - - if (method.params.length !== paramCount) { - if (method.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (method.kind === "set" && method.params[0].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - if (isAsync || isGenerator || this.match(types.parenL)) { - if (isPattern) this.unexpected(); - prop.kind = "method"; - prop.method = true; - return this.parseMethod(prop, isGenerator, isAsync, false, "ObjectMethod"); - } - - if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) { - if (isGenerator || isAsync) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - this.parseMethod(prop, false, false, false, "ObjectMethod"); - this.checkGetterSetterParams(prop); - return prop; - } - }; - - _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - prop.shorthand = false; - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - return this.finishNode(prop, "ObjectProperty"); - } - - if (!prop.computed && prop.key.type === "Identifier") { - this.checkReservedWord(prop.key.name, prop.key.start, true, true); - - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else if (this.match(types.eq) && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) { - refShorthandDefaultPos.start = this.state.start; - } - - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else { - prop.value = prop.key.__clone(); - } - - prop.shorthand = true; - return this.finishNode(prop, "ObjectProperty"); - } - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - if (!node) this.unexpected(); - return node; - }; - - _proto.parsePropertyName = function parsePropertyName(prop) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - } else { - var oldInPropertyName = this.state.inPropertyName; - this.state.inPropertyName = true; - prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName(); - - if (prop.key.type !== "PrivateName") { - prop.computed = false; - } - - this.state.inPropertyName = oldInPropertyName; - } - - return prop.key; - }; - - _proto.initFunction = function initFunction(node, isAsync) { - node.id = null; - node.generator = false; - node.async = !!isAsync; - }; - - _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) { - var oldInFunc = this.state.inFunction; - var oldInMethod = this.state.inMethod; - var oldInGenerator = this.state.inGenerator; - this.state.inFunction = true; - this.state.inMethod = node.kind || true; - this.state.inGenerator = isGenerator; - this.initFunction(node, isAsync); - node.generator = !!isGenerator; - var allowModifiers = isConstructor; - this.parseFunctionParams(node, allowModifiers); - this.parseFunctionBodyAndFinish(node, type); - this.state.inFunction = oldInFunc; - this.state.inMethod = oldInMethod; - this.state.inGenerator = oldInGenerator; - return node; - }; - - _proto.parseArrowExpression = function parseArrowExpression(node, params, isAsync) { - if (this.state.yieldInPossibleArrowParameters) { - this.raise(this.state.yieldInPossibleArrowParameters.start, "yield is not allowed in the parameters of an arrow function" + " inside a generator"); - } - - var oldInFunc = this.state.inFunction; - this.state.inFunction = true; - this.initFunction(node, isAsync); - if (params) this.setArrowFunctionParameters(node, params); - var oldInGenerator = this.state.inGenerator; - var oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - this.state.inGenerator = false; - this.state.maybeInArrowParameters = false; - this.parseFunctionBody(node, true); - this.state.inGenerator = oldInGenerator; - this.state.inFunction = oldInFunc; - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return this.finishNode(node, "ArrowFunctionExpression"); - }; - - _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) { - node.params = this.toAssignableList(params, true, "arrow function parameters"); - }; - - _proto.isStrictBody = function isStrictBody(node) { - var isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.directives.length) { - for (var _i4 = 0, _node$body$directives2 = node.body.directives; _i4 < _node$body$directives2.length; _i4++) { - var directive = _node$body$directives2[_i4]; - - if (directive.value.value === "use strict") { - return true; - } - } - } - - return false; - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - this.parseFunctionBody(node, allowExpressionBody); - this.finishNode(node, type); - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) { - var isExpression = allowExpression && !this.match(types.braceL); - var oldInParameters = this.state.inParameters; - var oldInAsync = this.state.inAsync; - this.state.inParameters = false; - this.state.inAsync = node.async; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - } else { - var oldInGen = this.state.inGenerator; - var oldInFunc = this.state.inFunction; - var oldLabels = this.state.labels; - this.state.inGenerator = node.generator; - this.state.inFunction = true; - this.state.labels = []; - node.body = this.parseBlock(true); - this.state.inFunction = oldInFunc; - this.state.inGenerator = oldInGen; - this.state.labels = oldLabels; - } - - this.state.inAsync = oldInAsync; - this.checkFunctionNameAndParams(node, allowExpression); - this.state.inParameters = oldInParameters; - }; - - _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) { - var isStrict = this.isStrictBody(node); - var checkLVal = this.state.strict || isStrict || isArrowFunction; - var oldStrict = this.state.strict; - if (isStrict) this.state.strict = isStrict; - - if (checkLVal) { - var nameHash = Object.create(null); - - if (node.id) { - this.checkLVal(node.id, true, undefined, "function name"); - } - - for (var _i6 = 0, _node$params2 = node.params; _i6 < _node$params2.length; _i6++) { - var param = _node$params2[_i6]; - - if (isStrict && param.type !== "Identifier") { - this.raise(param.start, "Non-simple parameter in strict mode"); - } - - this.checkLVal(param, true, nameHash, "function parameter list"); - } - } - - this.state.strict = oldStrict; - }; - - _proto.parseExprList = function parseExprList(close, allowEmpty, refShorthandDefaultPos) { - var elts = []; - var first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(close)) break; - } - - elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos)); - } - - return elts; - }; - - _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, refTrailingCommaPos) { - var elt; - - if (allowEmpty && this.match(types.comma)) { - elt = null; - } else if (this.match(types.ellipsis)) { - var spreadNodeStartPos = this.state.start; - var spreadNodeStartLoc = this.state.startLoc; - elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc); - - if (refTrailingCommaPos && this.match(types.comma)) { - refTrailingCommaPos.start = this.state.start; - } - } else { - elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos); - } - - return elt; - }; - - _proto.parseIdentifier = function parseIdentifier(liberal) { - var node = this.startNode(); - var name = this.parseIdentifierName(node.start, liberal); - node.name = name; - node.loc.identifierName = name; - return this.finishNode(node, "Identifier"); - }; - - _proto.parseIdentifierName = function parseIdentifierName(pos, liberal) { - if (!liberal) { - this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, false); - } - - var name; - - if (this.match(types.name)) { - name = this.state.value; - } else if (this.state.type.keyword) { - name = this.state.type.keyword; - } else { - throw this.unexpected(); - } - - if (!liberal && name === "await" && this.state.inAsync) { - this.raise(pos, "invalid use of await inside of an async function"); - } - - this.next(); - return name; - }; - - _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (this.state.strict && (reservedWords.strict(word) || isBinding && reservedWords.strictBind(word))) { - this.raise(startLoc, word + " is a reserved word in strict mode"); - } - - if (this.state.inGenerator && word === "yield") { - this.raise(startLoc, "yield is a reserved word inside generator functions"); - } - - if (this.state.inClassProperty && word === "arguments") { - this.raise(startLoc, "'arguments' is not allowed in class field initializer"); - } - - if (this.isReservedWord(word) || checkKeywords && this.isKeyword(word)) { - this.raise(startLoc, word + " is a reserved word"); - } - }; - - _proto.parseAwait = function parseAwait(node) { - if (!this.state.inAsync && (this.state.inFunction || !this.options.allowAwaitOutsideFunction)) { - this.unexpected(); - } - - if (this.match(types.star)) { - this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead."); - } - - node.argument = this.parseMaybeUnary(); - return this.finishNode(node, "AwaitExpression"); - }; - - _proto.parseYield = function parseYield() { - var node = this.startNode(); - - if (this.state.inParameters) { - this.raise(node.start, "yield is not allowed in generator parameters"); - } - - if (this.state.maybeInArrowParameters && !this.state.yieldInPossibleArrowParameters) { - this.state.yieldInPossibleArrowParameters = node; - } - - this.next(); - - if (this.match(types.semi) || this.canInsertSemicolon() || !this.match(types.star) && !this.state.type.startsExpr) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(); - } - - return this.finishNode(node, "YieldExpression"); - }; - - return ExpressionParser; -}(LValParser); - -var empty = []; -var loopLabel = { - kind: "loop" -}; -var switchLabel = { - kind: "switch" -}; - -var StatementParser = function (_ExpressionParser) { - _inheritsLoose(StatementParser, _ExpressionParser); - - function StatementParser() { - return _ExpressionParser.apply(this, arguments) || this; - } - - var _proto = StatementParser.prototype; - - _proto.parseTopLevel = function parseTopLevel(file, program) { - program.sourceType = this.options.sourceType; - this.parseBlockBody(program, true, true, types.eof); - file.program = this.finishNode(program, "Program"); - file.comments = this.state.comments; - if (this.options.tokens) file.tokens = this.state.tokens; - return this.finishNode(file, "File"); - }; - - _proto.stmtToDirective = function stmtToDirective(stmt) { - var expr = stmt.expression; - var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); - var directive = this.startNodeAt(stmt.start, stmt.loc.start); - var raw = this.input.slice(expr.start, expr.end); - var val = directiveLiteral.value = raw.slice(1, -1); - this.addExtra(directiveLiteral, "raw", raw); - this.addExtra(directiveLiteral, "rawValue", val); - directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end); - return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end); - }; - - _proto.parseStatement = function parseStatement(declaration, topLevel) { - if (this.match(types.at)) { - this.parseDecorators(true); - } - - return this.parseStatementContent(declaration, topLevel); - }; - - _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) { - var starttype = this.state.type; - var node = this.startNode(); - - switch (starttype) { - case types._break: - case types._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - - case types._debugger: - return this.parseDebuggerStatement(node); - - case types._do: - return this.parseDoStatement(node); - - case types._for: - return this.parseForStatement(node); - - case types._function: - if (this.lookahead().type === types.dot) break; - if (!declaration) this.unexpected(); - return this.parseFunctionStatement(node); - - case types._class: - if (!declaration) this.unexpected(); - return this.parseClass(node, true); - - case types._if: - return this.parseIfStatement(node); - - case types._return: - return this.parseReturnStatement(node); - - case types._switch: - return this.parseSwitchStatement(node); - - case types._throw: - return this.parseThrowStatement(node); - - case types._try: - return this.parseTryStatement(node); - - case types._let: - case types._const: - if (!declaration) this.unexpected(); - - case types._var: - return this.parseVarStatement(node, starttype); - - case types._while: - return this.parseWhileStatement(node); - - case types._with: - return this.parseWithStatement(node); - - case types.braceL: - return this.parseBlock(); - - case types.semi: - return this.parseEmptyStatement(node); - - case types._export: - case types._import: - { - var nextToken = this.lookahead(); - - if (nextToken.type === types.parenL || nextToken.type === types.dot) { - break; - } - - if (!this.options.allowImportExportEverywhere && !topLevel) { - this.raise(this.state.start, "'import' and 'export' may only appear at the top level"); - } - - this.next(); - var result; - - if (starttype == types._import) { - result = this.parseImport(node); - - if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { - this.sawUnambiguousESM = true; - } - } else { - result = this.parseExport(node); - - if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { - this.sawUnambiguousESM = true; - } - } - - this.assertModuleNodeAllowed(node); - return result; - } - - case types.name: - if (this.isContextual("async")) { - var state = this.state.clone(); - this.next(); - - if (this.match(types._function) && !this.canInsertSemicolon()) { - this.expect(types._function); - return this.parseFunction(node, true, false, true); - } else { - this.state = state; - } - } - - } - - var maybeName = this.state.value; - var expr = this.parseExpression(); - - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) { - return this.parseLabeledStatement(node, maybeName, expr); - } else { - return this.parseExpressionStatement(node, expr); - } - }; - - _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) { - if (!this.options.allowImportExportEverywhere && !this.inModule) { - this.raise(node.start, "'import' and 'export' may appear only with 'sourceType: \"module\"'", { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - }; - - _proto.takeDecorators = function takeDecorators(node) { - var decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (decorators.length) { - node.decorators = decorators; - this.resetStartLocationFromNode(node, decorators[0]); - this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; - } - }; - - _proto.parseDecorators = function parseDecorators(allowExport) { - if (this.hasPlugin("decorators2")) { - allowExport = false; - } - - var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - while (this.match(types.at)) { - var decorator = this.parseDecorator(); - currentContextDecorators.push(decorator); - } - - if (this.match(types._export)) { - if (allowExport) { - return; - } else { - this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead"); - } - } - - if (!this.match(types._class)) { - this.raise(this.state.start, "Leading decorators must be attached to a class declaration"); - } - }; - - _proto.parseDecorator = function parseDecorator() { - this.expectOnePlugin(["decorators", "decorators2"]); - var node = this.startNode(); - this.next(); - - if (this.hasPlugin("decorators2")) { - this.state.decoratorStack.push([]); - - if (this.eat(types.parenL)) { - node.callee = this.parseExpression(); - this.expect(types.parenR); - } else { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var expr = this.parseIdentifier(false); - - while (this.eat(types.dot)) { - var _node = this.startNodeAt(startPos, startLoc); - - _node.object = expr; - _node.property = this.parseIdentifier(true); - _node.computed = false; - expr = this.finishNode(_node, "MemberExpression"); - } - - node.callee = expr; - } - - if (this.eat(types.parenL)) { - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - this.toReferencedList(node.arguments); - } - - this.state.decoratorStack.pop(); - } else { - node.callee = this.parseMaybeAssign(); - } - - return this.finishNode(node, "Decorator"); - }; - - _proto.parseBreakContinueStatement = function parseBreakContinueStatement(node, keyword) { - var isBreak = keyword === "break"; - this.next(); - - if (this.isLineTerminator()) { - node.label = null; - } else if (!this.match(types.name)) { - this.unexpected(); - } else { - node.label = this.parseIdentifier(); - this.semicolon(); - } - - var i; - - for (i = 0; i < this.state.labels.length; ++i) { - var lab = this.state.labels[i]; - - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - - if (i === this.state.labels.length) { - this.raise(node.start, "Unsyntactic " + keyword); - } - - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - }; - - _proto.parseDebuggerStatement = function parseDebuggerStatement(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - }; - - _proto.parseDoStatement = function parseDoStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.state.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - this.eat(types.semi); - return this.finishNode(node, "DoWhileStatement"); - }; - - _proto.parseForStatement = function parseForStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - var forAwait = false; - - if (this.state.inAsync && this.isContextual("await")) { - this.expectPlugin("asyncGenerators"); - forAwait = true; - this.next(); - } - - this.expect(types.parenL); - - if (this.match(types.semi)) { - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, null); - } - - if (this.match(types._var) || this.match(types._let) || this.match(types._const)) { - var _init = this.startNode(); - - var varKind = this.state.type; - this.next(); - this.parseVar(_init, true, varKind); - this.finishNode(_init, "VariableDeclaration"); - - if (this.match(types._in) || this.isContextual("of")) { - if (_init.declarations.length === 1) { - var declaration = _init.declarations[0]; - var isForInInitializer = varKind === types._var && declaration.init && declaration.id.type != "ObjectPattern" && declaration.id.type != "ArrayPattern" && !this.isContextual("of"); - - if (this.state.strict && isForInInitializer) { - this.raise(this.state.start, "for-in initializer in strict mode"); - } else if (isForInInitializer || !declaration.init) { - return this.parseForIn(node, _init, forAwait); - } - } - } - - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, _init); - } - - var refShorthandDefaultPos = { - start: 0 - }; - var init = this.parseExpression(true, refShorthandDefaultPos); - - if (this.match(types._in) || this.isContextual("of")) { - var description = this.isContextual("of") ? "for-of statement" : "for-in statement"; - this.toAssignable(init, undefined, description); - this.checkLVal(init, undefined, undefined, description); - return this.parseForIn(node, init, forAwait); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (forAwait) { - this.unexpected(); - } - - return this.parseFor(node, init); - }; - - _proto.parseFunctionStatement = function parseFunctionStatement(node) { - this.next(); - return this.parseFunction(node, true); - }; - - _proto.parseIfStatement = function parseIfStatement(node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement(false); - node.alternate = this.eat(types._else) ? this.parseStatement(false) : null; - return this.finishNode(node, "IfStatement"); - }; - - _proto.parseReturnStatement = function parseReturnStatement(node) { - if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) { - this.raise(this.state.start, "'return' outside of function"); - } - - this.next(); - - if (this.isLineTerminator()) { - node.argument = null; - } else { - node.argument = this.parseExpression(); - this.semicolon(); - } - - return this.finishNode(node, "ReturnStatement"); - }; - - _proto.parseSwitchStatement = function parseSwitchStatement(node) { - this.next(); - node.discriminant = this.parseParenExpression(); - var cases = node.cases = []; - this.expect(types.braceL); - this.state.labels.push(switchLabel); - var cur; - - for (var sawDefault; !this.match(types.braceR);) { - if (this.match(types._case) || this.match(types._default)) { - var isCase = this.match(types._case); - if (cur) this.finishNode(cur, "SwitchCase"); - cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { - this.raise(this.state.lastTokStart, "Multiple default clauses"); - } - - sawDefault = true; - cur.test = null; - } - - this.expect(types.colon); - } else { - if (cur) { - cur.consequent.push(this.parseStatement(true)); - } else { - this.unexpected(); - } - } - } - - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); - this.state.labels.pop(); - return this.finishNode(node, "SwitchStatement"); - }; - - _proto.parseThrowStatement = function parseThrowStatement(node) { - this.next(); - - if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) { - this.raise(this.state.lastTokEnd, "Illegal newline after throw"); - } - - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); - }; - - _proto.parseTryStatement = function parseTryStatement(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - - if (this.match(types._catch)) { - var clause = this.startNode(); - this.next(); - - if (this.match(types.parenL)) { - this.expect(types.parenL); - clause.param = this.parseBindingAtom(); - var clashes = Object.create(null); - this.checkLVal(clause.param, true, clashes, "catch clause"); - this.expect(types.parenR); - } else { - this.expectPlugin("optionalCatchBinding"); - clause.param = null; - } - - clause.body = this.parseBlock(); - node.handler = this.finishNode(clause, "CatchClause"); - } - - node.guardedHandlers = empty; - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - - if (!node.handler && !node.finalizer) { - this.raise(node.start, "Missing catch or finally clause"); - } - - return this.finishNode(node, "TryStatement"); - }; - - _proto.parseVarStatement = function parseVarStatement(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); - }; - - _proto.parseWhileStatement = function parseWhileStatement(node) { - this.next(); - node.test = this.parseParenExpression(); - this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, "WhileStatement"); - }; - - _proto.parseWithStatement = function parseWithStatement(node) { - if (this.state.strict) { - this.raise(this.state.start, "'with' in strict mode"); - } - - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement"); - }; - - _proto.parseEmptyStatement = function parseEmptyStatement(node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); - }; - - _proto.parseLabeledStatement = function parseLabeledStatement(node, maybeName, expr) { - for (var _i2 = 0, _state$labels2 = this.state.labels; _i2 < _state$labels2.length; _i2++) { - var label = _state$labels2[_i2]; - - if (label.name === maybeName) { - this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } - } - - var kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null; - - for (var i = this.state.labels.length - 1; i >= 0; i--) { - var _label = this.state.labels[i]; - - if (_label.statementStart === node.start) { - _label.statementStart = this.state.start; - _label.kind = kind; - } else { - break; - } - } - - this.state.labels.push({ - name: maybeName, - kind: kind, - statementStart: this.state.start - }); - node.body = this.parseStatement(true); - - if (node.body.type == "ClassDeclaration" || node.body.type == "VariableDeclaration" && node.body.kind !== "var" || node.body.type == "FunctionDeclaration" && (this.state.strict || node.body.generator || node.body.async)) { - this.raise(node.body.start, "Invalid labeled declaration"); - } - - this.state.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); - }; - - _proto.parseBlock = function parseBlock(allowDirectives) { - var node = this.startNode(); - this.expect(types.braceL); - this.parseBlockBody(node, allowDirectives, false, types.braceR); - return this.finishNode(node, "BlockStatement"); - }; - - _proto.isValidDirective = function isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; - }; - - _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) { - var body = node.body = []; - var directives = node.directives = []; - this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end); - }; - - _proto.parseBlockOrModuleBlockBody = function parseBlockOrModuleBlockBody(body, directives, topLevel, end) { - var parsedNonDirective = false; - var oldStrict; - var octalPosition; - - while (!this.eat(end)) { - if (!parsedNonDirective && this.state.containsOctal && !octalPosition) { - octalPosition = this.state.octalPosition; - } - - var stmt = this.parseStatement(true, topLevel); - - if (directives && !parsedNonDirective && this.isValidDirective(stmt)) { - var directive = this.stmtToDirective(stmt); - directives.push(directive); - - if (oldStrict === undefined && directive.value.value === "use strict") { - oldStrict = this.state.strict; - this.setStrict(true); - - if (octalPosition) { - this.raise(octalPosition, "Octal literal in strict mode"); - } - } - - continue; - } - - parsedNonDirective = true; - body.push(stmt); - } - - if (oldStrict === false) { - this.setStrict(false); - } - }; - - _proto.parseFor = function parseFor(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.match(types.semi) ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.match(types.parenR) ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, "ForStatement"); - }; - - _proto.parseForIn = function parseForIn(node, init, forAwait) { - var type = this.match(types._in) ? "ForInStatement" : "ForOfStatement"; - - if (forAwait) { - this.eatContextual("of"); - } else { - this.next(); - } - - if (type === "ForOfStatement") { - node.await = !!forAwait; - } - - node.left = init; - node.right = this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement(false); - this.state.labels.pop(); - return this.finishNode(node, type); - }; - - _proto.parseVar = function parseVar(node, isFor, kind) { - var declarations = node.declarations = []; - node.kind = kind.keyword; - - for (;;) { - var decl = this.startNode(); - this.parseVarHead(decl); - - if (this.eat(types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else { - if (kind === types._const && !(this.match(types._in) || this.isContextual("of"))) { - if (!this.hasPlugin("typescript")) { - this.unexpected(); - } - } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) { - this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value"); - } - - decl.init = null; - } - - declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types.comma)) break; - } - - return node; - }; - - _proto.parseVarHead = function parseVarHead(decl) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true, undefined, "variable declaration"); - }; - - _proto.parseFunction = function parseFunction(node, isStatement, allowExpressionBody, isAsync, optionalId) { - var oldInFunc = this.state.inFunction; - var oldInMethod = this.state.inMethod; - var oldInGenerator = this.state.inGenerator; - var oldInClassProperty = this.state.inClassProperty; - this.state.inFunction = true; - this.state.inMethod = false; - this.state.inClassProperty = false; - this.initFunction(node, isAsync); - - if (this.match(types.star)) { - if (node.async) { - this.expectPlugin("asyncGenerators"); - } - - node.generator = true; - this.next(); - } - - if (isStatement && !optionalId && !this.match(types.name) && !this.match(types._yield)) { - this.unexpected(); - } - - if (!isStatement) this.state.inGenerator = node.generator; - - if (this.match(types.name) || this.match(types._yield)) { - node.id = this.parseBindingIdentifier(); - } - - if (isStatement) this.state.inGenerator = node.generator; - this.parseFunctionParams(node); - this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression", allowExpressionBody); - this.state.inFunction = oldInFunc; - this.state.inMethod = oldInMethod; - this.state.inGenerator = oldInGenerator; - this.state.inClassProperty = oldInClassProperty; - return node; - }; - - _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { - var oldInParameters = this.state.inParameters; - this.state.inParameters = true; - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, allowModifiers); - this.state.inParameters = oldInParameters; - }; - - _proto.parseClass = function parseClass(node, isStatement, optionalId) { - this.next(); - this.takeDecorators(node); - this.parseClassId(node, isStatement, optionalId); - this.parseClassSuper(node); - this.parseClassBody(node); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR); - }; - - _proto.isClassMethod = function isClassMethod() { - return this.match(types.parenL); - }; - - _proto.isNonstaticConstructor = function isNonstaticConstructor(method) { - return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); - }; - - _proto.parseClassBody = function parseClassBody(node) { - var oldStrict = this.state.strict; - this.state.strict = true; - this.state.classLevel++; - var state = { - hadConstructor: false - }; - var decorators = []; - var classBody = this.startNode(); - classBody.body = []; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (this.eat(types.semi)) { - if (decorators.length > 0) { - this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon"); - } - - continue; - } - - if (this.match(types.at)) { - decorators.push(this.parseDecorator()); - continue; - } - - var member = this.startNode(); - - if (decorators.length) { - member.decorators = decorators; - this.resetStartLocationFromNode(member, decorators[0]); - decorators = []; - } - - this.parseClassMember(classBody, member, state); - - if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { - this.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?"); - } - } - - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no method"); - } - - node.body = this.finishNode(classBody, "ClassBody"); - this.state.classLevel--; - this.state.strict = oldStrict; - }; - - _proto.parseClassMember = function parseClassMember(classBody, member, state) { - var isStatic = false; - var containsEsc = this.state.containsEsc; - - if (this.match(types.name) && this.state.value === "static") { - var key = this.parseIdentifier(true); - - if (this.isClassMethod()) { - var method = member; - method.kind = "method"; - method.computed = false; - method.key = key; - method.static = false; - this.pushClassMethod(classBody, method, false, false, false); - return; - } else if (this.isClassProperty()) { - var prop = member; - prop.computed = false; - prop.key = key; - prop.static = false; - classBody.body.push(this.parseClassProperty(prop)); - return; - } else if (containsEsc) { - throw this.unexpected(); - } - - isStatic = true; - } - - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); - }; - - _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - var publicMethod = member; - var privateMethod = member; - var publicProp = member; - var privateProp = member; - var method = publicMethod; - var publicMember = publicMethod; - member.static = isStatic; - - if (this.eat(types.star)) { - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, true, false); - return; - } - - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be a generator"); - } - - this.pushClassMethod(classBody, publicMethod, true, false, false); - return; - } - - var key = this.parseClassPropertyName(member); - var isPrivate = key.type === "PrivateName"; - var isSimple = key.type === "Identifier"; - this.parsePostMemberNameModifiers(publicMember); - - if (this.isClassMethod()) { - method.kind = "method"; - - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - return; - } - - var isConstructor = this.isNonstaticConstructor(publicMethod); - - if (isConstructor) { - publicMethod.kind = "constructor"; - - if (publicMethod.decorators) { - this.raise(publicMethod.start, "You can't attach decorators to a class constructor"); - } - - if (state.hadConstructor && !this.hasPlugin("typescript")) { - this.raise(key.start, "Duplicate constructor in the same class"); - } - - state.hadConstructor = true; - } - - this.pushClassMethod(classBody, publicMethod, false, false, isConstructor); - } else if (this.isClassProperty()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else if (isSimple && key.name === "async" && !this.isLineTerminator()) { - var isGenerator = this.match(types.star); - - if (isGenerator) { - this.expectPlugin("asyncGenerators"); - this.next(); - } - - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be an async function"); - } - - this.pushClassMethod(classBody, publicMethod, isGenerator, true, false); - } - } else if (isSimple && (key.name === "get" || key.name === "set") && !(this.isLineTerminator() && this.match(types.star))) { - method.kind = key.name; - this.parseClassPropertyName(publicMethod); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't have get/set modifier"); - } - - this.pushClassMethod(classBody, publicMethod, false, false, false); - } - - this.checkGetterSetterParams(publicMethod); - } else if (this.isLineTerminator()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else { - this.unexpected(); - } - }; - - _proto.parseClassPropertyName = function parseClassPropertyName(member) { - var key = this.parsePropertyName(member); - - if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) { - this.raise(key.start, "Classes may not have static property named prototype"); - } - - if (key.type === "PrivateName" && key.id.name === "constructor") { - this.raise(key.start, "Classes may not have a private field named '#constructor'"); - } - - return key; - }; - - _proto.pushClassProperty = function pushClassProperty(classBody, prop) { - if (this.isNonstaticConstructor(prop)) { - this.raise(prop.key.start, "Classes may not have a non-static field named 'constructor'"); - } - - classBody.body.push(this.parseClassProperty(prop)); - }; - - _proto.pushClassPrivateProperty = function pushClassPrivateProperty(classBody, prop) { - this.expectPlugin("classPrivateProperties", prop.key.start); - classBody.body.push(this.parseClassPrivateProperty(prop)); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, "ClassMethod")); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - this.expectPlugin("classPrivateMethods", method.key.start); - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, "ClassPrivateMethod")); - }; - - _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {}; - - _proto.parseAccessModifier = function parseAccessModifier() { - return undefined; - }; - - _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) { - var oldInMethod = this.state.inMethod; - this.state.inMethod = false; - this.state.inClassProperty = true; - node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null; - this.semicolon(); - this.state.inClassProperty = false; - this.state.inMethod = oldInMethod; - return this.finishNode(node, "ClassPrivateProperty"); - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (!node.typeAnnotation) { - this.expectPlugin("classProperties"); - } - - var oldInMethod = this.state.inMethod; - this.state.inMethod = false; - this.state.inClassProperty = true; - - if (this.match(types.eq)) { - this.expectPlugin("classProperties"); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; - } - - this.semicolon(); - this.state.inClassProperty = false; - this.state.inMethod = oldInMethod; - return this.finishNode(node, "ClassProperty"); - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - if (this.match(types.name)) { - node.id = this.parseIdentifier(); - } else { - if (optionalId || !isStatement) { - node.id = null; - } else { - this.unexpected(null, "A class name is required"); - } - } - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; - }; - - _proto.parseExport = function parseExport(node) { - if (this.shouldParseExportStar()) { - this.parseExportStar(node); - if (node.type === "ExportAllDeclaration") return node; - } else if (this.isExportDefaultSpecifier()) { - this.expectPlugin("exportDefaultFrom"); - var specifier = this.startNode(); - specifier.exported = this.parseIdentifier(true); - var specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - node.specifiers = specifiers; - - if (this.match(types.comma) && this.lookahead().type === types.star) { - this.expect(types.comma); - - var _specifier = this.startNode(); - - this.expect(types.star); - this.expectContextual("as"); - _specifier.exported = this.parseIdentifier(); - specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier")); - } else { - this.parseExportSpecifiersMaybe(node); - } - - this.parseExportFrom(node, true); - } else if (this.eat(types._default)) { - node.declaration = this.parseExportDefaultExpression(); - this.checkExport(node, true, true); - return this.finishNode(node, "ExportDefaultDeclaration"); - } else if (this.shouldParseExportDeclaration()) { - if (this.isContextual("async")) { - var next = this.lookahead(); - - if (next.type !== types._function) { - this.unexpected(next.start, "Unexpected token, expected \"function\""); - } - } - - node.specifiers = []; - node.source = null; - node.declaration = this.parseExportDeclaration(node); - } else { - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - } - - this.checkExport(node, true); - return this.finishNode(node, "ExportNamedDeclaration"); - }; - - _proto.parseExportDefaultExpression = function parseExportDefaultExpression() { - var expr = this.startNode(); - - if (this.eat(types._function)) { - return this.parseFunction(expr, true, false, false, true); - } else if (this.isContextual("async") && this.lookahead().type === types._function) { - this.eatContextual("async"); - this.eat(types._function); - return this.parseFunction(expr, true, false, true, true); - } else if (this.match(types._class)) { - return this.parseClass(expr, true, true); - } else if (this.match(types.at)) { - this.parseDecorators(false); - return this.parseClass(expr, true, true); - } else if (this.match(types._let) || this.match(types._const) || this.match(types._var)) { - return this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export."); - } else { - var res = this.parseMaybeAssign(); - this.semicolon(); - return res; - } - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - return this.parseStatement(true); - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.match(types.name)) { - return this.state.value !== "async"; - } - - if (!this.match(types._default)) { - return false; - } - - var lookahead = this.lookahead(); - return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from"; - }; - - _proto.parseExportSpecifiersMaybe = function parseExportSpecifiersMaybe(node) { - if (this.eat(types.comma)) { - node.specifiers = node.specifiers.concat(this.parseExportSpecifiers()); - } - }; - - _proto.parseExportFrom = function parseExportFrom(node, expect) { - if (this.eatContextual("from")) { - node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected(); - this.checkExport(node); - } else { - if (expect) { - this.unexpected(); - } else { - node.source = null; - } - } - - this.semicolon(); - }; - - _proto.shouldParseExportStar = function shouldParseExportStar() { - return this.match(types.star); - }; - - _proto.parseExportStar = function parseExportStar(node) { - this.expect(types.star); - - if (this.isContextual("as")) { - this.parseExportNamespace(node); - } else { - this.parseExportFrom(node, true); - this.finishNode(node, "ExportAllDeclaration"); - } - }; - - _proto.parseExportNamespace = function parseExportNamespace(node) { - this.expectPlugin("exportNamespaceFrom"); - var specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); - this.next(); - specifier.exported = this.parseIdentifier(true); - node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]; - this.parseExportSpecifiersMaybe(node); - this.parseExportFrom(node, true); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "let" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isContextual("async") || this.match(types.at) && this.expectPlugin("decorators2"); - }; - - _proto.checkExport = function checkExport(node, checkNames, isDefault) { - if (checkNames) { - if (isDefault) { - this.checkDuplicateExports(node, "default"); - } else if (node.specifiers && node.specifiers.length) { - for (var _i4 = 0, _node$specifiers2 = node.specifiers; _i4 < _node$specifiers2.length; _i4++) { - var specifier = _node$specifiers2[_i4]; - this.checkDuplicateExports(specifier, specifier.exported.name); - } - } else if (node.declaration) { - if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { - var id = node.declaration.id; - if (!id) throw new Error("Assertion failure"); - this.checkDuplicateExports(node, id.name); - } else if (node.declaration.type === "VariableDeclaration") { - for (var _i6 = 0, _node$declaration$dec2 = node.declaration.declarations; _i6 < _node$declaration$dec2.length; _i6++) { - var declaration = _node$declaration$dec2[_i6]; - this.checkDeclaration(declaration.id); - } - } - } - } - - var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (currentContextDecorators.length) { - var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - - if (!node.declaration || !isClass) { - throw this.raise(node.start, "You can only use decorators on an export when exporting a class"); - } - - this.takeDecorators(node.declaration); - } - }; - - _proto.checkDeclaration = function checkDeclaration(node) { - if (node.type === "ObjectPattern") { - for (var _i8 = 0, _node$properties2 = node.properties; _i8 < _node$properties2.length; _i8++) { - var prop = _node$properties2[_i8]; - this.checkDeclaration(prop); - } - } else if (node.type === "ArrayPattern") { - for (var _i10 = 0, _node$elements2 = node.elements; _i10 < _node$elements2.length; _i10++) { - var elem = _node$elements2[_i10]; - - if (elem) { - this.checkDeclaration(elem); - } - } - } else if (node.type === "ObjectProperty") { - this.checkDeclaration(node.value); - } else if (node.type === "RestElement") { - this.checkDeclaration(node.argument); - } else if (node.type === "Identifier") { - this.checkDuplicateExports(node, node.name); - } - }; - - _proto.checkDuplicateExports = function checkDuplicateExports(node, name) { - if (this.state.exportedIdentifiers.indexOf(name) > -1) { - this.raiseDuplicateExportError(node, name); - } - - this.state.exportedIdentifiers.push(name); - }; - - _proto.raiseDuplicateExportError = function raiseDuplicateExportError(node, name) { - throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : "`" + name + "` has already been exported. Exported identifiers must be unique."); - }; - - _proto.parseExportSpecifiers = function parseExportSpecifiers() { - var nodes = []; - var first = true; - var needsFrom; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - var isDefault = this.match(types._default); - if (isDefault && !needsFrom) needsFrom = true; - var node = this.startNode(); - node.local = this.parseIdentifier(isDefault); - node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - - if (needsFrom && !this.isContextual("from")) { - this.unexpected(); - } - - return nodes; - }; - - _proto.parseImport = function parseImport(node) { - if (this.match(types.string)) { - node.specifiers = []; - node.source = this.parseExprAtom(); - } else { - node.specifiers = []; - this.parseImportSpecifiers(node); - this.expectContextual("from"); - node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected(); - } - - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - }; - - _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) { - return this.match(types.name); - }; - - _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = this.parseIdentifier(); - this.checkLVal(specifier.local, true, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - }; - - _proto.parseImportSpecifiers = function parseImportSpecifiers(node) { - var first = true; - - if (this.shouldParseDefaultImport(node)) { - this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); - if (!this.eat(types.comma)) return; - } - - if (this.match(types.star)) { - var specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); - return; - } - - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - if (this.eat(types.colon)) { - this.unexpected(null, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import."); - } - - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - this.parseImportSpecifier(node); - } - }; - - _proto.parseImportSpecifier = function parseImportSpecifier(node) { - var specifier = this.startNode(); - specifier.imported = this.parseIdentifier(true); - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - this.checkReservedWord(specifier.imported.name, specifier.start, true, true); - specifier.local = specifier.imported.__clone(); - } - - this.checkLVal(specifier.local, true, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - }; - - return StatementParser; -}(ExpressionParser); - -var plugins = {}; - -var Parser = function (_StatementParser) { - _inheritsLoose(Parser, _StatementParser); - - function Parser(options, input) { - var _this; - - options = getOptions(options); - _this = _StatementParser.call(this, options, input) || this; - _this.options = options; - _this.inModule = _this.options.sourceType === "module"; - _this.input = input; - _this.plugins = pluginsMap(_this.options.plugins); - _this.filename = options.sourceFilename; - - if (_this.state.pos === 0 && _this.input[0] === "#" && _this.input[1] === "!") { - _this.skipLineComment(2); - } - - return _this; - } - - var _proto = Parser.prototype; - - _proto.parse = function parse() { - var file = this.startNode(); - var program = this.startNode(); - this.nextToken(); - return this.parseTopLevel(file, program); - }; - - return Parser; -}(StatementParser); - -function pluginsMap(pluginList) { - var pluginMap = {}; - - for (var _i2 = 0; _i2 < pluginList.length; _i2++) { - var _name = pluginList[_i2]; - pluginMap[_name] = true; - } - - return pluginMap; -} - -function isSimpleProperty(node) { - return node != null && node.type === "Property" && node.kind === "init" && node.method === false; -} - -var estreePlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.estreeParseRegExpLiteral = function estreeParseRegExpLiteral(_ref) { - var pattern = _ref.pattern, - flags = _ref.flags; - var regex = null; - - try { - regex = new RegExp(pattern, flags); - } catch (e) {} - - var node = this.estreeParseLiteral(regex); - node.regex = { - pattern: pattern, - flags: flags - }; - return node; - }; - - _proto.estreeParseLiteral = function estreeParseLiteral(value) { - return this.parseLiteral(value, "Literal"); - }; - - _proto.directiveToStmt = function directiveToStmt(directive) { - var directiveLiteral = directive.value; - var stmt = this.startNodeAt(directive.start, directive.loc.start); - var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); - expression.value = directiveLiteral.value; - expression.raw = directiveLiteral.extra.raw; - stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end); - stmt.directive = directiveLiteral.extra.raw.slice(1, -1); - return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end); - }; - - _proto.initFunction = function initFunction(node, isAsync) { - _superClass.prototype.initFunction.call(this, node, isAsync); - - node.expression = false; - }; - - _proto.checkDeclaration = function checkDeclaration(node) { - if (isSimpleProperty(node)) { - this.checkDeclaration(node.value); - } else { - _superClass.prototype.checkDeclaration.call(this, node); - } - }; - - _proto.checkGetterSetterParams = function checkGetterSetterParams(method) { - var prop = method; - var paramCount = prop.kind === "get" ? 0 : 1; - var start = prop.start; - - if (prop.value.params.length !== paramCount) { - if (prop.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - var _this = this; - - switch (expr.type) { - case "ObjectPattern": - expr.properties.forEach(function (prop) { - _this.checkLVal(prop.type === "Property" ? prop.value : prop, isBinding, checkClashes, "object destructuring pattern"); - }); - break; - - default: - _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - - } - }; - - _proto.checkPropClash = function checkPropClash(prop, propHash) { - if (prop.computed || !isSimpleProperty(prop)) return; - var key = prop.key; - var name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - }; - - _proto.isStrictBody = function isStrictBody(node) { - var isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.body.length > 0) { - for (var _i2 = 0, _node$body$body2 = node.body.body; _i2 < _node$body$body2.length; _i2++) { - var directive = _node$body$body2[_i2]; - - if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") { - if (directive.expression.value === "use strict") return true; - } else { - break; - } - } - } - - return false; - }; - - _proto.isValidDirective = function isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized); - }; - - _proto.stmtToDirective = function stmtToDirective(stmt) { - var directive = _superClass.prototype.stmtToDirective.call(this, stmt); - - var value = stmt.expression.value; - directive.value.value = value; - return directive; - }; - - _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) { - var _this2 = this; - - _superClass.prototype.parseBlockBody.call(this, node, allowDirectives, topLevel, end); - - var directiveStatements = node.directives.map(function (d) { - return _this2.directiveToStmt(d); - }); - node.body = directiveStatements.concat(node.body); - delete node.directives; - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - this.parseMethod(method, isGenerator, isAsync, isConstructor, "MethodDefinition"); - - if (method.typeParameters) { - method.value.typeParameters = method.typeParameters; - delete method.typeParameters; - } - - classBody.body.push(method); - }; - - _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) { - switch (this.state.type) { - case types.regexp: - return this.estreeParseRegExpLiteral(this.state.value); - - case types.num: - case types.string: - return this.estreeParseLiteral(this.state.value); - - case types._null: - return this.estreeParseLiteral(null); - - case types._true: - return this.estreeParseLiteral(true); - - case types._false: - return this.estreeParseLiteral(false); - - default: - return _superClass.prototype.parseExprAtom.call(this, refShorthandDefaultPos); - } - }; - - _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) { - var node = _superClass.prototype.parseLiteral.call(this, value, type, startPos, startLoc); - - node.raw = node.extra.raw; - delete node.extra; - return node; - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) { - _superClass.prototype.parseFunctionBody.call(this, node, allowExpression); - - node.expression = node.body.type !== "BlockStatement"; - }; - - _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) { - var funcNode = this.startNode(); - funcNode.kind = node.kind; - funcNode = _superClass.prototype.parseMethod.call(this, funcNode, isGenerator, isAsync, isConstructor, "FunctionExpression"); - delete funcNode.kind; - node.value = funcNode; - return this.finishNode(node, type); - }; - - _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - var node = _superClass.prototype.parseObjectMethod.call(this, prop, isGenerator, isAsync, isPattern, containsEsc); - - if (node) { - node.type = "Property"; - if (node.kind === "method") node.kind = "init"; - node.shorthand = false; - } - - return node; - }; - - _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - var node = _superClass.prototype.parseObjectProperty.call(this, prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - - if (node) { - node.kind = "init"; - node.type = "Property"; - } - - return node; - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (isSimpleProperty(node)) { - this.toAssignable(node.value, isBinding, contextDescription); - return node; - } - - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - }; - - _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.kind === "get" || prop.kind === "set") { - this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - } else if (prop.method) { - this.raise(prop.key.start, "Object pattern can't contain methods"); - } else { - _superClass.prototype.toAssignableObjectExpressionProp.call(this, prop, isBinding, isLast); - } - }; - - return _class; - }(superClass); -}); - -var primitiveTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]; - -function isEsModuleType(bodyElement) { - return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); -} - -function hasTypeImportKind(node) { - return node.importKind === "type" || node.importKind === "typeof"; -} - -function isMaybeDefaultImport(state) { - return (state.type === types.name || !!state.type.keyword) && state.value !== "from"; -} - -var exportSuggestions = { - const: "declare export var", - let: "declare export var", - type: "export type", - interface: "export interface" -}; - -function partition(list, test) { - var list1 = []; - var list2 = []; - - for (var i = 0; i < list.length; i++) { - (test(list[i], i, list) ? list1 : list2).push(list[i]); - } - - return [list1, list2]; -} - -var flowPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.flowParseTypeInitialiser = function flowParseTypeInitialiser(tok) { - var oldInType = this.state.inType; - this.state.inType = true; - this.expect(tok || types.colon); - var type = this.flowParseType(); - this.state.inType = oldInType; - return type; - }; - - _proto.flowParsePredicate = function flowParsePredicate() { - var node = this.startNode(); - var moduloLoc = this.state.startLoc; - var moduloPos = this.state.start; - this.expect(types.modulo); - var checksLoc = this.state.startLoc; - this.expectContextual("checks"); - - if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) { - this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here."); - } - - if (this.eat(types.parenL)) { - node.value = this.parseExpression(); - this.expect(types.parenR); - return this.finishNode(node, "DeclaredPredicate"); - } else { - return this.finishNode(node, "InferredPredicate"); - } - }; - - _proto.flowParseTypeAndPredicateInitialiser = function flowParseTypeAndPredicateInitialiser() { - var oldInType = this.state.inType; - this.state.inType = true; - this.expect(types.colon); - var type = null; - var predicate = null; - - if (this.match(types.modulo)) { - this.state.inType = oldInType; - predicate = this.flowParsePredicate(); - } else { - type = this.flowParseType(); - this.state.inType = oldInType; - - if (this.match(types.modulo)) { - predicate = this.flowParsePredicate(); - } - } - - return [type, predicate]; - }; - - _proto.flowParseDeclareClass = function flowParseDeclareClass(node) { - this.next(); - this.flowParseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); - }; - - _proto.flowParseDeclareFunction = function flowParseDeclareFunction(node) { - this.next(); - var id = node.id = this.parseIdentifier(); - var typeNode = this.startNode(); - var typeContainer = this.startNode(); - - if (this.isRelational("<")) { - typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } - - this.expect(types.parenL); - var tmp = this.flowParseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - this.expect(types.parenR); - - var _flowParseTypeAndPred = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.returnType = _flowParseTypeAndPred[0]; - node.predicate = _flowParseTypeAndPred[1]; - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); - this.finishNode(id, id.type); - this.semicolon(); - return this.finishNode(node, "DeclareFunction"); - }; - - _proto.flowParseDeclare = function flowParseDeclare(node, insideModule) { - if (this.match(types._class)) { - return this.flowParseDeclareClass(node); - } else if (this.match(types._function)) { - return this.flowParseDeclareFunction(node); - } else if (this.match(types._var)) { - return this.flowParseDeclareVariable(node); - } else if (this.isContextual("module")) { - if (this.lookahead().type === types.dot) { - return this.flowParseDeclareModuleExports(node); - } else { - if (insideModule) { - this.unexpected(null, "`declare module` cannot be used inside another `declare module`"); - } - - return this.flowParseDeclareModule(node); - } - } else if (this.isContextual("type")) { - return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual("opaque")) { - return this.flowParseDeclareOpaqueType(node); - } else if (this.isContextual("interface")) { - return this.flowParseDeclareInterface(node); - } else if (this.match(types._export)) { - return this.flowParseDeclareExportDeclaration(node, insideModule); - } else { - throw this.unexpected(); - } - }; - - _proto.flowParseDeclareVariable = function flowParseDeclareVariable(node) { - this.next(); - node.id = this.flowParseTypeAnnotatableIdentifier(true); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); - }; - - _proto.flowParseDeclareModule = function flowParseDeclareModule(node) { - var _this = this; - - this.next(); - - if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - node.id = this.parseIdentifier(); - } - - var bodyNode = node.body = this.startNode(); - var body = bodyNode.body = []; - this.expect(types.braceL); - - while (!this.match(types.braceR)) { - var _bodyNode = this.startNode(); - - if (this.match(types._import)) { - var lookahead = this.lookahead(); - - if (lookahead.value !== "type" && lookahead.value !== "typeof") { - this.unexpected(null, "Imports within a `declare module` body must always be `import type` or `import typeof`"); - } - - this.next(); - this.parseImport(_bodyNode); - } else { - this.expectContextual("declare", "Only declares and type imports are allowed inside declare module"); - _bodyNode = this.flowParseDeclare(_bodyNode, true); - } - - body.push(_bodyNode); - } - - this.expect(types.braceR); - this.finishNode(bodyNode, "BlockStatement"); - var kind = null; - var hasModuleExport = false; - var errorMessage = "Found both `declare module.exports` and `declare export` in the same module. " + "Modules can only have 1 since they are either an ES module or they are a CommonJS module"; - body.forEach(function (bodyElement) { - if (isEsModuleType(bodyElement)) { - if (kind === "CommonJS") { - _this.unexpected(bodyElement.start, errorMessage); - } - - kind = "ES"; - } else if (bodyElement.type === "DeclareModuleExports") { - if (hasModuleExport) { - _this.unexpected(bodyElement.start, "Duplicate `declare module.exports` statement"); - } - - if (kind === "ES") _this.unexpected(bodyElement.start, errorMessage); - kind = "CommonJS"; - hasModuleExport = true; - } - }); - node.kind = kind || "CommonJS"; - return this.finishNode(node, "DeclareModule"); - }; - - _proto.flowParseDeclareExportDeclaration = function flowParseDeclareExportDeclaration(node, insideModule) { - this.expect(types._export); - - if (this.eat(types._default)) { - if (this.match(types._function) || this.match(types._class)) { - node.declaration = this.flowParseDeclare(this.startNode()); - } else { - node.declaration = this.flowParseType(); - this.semicolon(); - } - - node.default = true; - return this.finishNode(node, "DeclareExportDeclaration"); - } else { - if (this.match(types._const) || this.match(types._let) || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) { - var label = this.state.value; - var suggestion = exportSuggestions[label]; - this.unexpected(this.state.start, "`declare export " + label + "` is not supported. Use `" + suggestion + "` instead"); - } - - if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) { - node.declaration = this.flowParseDeclare(this.startNode()); - node.default = false; - return this.finishNode(node, "DeclareExportDeclaration"); - } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) { - node = this.parseExport(node); - - if (node.type === "ExportNamedDeclaration") { - node.type = "ExportDeclaration"; - node.default = false; - delete node.exportKind; - } - - node.type = "Declare" + node.type; - return node; - } - } - - throw this.unexpected(); - }; - - _proto.flowParseDeclareModuleExports = function flowParseDeclareModuleExports(node) { - this.expectContextual("module"); - this.expect(types.dot); - this.expectContextual("exports"); - node.typeAnnotation = this.flowParseTypeAnnotation(); - this.semicolon(); - return this.finishNode(node, "DeclareModuleExports"); - }; - - _proto.flowParseDeclareTypeAlias = function flowParseDeclareTypeAlias(node) { - this.next(); - this.flowParseTypeAlias(node); - return this.finishNode(node, "DeclareTypeAlias"); - }; - - _proto.flowParseDeclareOpaqueType = function flowParseDeclareOpaqueType(node) { - this.next(); - this.flowParseOpaqueType(node, true); - return this.finishNode(node, "DeclareOpaqueType"); - }; - - _proto.flowParseDeclareInterface = function flowParseDeclareInterface(node) { - this.next(); - this.flowParseInterfaceish(node); - return this.finishNode(node, "DeclareInterface"); - }; - - _proto.flowParseInterfaceish = function flowParseInterfaceish(node, isClass) { - node.id = this.flowParseRestrictedIdentifier(!isClass); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.extends = []; - node.implements = []; - node.mixins = []; - - if (this.eat(types._extends)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (!isClass && this.eat(types.comma)); - } - - if (this.isContextual("mixins")) { - this.next(); - - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - if (this.isContextual("implements")) { - this.next(); - - do { - node.implements.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - node.body = this.flowParseObjectType(true, false, false); - }; - - _proto.flowParseInterfaceExtends = function flowParseInterfaceExtends() { - var node = this.startNode(); - node.id = this.flowParseQualifiedTypeIdentifier(); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - - return this.finishNode(node, "InterfaceExtends"); - }; - - _proto.flowParseInterface = function flowParseInterface(node) { - this.flowParseInterfaceish(node); - return this.finishNode(node, "InterfaceDeclaration"); - }; - - _proto.checkReservedType = function checkReservedType(word, startLoc) { - if (primitiveTypes.indexOf(word) > -1) { - this.raise(startLoc, "Cannot overwrite primitive type " + word); - } - }; - - _proto.flowParseRestrictedIdentifier = function flowParseRestrictedIdentifier(liberal) { - this.checkReservedType(this.state.value, this.state.start); - return this.parseIdentifier(liberal); - }; - - _proto.flowParseTypeAlias = function flowParseTypeAlias(node) { - node.id = this.flowParseRestrictedIdentifier(); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.right = this.flowParseTypeInitialiser(types.eq); - this.semicolon(); - return this.finishNode(node, "TypeAlias"); - }; - - _proto.flowParseOpaqueType = function flowParseOpaqueType(node, declare) { - this.expectContextual("type"); - node.id = this.flowParseRestrictedIdentifier(true); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.supertype = null; - - if (this.match(types.colon)) { - node.supertype = this.flowParseTypeInitialiser(types.colon); - } - - node.impltype = null; - - if (!declare) { - node.impltype = this.flowParseTypeInitialiser(types.eq); - } - - this.semicolon(); - return this.finishNode(node, "OpaqueType"); - }; - - _proto.flowParseTypeParameter = function flowParseTypeParameter() { - var node = this.startNode(); - var variance = this.flowParseVariance(); - var ident = this.flowParseTypeAnnotatableIdentifier(); - node.name = ident.name; - node.variance = variance; - node.bound = ident.typeAnnotation; - - if (this.match(types.eq)) { - this.eat(types.eq); - node.default = this.flowParseType(); - } - - return this.finishNode(node, "TypeParameter"); - }; - - _proto.flowParseTypeParameterDeclaration = function flowParseTypeParameterDeclaration() { - var oldInType = this.state.inType; - var node = this.startNode(); - node.params = []; - this.state.inType = true; - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - do { - node.params.push(this.flowParseTypeParameter()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } while (!this.isRelational(">")); - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterDeclaration"); - }; - - _proto.flowParseTypeParameterInstantiation = function flowParseTypeParameterInstantiation() { - var node = this.startNode(); - var oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expectRelational("<"); - - while (!this.isRelational(">")) { - node.params.push(this.flowParseType()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - }; - - _proto.flowParseObjectPropertyKey = function flowParseObjectPropertyKey() { - return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); - }; - - _proto.flowParseObjectTypeIndexer = function flowParseObjectTypeIndexer(node, isStatic, variance) { - node.static = isStatic; - this.expect(types.bracketL); - - if (this.lookahead().type === types.colon) { - node.id = this.flowParseObjectPropertyKey(); - node.key = this.flowParseTypeInitialiser(); - } else { - node.id = null; - node.key = this.flowParseType(); - } - - this.expect(types.bracketR); - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - return this.finishNode(node, "ObjectTypeIndexer"); - }; - - _proto.flowParseObjectTypeMethodish = function flowParseObjectTypeMethodish(node) { - node.params = []; - node.rest = null; - node.typeParameters = null; - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - this.expect(types.parenL); - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - node.params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - node.rest = this.flowParseFunctionTypeParam(); - } - - this.expect(types.parenR); - node.returnType = this.flowParseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeAnnotation"); - }; - - _proto.flowParseObjectTypeCallProperty = function flowParseObjectTypeCallProperty(node, isStatic) { - var valueNode = this.startNode(); - node.static = isStatic; - node.value = this.flowParseObjectTypeMethodish(valueNode); - return this.finishNode(node, "ObjectTypeCallProperty"); - }; - - _proto.flowParseObjectType = function flowParseObjectType(allowStatic, allowExact, allowSpread) { - var oldInType = this.state.inType; - this.state.inType = true; - var nodeStart = this.startNode(); - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - var endDelim; - var exact; - - if (allowExact && this.match(types.braceBarL)) { - this.expect(types.braceBarL); - endDelim = types.braceBarR; - exact = true; - } else { - this.expect(types.braceL); - endDelim = types.braceR; - exact = false; - } - - nodeStart.exact = exact; - - while (!this.match(endDelim)) { - var isStatic = false; - var node = this.startNode(); - - if (allowStatic && this.isContextual("static") && this.lookahead().type !== types.colon) { - this.next(); - isStatic = true; - } - - var variance = this.flowParseVariance(); - - if (this.match(types.bracketL)) { - nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); - } else if (this.match(types.parenL) || this.isRelational("<")) { - if (variance) { - this.unexpected(variance.start); - } - - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); - } else { - var kind = "init"; - - if (this.isContextual("get") || this.isContextual("set")) { - var lookahead = this.lookahead(); - - if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) { - kind = this.state.value; - this.next(); - } - } - - nodeStart.properties.push(this.flowParseObjectTypeProperty(node, isStatic, variance, kind, allowSpread)); - } - - this.flowObjectTypeSemicolon(); - } - - this.expect(endDelim); - var out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); - this.state.inType = oldInType; - return out; - }; - - _proto.flowParseObjectTypeProperty = function flowParseObjectTypeProperty(node, isStatic, variance, kind, allowSpread) { - if (this.match(types.ellipsis)) { - if (!allowSpread) { - this.unexpected(null, "Spread operator cannot appear in class or interface definitions"); - } - - if (variance) { - this.unexpected(variance.start, "Spread properties cannot have variance"); - } - - this.expect(types.ellipsis); - node.argument = this.flowParseType(); - return this.finishNode(node, "ObjectTypeSpreadProperty"); - } else { - node.key = this.flowParseObjectPropertyKey(); - node.static = isStatic; - node.kind = kind; - var optional = false; - - if (this.isRelational("<") || this.match(types.parenL)) { - node.method = true; - - if (variance) { - this.unexpected(variance.start); - } - - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); - - if (kind === "get" || kind === "set") { - this.flowCheckGetterSetterParams(node); - } - } else { - if (kind !== "init") this.unexpected(); - node.method = false; - - if (this.eat(types.question)) { - optional = true; - } - - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - } - - node.optional = optional; - return this.finishNode(node, "ObjectTypeProperty"); - } - }; - - _proto.flowCheckGetterSetterParams = function flowCheckGetterSetterParams(property) { - var paramCount = property.kind === "get" ? 0 : 1; - var start = property.start; - var length = property.value.params.length + (property.value.rest ? 1 : 0); - - if (length !== paramCount) { - if (property.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (property.kind === "set" && property.value.rest) { - this.raise(start, "setter function argument must not be a rest parameter"); - } - }; - - _proto.flowObjectTypeSemicolon = function flowObjectTypeSemicolon() { - if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) { - this.unexpected(); - } - }; - - _proto.flowParseQualifiedTypeIdentifier = function flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - var node = id || this.parseIdentifier(); - - while (this.eat(types.dot)) { - var node2 = this.startNodeAt(startPos, startLoc); - node2.qualification = node; - node2.id = this.parseIdentifier(); - node = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - - return node; - }; - - _proto.flowParseGenericType = function flowParseGenericType(startPos, startLoc, id) { - var node = this.startNodeAt(startPos, startLoc); - node.typeParameters = null; - node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } - - return this.finishNode(node, "GenericTypeAnnotation"); - }; - - _proto.flowParseTypeofType = function flowParseTypeofType() { - var node = this.startNode(); - this.expect(types._typeof); - node.argument = this.flowParsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - }; - - _proto.flowParseTupleType = function flowParseTupleType() { - var node = this.startNode(); - node.types = []; - this.expect(types.bracketL); - - while (this.state.pos < this.input.length && !this.match(types.bracketR)) { - node.types.push(this.flowParseType()); - if (this.match(types.bracketR)) break; - this.expect(types.comma); - } - - this.expect(types.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); - }; - - _proto.flowParseFunctionTypeParam = function flowParseFunctionTypeParam() { - var name = null; - var optional = false; - var typeAnnotation = null; - var node = this.startNode(); - var lh = this.lookahead(); - - if (lh.type === types.colon || lh.type === types.question) { - name = this.parseIdentifier(); - - if (this.eat(types.question)) { - optional = true; - } - - typeAnnotation = this.flowParseTypeInitialiser(); - } else { - typeAnnotation = this.flowParseType(); - } - - node.name = name; - node.optional = optional; - node.typeAnnotation = typeAnnotation; - return this.finishNode(node, "FunctionTypeParam"); - }; - - _proto.reinterpretTypeAsFunctionTypeParam = function reinterpretTypeAsFunctionTypeParam(type) { - var node = this.startNodeAt(type.start, type.loc.start); - node.name = null; - node.optional = false; - node.typeAnnotation = type; - return this.finishNode(node, "FunctionTypeParam"); - }; - - _proto.flowParseFunctionTypeParams = function flowParseFunctionTypeParams(params) { - if (params === void 0) { - params = []; - } - - var rest = null; - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - rest = this.flowParseFunctionTypeParam(); - } - - return { - params: params, - rest: rest - }; - }; - - _proto.flowIdentToTypeAnnotation = function flowIdentToTypeAnnotation(startPos, startLoc, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); - - case "void": - return this.finishNode(node, "VoidTypeAnnotation"); - - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); - - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); - - case "empty": - return this.finishNode(node, "EmptyTypeAnnotation"); - - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); - - case "string": - return this.finishNode(node, "StringTypeAnnotation"); - - default: - return this.flowParseGenericType(startPos, startLoc, id); - } - }; - - _proto.flowParsePrimaryType = function flowParsePrimaryType() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var node = this.startNode(); - var tmp; - var type; - var isGroupedType = false; - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - - switch (this.state.type) { - case types.name: - return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); - - case types.braceL: - return this.flowParseObjectType(false, false, true); - - case types.braceBarL: - return this.flowParseObjectType(false, true, true); - - case types.bracketL: - return this.flowParseTupleType(); - - case types.relational: - if (this.state.value === "<") { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(types.parenL); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - break; - - case types.parenL: - this.next(); - - if (!this.match(types.parenR) && !this.match(types.ellipsis)) { - if (this.match(types.name)) { - var token = this.lookahead().type; - isGroupedType = token !== types.question && token !== types.colon; - } else { - isGroupedType = true; - } - } - - if (isGroupedType) { - this.state.noAnonFunctionType = false; - type = this.flowParseType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - - if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) { - this.expect(types.parenR); - return type; - } else { - this.eat(types.comma); - } - } - - if (type) { - tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); - } else { - tmp = this.flowParseFunctionTypeParams(); - } - - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); - - case types._true: - case types._false: - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteralTypeAnnotation"); - - case types.plusMin: - if (this.state.value === "-") { - this.next(); - - if (!this.match(types.num)) { - this.unexpected(null, "Unexpected token, expected \"number\""); - } - - return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start); - } - - this.unexpected(); - - case types.num: - return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); - - case types._null: - this.next(); - return this.finishNode(node, "NullLiteralTypeAnnotation"); - - case types._this: - this.next(); - return this.finishNode(node, "ThisTypeAnnotation"); - - case types.star: - this.next(); - return this.finishNode(node, "ExistsTypeAnnotation"); - - default: - if (this.state.type.keyword === "typeof") { - return this.flowParseTypeofType(); - } - - } - - throw this.unexpected(); - }; - - _proto.flowParsePostfixType = function flowParsePostfixType() { - var startPos = this.state.start, - startLoc = this.state.startLoc; - var type = this.flowParsePrimaryType(); - - while (!this.canInsertSemicolon() && this.match(types.bracketL)) { - var node = this.startNodeAt(startPos, startLoc); - node.elementType = type; - this.expect(types.bracketL); - this.expect(types.bracketR); - type = this.finishNode(node, "ArrayTypeAnnotation"); - } - - return type; - }; - - _proto.flowParsePrefixType = function flowParsePrefixType() { - var node = this.startNode(); - - if (this.eat(types.question)) { - node.typeAnnotation = this.flowParsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } else { - return this.flowParsePostfixType(); - } - }; - - _proto.flowParseAnonFunctionWithoutParens = function flowParseAnonFunctionWithoutParens() { - var param = this.flowParsePrefixType(); - - if (!this.state.noAnonFunctionType && this.eat(types.arrow)) { - var node = this.startNodeAt(param.start, param.loc.start); - node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; - node.rest = null; - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - return param; - }; - - _proto.flowParseIntersectionType = function flowParseIntersectionType() { - var node = this.startNode(); - this.eat(types.bitwiseAND); - var type = this.flowParseAnonFunctionWithoutParens(); - node.types = [type]; - - while (this.eat(types.bitwiseAND)) { - node.types.push(this.flowParseAnonFunctionWithoutParens()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); - }; - - _proto.flowParseUnionType = function flowParseUnionType() { - var node = this.startNode(); - this.eat(types.bitwiseOR); - var type = this.flowParseIntersectionType(); - node.types = [type]; - - while (this.eat(types.bitwiseOR)) { - node.types.push(this.flowParseIntersectionType()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); - }; - - _proto.flowParseType = function flowParseType() { - var oldInType = this.state.inType; - this.state.inType = true; - var type = this.flowParseUnionType(); - this.state.inType = oldInType; - this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType; - return type; - }; - - _proto.flowParseTypeAnnotation = function flowParseTypeAnnotation() { - var node = this.startNode(); - node.typeAnnotation = this.flowParseTypeInitialiser(); - return this.finishNode(node, "TypeAnnotation"); - }; - - _proto.flowParseTypeAnnotatableIdentifier = function flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { - var ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); - - if (this.match(types.colon)) { - ident.typeAnnotation = this.flowParseTypeAnnotation(); - this.finishNode(ident, ident.type); - } - - return ident; - }; - - _proto.typeCastToParameter = function typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end); - }; - - _proto.flowParseVariance = function flowParseVariance() { - var variance = null; - - if (this.match(types.plusMin)) { - variance = this.startNode(); - - if (this.state.value === "+") { - variance.kind = "plus"; - } else { - variance.kind = "minus"; - } - - this.next(); - this.finishNode(variance, "Variance"); - } - - return variance; - }; - - _proto.parseFunctionBody = function parseFunctionBody(node, allowExpressionBody) { - var _this2 = this; - - if (allowExpressionBody) { - return this.forwardNoArrowParamsConversionAt(node, function () { - return _superClass.prototype.parseFunctionBody.call(_this2, node, true); - }); - } - - return _superClass.prototype.parseFunctionBody.call(this, node, false); - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - if (!allowExpressionBody && this.match(types.colon)) { - var typeNode = this.startNode(); - - var _flowParseTypeAndPred2 = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.typeAnnotation = _flowParseTypeAndPred2[0]; - node.predicate = _flowParseTypeAndPred2[1]; - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } - - _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody); - }; - - _proto.parseStatement = function parseStatement(declaration, topLevel) { - if (this.state.strict && this.match(types.name) && this.state.value === "interface") { - var node = this.startNode(); - this.next(); - return this.flowParseInterface(node); - } else { - return _superClass.prototype.parseStatement.call(this, declaration, topLevel); - } - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) { - return this.flowParseDeclare(node); - } - } else if (this.match(types.name)) { - if (expr.name === "interface") { - return this.flowParseInterface(node); - } else if (expr.name === "type") { - return this.flowParseTypeAlias(node); - } else if (expr.name === "opaque") { - return this.flowParseOpaqueType(node, false); - } - } - } - - return _superClass.prototype.parseExpressionStatement.call(this, node, expr); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || _superClass.prototype.shouldParseExportDeclaration.call(this); - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value == "opaque")) { - return false; - } - - return _superClass.prototype.isExportDefaultSpecifier.call(this); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - var _this3 = this; - - if (!this.match(types.question)) return expr; - - if (refNeedsArrowPos) { - var _state = this.state.clone(); - - try { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = _state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } else { - throw err; - } - } - } - - this.expect(types.question); - var state = this.state.clone(); - var originalNoArrowAt = this.state.noArrowAt; - var node = this.startNodeAt(startPos, startLoc); - - var _tryParseConditionalC = this.tryParseConditionalConsequent(), - consequent = _tryParseConditionalC.consequent, - failed = _tryParseConditionalC.failed; - - var _getArrowLikeExpressi = this.getArrowLikeExpressions(consequent), - valid = _getArrowLikeExpressi[0], - invalid = _getArrowLikeExpressi[1]; - - if (failed || invalid.length > 0) { - var noArrowAt = originalNoArrowAt.concat(); - - if (invalid.length > 0) { - this.state = state; - this.state.noArrowAt = noArrowAt; - - for (var i = 0; i < invalid.length; i++) { - noArrowAt.push(invalid[i].start); - } - - var _tryParseConditionalC2 = this.tryParseConditionalConsequent(); - - consequent = _tryParseConditionalC2.consequent; - failed = _tryParseConditionalC2.failed; - - var _getArrowLikeExpressi2 = this.getArrowLikeExpressions(consequent); - - valid = _getArrowLikeExpressi2[0]; - invalid = _getArrowLikeExpressi2[1]; - } - - if (failed && valid.length > 1) { - this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."); - } - - if (failed && valid.length === 1) { - this.state = state; - this.state.noArrowAt = noArrowAt.concat(valid[0].start); - - var _tryParseConditionalC3 = this.tryParseConditionalConsequent(); - - consequent = _tryParseConditionalC3.consequent; - failed = _tryParseConditionalC3.failed; - } - - this.getArrowLikeExpressions(consequent, true); - } - - this.state.noArrowAt = originalNoArrowAt; - this.expect(types.colon); - node.test = expr; - node.consequent = consequent; - node.alternate = this.forwardNoArrowParamsConversionAt(node, function () { - return _this3.parseMaybeAssign(noIn, undefined, undefined, undefined); - }); - return this.finishNode(node, "ConditionalExpression"); - }; - - _proto.tryParseConditionalConsequent = function tryParseConditionalConsequent() { - this.state.noArrowParamsConversionAt.push(this.state.start); - var consequent = this.parseMaybeAssign(); - var failed = !this.match(types.colon); - this.state.noArrowParamsConversionAt.pop(); - return { - consequent: consequent, - failed: failed - }; - }; - - _proto.getArrowLikeExpressions = function getArrowLikeExpressions(node, disallowInvalid) { - var _this4 = this; - - var stack = [node]; - var arrows = []; - - while (stack.length !== 0) { - var _node = stack.pop(); - - if (_node.type === "ArrowFunctionExpression") { - if (_node.typeParameters || !_node.returnType) { - this.toAssignableList(_node.params, true, "arrow function parameters"); - - _superClass.prototype.checkFunctionNameAndParams.call(this, _node, true); - } else { - arrows.push(_node); - } - - stack.push(_node.body); - } else if (_node.type === "ConditionalExpression") { - stack.push(_node.consequent); - stack.push(_node.alternate); - } - } - - if (disallowInvalid) { - for (var i = 0; i < arrows.length; i++) { - this.toAssignableList(node.params, true, "arrow function parameters"); - } - - return [arrows, []]; - } - - return partition(arrows, function (node) { - try { - _this4.toAssignableList(node.params, true, "arrow function parameters"); - - return true; - } catch (err) { - return false; - } - }); - }; - - _proto.forwardNoArrowParamsConversionAt = function forwardNoArrowParamsConversionAt(node, parse) { - var result; - - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - this.state.noArrowParamsConversionAt.push(this.state.start); - result = parse(); - this.state.noArrowParamsConversionAt.pop(); - } else { - result = parse(); - } - - return result; - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - } - - if (this.match(types.colon)) { - var typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } - - return node; - }; - - _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) { - if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { - return; - } - - _superClass.prototype.assertModuleNodeAllowed.call(this, node); - }; - - _proto.parseExport = function parseExport(node) { - node = _superClass.prototype.parseExport.call(this, node); - - if (node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration") { - node.exportKind = node.exportKind || "value"; - } - - return node; - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - if (this.isContextual("type")) { - node.exportKind = "type"; - var declarationNode = this.startNode(); - this.next(); - - if (this.match(types.braceL)) { - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - return null; - } else { - return this.flowParseTypeAlias(declarationNode); - } - } else if (this.isContextual("opaque")) { - node.exportKind = "type"; - - var _declarationNode = this.startNode(); - - this.next(); - return this.flowParseOpaqueType(_declarationNode, false); - } else if (this.isContextual("interface")) { - node.exportKind = "type"; - - var _declarationNode2 = this.startNode(); - - this.next(); - return this.flowParseInterface(_declarationNode2); - } else { - return _superClass.prototype.parseExportDeclaration.call(this, node); - } - }; - - _proto.shouldParseExportStar = function shouldParseExportStar() { - return _superClass.prototype.shouldParseExportStar.call(this) || this.isContextual("type") && this.lookahead().type === types.star; - }; - - _proto.parseExportStar = function parseExportStar(node) { - if (this.eatContextual("type")) { - node.exportKind = "type"; - } - - return _superClass.prototype.parseExportStar.call(this, node); - }; - - _proto.parseExportNamespace = function parseExportNamespace(node) { - if (node.exportKind === "type") { - this.unexpected(); - } - - return _superClass.prototype.parseExportNamespace.call(this, node); - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - }; - - _proto.isKeyword = function isKeyword$$1(name) { - if (this.state.inType && name === "void") { - return false; - } else { - return _superClass.prototype.isKeyword.call(this, name); - } - }; - - _proto.readToken = function readToken(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else if (isIteratorStart(code, next)) { - this.state.isIterator = true; - return _superClass.prototype.readWord.call(this); - } else { - return _superClass.prototype.readToken.call(this, code); - } - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - if (node.type === "TypeCastExpression") { - return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription); - } else { - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr.type === "TypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - - return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription); - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr._exprListItem && expr.type === "TypeCastExpression") { - this.raise(expr.start, "Unexpected type cast"); - } - } - - return exprList; - }; - - _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos) { - var container = this.startNode(); - - var node = _superClass.prototype.parseExprListItem.call(this, allowEmpty, refShorthandDefaultPos, refNeedsArrowPos); - - if (this.match(types.colon)) { - container._exprListItem = true; - container.expression = node; - container.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(container, "TypeCastExpression"); - } else { - return node; - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - if (expr.type !== "TypeCastExpression") { - return _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - } - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (this.match(types.colon)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - - return _superClass.prototype.parseClassProperty.call(this, node); - }; - - _proto.isClassMethod = function isClassMethod() { - return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.colon) || _superClass.prototype.isClassProperty.call(this); - }; - - _proto.isNonstaticConstructor = function isNonstaticConstructor(method) { - return !this.match(types.colon) && _superClass.prototype.isNonstaticConstructor.call(this, method); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync); - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - _superClass.prototype.parseClassSuper.call(this, node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.flowParseTypeParameterInstantiation(); - } - - if (this.isContextual("implements")) { - this.next(); - var implemented = node.implements = []; - - do { - var _node2 = this.startNode(); - - _node2.id = this.flowParseRestrictedIdentifier(true); - - if (this.isRelational("<")) { - _node2.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - _node2.typeParameters = null; - } - - implemented.push(this.finishNode(_node2, "ClassImplements")); - } while (this.eat(types.comma)); - } - }; - - _proto.parsePropertyName = function parsePropertyName(node) { - var variance = this.flowParseVariance(); - - var key = _superClass.prototype.parsePropertyName.call(this, node); - - node.variance = variance; - return key; - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - if (prop.variance) { - this.unexpected(prop.variance.start); - } - - delete prop.variance; - var typeParameters; - - if (this.isRelational("<")) { - typeParameters = this.flowParseTypeParameterDeclaration(); - if (!this.match(types.parenL)) this.unexpected(); - } - - _superClass.prototype.parseObjPropValue.call(this, prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); - - if (typeParameters) { - (prop.value || prop).typeParameters = typeParameters; - } - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - if (this.match(types.colon)) { - param.typeAnnotation = this.flowParseTypeAnnotation(); - } - - this.finishNode(param, param.type); - return param; - }; - - _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) { - var node = _superClass.prototype.parseMaybeDefault.call(this, startPos, startLoc, left); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - }; - - _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) { - if (!hasTypeImportKind(node)) { - return _superClass.prototype.shouldParseDefaultImport.call(this, node); - } - - return isMaybeDefaultImport(this.state); - }; - - _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier(); - this.checkLVal(specifier.local, true, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - }; - - _proto.parseImportSpecifiers = function parseImportSpecifiers(node) { - node.importKind = "value"; - var kind = null; - - if (this.match(types._typeof)) { - kind = "typeof"; - } else if (this.isContextual("type")) { - kind = "type"; - } - - if (kind) { - var lh = this.lookahead(); - - if (kind === "type" && lh.type === types.star) { - this.unexpected(lh.start); - } - - if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) { - this.next(); - node.importKind = kind; - } - } - - _superClass.prototype.parseImportSpecifiers.call(this, node); - }; - - _proto.parseImportSpecifier = function parseImportSpecifier(node) { - var specifier = this.startNode(); - var firstIdentLoc = this.state.start; - var firstIdent = this.parseIdentifier(true); - var specifierTypeKind = null; - - if (firstIdent.name === "type") { - specifierTypeKind = "type"; - } else if (firstIdent.name === "typeof") { - specifierTypeKind = "typeof"; - } - - var isBinding = false; - - if (this.isContextual("as") && !this.isLookaheadContextual("as")) { - var as_ident = this.parseIdentifier(true); - - if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) { - specifier.imported = as_ident; - specifier.importKind = specifierTypeKind; - specifier.local = as_ident.__clone(); - } else { - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = this.parseIdentifier(); - } - } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) { - specifier.imported = this.parseIdentifier(true); - specifier.importKind = specifierTypeKind; - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - isBinding = true; - specifier.local = specifier.imported.__clone(); - } - } else { - isBinding = true; - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = specifier.imported.__clone(); - } - - var nodeIsTypeImport = hasTypeImportKind(node); - var specifierIsTypeImport = hasTypeImportKind(specifier); - - if (nodeIsTypeImport && specifierIsTypeImport) { - this.raise(firstIdentLoc, "The `type` and `typeof` keywords on named imports can only be used on regular " + "`import` statements. It cannot be used with `import type` or `import typeof` statements"); - } - - if (nodeIsTypeImport || specifierIsTypeImport) { - this.checkReservedType(specifier.local.name, specifier.local.start); - } - - if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) { - this.checkReservedWord(specifier.local.name, specifier.start, true, true); - } - - this.checkLVal(specifier.local, true, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - }; - - _proto.parseFunctionParams = function parseFunctionParams(node) { - var kind = node.kind; - - if (kind !== "get" && kind !== "set" && this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - _superClass.prototype.parseFunctionParams.call(this, node); - }; - - _proto.parseVarHead = function parseVarHead(decl) { - _superClass.prototype.parseVarHead.call(this, decl); - - if (this.match(types.colon)) { - decl.id.typeAnnotation = this.flowParseTypeAnnotation(); - this.finishNode(decl.id, decl.id.type); - } - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - node.returnType = this.flowParseTypeAnnotation(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - } - - return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call); - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this); - }; - - _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - var _this5 = this; - - var jsxError = null; - - if (types.jsxTagStart && this.match(types.jsxTagStart)) { - var state = this.state.clone(); - - try { - return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - this.state.context.length -= 2; - jsxError = err; - } else { - throw err; - } - } - } - - if (jsxError != null || this.isRelational("<")) { - var arrowExpression; - var typeParameters; - - try { - typeParameters = this.flowParseTypeParameterDeclaration(); - arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, function () { - return _superClass.prototype.parseMaybeAssign.call(_this5, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - }); - arrowExpression.typeParameters = typeParameters; - this.resetStartLocationFromNode(arrowExpression, typeParameters); - } catch (err) { - throw jsxError || err; - } - - if (arrowExpression.type === "ArrowFunctionExpression") { - return arrowExpression; - } else if (jsxError != null) { - throw jsxError; - } else { - this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration"); - } - } - - return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.match(types.colon)) { - var state = this.state.clone(); - - try { - var oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - var typeNode = this.startNode(); - - var _flowParseTypeAndPred3 = this.flowParseTypeAndPredicateInitialiser(); - - typeNode.typeAnnotation = _flowParseTypeAndPred3[0]; - node.predicate = _flowParseTypeAndPred3[1]; - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(types.arrow)) this.unexpected(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return _superClass.prototype.parseArrow.call(this, node); - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this); - }; - - _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) { - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - node.params = params; - } else { - _superClass.prototype.setArrowFunctionParameters.call(this, node, params); - } - }; - - _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) { - if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - return; - } - - return _superClass.prototype.checkFunctionNameAndParams.call(this, node, isArrowFunction); - }; - - _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) { - return _superClass.prototype.parseParenAndDistinguishExpression.call(this, canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); - }; - - _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { - this.next(); - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) { - var state = this.state.clone(); - var error; - - try { - var _node3 = this.parseAsyncArrowWithTypeParameters(startPos, startLoc); - - if (_node3) return _node3; - } catch (e) { - error = e; - } - - this.state = state; - - try { - return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls); - } catch (e) { - throw error || e; - } - } - - return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls); - }; - - _proto.parseAsyncArrowWithTypeParameters = function parseAsyncArrowWithTypeParameters(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - this.parseFunctionParams(node); - if (!this.parseArrow(node)) return; - return this.parseArrowExpression(node, undefined, true); - }; - - _proto.readToken_mult_modulo = function readToken_mult_modulo(code) { - var next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 42 && next === 47 && this.state.hasFlowComment) { - this.state.hasFlowComment = false; - this.state.pos += 2; - this.nextToken(); - return; - } - - _superClass.prototype.readToken_mult_modulo.call(this, code); - }; - - _proto.skipBlockComment = function skipBlockComment() { - if (this.hasPlugin("flow") && this.hasPlugin("flowComments") && this.skipFlowComment()) { - this.hasFlowCommentCompletion(); - this.state.pos += this.skipFlowComment(); - this.state.hasFlowComment = true; - return; - } - - var end; - - if (this.hasPlugin("flow") && this.state.hasFlowComment) { - end = this.input.indexOf("*-/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 3; - return; - } - - _superClass.prototype.skipBlockComment.call(this); - }; - - _proto.skipFlowComment = function skipFlowComment() { - var ch2 = this.input.charCodeAt(this.state.pos + 2); - var ch3 = this.input.charCodeAt(this.state.pos + 3); - - if (ch2 === 58 && ch3 === 58) { - return 4; - } - - if (this.input.slice(this.state.pos + 2, 14) === "flow-include") { - return 14; - } - - if (ch2 === 58 && ch3 !== 58 && 2) { - return 2; - } - - return false; - }; - - _proto.hasFlowCommentCompletion = function hasFlowCommentCompletion() { - var end = this.input.indexOf("*/", this.state.pos); - - if (end === -1) { - this.raise(this.state.pos, "Unterminated comment"); - } - }; - - return _class; - }(superClass); -}); - -var entities = { - quot: "\"", - amp: "&", - apos: "'", - lt: "<", - gt: ">", - nbsp: "\xA0", - iexcl: "\xA1", - cent: "\xA2", - pound: "\xA3", - curren: "\xA4", - yen: "\xA5", - brvbar: "\xA6", - sect: "\xA7", - uml: "\xA8", - copy: "\xA9", - ordf: "\xAA", - laquo: "\xAB", - not: "\xAC", - shy: "\xAD", - reg: "\xAE", - macr: "\xAF", - deg: "\xB0", - plusmn: "\xB1", - sup2: "\xB2", - sup3: "\xB3", - acute: "\xB4", - micro: "\xB5", - para: "\xB6", - middot: "\xB7", - cedil: "\xB8", - sup1: "\xB9", - ordm: "\xBA", - raquo: "\xBB", - frac14: "\xBC", - frac12: "\xBD", - frac34: "\xBE", - iquest: "\xBF", - Agrave: "\xC0", - Aacute: "\xC1", - Acirc: "\xC2", - Atilde: "\xC3", - Auml: "\xC4", - Aring: "\xC5", - AElig: "\xC6", - Ccedil: "\xC7", - Egrave: "\xC8", - Eacute: "\xC9", - Ecirc: "\xCA", - Euml: "\xCB", - Igrave: "\xCC", - Iacute: "\xCD", - Icirc: "\xCE", - Iuml: "\xCF", - ETH: "\xD0", - Ntilde: "\xD1", - Ograve: "\xD2", - Oacute: "\xD3", - Ocirc: "\xD4", - Otilde: "\xD5", - Ouml: "\xD6", - times: "\xD7", - Oslash: "\xD8", - Ugrave: "\xD9", - Uacute: "\xDA", - Ucirc: "\xDB", - Uuml: "\xDC", - Yacute: "\xDD", - THORN: "\xDE", - szlig: "\xDF", - agrave: "\xE0", - aacute: "\xE1", - acirc: "\xE2", - atilde: "\xE3", - auml: "\xE4", - aring: "\xE5", - aelig: "\xE6", - ccedil: "\xE7", - egrave: "\xE8", - eacute: "\xE9", - ecirc: "\xEA", - euml: "\xEB", - igrave: "\xEC", - iacute: "\xED", - icirc: "\xEE", - iuml: "\xEF", - eth: "\xF0", - ntilde: "\xF1", - ograve: "\xF2", - oacute: "\xF3", - ocirc: "\xF4", - otilde: "\xF5", - ouml: "\xF6", - divide: "\xF7", - oslash: "\xF8", - ugrave: "\xF9", - uacute: "\xFA", - ucirc: "\xFB", - uuml: "\xFC", - yacute: "\xFD", - thorn: "\xFE", - yuml: "\xFF", - OElig: "\u0152", - oelig: "\u0153", - Scaron: "\u0160", - scaron: "\u0161", - Yuml: "\u0178", - fnof: "\u0192", - circ: "\u02C6", - tilde: "\u02DC", - Alpha: "\u0391", - Beta: "\u0392", - Gamma: "\u0393", - Delta: "\u0394", - Epsilon: "\u0395", - Zeta: "\u0396", - Eta: "\u0397", - Theta: "\u0398", - Iota: "\u0399", - Kappa: "\u039A", - Lambda: "\u039B", - Mu: "\u039C", - Nu: "\u039D", - Xi: "\u039E", - Omicron: "\u039F", - Pi: "\u03A0", - Rho: "\u03A1", - Sigma: "\u03A3", - Tau: "\u03A4", - Upsilon: "\u03A5", - Phi: "\u03A6", - Chi: "\u03A7", - Psi: "\u03A8", - Omega: "\u03A9", - alpha: "\u03B1", - beta: "\u03B2", - gamma: "\u03B3", - delta: "\u03B4", - epsilon: "\u03B5", - zeta: "\u03B6", - eta: "\u03B7", - theta: "\u03B8", - iota: "\u03B9", - kappa: "\u03BA", - lambda: "\u03BB", - mu: "\u03BC", - nu: "\u03BD", - xi: "\u03BE", - omicron: "\u03BF", - pi: "\u03C0", - rho: "\u03C1", - sigmaf: "\u03C2", - sigma: "\u03C3", - tau: "\u03C4", - upsilon: "\u03C5", - phi: "\u03C6", - chi: "\u03C7", - psi: "\u03C8", - omega: "\u03C9", - thetasym: "\u03D1", - upsih: "\u03D2", - piv: "\u03D6", - ensp: "\u2002", - emsp: "\u2003", - thinsp: "\u2009", - zwnj: "\u200C", - zwj: "\u200D", - lrm: "\u200E", - rlm: "\u200F", - ndash: "\u2013", - mdash: "\u2014", - lsquo: "\u2018", - rsquo: "\u2019", - sbquo: "\u201A", - ldquo: "\u201C", - rdquo: "\u201D", - bdquo: "\u201E", - dagger: "\u2020", - Dagger: "\u2021", - bull: "\u2022", - hellip: "\u2026", - permil: "\u2030", - prime: "\u2032", - Prime: "\u2033", - lsaquo: "\u2039", - rsaquo: "\u203A", - oline: "\u203E", - frasl: "\u2044", - euro: "\u20AC", - image: "\u2111", - weierp: "\u2118", - real: "\u211C", - trade: "\u2122", - alefsym: "\u2135", - larr: "\u2190", - uarr: "\u2191", - rarr: "\u2192", - darr: "\u2193", - harr: "\u2194", - crarr: "\u21B5", - lArr: "\u21D0", - uArr: "\u21D1", - rArr: "\u21D2", - dArr: "\u21D3", - hArr: "\u21D4", - forall: "\u2200", - part: "\u2202", - exist: "\u2203", - empty: "\u2205", - nabla: "\u2207", - isin: "\u2208", - notin: "\u2209", - ni: "\u220B", - prod: "\u220F", - sum: "\u2211", - minus: "\u2212", - lowast: "\u2217", - radic: "\u221A", - prop: "\u221D", - infin: "\u221E", - ang: "\u2220", - and: "\u2227", - or: "\u2228", - cap: "\u2229", - cup: "\u222A", - int: "\u222B", - there4: "\u2234", - sim: "\u223C", - cong: "\u2245", - asymp: "\u2248", - ne: "\u2260", - equiv: "\u2261", - le: "\u2264", - ge: "\u2265", - sub: "\u2282", - sup: "\u2283", - nsub: "\u2284", - sube: "\u2286", - supe: "\u2287", - oplus: "\u2295", - otimes: "\u2297", - perp: "\u22A5", - sdot: "\u22C5", - lceil: "\u2308", - rceil: "\u2309", - lfloor: "\u230A", - rfloor: "\u230B", - lang: "\u2329", - rang: "\u232A", - loz: "\u25CA", - spades: "\u2660", - clubs: "\u2663", - hearts: "\u2665", - diams: "\u2666" -}; - -var HEX_NUMBER = /^[\da-fA-F]+$/; -var DECIMAL_NUMBER = /^\d+$/; -types$1.j_oTag = new TokContext("...", true, true); -types.jsxName = new TokenType("jsxName"); -types.jsxText = new TokenType("jsxText", { - beforeExpr: true -}); -types.jsxTagStart = new TokenType("jsxTagStart", { - startsExpr: true -}); -types.jsxTagEnd = new TokenType("jsxTagEnd"); - -types.jsxTagStart.updateContext = function () { - this.state.context.push(types$1.j_expr); - this.state.context.push(types$1.j_oTag); - this.state.exprAllowed = false; -}; - -types.jsxTagEnd.updateContext = function (prevType) { - var out = this.state.context.pop(); - - if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) { - this.state.context.pop(); - this.state.exprAllowed = this.curContext() === types$1.j_expr; - } else { - this.state.exprAllowed = true; - } -}; - -function isFragment(object) { - return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; -} - -function getQualifiedJSXName(object) { - if (object.type === "JSXIdentifier") { - return object.name; - } - - if (object.type === "JSXNamespacedName") { - return object.namespace.name + ":" + object.name.name; - } - - if (object.type === "JSXMemberExpression") { - return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); - } - - throw new Error("Node had unexpected type: " + object.type); -} - -var jsxPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.jsxReadToken = function jsxReadToken() { - var out = ""; - var chunkStart = this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated JSX contents"); - } - - var ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 60: - case 123: - if (this.state.pos === this.state.start) { - if (ch === 60 && this.state.exprAllowed) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return this.getTokenFromCode(ch); - } - - out += this.input.slice(chunkStart, this.state.pos); - return this.finishToken(types.jsxText, out); - - case 38: - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - break; - - default: - if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(true); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - - } - } - }; - - _proto.jsxReadNewLine = function jsxReadNewLine(normalizeCRLF) { - var ch = this.input.charCodeAt(this.state.pos); - var out; - ++this.state.pos; - - if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - out = normalizeCRLF ? "\n" : "\r\n"; - } else { - out = String.fromCharCode(ch); - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - return out; - }; - - _proto.jsxReadString = function jsxReadString(quote) { - var out = ""; - var chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.input.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - var ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 38) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(false); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - return this.finishToken(types.string, out); - }; - - _proto.jsxReadEntity = function jsxReadEntity() { - var str = ""; - var count = 0; - var entity; - var ch = this.input[this.state.pos]; - var startPos = ++this.state.pos; - - while (this.state.pos < this.input.length && count++ < 10) { - ch = this.input[this.state.pos++]; - - if (ch === ";") { - if (str[0] === "#") { - if (str[1] === "x") { - str = str.substr(2); - - if (HEX_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 16)); - } - } else { - str = str.substr(1); - - if (DECIMAL_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 10)); - } - } - } else { - entity = entities[str]; - } - - break; - } - - str += ch; - } - - if (!entity) { - this.state.pos = startPos; - return "&"; - } - - return entity; - }; - - _proto.jsxReadWord = function jsxReadWord() { - var ch; - var start = this.state.pos; - - do { - ch = this.input.charCodeAt(++this.state.pos); - } while (isIdentifierChar(ch) || ch === 45); - - return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos)); - }; - - _proto.jsxParseIdentifier = function jsxParseIdentifier() { - var node = this.startNode(); - - if (this.match(types.jsxName)) { - node.name = this.state.value; - } else if (this.state.type.keyword) { - node.name = this.state.type.keyword; - } else { - this.unexpected(); - } - - this.next(); - return this.finishNode(node, "JSXIdentifier"); - }; - - _proto.jsxParseNamespacedName = function jsxParseNamespacedName() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var name = this.jsxParseIdentifier(); - if (!this.eat(types.colon)) return name; - var node = this.startNodeAt(startPos, startLoc); - node.namespace = name; - node.name = this.jsxParseIdentifier(); - return this.finishNode(node, "JSXNamespacedName"); - }; - - _proto.jsxParseElementName = function jsxParseElementName() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - var node = this.jsxParseNamespacedName(); - - while (this.eat(types.dot)) { - var newNode = this.startNodeAt(startPos, startLoc); - newNode.object = node; - newNode.property = this.jsxParseIdentifier(); - node = this.finishNode(newNode, "JSXMemberExpression"); - } - - return node; - }; - - _proto.jsxParseAttributeValue = function jsxParseAttributeValue() { - var node; - - switch (this.state.type) { - case types.braceL: - node = this.jsxParseExpressionContainer(); - - if (node.expression.type === "JSXEmptyExpression") { - throw this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); - } else { - return node; - } - - case types.jsxTagStart: - case types.string: - return this.parseExprAtom(); - - default: - throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text"); - } - }; - - _proto.jsxParseEmptyExpression = function jsxParseEmptyExpression() { - var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); - return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc); - }; - - _proto.jsxParseSpreadChild = function jsxParseSpreadChild() { - var node = this.startNode(); - this.expect(types.braceL); - this.expect(types.ellipsis); - node.expression = this.parseExpression(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadChild"); - }; - - _proto.jsxParseExpressionContainer = function jsxParseExpressionContainer() { - var node = this.startNode(); - this.next(); - - if (this.match(types.braceR)) { - node.expression = this.jsxParseEmptyExpression(); - } else { - node.expression = this.parseExpression(); - } - - this.expect(types.braceR); - return this.finishNode(node, "JSXExpressionContainer"); - }; - - _proto.jsxParseAttribute = function jsxParseAttribute() { - var node = this.startNode(); - - if (this.eat(types.braceL)) { - this.expect(types.ellipsis); - node.argument = this.parseMaybeAssign(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadAttribute"); - } - - node.name = this.jsxParseNamespacedName(); - node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null; - return this.finishNode(node, "JSXAttribute"); - }; - - _proto.jsxParseOpeningElementAt = function jsxParseOpeningElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningFragment"); - } - - node.attributes = []; - node.name = this.jsxParseElementName(); - - while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) { - node.attributes.push(this.jsxParseAttribute()); - } - - node.selfClosing = this.eat(types.slash); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningElement"); - }; - - _proto.jsxParseClosingElementAt = function jsxParseClosingElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingFragment"); - } - - node.name = this.jsxParseElementName(); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingElement"); - }; - - _proto.jsxParseElementAt = function jsxParseElementAt(startPos, startLoc) { - var node = this.startNodeAt(startPos, startLoc); - var children = []; - var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); - var closingElement = null; - - if (!openingElement.selfClosing) { - contents: for (;;) { - switch (this.state.type) { - case types.jsxTagStart: - startPos = this.state.start; - startLoc = this.state.startLoc; - this.next(); - - if (this.eat(types.slash)) { - closingElement = this.jsxParseClosingElementAt(startPos, startLoc); - break contents; - } - - children.push(this.jsxParseElementAt(startPos, startLoc)); - break; - - case types.jsxText: - children.push(this.parseExprAtom()); - break; - - case types.braceL: - if (this.lookahead().type === types.ellipsis) { - children.push(this.jsxParseSpreadChild()); - } else { - children.push(this.jsxParseExpressionContainer()); - } - - break; - - default: - throw this.unexpected(); - } - } - - if (isFragment(openingElement) && !isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>"); - } else if (!isFragment(openingElement) && isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } else if (!isFragment(openingElement) && !isFragment(closingElement)) { - if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } - } - } - - if (isFragment(openingElement)) { - node.openingFragment = openingElement; - node.closingFragment = closingElement; - } else { - node.openingElement = openingElement; - node.closingElement = closingElement; - } - - node.children = children; - - if (this.match(types.relational) && this.state.value === "<") { - this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...?"); - } - - return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); - }; - - _proto.jsxParseElement = function jsxParseElement() { - var startPos = this.state.start; - var startLoc = this.state.startLoc; - this.next(); - return this.jsxParseElementAt(startPos, startLoc); - }; - - _proto.parseExprAtom = function parseExprAtom(refShortHandDefaultPos) { - if (this.match(types.jsxText)) { - return this.parseLiteral(this.state.value, "JSXText"); - } else if (this.match(types.jsxTagStart)) { - return this.jsxParseElement(); - } else { - return _superClass.prototype.parseExprAtom.call(this, refShortHandDefaultPos); - } - }; - - _proto.readToken = function readToken(code) { - if (this.state.inPropertyName) return _superClass.prototype.readToken.call(this, code); - var context = this.curContext(); - - if (context === types$1.j_expr) { - return this.jsxReadToken(); - } - - if (context === types$1.j_oTag || context === types$1.j_cTag) { - if (isIdentifierStart(code)) { - return this.jsxReadWord(); - } - - if (code === 62) { - ++this.state.pos; - return this.finishToken(types.jsxTagEnd); - } - - if ((code === 34 || code === 39) && context === types$1.j_oTag) { - return this.jsxReadString(code); - } - } - - if (code === 60 && this.state.exprAllowed) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return _superClass.prototype.readToken.call(this, code); - }; - - _proto.updateContext = function updateContext(prevType) { - if (this.match(types.braceL)) { - var curContext = this.curContext(); - - if (curContext === types$1.j_oTag) { - this.state.context.push(types$1.braceExpression); - } else if (curContext === types$1.j_expr) { - this.state.context.push(types$1.templateQuasi); - } else { - _superClass.prototype.updateContext.call(this, prevType); - } - - this.state.exprAllowed = true; - } else if (this.match(types.slash) && prevType === types.jsxTagStart) { - this.state.context.length -= 2; - this.state.context.push(types$1.j_cTag); - this.state.exprAllowed = false; - } else { - return _superClass.prototype.updateContext.call(this, prevType); - } - }; - - return _class; - }(superClass); -}); - -function nonNull(x) { - if (x == null) { - throw new Error("Unexpected " + x + " value."); - } - - return x; -} - -function assert(x) { - if (!x) { - throw new Error("Assert fail"); - } -} - -function keywordTypeFromName(value) { - switch (value) { - case "any": - return "TSAnyKeyword"; - - case "boolean": - return "TSBooleanKeyword"; - - case "never": - return "TSNeverKeyword"; - - case "number": - return "TSNumberKeyword"; - - case "object": - return "TSObjectKeyword"; - - case "string": - return "TSStringKeyword"; - - case "symbol": - return "TSSymbolKeyword"; - - case "undefined": - return "TSUndefinedKeyword"; - - default: - return undefined; - } -} - -var typescriptPlugin = (function (superClass) { - return function (_superClass) { - _inheritsLoose(_class, _superClass); - - function _class() { - return _superClass.apply(this, arguments) || this; - } - - var _proto = _class.prototype; - - _proto.tsIsIdentifier = function tsIsIdentifier() { - return this.match(types.name); - }; - - _proto.tsNextTokenCanFollowModifier = function tsNextTokenCanFollowModifier() { - this.next(); - return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question); - }; - - _proto.tsParseModifier = function tsParseModifier(allowedModifiers) { - if (!this.match(types.name)) { - return undefined; - } - - var modifier = this.state.value; - - if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { - return modifier; - } - - return undefined; - }; - - _proto.tsIsListTerminator = function tsIsListTerminator(kind) { - switch (kind) { - case "EnumMembers": - case "TypeMembers": - return this.match(types.braceR); - - case "HeritageClauseElement": - return this.match(types.braceL); - - case "TupleElementTypes": - return this.match(types.bracketR); - - case "TypeParametersOrArguments": - return this.isRelational(">"); - } - - throw new Error("Unreachable"); - }; - - _proto.tsParseList = function tsParseList(kind, parseElement) { - var result = []; - - while (!this.tsIsListTerminator(kind)) { - result.push(parseElement()); - } - - return result; - }; - - _proto.tsParseDelimitedList = function tsParseDelimitedList(kind, parseElement) { - return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true)); - }; - - _proto.tsTryParseDelimitedList = function tsTryParseDelimitedList(kind, parseElement) { - return this.tsParseDelimitedListWorker(kind, parseElement, false); - }; - - _proto.tsParseDelimitedListWorker = function tsParseDelimitedListWorker(kind, parseElement, expectSuccess) { - var result = []; - - while (true) { - if (this.tsIsListTerminator(kind)) { - break; - } - - var element = parseElement(); - - if (element == null) { - return undefined; - } - - result.push(element); - - if (this.eat(types.comma)) { - continue; - } - - if (this.tsIsListTerminator(kind)) { - break; - } - - if (expectSuccess) { - this.expect(types.comma); - } - - return undefined; - } - - return result; - }; - - _proto.tsParseBracketedList = function tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) { - if (!skipFirstToken) { - if (bracket) { - this.expect(types.bracketL); - } else { - this.expectRelational("<"); - } - } - - var result = this.tsParseDelimitedList(kind, parseElement); - - if (bracket) { - this.expect(types.bracketR); - } else { - this.expectRelational(">"); - } - - return result; - }; - - _proto.tsParseEntityName = function tsParseEntityName(allowReservedWords) { - var entity = this.parseIdentifier(); - - while (this.eat(types.dot)) { - var node = this.startNodeAtNode(entity); - node.left = entity; - node.right = this.parseIdentifier(allowReservedWords); - entity = this.finishNode(node, "TSQualifiedName"); - } - - return entity; - }; - - _proto.tsParseTypeReference = function tsParseTypeReference() { - var node = this.startNode(); - node.typeName = this.tsParseEntityName(false); - - if (!this.hasPrecedingLineBreak() && this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSTypeReference"); - }; - - _proto.tsParseThisTypePredicate = function tsParseThisTypePredicate(lhs) { - this.next(); - var node = this.startNode(); - node.parameterName = lhs; - node.typeAnnotation = this.tsParseTypeAnnotation(false); - return this.finishNode(node, "TSTypePredicate"); - }; - - _proto.tsParseThisTypeNode = function tsParseThisTypeNode() { - var node = this.startNode(); - this.next(); - return this.finishNode(node, "TSThisType"); - }; - - _proto.tsParseTypeQuery = function tsParseTypeQuery() { - var node = this.startNode(); - this.expect(types._typeof); - node.exprName = this.tsParseEntityName(true); - return this.finishNode(node, "TSTypeQuery"); - }; - - _proto.tsParseTypeParameter = function tsParseTypeParameter() { - var node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsEatThenParseType(types._extends); - node.default = this.tsEatThenParseType(types.eq); - return this.finishNode(node, "TSTypeParameter"); - }; - - _proto.tsTryParseTypeParameters = function tsTryParseTypeParameters() { - if (this.isRelational("<")) { - return this.tsParseTypeParameters(); - } - }; - - _proto.tsParseTypeParameters = function tsParseTypeParameters() { - var node = this.startNode(); - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true); - return this.finishNode(node, "TSTypeParameterDeclaration"); - }; - - _proto.tsFillSignature = function tsFillSignature(returnToken, signature) { - var returnTokenRequired = returnToken === types.arrow; - signature.typeParameters = this.tsTryParseTypeParameters(); - this.expect(types.parenL); - signature.parameters = this.tsParseBindingListForSignature(); - - if (returnTokenRequired) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } else if (this.match(returnToken)) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } - }; - - _proto.tsParseBindingListForSignature = function tsParseBindingListForSignature() { - var _this = this; - - return this.parseBindingList(types.parenR).map(function (pattern) { - if (pattern.type !== "Identifier" && pattern.type !== "RestElement") { - throw _this.unexpected(pattern.start, "Name in a signature must be an Identifier."); - } - - return pattern; - }); - }; - - _proto.tsParseTypeMemberSemicolon = function tsParseTypeMemberSemicolon() { - if (!this.eat(types.comma)) { - this.semicolon(); - } - }; - - _proto.tsParseSignatureMember = function tsParseSignatureMember(kind) { - var node = this.startNode(); - - if (kind === "TSConstructSignatureDeclaration") { - this.expect(types._new); - } - - this.tsFillSignature(types.colon, node); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, kind); - }; - - _proto.tsIsUnambiguouslyIndexSignature = function tsIsUnambiguouslyIndexSignature() { - this.next(); - return this.eat(types.name) && this.match(types.colon); - }; - - _proto.tsTryParseIndexSignature = function tsTryParseIndexSignature(node) { - if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { - return undefined; - } - - this.expect(types.bracketL); - var id = this.parseIdentifier(); - this.expect(types.colon); - id.typeAnnotation = this.tsParseTypeAnnotation(false); - this.expect(types.bracketR); - node.parameters = [id]; - var type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, "TSIndexSignature"); - }; - - _proto.tsParsePropertyOrMethodSignature = function tsParsePropertyOrMethodSignature(node, readonly) { - this.parsePropertyName(node); - if (this.eat(types.question)) node.optional = true; - var nodeAny = node; - - if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) { - var method = nodeAny; - this.tsFillSignature(types.colon, method); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(method, "TSMethodSignature"); - } else { - var property = nodeAny; - if (readonly) property.readonly = true; - var type = this.tsTryParseTypeAnnotation(); - if (type) property.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(property, "TSPropertySignature"); - } - }; - - _proto.tsParseTypeMember = function tsParseTypeMember() { - if (this.match(types.parenL) || this.isRelational("<")) { - return this.tsParseSignatureMember("TSCallSignatureDeclaration"); - } - - if (this.match(types._new) && this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this))) { - return this.tsParseSignatureMember("TSConstructSignatureDeclaration"); - } - - var node = this.startNode(); - var readonly = !!this.tsParseModifier(["readonly"]); - var idx = this.tsTryParseIndexSignature(node); - - if (idx) { - if (readonly) node.readonly = true; - return idx; - } - - return this.tsParsePropertyOrMethodSignature(node, readonly); - }; - - _proto.tsIsStartOfConstructSignature = function tsIsStartOfConstructSignature() { - this.next(); - return this.match(types.parenL) || this.isRelational("<"); - }; - - _proto.tsParseTypeLiteral = function tsParseTypeLiteral() { - var node = this.startNode(); - node.members = this.tsParseObjectTypeMembers(); - return this.finishNode(node, "TSTypeLiteral"); - }; - - _proto.tsParseObjectTypeMembers = function tsParseObjectTypeMembers() { - this.expect(types.braceL); - var members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); - this.expect(types.braceR); - return members; - }; - - _proto.tsIsStartOfMappedType = function tsIsStartOfMappedType() { - this.next(); - - if (this.eat(types.plusMin)) { - return this.isContextual("readonly"); - } - - if (this.isContextual("readonly")) { - this.next(); - } - - if (!this.match(types.bracketL)) { - return false; - } - - this.next(); - - if (!this.tsIsIdentifier()) { - return false; - } - - this.next(); - return this.match(types._in); - }; - - _proto.tsParseMappedTypeParameter = function tsParseMappedTypeParameter() { - var node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsExpectThenParseType(types._in); - return this.finishNode(node, "TSTypeParameter"); - }; - - _proto.tsParseMappedType = function tsParseMappedType() { - var node = this.startNode(); - this.expect(types.braceL); - - if (this.match(types.plusMin)) { - node.readonly = this.state.value; - this.next(); - this.expectContextual("readonly"); - } else if (this.eatContextual("readonly")) { - node.readonly = true; - } - - this.expect(types.bracketL); - node.typeParameter = this.tsParseMappedTypeParameter(); - this.expect(types.bracketR); - - if (this.match(types.plusMin)) { - node.optional = this.state.value; - this.next(); - this.expect(types.question); - } else if (this.eat(types.question)) { - node.optional = true; - } - - node.typeAnnotation = this.tsTryParseType(); - this.semicolon(); - this.expect(types.braceR); - return this.finishNode(node, "TSMappedType"); - }; - - _proto.tsParseTupleType = function tsParseTupleType() { - var node = this.startNode(); - node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseType.bind(this), true, false); - return this.finishNode(node, "TSTupleType"); - }; - - _proto.tsParseParenthesizedType = function tsParseParenthesizedType() { - var node = this.startNode(); - this.expect(types.parenL); - node.typeAnnotation = this.tsParseType(); - this.expect(types.parenR); - return this.finishNode(node, "TSParenthesizedType"); - }; - - _proto.tsParseFunctionOrConstructorType = function tsParseFunctionOrConstructorType(type) { - var node = this.startNode(); - - if (type === "TSConstructorType") { - this.expect(types._new); - } - - this.tsFillSignature(types.arrow, node); - return this.finishNode(node, type); - }; - - _proto.tsParseLiteralTypeNode = function tsParseLiteralTypeNode() { - var _this2 = this; - - var node = this.startNode(); - - node.literal = function () { - switch (_this2.state.type) { - case types.num: - return _this2.parseLiteral(_this2.state.value, "NumericLiteral"); - - case types.string: - return _this2.parseLiteral(_this2.state.value, "StringLiteral"); - - case types._true: - case types._false: - return _this2.parseBooleanLiteral(); - - default: - throw _this2.unexpected(); - } - }(); - - return this.finishNode(node, "TSLiteralType"); - }; - - _proto.tsParseNonArrayType = function tsParseNonArrayType() { - switch (this.state.type) { - case types.name: - case types._void: - case types._null: - { - var type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value); - - if (type !== undefined && this.lookahead().type !== types.dot) { - var node = this.startNode(); - this.next(); - return this.finishNode(node, type); - } - - return this.tsParseTypeReference(); - } - - case types.string: - case types.num: - case types._true: - case types._false: - return this.tsParseLiteralTypeNode(); - - case types.plusMin: - if (this.state.value === "-") { - var _node = this.startNode(); - - this.next(); - - if (!this.match(types.num)) { - throw this.unexpected(); - } - - _node.literal = this.parseLiteral(-this.state.value, "NumericLiteral", _node.start, _node.loc.start); - return this.finishNode(_node, "TSLiteralType"); - } - - break; - - case types._this: - { - var thisKeyword = this.tsParseThisTypeNode(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - return this.tsParseThisTypePredicate(thisKeyword); - } else { - return thisKeyword; - } - } - - case types._typeof: - return this.tsParseTypeQuery(); - - case types.braceL: - return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); - - case types.bracketL: - return this.tsParseTupleType(); - - case types.parenL: - return this.tsParseParenthesizedType(); - } - - throw this.unexpected(); - }; - - _proto.tsParseArrayTypeOrHigher = function tsParseArrayTypeOrHigher() { - var type = this.tsParseNonArrayType(); - - while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) { - if (this.match(types.bracketR)) { - var node = this.startNodeAtNode(type); - node.elementType = type; - this.expect(types.bracketR); - type = this.finishNode(node, "TSArrayType"); - } else { - var _node2 = this.startNodeAtNode(type); - - _node2.objectType = type; - _node2.indexType = this.tsParseType(); - this.expect(types.bracketR); - type = this.finishNode(_node2, "TSIndexedAccessType"); - } - } - - return type; - }; - - _proto.tsParseTypeOperator = function tsParseTypeOperator(operator) { - var node = this.startNode(); - this.expectContextual(operator); - node.operator = operator; - node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); - return this.finishNode(node, "TSTypeOperator"); - }; - - _proto.tsParseInferType = function tsParseInferType() { - var node = this.startNode(); - this.expectContextual("infer"); - var typeParameter = this.startNode(); - typeParameter.name = this.parseIdentifierName(typeParameter.start); - node.typeParameter = this.finishNode(typeParameter, "TypeParameter"); - return this.finishNode(node, "TSInferType"); - }; - - _proto.tsParseTypeOperatorOrHigher = function tsParseTypeOperatorOrHigher() { - var _this3 = this; - - var operator = ["keyof", "unique"].find(function (kw) { - return _this3.isContextual(kw); - }); - return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); - }; - - _proto.tsParseUnionOrIntersectionType = function tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { - this.eat(operator); - var type = parseConstituentType(); - - if (this.match(operator)) { - var types$$1 = [type]; - - while (this.eat(operator)) { - types$$1.push(parseConstituentType()); - } - - var node = this.startNodeAtNode(type); - node.types = types$$1; - type = this.finishNode(node, kind); - } - - return type; - }; - - _proto.tsParseIntersectionTypeOrHigher = function tsParseIntersectionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND); - }; - - _proto.tsParseUnionTypeOrHigher = function tsParseUnionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR); - }; - - _proto.tsIsStartOfFunctionType = function tsIsStartOfFunctionType() { - if (this.isRelational("<")) { - return true; - } - - return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); - }; - - _proto.tsSkipParameterStart = function tsSkipParameterStart() { - if (this.match(types.name) || this.match(types._this)) { - this.next(); - return true; - } - - return false; - }; - - _proto.tsIsUnambiguouslyStartOfFunctionType = function tsIsUnambiguouslyStartOfFunctionType() { - this.next(); - - if (this.match(types.parenR) || this.match(types.ellipsis)) { - return true; - } - - if (this.tsSkipParameterStart()) { - if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) { - return true; - } - - if (this.match(types.parenR)) { - this.next(); - - if (this.match(types.arrow)) { - return true; - } - } - } - - return false; - }; - - _proto.tsParseTypeOrTypePredicateAnnotation = function tsParseTypeOrTypePredicateAnnotation(returnToken) { - var _this4 = this; - - return this.tsInType(function () { - var t = _this4.startNode(); - - _this4.expect(returnToken); - - var typePredicateVariable = _this4.tsIsIdentifier() && _this4.tsTryParse(_this4.tsParseTypePredicatePrefix.bind(_this4)); - - if (!typePredicateVariable) { - return _this4.tsParseTypeAnnotation(false, t); - } - - var type = _this4.tsParseTypeAnnotation(false); - - var node = _this4.startNodeAtNode(typePredicateVariable); - - node.parameterName = typePredicateVariable; - node.typeAnnotation = type; - t.typeAnnotation = _this4.finishNode(node, "TSTypePredicate"); - return _this4.finishNode(t, "TSTypeAnnotation"); - }); - }; - - _proto.tsTryParseTypeOrTypePredicateAnnotation = function tsTryParseTypeOrTypePredicateAnnotation() { - return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined; - }; - - _proto.tsTryParseTypeAnnotation = function tsTryParseTypeAnnotation() { - return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined; - }; - - _proto.tsTryParseType = function tsTryParseType() { - return this.tsEatThenParseType(types.colon); - }; - - _proto.tsParseTypePredicatePrefix = function tsParseTypePredicatePrefix() { - var id = this.parseIdentifier(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - this.next(); - return id; - } - }; - - _proto.tsParseTypeAnnotation = function tsParseTypeAnnotation(eatColon, t) { - var _this5 = this; - - if (eatColon === void 0) { - eatColon = true; - } - - if (t === void 0) { - t = this.startNode(); - } - - this.tsInType(function () { - if (eatColon) _this5.expect(types.colon); - t.typeAnnotation = _this5.tsParseType(); - }); - return this.finishNode(t, "TSTypeAnnotation"); - }; - - _proto.tsParseType = function tsParseType() { - assert(this.state.inType); - var type = this.tsParseNonConditionalType(); - - if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) { - return type; - } - - var node = this.startNodeAtNode(type); - node.checkType = type; - node.extendsType = this.tsParseNonConditionalType(); - this.expect(types.question); - node.trueType = this.tsParseType(); - this.expect(types.colon); - node.falseType = this.tsParseType(); - return this.finishNode(node, "TSConditionalType"); - }; - - _proto.tsParseNonConditionalType = function tsParseNonConditionalType() { - if (this.tsIsStartOfFunctionType()) { - return this.tsParseFunctionOrConstructorType("TSFunctionType"); - } - - if (this.match(types._new)) { - return this.tsParseFunctionOrConstructorType("TSConstructorType"); - } - - return this.tsParseUnionTypeOrHigher(); - }; - - _proto.tsParseTypeAssertion = function tsParseTypeAssertion() { - var _this6 = this; - - var node = this.startNode(); - node.typeAnnotation = this.tsInType(function () { - return _this6.tsParseType(); - }); - this.expectRelational(">"); - node.expression = this.parseMaybeUnary(); - return this.finishNode(node, "TSTypeAssertion"); - }; - - _proto.tsTryParseTypeArgumentsInExpression = function tsTryParseTypeArgumentsInExpression() { - var _this7 = this; - - return this.tsTryParseAndCatch(function () { - var res = _this7.tsParseTypeArguments(); - - _this7.expect(types.parenL); - - return res; - }); - }; - - _proto.tsParseHeritageClause = function tsParseHeritageClause() { - return this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); - }; - - _proto.tsParseExpressionWithTypeArguments = function tsParseExpressionWithTypeArguments() { - var node = this.startNode(); - node.expression = this.tsParseEntityName(false); - - if (this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSExpressionWithTypeArguments"); - }; - - _proto.tsParseInterfaceDeclaration = function tsParseInterfaceDeclaration(node) { - node.id = this.parseIdentifier(); - node.typeParameters = this.tsTryParseTypeParameters(); - - if (this.eat(types._extends)) { - node.extends = this.tsParseHeritageClause(); - } - - var body = this.startNode(); - body.body = this.tsParseObjectTypeMembers(); - node.body = this.finishNode(body, "TSInterfaceBody"); - return this.finishNode(node, "TSInterfaceDeclaration"); - }; - - _proto.tsParseTypeAliasDeclaration = function tsParseTypeAliasDeclaration(node) { - node.id = this.parseIdentifier(); - node.typeParameters = this.tsTryParseTypeParameters(); - node.typeAnnotation = this.tsExpectThenParseType(types.eq); - this.semicolon(); - return this.finishNode(node, "TSTypeAliasDeclaration"); - }; - - _proto.tsInType = function tsInType(cb) { - var oldInType = this.state.inType; - this.state.inType = true; - - try { - return cb(); - } finally { - this.state.inType = oldInType; - } - }; - - _proto.tsEatThenParseType = function tsEatThenParseType(token) { - return !this.match(token) ? undefined : this.tsNextThenParseType(); - }; - - _proto.tsExpectThenParseType = function tsExpectThenParseType(token) { - var _this8 = this; - - return this.tsDoThenParseType(function () { - return _this8.expect(token); - }); - }; - - _proto.tsNextThenParseType = function tsNextThenParseType() { - var _this9 = this; - - return this.tsDoThenParseType(function () { - return _this9.next(); - }); - }; - - _proto.tsDoThenParseType = function tsDoThenParseType(cb) { - var _this10 = this; - - return this.tsInType(function () { - cb(); - return _this10.tsParseType(); - }); - }; - - _proto.tsParseEnumMember = function tsParseEnumMember() { - var node = this.startNode(); - node.id = this.match(types.string) ? this.parseLiteral(this.state.value, "StringLiteral") : this.parseIdentifier(true); - - if (this.eat(types.eq)) { - node.initializer = this.parseMaybeAssign(); - } - - return this.finishNode(node, "TSEnumMember"); - }; - - _proto.tsParseEnumDeclaration = function tsParseEnumDeclaration(node, isConst) { - if (isConst) node.const = true; - node.id = this.parseIdentifier(); - this.expect(types.braceL); - node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); - this.expect(types.braceR); - return this.finishNode(node, "TSEnumDeclaration"); - }; - - _proto.tsParseModuleBlock = function tsParseModuleBlock() { - var node = this.startNode(); - this.expect(types.braceL); - this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR); - return this.finishNode(node, "TSModuleBlock"); - }; - - _proto.tsParseModuleOrNamespaceDeclaration = function tsParseModuleOrNamespaceDeclaration(node) { - node.id = this.parseIdentifier(); - - if (this.eat(types.dot)) { - var inner = this.startNode(); - this.tsParseModuleOrNamespaceDeclaration(inner); - node.body = inner; - } else { - node.body = this.tsParseModuleBlock(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - }; - - _proto.tsParseAmbientExternalModuleDeclaration = function tsParseAmbientExternalModuleDeclaration(node) { - if (this.isContextual("global")) { - node.global = true; - node.id = this.parseIdentifier(); - } else if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - this.unexpected(); - } - - if (this.match(types.braceL)) { - node.body = this.tsParseModuleBlock(); - } else { - this.semicolon(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - }; - - _proto.tsParseImportEqualsDeclaration = function tsParseImportEqualsDeclaration(node, isExport) { - node.isExport = isExport || false; - node.id = this.parseIdentifier(); - this.expect(types.eq); - node.moduleReference = this.tsParseModuleReference(); - this.semicolon(); - return this.finishNode(node, "TSImportEqualsDeclaration"); - }; - - _proto.tsIsExternalModuleReference = function tsIsExternalModuleReference() { - return this.isContextual("require") && this.lookahead().type === types.parenL; - }; - - _proto.tsParseModuleReference = function tsParseModuleReference() { - return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); - }; - - _proto.tsParseExternalModuleReference = function tsParseExternalModuleReference() { - var node = this.startNode(); - this.expectContextual("require"); - this.expect(types.parenL); - - if (!this.match(types.string)) { - throw this.unexpected(); - } - - node.expression = this.parseLiteral(this.state.value, "StringLiteral"); - this.expect(types.parenR); - return this.finishNode(node, "TSExternalModuleReference"); - }; - - _proto.tsLookAhead = function tsLookAhead(f) { - var state = this.state.clone(); - var res = f(); - this.state = state; - return res; - }; - - _proto.tsTryParseAndCatch = function tsTryParseAndCatch(f) { - var state = this.state.clone(); - - try { - return f(); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - return undefined; - } - - throw e; - } - }; - - _proto.tsTryParse = function tsTryParse(f) { - var state = this.state.clone(); - var result = f(); - - if (result !== undefined && result !== false) { - return result; - } else { - this.state = state; - return undefined; - } - }; - - _proto.nodeWithSamePosition = function nodeWithSamePosition(original, type) { - var node = this.startNodeAtNode(original); - node.type = type; - node.end = original.end; - node.loc.end = original.loc.end; - - if (original.leadingComments) { - node.leadingComments = original.leadingComments; - } - - if (original.trailingComments) { - node.trailingComments = original.trailingComments; - } - - if (original.innerComments) node.innerComments = original.innerComments; - return node; - }; - - _proto.tsTryParseDeclare = function tsTryParseDeclare(nany) { - switch (this.state.type) { - case types._function: - this.next(); - return this.parseFunction(nany, true); - - case types._class: - return this.parseClass(nany, true, false); - - case types._const: - if (this.match(types._const) && this.isLookaheadContextual("enum")) { - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(nany, true); - } - - case types._var: - case types._let: - return this.parseVarStatement(nany, this.state.type); - - case types.name: - { - var value = this.state.value; - - if (value === "global") { - return this.tsParseAmbientExternalModuleDeclaration(nany); - } else { - return this.tsParseDeclaration(nany, value, true); - } - } - } - }; - - _proto.tsTryParseExportDeclaration = function tsTryParseExportDeclaration() { - return this.tsParseDeclaration(this.startNode(), this.state.value, true); - }; - - _proto.tsParseExpressionStatement = function tsParseExpressionStatement(node, expr) { - switch (expr.name) { - case "declare": - { - var declaration = this.tsTryParseDeclare(node); - - if (declaration) { - declaration.declare = true; - return declaration; - } - - break; - } - - case "global": - if (this.match(types.braceL)) { - var mod = node; - mod.global = true; - mod.id = expr; - mod.body = this.tsParseModuleBlock(); - return this.finishNode(mod, "TSModuleDeclaration"); - } - - break; - - default: - return this.tsParseDeclaration(node, expr.name, false); - } - }; - - _proto.tsParseDeclaration = function tsParseDeclaration(node, value, next) { - switch (value) { - case "abstract": - if (next || this.match(types._class)) { - var cls = node; - cls.abstract = true; - if (next) this.next(); - return this.parseClass(cls, true, false); - } - - break; - - case "enum": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseEnumDeclaration(node, false); - } - - break; - - case "interface": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseInterfaceDeclaration(node); - } - - break; - - case "module": - if (next) this.next(); - - if (this.match(types.string)) { - return this.tsParseAmbientExternalModuleDeclaration(node); - } else if (next || this.match(types.name)) { - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "namespace": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "type": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseTypeAliasDeclaration(node); - } - - break; - } - }; - - _proto.tsTryParseGenericAsyncArrowFunction = function tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { - var _this11 = this; - - var res = this.tsTryParseAndCatch(function () { - var node = _this11.startNodeAt(startPos, startLoc); - - node.typeParameters = _this11.tsParseTypeParameters(); - - _superClass.prototype.parseFunctionParams.call(_this11, node); - - node.returnType = _this11.tsTryParseTypeOrTypePredicateAnnotation(); - - _this11.expect(types.arrow); - - return node; - }); - - if (!res) { - return undefined; - } - - res.id = null; - res.generator = false; - res.expression = true; - res.async = true; - this.parseFunctionBody(res, true); - return this.finishNode(res, "ArrowFunctionExpression"); - }; - - _proto.tsParseTypeArguments = function tsParseTypeArguments() { - var _this12 = this; - - var node = this.startNode(); - node.params = this.tsInType(function () { - _this12.expectRelational("<"); - - return _this12.tsParseDelimitedList("TypeParametersOrArguments", _this12.tsParseType.bind(_this12)); - }); - this.expectRelational(">"); - return this.finishNode(node, "TSTypeParameterInstantiation"); - }; - - _proto.tsIsDeclarationStart = function tsIsDeclarationStart() { - if (this.match(types.name)) { - switch (this.state.value) { - case "abstract": - case "declare": - case "enum": - case "interface": - case "module": - case "namespace": - case "type": - return true; - } - } - - return false; - }; - - _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() { - if (this.tsIsDeclarationStart()) return false; - return _superClass.prototype.isExportDefaultSpecifier.call(this); - }; - - _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) { - var accessibility; - var readonly = false; - - if (allowModifiers) { - accessibility = this.parseAccessModifier(); - readonly = !!this.tsParseModifier(["readonly"]); - } - - var left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - var elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (accessibility || readonly) { - var pp = this.startNodeAtNode(elt); - - if (decorators.length) { - pp.decorators = decorators; - } - - if (accessibility) pp.accessibility = accessibility; - if (readonly) pp.readonly = readonly; - - if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { - throw this.raise(pp.start, "A parameter property may not be declared using a binding pattern."); - } - - pp.parameter = elt; - return this.finishNode(pp, "TSParameterProperty"); - } else { - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - } - }; - - _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) { - if (!allowExpressionBody && this.match(types.colon)) { - node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - } - - var bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined; - - if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) { - this.finishNode(node, bodilessType); - return; - } - - _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody); - }; - - _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) { - if (!this.hasPrecedingLineBreak() && this.eat(types.bang)) { - var nonNullExpression = this.startNodeAt(startPos, startLoc); - nonNullExpression.expression = base; - return this.finishNode(nonNullExpression, "TSNonNullExpression"); - } - - if (!noCalls && this.isRelational("<")) { - if (this.atPossibleAsync(base)) { - var asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); - - if (asyncArrowFn) { - return asyncArrowFn; - } - } - - var node = this.startNodeAt(startPos, startLoc); - node.callee = base; - var typeArguments = this.tsTryParseTypeArgumentsInExpression(); - - if (typeArguments) { - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.typeParameters = typeArguments; - return this.finishCallExpression(node); - } - } - - return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state); - }; - - _proto.parseNewArguments = function parseNewArguments(node) { - var _this13 = this; - - if (this.isRelational("<")) { - var typeParameters = this.tsTryParseAndCatch(function () { - var args = _this13.tsParseTypeArguments(); - - if (!_this13.match(types.parenL)) _this13.unexpected(); - return args; - }); - - if (typeParameters) { - node.typeParameters = typeParameters; - } - } - - _superClass.prototype.parseNewArguments.call(this, node); - }; - - _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) { - var node = this.startNodeAt(leftStartPos, leftStartLoc); - node.expression = left; - node.typeAnnotation = this.tsNextThenParseType(); - this.finishNode(node, "TSAsExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - - return _superClass.prototype.parseExprOp.call(this, left, leftStartPos, leftStartLoc, minPrec, noIn); - }; - - _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {}; - - _proto.checkDuplicateExports = function checkDuplicateExports() {}; - - _proto.parseImport = function parseImport(node) { - if (this.match(types.name) && this.lookahead().type === types.eq) { - return this.tsParseImportEqualsDeclaration(node); - } - - return _superClass.prototype.parseImport.call(this, node); - }; - - _proto.parseExport = function parseExport(node) { - if (this.match(types._import)) { - this.expect(types._import); - return this.tsParseImportEqualsDeclaration(node, true); - } else if (this.eat(types.eq)) { - var assign = node; - assign.expression = this.parseExpression(); - this.semicolon(); - return this.finishNode(assign, "TSExportAssignment"); - } else if (this.eatContextual("as")) { - var decl = node; - this.expectContextual("namespace"); - decl.id = this.parseIdentifier(); - this.semicolon(); - return this.finishNode(decl, "TSNamespaceExportDeclaration"); - } else { - return _superClass.prototype.parseExport.call(this, node); - } - }; - - _proto.parseExportDefaultExpression = function parseExportDefaultExpression() { - if (this.isContextual("abstract") && this.lookahead().type === types._class) { - var cls = this.startNode(); - this.next(); - this.parseClass(cls, true, true); - cls.abstract = true; - return cls; - } - - return _superClass.prototype.parseExportDefaultExpression.call(this); - }; - - _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) { - if (this.state.type === types._const) { - var ahead = this.lookahead(); - - if (ahead.type === types.name && ahead.value === "enum") { - var node = this.startNode(); - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(node, true); - } - } - - return _superClass.prototype.parseStatementContent.call(this, declaration, topLevel); - }; - - _proto.parseAccessModifier = function parseAccessModifier() { - return this.tsParseModifier(["public", "protected", "private"]); - }; - - _proto.parseClassMember = function parseClassMember(classBody, member, state) { - var accessibility = this.parseAccessModifier(); - if (accessibility) member.accessibility = accessibility; - - _superClass.prototype.parseClassMember.call(this, classBody, member, state); - }; - - _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) { - var methodOrProp = member; - var prop = member; - var propOrIdx = member; - var abstract = false, - readonly = false; - var mod = this.tsParseModifier(["abstract", "readonly"]); - - switch (mod) { - case "readonly": - readonly = true; - abstract = !!this.tsParseModifier(["abstract"]); - break; - - case "abstract": - abstract = true; - readonly = !!this.tsParseModifier(["readonly"]); - break; - } - - if (abstract) methodOrProp.abstract = true; - if (readonly) propOrIdx.readonly = true; - - if (!abstract && !isStatic && !methodOrProp.accessibility) { - var idx = this.tsTryParseIndexSignature(member); - - if (idx) { - classBody.body.push(idx); - return; - } - } - - if (readonly) { - methodOrProp.static = isStatic; - this.parseClassPropertyName(prop); - this.parsePostMemberNameModifiers(methodOrProp); - this.pushClassProperty(classBody, prop); - return; - } - - _superClass.prototype.parseClassMemberWithIsStatic.call(this, classBody, member, state, isStatic); - }; - - _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) { - var optional = this.eat(types.question); - if (optional) methodOrProp.optional = true; - }; - - _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) { - var decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined; - return decl || _superClass.prototype.parseExpressionStatement.call(this, node, expr); - }; - - _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() { - if (this.tsIsDeclarationStart()) return true; - return _superClass.prototype.shouldParseExportDeclaration.call(this); - }; - - _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (!refNeedsArrowPos || !this.match(types.question)) { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc, refNeedsArrowPos); - } - - var state = this.state.clone(); - - try { - return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } - }; - - _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) { - node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - } - - if (this.match(types.colon)) { - var typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TSTypeCastExpression"); - } - - return node; - }; - - _proto.parseExportDeclaration = function parseExportDeclaration(node) { - var isDeclare = this.eatContextual("declare"); - var declaration; - - if (this.match(types.name)) { - declaration = this.tsTryParseExportDeclaration(); - } - - if (!declaration) { - declaration = _superClass.prototype.parseExportDeclaration.call(this, node); - } - - if (declaration && isDeclare) { - declaration.declare = true; - } - - return declaration; - }; - - _proto.parseClassId = function parseClassId(node, isStatement, optionalId) { - var _superClass$prototype; - - if ((!isStatement || optionalId) && this.isContextual("implements")) { - return; - } - - (_superClass$prototype = _superClass.prototype.parseClassId).call.apply(_superClass$prototype, [this].concat(Array.prototype.slice.call(arguments))); - - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - }; - - _proto.parseClassProperty = function parseClassProperty(node) { - if (!node.optional && this.eat(types.bang)) { - node.definite = true; - } - - var type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - return _superClass.prototype.parseClassProperty.call(this, node); - }; - - _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - - _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor); - }; - - _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - - _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync); - }; - - _proto.parseClassSuper = function parseClassSuper(node) { - _superClass.prototype.parseClassSuper.call(this, node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.tsParseTypeArguments(); - } - - if (this.eatContextual("implements")) { - node.implements = this.tsParseHeritageClause(); - } - }; - - _proto.parseObjPropValue = function parseObjPropValue(prop) { - var _superClass$prototype2; - - if (this.isRelational("<")) { - throw new Error("TODO"); - } - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - (_superClass$prototype2 = _superClass.prototype.parseObjPropValue).call.apply(_superClass$prototype2, [this, prop].concat(args)); - }; - - _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) { - var typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - - _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers); - }; - - _proto.parseVarHead = function parseVarHead(decl) { - _superClass.prototype.parseVarHead.call(this, decl); - - if (decl.id.type === "Identifier" && this.eat(types.bang)) { - decl.definite = true; - } - - var type = this.tsTryParseTypeAnnotation(); - - if (type) { - decl.id.typeAnnotation = type; - this.finishNode(decl.id, decl.id.type); - } - }; - - _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - node.returnType = this.tsParseTypeAnnotation(); - } - - return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call); - }; - - _proto.parseMaybeAssign = function parseMaybeAssign() { - var jsxError; - - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - if (this.match(types.jsxTagStart)) { - var context = this.curContext(); - assert(context === types$1.j_oTag); - assert(this.state.context[this.state.context.length - 2] === types$1.j_expr); - - var _state = this.state.clone(); - - try { - var _superClass$prototype3; - - return (_superClass$prototype3 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype3, [this].concat(args)); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = _state; - assert(this.curContext() === types$1.j_oTag); - this.state.context.pop(); - assert(this.curContext() === types$1.j_expr); - this.state.context.pop(); - jsxError = err; - } - } - - if (jsxError === undefined && !this.isRelational("<")) { - var _superClass$prototype4; - - return (_superClass$prototype4 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype4, [this].concat(args)); - } - - var arrowExpression; - var typeParameters; - var state = this.state.clone(); - - try { - var _superClass$prototype5; - - typeParameters = this.tsParseTypeParameters(); - arrowExpression = (_superClass$prototype5 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype5, [this].concat(args)); - - if (arrowExpression.type !== "ArrowFunctionExpression") { - this.unexpected(); - } - } catch (err) { - var _superClass$prototype6; - - if (!(err instanceof SyntaxError)) { - throw err; - } - - if (jsxError) { - throw jsxError; - } - - assert(!this.hasPlugin("jsx")); - this.state = state; - return (_superClass$prototype6 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype6, [this].concat(args)); - } - - if (typeParameters && typeParameters.params.length !== 0) { - this.resetStartLocationFromNode(arrowExpression, typeParameters.params[0]); - } - - arrowExpression.typeParameters = typeParameters; - return arrowExpression; - }; - - _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) { - if (!this.hasPlugin("jsx") && this.eatRelational("<")) { - return this.tsParseTypeAssertion(); - } else { - return _superClass.prototype.parseMaybeUnary.call(this, refShorthandDefaultPos); - } - }; - - _proto.parseArrow = function parseArrow(node) { - if (this.match(types.colon)) { - var state = this.state.clone(); - - try { - var returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(types.arrow)) this.unexpected(); - node.returnType = returnType; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return _superClass.prototype.parseArrow.call(this, node); - }; - - _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - var type = this.tsTryParseTypeAnnotation(); - if (type) param.typeAnnotation = type; - return this.finishNode(param, param.type); - }; - - _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) { - switch (node.type) { - case "TSTypeCastExpression": - return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription); - - case "TSParameterProperty": - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - - case "TSAsExpression": - node.expression = this.toAssignable(node.expression, isBinding, contextDescription); - return node; - - default: - return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription); - } - }; - - _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) { - switch (expr.type) { - case "TSTypeCastExpression": - return; - - case "TSParameterProperty": - this.checkLVal(expr.parameter, isBinding, checkClashes, "parameter property"); - return; - - case "TSAsExpression": - this.checkLVal(expr.expression, isBinding, checkClashes, contextDescription); - return; - - default: - _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription); - - return; - } - }; - - _proto.parseBindingAtom = function parseBindingAtom() { - switch (this.state.type) { - case types._this: - return this.parseIdentifier(true); - - default: - return _superClass.prototype.parseBindingAtom.call(this); - } - }; - - _proto.isClassMethod = function isClassMethod() { - return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this); - }; - - _proto.isClassProperty = function isClassProperty() { - return this.match(types.bang) || this.match(types.colon) || _superClass.prototype.isClassProperty.call(this); - }; - - _proto.parseMaybeDefault = function parseMaybeDefault() { - var _superClass$prototype7; - - for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - var node = (_superClass$prototype7 = _superClass.prototype.parseMaybeDefault).call.apply(_superClass$prototype7, [this].concat(args)); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - }; - - _proto.readToken = function readToken(code) { - if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else { - return _superClass.prototype.readToken.call(this, code); - } - }; - - _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr.type === "TSTypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - - return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription); - }; - - _proto.typeCastToParameter = function typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end); - }; - - _proto.toReferencedList = function toReferencedList(exprList) { - for (var i = 0; i < exprList.length; i++) { - var expr = exprList[i]; - - if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") { - this.raise(expr.start, "Did not expect a type annotation here."); - } - } - - return exprList; - }; - - _proto.shouldParseArrow = function shouldParseArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this); - }; - - _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() { - return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this); - }; - - return _class; - }(superClass); -}); - -plugins.estree = estreePlugin; -plugins.flow = flowPlugin; -plugins.jsx = jsxPlugin; -plugins.typescript = typescriptPlugin; -function parse(input, options) { - if (options && options.sourceType === "unambiguous") { - options = Object.assign({}, options); - - try { - options.sourceType = "module"; - var parser = getParser(options, input); - var ast = parser.parse(); - if (!parser.sawUnambiguousESM) ast.program.sourceType = "script"; - return ast; - } catch (moduleError) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (scriptError) {} - - throw moduleError; - } - } else { - return getParser(options, input).parse(); - } -} -function parseExpression(input, options) { - var parser = getParser(options, input); - - if (parser.options.strictMode) { - parser.state.strict = true; - } - - return parser.getExpression(); -} -function getParser(options, input) { - var cls = options && options.plugins ? getParserClass(options.plugins) : Parser; - return new cls(options, input); -} - -var parserClassCache = {}; - -function getParserClass(pluginsFromOptions) { - if (pluginsFromOptions.indexOf("decorators") >= 0 && pluginsFromOptions.indexOf("decorators2") >= 0) { - throw new Error("Cannot use decorators and decorators2 plugin together"); - } - - var pluginList = pluginsFromOptions.filter(function (p) { - return p === "estree" || p === "flow" || p === "jsx" || p === "typescript"; - }); - - if (pluginList.indexOf("flow") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "flow"; - }); - pluginList.push("flow"); - } - - if (pluginList.indexOf("flow") >= 0 && pluginList.indexOf("typescript") >= 0) { - throw new Error("Cannot combine flow and typescript plugins."); - } - - if (pluginList.indexOf("typescript") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "typescript"; - }); - pluginList.push("typescript"); - } - - if (pluginList.indexOf("estree") >= 0) { - pluginList = pluginList.filter(function (plugin) { - return plugin !== "estree"; - }); - pluginList.unshift("estree"); - } - - var key = pluginList.join("/"); - var cls = parserClassCache[key]; - - if (!cls) { - cls = Parser; - - for (var _i2 = 0, _pluginList2 = pluginList; _i2 < _pluginList2.length; _i2++) { - var plugin = _pluginList2[_i2]; - cls = plugins[plugin](cls); - } - - parserClassCache[key] = cls; - } - - return cls; -} - -exports.parse = parse; -exports.parseExpression = parseExpression; -exports.tokTypes = types; diff --git a/node_modules/@babel/traverse/node_modules/babylon/package.json b/node_modules/@babel/traverse/node_modules/babylon/package.json deleted file mode 100644 index 57c0f3e..0000000 --- a/node_modules/@babel/traverse/node_modules/babylon/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "babylon@7.0.0-beta.46", - "_id": "babylon@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-WFJlg2WatdkXRFMpk7BN/Uzzkjkcjk+WaqnrSCpay+RYl4ypW9ZetZyT9kNt22IH/BQNst3M6PaaBn9IXsUNrg==", - "_location": "/@babel/traverse/babylon", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "babylon@7.0.0-beta.46", - "name": "babylon", - "escapedName": "babylon", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.46.tgz", - "_shasum": "b6ddaba81bbb130313932757ff9c195d527088b6", - "_spec": "babylon@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/traverse", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bin": { - "babylon": "./bin/babylon.js" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A JavaScript parser", - "devDependencies": { - "@babel/helper-fixtures": "7.0.0-beta.46", - "charcodes": "0.1.0", - "unicode-10.0.0": "^0.7.4" - }, - "engines": { - "node": ">=6.0.0" - }, - "files": [ - "bin", - "lib" - ], - "homepage": "https://babeljs.io/", - "keywords": [ - "babel", - "javascript", - "parser", - "tc39", - "ecmascript", - "babylon" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "babylon", - "publishConfig": { - "tag": "next" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babylon" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/traverse/node_modules/debug/.coveralls.yml b/node_modules/@babel/traverse/node_modules/debug/.coveralls.yml deleted file mode 100644 index 20a7068..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/node_modules/@babel/traverse/node_modules/debug/.eslintrc b/node_modules/@babel/traverse/node_modules/debug/.eslintrc deleted file mode 100644 index 146371e..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/.eslintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - "globals": { - "chrome": true - }, - "rules": { - "no-console": 0, - "no-empty": [1, { "allowEmptyCatch": true }] - }, - "extends": "eslint:recommended" -} diff --git a/node_modules/@babel/traverse/node_modules/debug/.npmignore b/node_modules/@babel/traverse/node_modules/debug/.npmignore deleted file mode 100644 index 5f60eec..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -support -test -examples -example -*.sock -dist -yarn.lock -coverage -bower.json diff --git a/node_modules/@babel/traverse/node_modules/debug/.travis.yml b/node_modules/@babel/traverse/node_modules/debug/.travis.yml deleted file mode 100644 index a764300..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -sudo: false - -language: node_js - -node_js: - - "4" - - "6" - - "8" - -install: - - make install - -script: - - make lint - - make test - -matrix: - include: - - node_js: '8' - env: BROWSER=1 diff --git a/node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md b/node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,395 +0,0 @@ - -3.1.0 / 2017-09-26 -================== - - * Add `DEBUG_HIDE_DATE` env var (#486) - * Remove ReDoS regexp in %o formatter (#504) - * Remove "component" from package.json - * Remove `component.json` - * Ignore package-lock.json - * Examples: fix colors printout - * Fix: browser detection - * Fix: spelling mistake (#496, @EdwardBetts) - -3.0.1 / 2017-08-24 -================== - - * Fix: Disable colors in Edge and Internet Explorer (#489) - -3.0.0 / 2017-08-08 -================== - - * Breaking: Remove DEBUG_FD (#406) - * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) - * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) - * Addition: document `enabled` flag (#465) - * Addition: add 256 colors mode (#481) - * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) - * Update: component: update "ms" to v2.0.0 - * Update: separate the Node and Browser tests in Travis-CI - * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots - * Update: separate Node.js and web browser examples for organization - * Update: update "browserify" to v14.4.0 - * Fix: fix Readme typo (#473) - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/@babel/traverse/node_modules/debug/LICENSE b/node_modules/@babel/traverse/node_modules/debug/LICENSE deleted file mode 100644 index 658c933..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@babel/traverse/node_modules/debug/Makefile b/node_modules/@babel/traverse/node_modules/debug/Makefile deleted file mode 100644 index 3ddd136..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# Path -PATH := node_modules/.bin:$(PATH) -SHELL := /bin/bash - -# applications -NODE ?= $(shell which node) -YARN ?= $(shell which yarn) -PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -install: node_modules - -browser: dist/debug.js - -node_modules: package.json - @NODE_ENV= $(PKG) install - @touch node_modules - -dist/debug.js: src/*.js node_modules - @mkdir -p dist - @$(BROWSERIFY) \ - --standalone debug \ - . > dist/debug.js - -lint: - @eslint *.js src/*.js - -test-node: - @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js - @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js - -test-browser: - @$(MAKE) browser - @karma start --single-run - -test-all: - @concurrently \ - "make test-node" \ - "make test-browser" - -test: - @if [ "x$(BROWSER)" = "x" ]; then \ - $(MAKE) test-node; \ - else \ - $(MAKE) test-browser; \ - fi - -clean: - rimraf dist coverage - -.PHONY: browser install clean lint test test-all test-node test-browser diff --git a/node_modules/@babel/traverse/node_modules/debug/README.md b/node_modules/@babel/traverse/node_modules/debug/README.md deleted file mode 100644 index 8e754d1..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/README.md +++ /dev/null @@ -1,368 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows note - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Note that PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Then, run the program to be debugged as usual. - - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/traverse/node_modules/debug/karma.conf.js b/node_modules/@babel/traverse/node_modules/debug/karma.conf.js deleted file mode 100644 index 103a82d..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/karma.conf.js +++ /dev/null @@ -1,70 +0,0 @@ -// Karma configuration -// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) - -module.exports = function(config) { - config.set({ - - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '', - - - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha', 'chai', 'sinon'], - - - // list of files / patterns to load in the browser - files: [ - 'dist/debug.js', - 'test/*spec.js' - ], - - - // list of files to exclude - exclude: [ - 'src/node.js' - ], - - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - }, - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], - - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity - }) -} diff --git a/node_modules/@babel/traverse/node_modules/debug/node.js b/node_modules/@babel/traverse/node_modules/debug/node.js deleted file mode 100644 index 7fc36fe..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/node_modules/@babel/traverse/node_modules/debug/package.json b/node_modules/@babel/traverse/node_modules/debug/package.json deleted file mode 100644 index 2eb5058..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "debug@^3.1.0", - "_id": "debug@3.1.0", - "_inBundle": false, - "_integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "_location": "/@babel/traverse/debug", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "debug@^3.1.0", - "name": "debug", - "escapedName": "debug", - "rawSpec": "^3.1.0", - "saveSpec": null, - "fetchSpec": "^3.1.0" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "_shasum": "5bb5a0672628b64149566ba16819e61518c67261", - "_spec": "debug@^3.1.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/traverse", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } - ], - "dependencies": { - "ms": "2.0.0" - }, - "deprecated": false, - "description": "small debugging utility", - "devDependencies": { - "browserify": "14.4.0", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^2.11.15", - "eslint": "^3.12.1", - "istanbul": "^0.4.5", - "karma": "^1.3.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "karma-sinon": "^1.0.5", - "mocha": "^3.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "sinon": "^1.17.6", - "sinon-chai": "^2.8.0" - }, - "homepage": "https://github.com/visionmedia/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "version": "3.1.0" -} diff --git a/node_modules/@babel/traverse/node_modules/debug/src/browser.js b/node_modules/@babel/traverse/node_modules/debug/src/browser.js deleted file mode 100644 index f5149ff..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/browser.js +++ /dev/null @@ -1,195 +0,0 @@ -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = 'undefined' != typeof chrome - && 'undefined' != typeof chrome.storage - ? chrome.storage.local - : localstorage(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', - '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', - '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', - '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', - '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', - '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', - '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', - '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', - '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', - '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', - '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (err) { - return '[UnexpectedJSONParseError]: ' + err.message; - } -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return; - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit') - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - exports.storage.removeItem('debug'); - } else { - exports.storage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = exports.storage.debug; - } catch(e) {} - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - return window.localStorage; - } catch (e) {} -} diff --git a/node_modules/@babel/traverse/node_modules/debug/src/debug.js b/node_modules/@babel/traverse/node_modules/debug/src/debug.js deleted file mode 100644 index 77e6384..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/debug.js +++ /dev/null @@ -1,225 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * Active `debug` instances. - */ -exports.instances = []; - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - -exports.formatters = {}; - -/** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - -function selectColor(namespace) { - var hash = 0, i; - - for (i in namespace) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function createDebug(namespace) { - - var prevTime; - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - exports.instances.push(debug); - - return debug; -} - -function destroy () { - var index = exports.instances.indexOf(this); - if (index !== -1) { - exports.instances.splice(index, 1); - return true; - } else { - return false; - } -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < exports.instances.length; i++) { - var instance = exports.instances[i]; - instance.enabled = exports.enabled(instance.namespace); - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/@babel/traverse/node_modules/debug/src/index.js b/node_modules/@babel/traverse/node_modules/debug/src/index.js deleted file mode 100644 index cabcbcd..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer') { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/@babel/traverse/node_modules/debug/src/node.js b/node_modules/@babel/traverse/node_modules/debug/src/node.js deleted file mode 100644 index d666fb9..0000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/node.js +++ /dev/null @@ -1,186 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); -var util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [ 6, 2, 3, 4, 5, 1 ]; - -try { - var supportsColor = require('supports-color'); - if (supportsColor && supportsColor.level >= 2) { - exports.colors = [ - 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, - 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, - 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 214, 215, 220, 221 - ]; - } -} catch (err) { - // swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // camel-case - var prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); - - // coerce string value into JS value - var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true; - else if (/^(no|off|false|disabled)$/i.test(val)) val = false; - else if (val === 'null') val = null; - else val = Number(val); - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts - ? Boolean(exports.inspectOpts.colors) - : tty.isatty(process.stderr.fd); -} - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -exports.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n').map(function(str) { - return str.trim() - }).join(' '); -}; - -/** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - -exports.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; - - if (useColors) { - var c = this.color; - var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c); - var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m'; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } else { - return new Date().toISOString() + ' '; - } -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log() { - return process.stderr.write(util.format.apply(util, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init (debug) { - debug.inspectOpts = {}; - - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); diff --git a/node_modules/@babel/traverse/node_modules/globals/package.json b/node_modules/@babel/traverse/node_modules/globals/package.json deleted file mode 100644 index 3d3a69b..0000000 --- a/node_modules/@babel/traverse/node_modules/globals/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "globals@^11.1.0", - "_id": "globals@11.5.0", - "_inBundle": false, - "_integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", - "_location": "/@babel/traverse/globals", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "globals@^11.1.0", - "name": "globals", - "escapedName": "globals", - "rawSpec": "^11.1.0", - "saveSpec": null, - "fetchSpec": "^11.1.0" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", - "_shasum": "6bc840de6771173b191f13d3a9c94d441ee92642", - "_spec": "globals@^11.1.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/traverse", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/globals/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Global identifiers from different JavaScript environments", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "globals.json" - ], - "homepage": "https://github.com/sindresorhus/globals#readme", - "keywords": [ - "globals", - "global", - "identifiers", - "variables", - "vars", - "jshint", - "eslint", - "environments" - ], - "license": "MIT", - "name": "globals", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/globals.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "11.5.0", - "xo": { - "ignores": [ - "get-browser-globals.js" - ] - } -} diff --git a/node_modules/@babel/traverse/package.json b/node_modules/@babel/traverse/package.json deleted file mode 100644 index ea4a101..0000000 --- a/node_modules/@babel/traverse/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "@babel/traverse@7.0.0-beta.46", - "_id": "@babel/traverse@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-IU7MTGbcjpfhf5tyCu3sDB7sWYainZQcT+CqOBdVZXZfq5MMr130R7aiZBI2g5dJYUaW1PS81DVNpd0/Sq/Gzg==", - "_location": "/@babel/traverse", - "_phantomChildren": { - "ms": "2.0.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/traverse@7.0.0-beta.46", - "name": "@babel/traverse", - "escapedName": "@babel%2ftraverse", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/helpers" - ], - "_resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.46.tgz", - "_shasum": "29a0c0395b3642f0297e6f8e475bde89f9343755", - "_spec": "@babel/traverse@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/code-frame": "7.0.0-beta.46", - "@babel/generator": "7.0.0-beta.46", - "@babel/helper-function-name": "7.0.0-beta.46", - "@babel/helper-split-export-declaration": "7.0.0-beta.46", - "@babel/types": "7.0.0-beta.46", - "babylon": "7.0.0-beta.46", - "debug": "^3.1.0", - "globals": "^11.1.0", - "invariant": "^2.2.0", - "lodash": "^4.2.0" - }, - "deprecated": false, - "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", - "devDependencies": { - "@babel/helper-plugin-test-runner": "7.0.0-beta.46" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/traverse", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-traverse" - }, - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/types/README.md b/node_modules/@babel/types/README.md deleted file mode 100644 index d4b183a..0000000 --- a/node_modules/@babel/types/README.md +++ /dev/null @@ -1,2955 +0,0 @@ -# @babel/types - -> This module contains methods for building ASTs manually and for checking the types of AST nodes. - -## Install - -```sh -npm install --save-dev @babel/types -``` - -## API -### anyTypeAnnotation -```javascript -t.anyTypeAnnotation() -``` - -See also `t.isAnyTypeAnnotation(node, opts)` and `t.assertAnyTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### arrayExpression -```javascript -t.arrayExpression(elements) -``` - -See also `t.isArrayExpression(node, opts)` and `t.assertArrayExpression(node, opts)`. - -Aliases: `Expression` - - - `elements`: `Array` (default: `[]`) - ---- - -### arrayPattern -```javascript -t.arrayPattern(elements) -``` - -See also `t.isArrayPattern(node, opts)` and `t.assertArrayPattern(node, opts)`. - -Aliases: `Pattern`, `PatternLike`, `LVal` - - - `elements`: `Array` (required) - - `decorators`: `Array` (default: `null`) - - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - ---- - -### arrayTypeAnnotation -```javascript -t.arrayTypeAnnotation(elementType) -``` - -See also `t.isArrayTypeAnnotation(node, opts)` and `t.assertArrayTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `elementType`: `FlowType` (required) - ---- - -### arrowFunctionExpression -```javascript -t.arrowFunctionExpression(params, body, async) -``` - -See also `t.isArrowFunctionExpression(node, opts)` and `t.assertArrowFunctionExpression(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish` - - - `params`: `Array` (required) - - `body`: `BlockStatement | Expression` (required) - - `async`: `boolean` (default: `false`) - - `expression`: `boolean` (default: `null`) - - `generator`: `boolean` (default: `false`) - - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`) - ---- - -### assignmentExpression -```javascript -t.assignmentExpression(operator, left, right) -``` - -See also `t.isAssignmentExpression(node, opts)` and `t.assertAssignmentExpression(node, opts)`. - -Aliases: `Expression` - - - `operator`: `string` (required) - - `left`: `LVal` (required) - - `right`: `Expression` (required) - ---- - -### assignmentPattern -```javascript -t.assignmentPattern(left, right) -``` - -See also `t.isAssignmentPattern(node, opts)` and `t.assertAssignmentPattern(node, opts)`. - -Aliases: `Pattern`, `PatternLike`, `LVal` - - - `left`: `Identifier | ObjectPattern | ArrayPattern` (required) - - `right`: `Expression` (required) - - `decorators`: `Array` (default: `null`) - - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - ---- - -### awaitExpression -```javascript -t.awaitExpression(argument) -``` - -See also `t.isAwaitExpression(node, opts)` and `t.assertAwaitExpression(node, opts)`. - -Aliases: `Expression`, `Terminatorless` - - - `argument`: `Expression` (required) - ---- - -### binaryExpression -```javascript -t.binaryExpression(operator, left, right) -``` - -See also `t.isBinaryExpression(node, opts)` and `t.assertBinaryExpression(node, opts)`. - -Aliases: `Binary`, `Expression` - - - `operator`: `"+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="` (required) - - `left`: `Expression` (required) - - `right`: `Expression` (required) - ---- - -### bindExpression -```javascript -t.bindExpression(object, callee) -``` - -See also `t.isBindExpression(node, opts)` and `t.assertBindExpression(node, opts)`. - -Aliases: `Expression` - - - `object` (required) - - `callee` (required) - ---- - -### blockStatement -```javascript -t.blockStatement(body, directives) -``` - -See also `t.isBlockStatement(node, opts)` and `t.assertBlockStatement(node, opts)`. - -Aliases: `Scopable`, `BlockParent`, `Block`, `Statement` - - - `body`: `Array` (required) - - `directives`: `Array` (default: `[]`) - ---- - -### booleanLiteral -```javascript -t.booleanLiteral(value) -``` - -See also `t.isBooleanLiteral(node, opts)` and `t.assertBooleanLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `boolean` (required) - ---- - -### booleanLiteralTypeAnnotation -```javascript -t.booleanLiteralTypeAnnotation(value) -``` - -See also `t.isBooleanLiteralTypeAnnotation(node, opts)` and `t.assertBooleanLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `value`: `boolean` (required) - ---- - -### booleanTypeAnnotation -```javascript -t.booleanTypeAnnotation() -``` - -See also `t.isBooleanTypeAnnotation(node, opts)` and `t.assertBooleanTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### breakStatement -```javascript -t.breakStatement(label) -``` - -See also `t.isBreakStatement(node, opts)` and `t.assertBreakStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `label`: `Identifier` (default: `null`) - ---- - -### callExpression -```javascript -t.callExpression(callee, arguments) -``` - -See also `t.isCallExpression(node, opts)` and `t.assertCallExpression(node, opts)`. - -Aliases: `Expression` - - - `callee`: `Expression` (required) - - `arguments`: `Array` (required) - - `optional`: `true | false` (default: `null`) - - `typeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`) - ---- - -### catchClause -```javascript -t.catchClause(param, body) -``` - -See also `t.isCatchClause(node, opts)` and `t.assertCatchClause(node, opts)`. - -Aliases: `Scopable`, `BlockParent` - - - `param`: `Identifier` (default: `null`) - - `body`: `BlockStatement` (required) - ---- - -### classBody -```javascript -t.classBody(body) -``` - -See also `t.isClassBody(node, opts)` and `t.assertClassBody(node, opts)`. - - - `body`: `Array` (required) - ---- - -### classDeclaration -```javascript -t.classDeclaration(id, superClass, body, decorators) -``` - -See also `t.isClassDeclaration(node, opts)` and `t.assertClassDeclaration(node, opts)`. - -Aliases: `Scopable`, `Class`, `Statement`, `Declaration`, `Pureish` - - - `id`: `Identifier` (default: `null`) - - `superClass`: `Expression` (default: `null`) - - `body`: `ClassBody` (required) - - `decorators`: `Array` (default: `null`) - - `abstract`: `boolean` (default: `null`) - - `declare`: `boolean` (default: `null`) - - `implements`: `Array` (default: `null`) - - `mixins` (default: `null`) - - `superTypeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`) - - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`) - ---- - -### classExpression -```javascript -t.classExpression(id, superClass, body, decorators) -``` - -See also `t.isClassExpression(node, opts)` and `t.assertClassExpression(node, opts)`. - -Aliases: `Scopable`, `Class`, `Expression`, `Pureish` - - - `id`: `Identifier` (default: `null`) - - `superClass`: `Expression` (default: `null`) - - `body`: `ClassBody` (required) - - `decorators`: `Array` (default: `null`) - - `implements`: `Array` (default: `null`) - - `mixins` (default: `null`) - - `superTypeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`) - - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`) - ---- - -### classImplements -```javascript -t.classImplements(id, typeParameters) -``` - -See also `t.isClassImplements(node, opts)` and `t.assertClassImplements(node, opts)`. - -Aliases: `Flow` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterInstantiation` (default: `null`) - ---- - -### classMethod -```javascript -t.classMethod(kind, key, params, body, computed, static) -``` - -See also `t.isClassMethod(node, opts)` and `t.assertClassMethod(node, opts)`. - -Aliases: `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method` - - - `kind`: `"get" | "set" | "method" | "constructor"` (default: `'method'`) - - `key`: if computed then `Expression` else `Identifier | Literal` (required) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `computed`: `boolean` (default: `false`) - - `static`: `boolean` (default: `null`) - - `abstract`: `boolean` (default: `null`) - - `access`: `"public" | "private" | "protected"` (default: `null`) - - `accessibility`: `"public" | "private" | "protected"` (default: `null`) - - `async`: `boolean` (default: `false`) - - `decorators`: `Array` (default: `null`) - - `generator`: `boolean` (default: `false`) - - `optional`: `boolean` (default: `null`) - - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`) - ---- - -### classPrivateProperty -```javascript -t.classPrivateProperty(key, value) -``` - -See also `t.isClassPrivateProperty(node, opts)` and `t.assertClassPrivateProperty(node, opts)`. - -Aliases: `Property`, `Private` - - - `key`: `PrivateName` (required) - - `value`: `Expression` (default: `null`) - ---- - -### classProperty -```javascript -t.classProperty(key, value, typeAnnotation, decorators, computed) -``` - -See also `t.isClassProperty(node, opts)` and `t.assertClassProperty(node, opts)`. - -Aliases: `Property` - - - `key`: `Identifier | StringLiteral | NumericLiteral | Expression` (required) - - `value`: `Expression` (default: `null`) - - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - - `decorators`: `Array` (default: `null`) - - `computed`: `boolean` (default: `false`) - - `abstract`: `boolean` (default: `null`) - - `accessibility`: `"public" | "private" | "protected"` (default: `null`) - - `definite`: `boolean` (default: `null`) - - `optional`: `boolean` (default: `null`) - - `readonly`: `boolean` (default: `null`) - - `static`: `boolean` (default: `null`) - ---- - -### conditionalExpression -```javascript -t.conditionalExpression(test, consequent, alternate) -``` - -See also `t.isConditionalExpression(node, opts)` and `t.assertConditionalExpression(node, opts)`. - -Aliases: `Expression`, `Conditional` - - - `test`: `Expression` (required) - - `consequent`: `Expression` (required) - - `alternate`: `Expression` (required) - ---- - -### continueStatement -```javascript -t.continueStatement(label) -``` - -See also `t.isContinueStatement(node, opts)` and `t.assertContinueStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `label`: `Identifier` (default: `null`) - ---- - -### debuggerStatement -```javascript -t.debuggerStatement() -``` - -See also `t.isDebuggerStatement(node, opts)` and `t.assertDebuggerStatement(node, opts)`. - -Aliases: `Statement` - - ---- - -### declareClass -```javascript -t.declareClass(id, typeParameters, extends, body) -``` - -See also `t.isDeclareClass(node, opts)` and `t.assertDeclareClass(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterInstantiation` (default: `null`) - - `extends`: `Array` (default: `null`) - - `body`: `ObjectTypeAnnotation` (required) - - `implements`: `Array` (default: `null`) - - `mixins`: `Array` (default: `null`) - ---- - -### declareExportAllDeclaration -```javascript -t.declareExportAllDeclaration(source) -``` - -See also `t.isDeclareExportAllDeclaration(node, opts)` and `t.assertDeclareExportAllDeclaration(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `source`: `StringLiteral` (required) - - `exportKind`: `["type","value"]` (default: `null`) - ---- - -### declareExportDeclaration -```javascript -t.declareExportDeclaration(declaration, specifiers, source) -``` - -See also `t.isDeclareExportDeclaration(node, opts)` and `t.assertDeclareExportDeclaration(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `declaration`: `Flow` (default: `null`) - - `specifiers`: `Array` (default: `null`) - - `source`: `StringLiteral` (default: `null`) - - `default`: `boolean` (default: `null`) - ---- - -### declareFunction -```javascript -t.declareFunction(id) -``` - -See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `predicate`: `DeclaredPredicate` (default: `null`) - ---- - -### declareInterface -```javascript -t.declareInterface(id, typeParameters, extends, body) -``` - -See also `t.isDeclareInterface(node, opts)` and `t.assertDeclareInterface(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterDeclaration` (default: `null`) - - `extends`: `Array` (default: `null`) - - `body`: `ObjectTypeAnnotation` (required) - - `implements`: `Array` (default: `null`) - - `mixins`: `Array` (default: `null`) - ---- - -### declareModule -```javascript -t.declareModule(id, body, kind) -``` - -See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier | StringLiteral` (required) - - `body`: `BlockStatement` (required) - - `kind`: `"CommonJS" | "ES"` (default: `null`) - ---- - -### declareModuleExports -```javascript -t.declareModuleExports(typeAnnotation) -``` - -See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `typeAnnotation`: `TypeAnnotation` (required) - ---- - -### declareOpaqueType -```javascript -t.declareOpaqueType(id, typeParameters, supertype) -``` - -See also `t.isDeclareOpaqueType(node, opts)` and `t.assertDeclareOpaqueType(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterDeclaration` (default: `null`) - - `supertype`: `FlowType` (default: `null`) - ---- - -### declareTypeAlias -```javascript -t.declareTypeAlias(id, typeParameters, right) -``` - -See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterDeclaration` (default: `null`) - - `right`: `FlowType` (required) - ---- - -### declareVariable -```javascript -t.declareVariable(id) -``` - -See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - ---- - -### declaredPredicate -```javascript -t.declaredPredicate(value) -``` - -See also `t.isDeclaredPredicate(node, opts)` and `t.assertDeclaredPredicate(node, opts)`. - -Aliases: `Flow`, `FlowPredicate` - - - `value`: `Flow` (required) - ---- - -### decorator -```javascript -t.decorator(callee, arguments) -``` - -See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`. - - - `callee`: `Expression` (required) - - `arguments`: `Array` (default: `null`) - ---- - -### directive -```javascript -t.directive(value) -``` - -See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`. - - - `value`: `DirectiveLiteral` (required) - ---- - -### directiveLiteral -```javascript -t.directiveLiteral(value) -``` - -See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`. - - - `value`: `string` (required) - ---- - -### doExpression -```javascript -t.doExpression(body) -``` - -See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`. - -Aliases: `Expression` - - - `body`: `BlockStatement` (required) - ---- - -### doWhileStatement -```javascript -t.doWhileStatement(test, body) -``` - -See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable` - - - `test`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### emptyStatement -```javascript -t.emptyStatement() -``` - -See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`. - -Aliases: `Statement` - - ---- - -### emptyTypeAnnotation -```javascript -t.emptyTypeAnnotation() -``` - -See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### existsTypeAnnotation -```javascript -t.existsTypeAnnotation() -``` - -See also `t.isExistsTypeAnnotation(node, opts)` and `t.assertExistsTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - ---- - -### exportAllDeclaration -```javascript -t.exportAllDeclaration(source) -``` - -See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `source`: `StringLiteral` (required) - ---- - -### exportDefaultDeclaration -```javascript -t.exportDefaultDeclaration(declaration) -``` - -See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `declaration`: `FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression` (required) - ---- - -### exportDefaultSpecifier -```javascript -t.exportDefaultSpecifier(exported) -``` - -See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `exported`: `Identifier` (required) - ---- - -### exportNamedDeclaration -```javascript -t.exportNamedDeclaration(declaration, specifiers, source) -``` - -See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `declaration`: `Declaration` (default: `null`) - - `specifiers`: `Array` (required) - - `source`: `StringLiteral` (default: `null`) - ---- - -### exportNamespaceSpecifier -```javascript -t.exportNamespaceSpecifier(exported) -``` - -See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `exported`: `Identifier` (required) - ---- - -### exportSpecifier -```javascript -t.exportSpecifier(local, exported) -``` - -See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - - `exported`: `Identifier` (required) - ---- - -### expressionStatement -```javascript -t.expressionStatement(expression) -``` - -See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`. - -Aliases: `Statement`, `ExpressionWrapper` - - - `expression`: `Expression` (required) - ---- - -### file -```javascript -t.file(program, comments, tokens) -``` - -See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`. - - - `program`: `Program` (required) - - `comments` (required) - - `tokens` (required) - ---- - -### forInStatement -```javascript -t.forInStatement(left, right, body) -``` - -See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` - - - `left`: `VariableDeclaration | LVal` (required) - - `right`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### forOfStatement -```javascript -t.forOfStatement(left, right, body) -``` - -See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` - - - `left`: `VariableDeclaration | LVal` (required) - - `right`: `Expression` (required) - - `body`: `Statement` (required) - - `await`: `boolean` (default: `false`) - ---- - -### forStatement -```javascript -t.forStatement(init, test, update, body) -``` - -See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop` - - - `init`: `VariableDeclaration | Expression` (default: `null`) - - `test`: `Expression` (default: `null`) - - `update`: `Expression` (default: `null`) - - `body`: `Statement` (required) - ---- - -### functionDeclaration -```javascript -t.functionDeclaration(id, params, body, generator, async) -``` - -See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `Pureish`, `Declaration` - - - `id`: `Identifier` (default: `null`) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `generator`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `declare`: `boolean` (default: `null`) - - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`) - ---- - -### functionExpression -```javascript -t.functionExpression(id, params, body, generator, async) -``` - -See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish` - - - `id`: `Identifier` (default: `null`) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `generator`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`) - ---- - -### functionTypeAnnotation -```javascript -t.functionTypeAnnotation(typeParameters, params, rest, returnType) -``` - -See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `typeParameters`: `TypeParameterDeclaration` (default: `null`) - - `params`: `Array` (required) - - `rest`: `FunctionTypeParam` (default: `null`) - - `returnType`: `FlowType` (required) - ---- - -### functionTypeParam -```javascript -t.functionTypeParam(name, typeAnnotation) -``` - -See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`. - -Aliases: `Flow` - - - `name`: `Identifier` (default: `null`) - - `typeAnnotation`: `FlowType` (required) - - `optional`: `boolean` (default: `null`) - ---- - -### genericTypeAnnotation -```javascript -t.genericTypeAnnotation(id, typeParameters) -``` - -See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterInstantiation` (default: `null`) - ---- - -### identifier -```javascript -t.identifier(name) -``` - -See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`. - -Aliases: `Expression`, `PatternLike`, `LVal`, `TSEntityName` - - - `name`: `string` (required) - - `decorators`: `Array` (default: `null`) - - `optional`: `boolean` (default: `null`) - - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - ---- - -### ifStatement -```javascript -t.ifStatement(test, consequent, alternate) -``` - -See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`. - -Aliases: `Statement`, `Conditional` - - - `test`: `Expression` (required) - - `consequent`: `Statement` (required) - - `alternate`: `Statement` (default: `null`) - ---- - -### import -```javascript -t.import() -``` - -See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`. - -Aliases: `Expression` - - ---- - -### importDeclaration -```javascript -t.importDeclaration(specifiers, source) -``` - -See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration` - - - `specifiers`: `Array` (required) - - `source`: `StringLiteral` (required) - ---- - -### importDefaultSpecifier -```javascript -t.importDefaultSpecifier(local) -``` - -See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - ---- - -### importNamespaceSpecifier -```javascript -t.importNamespaceSpecifier(local) -``` - -See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - ---- - -### importSpecifier -```javascript -t.importSpecifier(local, imported) -``` - -See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - - `imported`: `Identifier` (required) - - `importKind`: `null | "type" | "typeof"` (default: `null`) - ---- - -### inferredPredicate -```javascript -t.inferredPredicate() -``` - -See also `t.isInferredPredicate(node, opts)` and `t.assertInferredPredicate(node, opts)`. - -Aliases: `Flow`, `FlowPredicate` - - ---- - -### interfaceDeclaration -```javascript -t.interfaceDeclaration(id, typeParameters, extends, body) -``` - -See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterDeclaration` (default: `null`) - - `extends`: `Array` (default: `null`) - - `body`: `ObjectTypeAnnotation` (required) - - `implements`: `Array` (default: `null`) - - `mixins`: `Array` (default: `null`) - ---- - -### interfaceExtends -```javascript -t.interfaceExtends(id, typeParameters) -``` - -See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`. - -Aliases: `Flow` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterInstantiation` (default: `null`) - ---- - -### intersectionTypeAnnotation -```javascript -t.intersectionTypeAnnotation(types) -``` - -See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `types`: `Array` (required) - ---- - -### jSXAttribute -```javascript -t.jsxAttribute(name, value) -``` - -See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXNamespacedName` (required) - - `value`: `JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer` (default: `null`) - ---- - -### jSXClosingElement -```javascript -t.jsxClosingElement(name) -``` - -See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXMemberExpression` (required) - ---- - -### jSXClosingFragment -```javascript -t.jsxClosingFragment() -``` - -See also `t.isJSXClosingFragment(node, opts)` and `t.assertJSXClosingFragment(node, opts)`. - -Aliases: `JSX`, `Immutable` - - ---- - -### jSXElement -```javascript -t.jsxElement(openingElement, closingElement, children, selfClosing) -``` - -See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`. - -Aliases: `JSX`, `Immutable`, `Expression` - - - `openingElement`: `JSXOpeningElement` (required) - - `closingElement`: `JSXClosingElement` (default: `null`) - - `children`: `Array` (required) - - `selfClosing` (required) - ---- - -### jSXEmptyExpression -```javascript -t.jsxEmptyExpression() -``` - -See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`. - -Aliases: `JSX` - - ---- - -### jSXExpressionContainer -```javascript -t.jsxExpressionContainer(expression) -``` - -See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `expression`: `Expression` (required) - ---- - -### jSXFragment -```javascript -t.jsxFragment(openingFragment, closingFragment, children) -``` - -See also `t.isJSXFragment(node, opts)` and `t.assertJSXFragment(node, opts)`. - -Aliases: `JSX`, `Immutable`, `Expression` - - - `openingFragment`: `JSXOpeningFragment` (required) - - `closingFragment`: `JSXClosingFragment` (required) - - `children`: `Array` (required) - ---- - -### jSXIdentifier -```javascript -t.jsxIdentifier(name) -``` - -See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`. - -Aliases: `JSX` - - - `name`: `string` (required) - ---- - -### jSXMemberExpression -```javascript -t.jsxMemberExpression(object, property) -``` - -See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`. - -Aliases: `JSX` - - - `object`: `JSXMemberExpression | JSXIdentifier` (required) - - `property`: `JSXIdentifier` (required) - ---- - -### jSXNamespacedName -```javascript -t.jsxNamespacedName(namespace, name) -``` - -See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`. - -Aliases: `JSX` - - - `namespace`: `JSXIdentifier` (required) - - `name`: `JSXIdentifier` (required) - ---- - -### jSXOpeningElement -```javascript -t.jsxOpeningElement(name, attributes, selfClosing) -``` - -See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXMemberExpression` (required) - - `attributes`: `Array` (required) - - `selfClosing`: `boolean` (default: `false`) - ---- - -### jSXOpeningFragment -```javascript -t.jsxOpeningFragment() -``` - -See also `t.isJSXOpeningFragment(node, opts)` and `t.assertJSXOpeningFragment(node, opts)`. - -Aliases: `JSX`, `Immutable` - - ---- - -### jSXSpreadAttribute -```javascript -t.jsxSpreadAttribute(argument) -``` - -See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`. - -Aliases: `JSX` - - - `argument`: `Expression` (required) - ---- - -### jSXSpreadChild -```javascript -t.jsxSpreadChild(expression) -``` - -See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `expression`: `Expression` (required) - ---- - -### jSXText -```javascript -t.jsxText(value) -``` - -See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `value`: `string` (required) - ---- - -### labeledStatement -```javascript -t.labeledStatement(label, body) -``` - -See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`. - -Aliases: `Statement` - - - `label`: `Identifier` (required) - - `body`: `Statement` (required) - ---- - -### logicalExpression -```javascript -t.logicalExpression(operator, left, right) -``` - -See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`. - -Aliases: `Binary`, `Expression` - - - `operator`: `"||" | "&&" | "??"` (required) - - `left`: `Expression` (required) - - `right`: `Expression` (required) - ---- - -### memberExpression -```javascript -t.memberExpression(object, property, computed, optional) -``` - -See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`. - -Aliases: `Expression`, `LVal` - - - `object`: `Expression` (required) - - `property`: if computed then `Expression` else `Identifier` (required) - - `computed`: `boolean` (default: `false`) - - `optional`: `true | false` (default: `null`) - ---- - -### metaProperty -```javascript -t.metaProperty(meta, property) -``` - -See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`. - -Aliases: `Expression` - - - `meta`: `Identifier` (required) - - `property`: `Identifier` (required) - ---- - -### mixedTypeAnnotation -```javascript -t.mixedTypeAnnotation() -``` - -See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### newExpression -```javascript -t.newExpression(callee, arguments) -``` - -See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`. - -Aliases: `Expression` - - - `callee`: `Expression` (required) - - `arguments`: `Array` (required) - - `optional`: `true | false` (default: `null`) - - `typeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`) - ---- - -### noop -```javascript -t.noop() -``` - -See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`. - - ---- - -### nullLiteral -```javascript -t.nullLiteral() -``` - -See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - ---- - -### nullLiteralTypeAnnotation -```javascript -t.nullLiteralTypeAnnotation() -``` - -See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### nullableTypeAnnotation -```javascript -t.nullableTypeAnnotation(typeAnnotation) -``` - -See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `typeAnnotation`: `FlowType` (required) - ---- - -### numberLiteralTypeAnnotation -```javascript -t.numberLiteralTypeAnnotation(value) -``` - -See also `t.isNumberLiteralTypeAnnotation(node, opts)` and `t.assertNumberLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `value`: `number` (required) - ---- - -### numberTypeAnnotation -```javascript -t.numberTypeAnnotation() -``` - -See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### numericLiteral -```javascript -t.numericLiteral(value) -``` - -See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `number` (required) - ---- - -### objectExpression -```javascript -t.objectExpression(properties) -``` - -See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`. - -Aliases: `Expression` - - - `properties`: `Array` (required) - ---- - -### objectMethod -```javascript -t.objectMethod(kind, key, params, body, computed) -``` - -See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`. - -Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`, `ObjectMember` - - - `kind`: `"method" | "get" | "set"` (default: `'method'`) - - `key`: if computed then `Expression` else `Identifier | Literal` (required) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `computed`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `decorators`: `Array` (default: `null`) - - `generator`: `boolean` (default: `false`) - - `returnType`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - - `typeParameters`: `TypeParameterDeclaration | TSTypeParameterDeclaration | Noop` (default: `null`) - ---- - -### objectPattern -```javascript -t.objectPattern(properties) -``` - -See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`. - -Aliases: `Pattern`, `PatternLike`, `LVal` - - - `properties`: `Array` (required) - - `decorators`: `Array` (default: `null`) - - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - ---- - -### objectProperty -```javascript -t.objectProperty(key, value, computed, shorthand, decorators) -``` - -See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`. - -Aliases: `UserWhitespacable`, `Property`, `ObjectMember` - - - `key`: if computed then `Expression` else `Identifier | Literal` (required) - - `value`: `Expression | PatternLike` (required) - - `computed`: `boolean` (default: `false`) - - `shorthand`: `boolean` (default: `false`) - - `decorators`: `Array` (default: `null`) - ---- - -### objectTypeAnnotation -```javascript -t.objectTypeAnnotation(properties, indexers, callProperties, exact) -``` - -See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `properties`: `Array` (required) - - `indexers`: `Array` (default: `null`) - - `callProperties`: `Array` (default: `null`) - - `exact`: `boolean` (default: `false`) - ---- - -### objectTypeCallProperty -```javascript -t.objectTypeCallProperty(value) -``` - -See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `value`: `FlowType` (required) - - `static`: `boolean` (default: `null`) - ---- - -### objectTypeIndexer -```javascript -t.objectTypeIndexer(id, key, value, variance) -``` - -See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `id`: `Identifier` (default: `null`) - - `key`: `FlowType` (required) - - `value`: `FlowType` (required) - - `variance`: `Variance` (default: `null`) - - `static`: `boolean` (default: `null`) - ---- - -### objectTypeProperty -```javascript -t.objectTypeProperty(key, value, variance) -``` - -See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `key`: `Identifier | StringLiteral` (required) - - `value`: `FlowType` (required) - - `variance`: `Variance` (default: `null`) - - `kind`: `"init" | "get" | "set"` (default: `null`) - - `optional`: `boolean` (default: `null`) - - `static`: `boolean` (default: `null`) - ---- - -### objectTypeSpreadProperty -```javascript -t.objectTypeSpreadProperty(argument) -``` - -See also `t.isObjectTypeSpreadProperty(node, opts)` and `t.assertObjectTypeSpreadProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `argument`: `FlowType` (required) - ---- - -### opaqueType -```javascript -t.opaqueType(id, typeParameters, supertype, impltype) -``` - -See also `t.isOpaqueType(node, opts)` and `t.assertOpaqueType(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterDeclaration` (default: `null`) - - `supertype`: `FlowType` (default: `null`) - - `impltype`: `FlowType` (required) - ---- - -### optionalCallExpression -```javascript -t.optionalCallExpression(callee, arguments, optional) -``` - -See also `t.isOptionalCallExpression(node, opts)` and `t.assertOptionalCallExpression(node, opts)`. - -Aliases: `Expression` - - - `callee`: `Expression` (required) - - `arguments`: `Array` (required) - - `optional`: `boolean` (required) - - `typeParameters`: `TypeParameterInstantiation | TSTypeParameterInstantiation` (default: `null`) - ---- - -### optionalMemberExpression -```javascript -t.optionalMemberExpression(object, property, computed, optional) -``` - -See also `t.isOptionalMemberExpression(node, opts)` and `t.assertOptionalMemberExpression(node, opts)`. - -Aliases: `Expression` - - - `object`: `Expression` (required) - - `property`: `any` (required) - - `computed`: `boolean` (default: `false`) - - `optional`: `boolean` (required) - ---- - -### parenthesizedExpression -```javascript -t.parenthesizedExpression(expression) -``` - -See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`. - -Aliases: `Expression`, `ExpressionWrapper` - - - `expression`: `Expression` (required) - ---- - -### privateName -```javascript -t.privateName(id) -``` - -See also `t.isPrivateName(node, opts)` and `t.assertPrivateName(node, opts)`. - -Aliases: `Private` - - - `id`: `Identifier` (required) - ---- - -### program -```javascript -t.program(body, directives, sourceType) -``` - -See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`. - -Aliases: `Scopable`, `BlockParent`, `Block` - - - `body`: `Array` (required) - - `directives`: `Array` (default: `[]`) - - `sourceType`: `"script" | "module"` (default: `'script'`) - - `sourceFile`: `string` (default: `null`) - ---- - -### qualifiedTypeIdentifier -```javascript -t.qualifiedTypeIdentifier(id, qualification) -``` - -See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`. - -Aliases: `Flow` - - - `id`: `Identifier` (required) - - `qualification`: `Identifier | QualifiedTypeIdentifier` (required) - ---- - -### regExpLiteral -```javascript -t.regExpLiteral(pattern, flags) -``` - -See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`. - -Aliases: `Expression`, `Literal` - - - `pattern`: `string` (required) - - `flags`: `string` (default: `''`) - ---- - -### restElement -```javascript -t.restElement(argument) -``` - -See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`. - -Aliases: `LVal`, `PatternLike` - - - `argument`: `LVal` (required) - - `decorators`: `Array` (default: `null`) - - `typeAnnotation`: `TypeAnnotation | TSTypeAnnotation | Noop` (default: `null`) - ---- - -### returnStatement -```javascript -t.returnStatement(argument) -``` - -See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `argument`: `Expression` (default: `null`) - ---- - -### sequenceExpression -```javascript -t.sequenceExpression(expressions) -``` - -See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`. - -Aliases: `Expression` - - - `expressions`: `Array` (required) - ---- - -### spreadElement -```javascript -t.spreadElement(argument) -``` - -See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`. - -Aliases: `UnaryLike` - - - `argument`: `Expression` (required) - ---- - -### stringLiteral -```javascript -t.stringLiteral(value) -``` - -See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `string` (required) - ---- - -### stringLiteralTypeAnnotation -```javascript -t.stringLiteralTypeAnnotation(value) -``` - -See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `value`: `string` (required) - ---- - -### stringTypeAnnotation -```javascript -t.stringTypeAnnotation() -``` - -See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### super -```javascript -t.super() -``` - -See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`. - -Aliases: `Expression` - - ---- - -### switchCase -```javascript -t.switchCase(test, consequent) -``` - -See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`. - - - `test`: `Expression` (default: `null`) - - `consequent`: `Array` (required) - ---- - -### switchStatement -```javascript -t.switchStatement(discriminant, cases) -``` - -See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Scopable` - - - `discriminant`: `Expression` (required) - - `cases`: `Array` (required) - ---- - -### tSAnyKeyword -```javascript -t.tsAnyKeyword() -``` - -See also `t.isTSAnyKeyword(node, opts)` and `t.assertTSAnyKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSArrayType -```javascript -t.tsArrayType(elementType) -``` - -See also `t.isTSArrayType(node, opts)` and `t.assertTSArrayType(node, opts)`. - -Aliases: `TSType` - - - `elementType`: `TSType` (required) - ---- - -### tSAsExpression -```javascript -t.tsAsExpression(expression, typeAnnotation) -``` - -See also `t.isTSAsExpression(node, opts)` and `t.assertTSAsExpression(node, opts)`. - -Aliases: `Expression` - - - `expression`: `Expression` (required) - - `typeAnnotation`: `TSType` (required) - ---- - -### tSBooleanKeyword -```javascript -t.tsBooleanKeyword() -``` - -See also `t.isTSBooleanKeyword(node, opts)` and `t.assertTSBooleanKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSCallSignatureDeclaration -```javascript -t.tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation) -``` - -See also `t.isTSCallSignatureDeclaration(node, opts)` and `t.assertTSCallSignatureDeclaration(node, opts)`. - -Aliases: `TSTypeElement` - - - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`) - - `parameters`: `Array` (default: `null`) - - `typeAnnotation`: `TSTypeAnnotation` (default: `null`) - ---- - -### tSConditionalType -```javascript -t.tsConditionalType(checkType, extendsType, trueType, falseType) -``` - -See also `t.isTSConditionalType(node, opts)` and `t.assertTSConditionalType(node, opts)`. - -Aliases: `TSType` - - - `checkType`: `TSType` (required) - - `extendsType`: `TSType` (required) - - `trueType`: `TSType` (required) - - `falseType`: `TSType` (required) - ---- - -### tSConstructSignatureDeclaration -```javascript -t.tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation) -``` - -See also `t.isTSConstructSignatureDeclaration(node, opts)` and `t.assertTSConstructSignatureDeclaration(node, opts)`. - -Aliases: `TSTypeElement` - - - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`) - - `parameters`: `Array` (default: `null`) - - `typeAnnotation`: `TSTypeAnnotation` (default: `null`) - ---- - -### tSConstructorType -```javascript -t.tsConstructorType(typeParameters, typeAnnotation) -``` - -See also `t.isTSConstructorType(node, opts)` and `t.assertTSConstructorType(node, opts)`. - -Aliases: `TSType` - - - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`) - - `typeAnnotation`: `TSTypeAnnotation` (default: `null`) - - `parameters`: `Array` (default: `null`) - ---- - -### tSDeclareFunction -```javascript -t.tsDeclareFunction(id, typeParameters, params, returnType) -``` - -See also `t.isTSDeclareFunction(node, opts)` and `t.assertTSDeclareFunction(node, opts)`. - -Aliases: `Statement`, `Declaration` - - - `id`: `Identifier` (default: `null`) - - `typeParameters`: `TSTypeParameterDeclaration | Noop` (default: `null`) - - `params`: `Array` (required) - - `returnType`: `TSTypeAnnotation | Noop` (default: `null`) - - `async`: `boolean` (default: `false`) - - `declare`: `boolean` (default: `null`) - - `generator`: `boolean` (default: `false`) - ---- - -### tSDeclareMethod -```javascript -t.tsDeclareMethod(decorators, key, typeParameters, params, returnType) -``` - -See also `t.isTSDeclareMethod(node, opts)` and `t.assertTSDeclareMethod(node, opts)`. - - - `decorators`: `Array` (default: `null`) - - `key`: `Identifier | StringLiteral | NumericLiteral | Expression` (required) - - `typeParameters`: `TSTypeParameterDeclaration | Noop` (default: `null`) - - `params`: `Array` (required) - - `returnType`: `TSTypeAnnotation | Noop` (default: `null`) - - `abstract`: `boolean` (default: `null`) - - `access`: `"public" | "private" | "protected"` (default: `null`) - - `accessibility`: `"public" | "private" | "protected"` (default: `null`) - - `async`: `boolean` (default: `false`) - - `computed`: `boolean` (default: `false`) - - `generator`: `boolean` (default: `false`) - - `kind`: `"get" | "set" | "method" | "constructor"` (default: `'method'`) - - `optional`: `boolean` (default: `null`) - - `static`: `boolean` (default: `null`) - ---- - -### tSEnumDeclaration -```javascript -t.tsEnumDeclaration(id, members) -``` - -See also `t.isTSEnumDeclaration(node, opts)` and `t.assertTSEnumDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `members`: `Array` (required) - - `const`: `boolean` (default: `null`) - - `declare`: `boolean` (default: `null`) - - `initializer`: `Expression` (default: `null`) - ---- - -### tSEnumMember -```javascript -t.tsEnumMember(id, initializer) -``` - -See also `t.isTSEnumMember(node, opts)` and `t.assertTSEnumMember(node, opts)`. - - - `id`: `Identifier | StringLiteral` (required) - - `initializer`: `Expression` (default: `null`) - ---- - -### tSExportAssignment -```javascript -t.tsExportAssignment(expression) -``` - -See also `t.isTSExportAssignment(node, opts)` and `t.assertTSExportAssignment(node, opts)`. - -Aliases: `Statement` - - - `expression`: `Expression` (required) - ---- - -### tSExpressionWithTypeArguments -```javascript -t.tsExpressionWithTypeArguments(expression, typeParameters) -``` - -See also `t.isTSExpressionWithTypeArguments(node, opts)` and `t.assertTSExpressionWithTypeArguments(node, opts)`. - -Aliases: `TSType` - - - `expression`: `TSEntityName` (required) - - `typeParameters`: `TSTypeParameterInstantiation` (default: `null`) - ---- - -### tSExternalModuleReference -```javascript -t.tsExternalModuleReference(expression) -``` - -See also `t.isTSExternalModuleReference(node, opts)` and `t.assertTSExternalModuleReference(node, opts)`. - - - `expression`: `StringLiteral` (required) - ---- - -### tSFunctionType -```javascript -t.tsFunctionType(typeParameters, typeAnnotation) -``` - -See also `t.isTSFunctionType(node, opts)` and `t.assertTSFunctionType(node, opts)`. - -Aliases: `TSType` - - - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`) - - `typeAnnotation`: `TSTypeAnnotation` (default: `null`) - - `parameters`: `Array` (default: `null`) - ---- - -### tSImportEqualsDeclaration -```javascript -t.tsImportEqualsDeclaration(id, moduleReference) -``` - -See also `t.isTSImportEqualsDeclaration(node, opts)` and `t.assertTSImportEqualsDeclaration(node, opts)`. - -Aliases: `Statement` - - - `id`: `Identifier` (required) - - `moduleReference`: `TSEntityName | TSExternalModuleReference` (required) - - `isExport`: `boolean` (default: `null`) - ---- - -### tSIndexSignature -```javascript -t.tsIndexSignature(parameters, typeAnnotation) -``` - -See also `t.isTSIndexSignature(node, opts)` and `t.assertTSIndexSignature(node, opts)`. - -Aliases: `TSTypeElement` - - - `parameters`: `Array` (required) - - `typeAnnotation`: `TSTypeAnnotation` (default: `null`) - - `readonly`: `boolean` (default: `null`) - ---- - -### tSIndexedAccessType -```javascript -t.tsIndexedAccessType(objectType, indexType) -``` - -See also `t.isTSIndexedAccessType(node, opts)` and `t.assertTSIndexedAccessType(node, opts)`. - -Aliases: `TSType` - - - `objectType`: `TSType` (required) - - `indexType`: `TSType` (required) - ---- - -### tSInferType -```javascript -t.tsInferType(typeParameter) -``` - -See also `t.isTSInferType(node, opts)` and `t.assertTSInferType(node, opts)`. - -Aliases: `TSType` - - - `typeParameter`: `TSType` (required) - ---- - -### tSInterfaceBody -```javascript -t.tsInterfaceBody(body) -``` - -See also `t.isTSInterfaceBody(node, opts)` and `t.assertTSInterfaceBody(node, opts)`. - - - `body`: `Array` (required) - ---- - -### tSInterfaceDeclaration -```javascript -t.tsInterfaceDeclaration(id, typeParameters, extends, body) -``` - -See also `t.isTSInterfaceDeclaration(node, opts)` and `t.assertTSInterfaceDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`) - - `extends`: `Array` (default: `null`) - - `body`: `TSInterfaceBody` (required) - - `declare`: `boolean` (default: `null`) - ---- - -### tSIntersectionType -```javascript -t.tsIntersectionType(types) -``` - -See also `t.isTSIntersectionType(node, opts)` and `t.assertTSIntersectionType(node, opts)`. - -Aliases: `TSType` - - - `types`: `Array` (required) - ---- - -### tSLiteralType -```javascript -t.tsLiteralType(literal) -``` - -See also `t.isTSLiteralType(node, opts)` and `t.assertTSLiteralType(node, opts)`. - -Aliases: `TSType` - - - `literal`: `NumericLiteral | StringLiteral | BooleanLiteral` (required) - ---- - -### tSMappedType -```javascript -t.tsMappedType(typeParameter, typeAnnotation) -``` - -See also `t.isTSMappedType(node, opts)` and `t.assertTSMappedType(node, opts)`. - -Aliases: `TSType` - - - `typeParameter`: `TSTypeParameter` (required) - - `typeAnnotation`: `TSType` (default: `null`) - - `optional`: `boolean` (default: `null`) - - `readonly`: `boolean` (default: `null`) - ---- - -### tSMethodSignature -```javascript -t.tsMethodSignature(key, typeParameters, parameters, typeAnnotation) -``` - -See also `t.isTSMethodSignature(node, opts)` and `t.assertTSMethodSignature(node, opts)`. - -Aliases: `TSTypeElement` - - - `key`: `Expression` (required) - - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`) - - `parameters`: `Array` (default: `null`) - - `typeAnnotation`: `TSTypeAnnotation` (default: `null`) - - `computed`: `boolean` (default: `null`) - - `optional`: `boolean` (default: `null`) - ---- - -### tSModuleBlock -```javascript -t.tsModuleBlock(body) -``` - -See also `t.isTSModuleBlock(node, opts)` and `t.assertTSModuleBlock(node, opts)`. - - - `body`: `Array` (required) - ---- - -### tSModuleDeclaration -```javascript -t.tsModuleDeclaration(id, body) -``` - -See also `t.isTSModuleDeclaration(node, opts)` and `t.assertTSModuleDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration` - - - `id`: `Identifier | StringLiteral` (required) - - `body`: `TSModuleBlock | TSModuleDeclaration` (required) - - `declare`: `boolean` (default: `null`) - - `global`: `boolean` (default: `null`) - ---- - -### tSNamespaceExportDeclaration -```javascript -t.tsNamespaceExportDeclaration(id) -``` - -See also `t.isTSNamespaceExportDeclaration(node, opts)` and `t.assertTSNamespaceExportDeclaration(node, opts)`. - -Aliases: `Statement` - - - `id`: `Identifier` (required) - ---- - -### tSNeverKeyword -```javascript -t.tsNeverKeyword() -``` - -See also `t.isTSNeverKeyword(node, opts)` and `t.assertTSNeverKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSNonNullExpression -```javascript -t.tsNonNullExpression(expression) -``` - -See also `t.isTSNonNullExpression(node, opts)` and `t.assertTSNonNullExpression(node, opts)`. - -Aliases: `Expression` - - - `expression`: `Expression` (required) - ---- - -### tSNullKeyword -```javascript -t.tsNullKeyword() -``` - -See also `t.isTSNullKeyword(node, opts)` and `t.assertTSNullKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSNumberKeyword -```javascript -t.tsNumberKeyword() -``` - -See also `t.isTSNumberKeyword(node, opts)` and `t.assertTSNumberKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSObjectKeyword -```javascript -t.tsObjectKeyword() -``` - -See also `t.isTSObjectKeyword(node, opts)` and `t.assertTSObjectKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSParameterProperty -```javascript -t.tsParameterProperty(parameter) -``` - -See also `t.isTSParameterProperty(node, opts)` and `t.assertTSParameterProperty(node, opts)`. - -Aliases: `LVal` - - - `parameter`: `Identifier | AssignmentPattern` (required) - - `accessibility`: `"public" | "private" | "protected"` (default: `null`) - - `readonly`: `boolean` (default: `null`) - ---- - -### tSParenthesizedType -```javascript -t.tsParenthesizedType(typeAnnotation) -``` - -See also `t.isTSParenthesizedType(node, opts)` and `t.assertTSParenthesizedType(node, opts)`. - -Aliases: `TSType` - - - `typeAnnotation`: `TSType` (required) - ---- - -### tSPropertySignature -```javascript -t.tsPropertySignature(key, typeAnnotation, initializer) -``` - -See also `t.isTSPropertySignature(node, opts)` and `t.assertTSPropertySignature(node, opts)`. - -Aliases: `TSTypeElement` - - - `key`: `Expression` (required) - - `typeAnnotation`: `TSTypeAnnotation` (default: `null`) - - `initializer`: `Expression` (default: `null`) - - `computed`: `boolean` (default: `null`) - - `optional`: `boolean` (default: `null`) - - `readonly`: `boolean` (default: `null`) - ---- - -### tSQualifiedName -```javascript -t.tsQualifiedName(left, right) -``` - -See also `t.isTSQualifiedName(node, opts)` and `t.assertTSQualifiedName(node, opts)`. - -Aliases: `TSEntityName` - - - `left`: `TSEntityName` (required) - - `right`: `Identifier` (required) - ---- - -### tSStringKeyword -```javascript -t.tsStringKeyword() -``` - -See also `t.isTSStringKeyword(node, opts)` and `t.assertTSStringKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSSymbolKeyword -```javascript -t.tsSymbolKeyword() -``` - -See also `t.isTSSymbolKeyword(node, opts)` and `t.assertTSSymbolKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSThisType -```javascript -t.tsThisType() -``` - -See also `t.isTSThisType(node, opts)` and `t.assertTSThisType(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSTupleType -```javascript -t.tsTupleType(elementTypes) -``` - -See also `t.isTSTupleType(node, opts)` and `t.assertTSTupleType(node, opts)`. - -Aliases: `TSType` - - - `elementTypes`: `Array` (required) - ---- - -### tSTypeAliasDeclaration -```javascript -t.tsTypeAliasDeclaration(id, typeParameters, typeAnnotation) -``` - -See also `t.isTSTypeAliasDeclaration(node, opts)` and `t.assertTSTypeAliasDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TSTypeParameterDeclaration` (default: `null`) - - `typeAnnotation`: `TSType` (required) - - `declare`: `boolean` (default: `null`) - ---- - -### tSTypeAnnotation -```javascript -t.tsTypeAnnotation(typeAnnotation) -``` - -See also `t.isTSTypeAnnotation(node, opts)` and `t.assertTSTypeAnnotation(node, opts)`. - - - `typeAnnotation`: `TSType` (required) - ---- - -### tSTypeAssertion -```javascript -t.tsTypeAssertion(typeAnnotation, expression) -``` - -See also `t.isTSTypeAssertion(node, opts)` and `t.assertTSTypeAssertion(node, opts)`. - -Aliases: `Expression` - - - `typeAnnotation`: `TSType` (required) - - `expression`: `Expression` (required) - ---- - -### tSTypeLiteral -```javascript -t.tsTypeLiteral(members) -``` - -See also `t.isTSTypeLiteral(node, opts)` and `t.assertTSTypeLiteral(node, opts)`. - -Aliases: `TSType` - - - `members`: `Array` (required) - ---- - -### tSTypeOperator -```javascript -t.tsTypeOperator(typeAnnotation) -``` - -See also `t.isTSTypeOperator(node, opts)` and `t.assertTSTypeOperator(node, opts)`. - -Aliases: `TSType` - - - `typeAnnotation`: `TSType` (required) - - `operator`: `string` (default: `null`) - ---- - -### tSTypeParameter -```javascript -t.tsTypeParameter(constraint, default) -``` - -See also `t.isTSTypeParameter(node, opts)` and `t.assertTSTypeParameter(node, opts)`. - - - `constraint`: `TSType` (default: `null`) - - `default`: `TSType` (default: `null`) - - `name`: `string` (default: `null`) - ---- - -### tSTypeParameterDeclaration -```javascript -t.tsTypeParameterDeclaration(params) -``` - -See also `t.isTSTypeParameterDeclaration(node, opts)` and `t.assertTSTypeParameterDeclaration(node, opts)`. - - - `params`: `Array` (required) - ---- - -### tSTypeParameterInstantiation -```javascript -t.tsTypeParameterInstantiation(params) -``` - -See also `t.isTSTypeParameterInstantiation(node, opts)` and `t.assertTSTypeParameterInstantiation(node, opts)`. - - - `params`: `Array` (required) - ---- - -### tSTypePredicate -```javascript -t.tsTypePredicate(parameterName, typeAnnotation) -``` - -See also `t.isTSTypePredicate(node, opts)` and `t.assertTSTypePredicate(node, opts)`. - -Aliases: `TSType` - - - `parameterName`: `Identifier | TSThisType` (required) - - `typeAnnotation`: `TSTypeAnnotation` (required) - ---- - -### tSTypeQuery -```javascript -t.tsTypeQuery(exprName) -``` - -See also `t.isTSTypeQuery(node, opts)` and `t.assertTSTypeQuery(node, opts)`. - -Aliases: `TSType` - - - `exprName`: `TSEntityName` (required) - ---- - -### tSTypeReference -```javascript -t.tsTypeReference(typeName, typeParameters) -``` - -See also `t.isTSTypeReference(node, opts)` and `t.assertTSTypeReference(node, opts)`. - -Aliases: `TSType` - - - `typeName`: `TSEntityName` (required) - - `typeParameters`: `TSTypeParameterInstantiation` (default: `null`) - ---- - -### tSUndefinedKeyword -```javascript -t.tsUndefinedKeyword() -``` - -See also `t.isTSUndefinedKeyword(node, opts)` and `t.assertTSUndefinedKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### tSUnionType -```javascript -t.tsUnionType(types) -``` - -See also `t.isTSUnionType(node, opts)` and `t.assertTSUnionType(node, opts)`. - -Aliases: `TSType` - - - `types`: `Array` (required) - ---- - -### tSVoidKeyword -```javascript -t.tsVoidKeyword() -``` - -See also `t.isTSVoidKeyword(node, opts)` and `t.assertTSVoidKeyword(node, opts)`. - -Aliases: `TSType` - - ---- - -### taggedTemplateExpression -```javascript -t.taggedTemplateExpression(tag, quasi) -``` - -See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`. - -Aliases: `Expression` - - - `tag`: `Expression` (required) - - `quasi`: `TemplateLiteral` (required) - ---- - -### templateElement -```javascript -t.templateElement(value, tail) -``` - -See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`. - - - `value` (required) - - `tail`: `boolean` (default: `false`) - ---- - -### templateLiteral -```javascript -t.templateLiteral(quasis, expressions) -``` - -See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`. - -Aliases: `Expression`, `Literal` - - - `quasis`: `Array` (required) - - `expressions`: `Array` (required) - ---- - -### thisExpression -```javascript -t.thisExpression() -``` - -See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`. - -Aliases: `Expression` - - ---- - -### thisTypeAnnotation -```javascript -t.thisTypeAnnotation() -``` - -See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### throwStatement -```javascript -t.throwStatement(argument) -``` - -See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `argument`: `Expression` (required) - ---- - -### tryStatement -```javascript -t.tryStatement(block, handler, finalizer) -``` - -See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`. - -Aliases: `Statement` - - - `block`: `BlockStatement` (required) - - `handler`: `CatchClause` (default: `null`) - - `finalizer`: `BlockStatement` (default: `null`) - ---- - -### tupleTypeAnnotation -```javascript -t.tupleTypeAnnotation(types) -``` - -See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `types`: `Array` (required) - ---- - -### typeAlias -```javascript -t.typeAlias(id, typeParameters, right) -``` - -See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id`: `Identifier` (required) - - `typeParameters`: `TypeParameterDeclaration` (default: `null`) - - `right`: `FlowType` (required) - ---- - -### typeAnnotation -```javascript -t.typeAnnotation(typeAnnotation) -``` - -See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `typeAnnotation`: `FlowType` (required) - ---- - -### typeCastExpression -```javascript -t.typeCastExpression(expression, typeAnnotation) -``` - -See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`. - -Aliases: `Flow`, `ExpressionWrapper`, `Expression` - - - `expression`: `Expression` (required) - - `typeAnnotation`: `TypeAnnotation` (required) - ---- - -### typeParameter -```javascript -t.typeParameter(bound, default, variance) -``` - -See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`. - -Aliases: `Flow` - - - `bound`: `TypeAnnotation` (default: `null`) - - `default`: `FlowType` (default: `null`) - - `variance`: `Variance` (default: `null`) - - `name`: `string` (default: `null`) - ---- - -### typeParameterDeclaration -```javascript -t.typeParameterDeclaration(params) -``` - -See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`. - -Aliases: `Flow` - - - `params`: `Array` (required) - ---- - -### typeParameterInstantiation -```javascript -t.typeParameterInstantiation(params) -``` - -See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`. - -Aliases: `Flow` - - - `params`: `Array` (required) - ---- - -### typeofTypeAnnotation -```javascript -t.typeofTypeAnnotation(argument) -``` - -See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `argument`: `FlowType` (required) - ---- - -### unaryExpression -```javascript -t.unaryExpression(operator, argument, prefix) -``` - -See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`. - -Aliases: `UnaryLike`, `Expression` - - - `operator`: `"void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"` (required) - - `argument`: `Expression` (required) - - `prefix`: `boolean` (default: `true`) - ---- - -### unionTypeAnnotation -```javascript -t.unionTypeAnnotation(types) -``` - -See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType` - - - `types`: `Array` (required) - ---- - -### updateExpression -```javascript -t.updateExpression(operator, argument, prefix) -``` - -See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`. - -Aliases: `Expression` - - - `operator`: `"++" | "--"` (required) - - `argument`: `Expression` (required) - - `prefix`: `boolean` (default: `false`) - ---- - -### variableDeclaration -```javascript -t.variableDeclaration(kind, declarations) -``` - -See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration` - - - `kind`: `"var" | "let" | "const"` (required) - - `declarations`: `Array` (required) - - `declare`: `boolean` (default: `null`) - ---- - -### variableDeclarator -```javascript -t.variableDeclarator(id, init) -``` - -See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`. - - - `id`: `LVal` (required) - - `init`: `Expression` (default: `null`) - - `definite`: `boolean` (default: `null`) - ---- - -### variance -```javascript -t.variance(kind) -``` - -See also `t.isVariance(node, opts)` and `t.assertVariance(node, opts)`. - -Aliases: `Flow` - - - `kind`: `"minus" | "plus"` (required) - ---- - -### voidTypeAnnotation -```javascript -t.voidTypeAnnotation() -``` - -See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowType`, `FlowBaseAnnotation` - - ---- - -### whileStatement -```javascript -t.whileStatement(test, body) -``` - -See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable` - - - `test`: `Expression` (required) - - `body`: `BlockStatement | Statement` (required) - ---- - -### withStatement -```javascript -t.withStatement(object, body) -``` - -See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`. - -Aliases: `Statement` - - - `object`: `Expression` (required) - - `body`: `BlockStatement | Statement` (required) - ---- - -### yieldExpression -```javascript -t.yieldExpression(argument, delegate) -``` - -See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`. - -Aliases: `Expression`, `Terminatorless` - - - `argument`: `Expression` (default: `null`) - - `delegate`: `boolean` (default: `false`) - ---- diff --git a/node_modules/@babel/types/lib/asserts/assertNode.js b/node_modules/@babel/types/lib/asserts/assertNode.js deleted file mode 100644 index 4023d9d..0000000 --- a/node_modules/@babel/types/lib/asserts/assertNode.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = assertNode; - -var _isNode = _interopRequireDefault(require("../validators/isNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function assertNode(node) { - if (!(0, _isNode.default)(node)) { - var type = node && node.type || JSON.stringify(node); - throw new TypeError("Not a valid node of type \"" + type + "\""); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/asserts/generated/index.js b/node_modules/@babel/types/lib/asserts/generated/index.js deleted file mode 100644 index f71028d..0000000 --- a/node_modules/@babel/types/lib/asserts/generated/index.js +++ /dev/null @@ -1,2298 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.assertArrayExpression = assertArrayExpression; -exports.assertAssignmentExpression = assertAssignmentExpression; -exports.assertBinaryExpression = assertBinaryExpression; -exports.assertDirective = assertDirective; -exports.assertDirectiveLiteral = assertDirectiveLiteral; -exports.assertBlockStatement = assertBlockStatement; -exports.assertBreakStatement = assertBreakStatement; -exports.assertCallExpression = assertCallExpression; -exports.assertCatchClause = assertCatchClause; -exports.assertConditionalExpression = assertConditionalExpression; -exports.assertContinueStatement = assertContinueStatement; -exports.assertDebuggerStatement = assertDebuggerStatement; -exports.assertDoWhileStatement = assertDoWhileStatement; -exports.assertEmptyStatement = assertEmptyStatement; -exports.assertExpressionStatement = assertExpressionStatement; -exports.assertFile = assertFile; -exports.assertForInStatement = assertForInStatement; -exports.assertForStatement = assertForStatement; -exports.assertFunctionDeclaration = assertFunctionDeclaration; -exports.assertFunctionExpression = assertFunctionExpression; -exports.assertIdentifier = assertIdentifier; -exports.assertIfStatement = assertIfStatement; -exports.assertLabeledStatement = assertLabeledStatement; -exports.assertStringLiteral = assertStringLiteral; -exports.assertNumericLiteral = assertNumericLiteral; -exports.assertNullLiteral = assertNullLiteral; -exports.assertBooleanLiteral = assertBooleanLiteral; -exports.assertRegExpLiteral = assertRegExpLiteral; -exports.assertLogicalExpression = assertLogicalExpression; -exports.assertMemberExpression = assertMemberExpression; -exports.assertNewExpression = assertNewExpression; -exports.assertProgram = assertProgram; -exports.assertObjectExpression = assertObjectExpression; -exports.assertObjectMethod = assertObjectMethod; -exports.assertObjectProperty = assertObjectProperty; -exports.assertRestElement = assertRestElement; -exports.assertReturnStatement = assertReturnStatement; -exports.assertSequenceExpression = assertSequenceExpression; -exports.assertSwitchCase = assertSwitchCase; -exports.assertSwitchStatement = assertSwitchStatement; -exports.assertThisExpression = assertThisExpression; -exports.assertThrowStatement = assertThrowStatement; -exports.assertTryStatement = assertTryStatement; -exports.assertUnaryExpression = assertUnaryExpression; -exports.assertUpdateExpression = assertUpdateExpression; -exports.assertVariableDeclaration = assertVariableDeclaration; -exports.assertVariableDeclarator = assertVariableDeclarator; -exports.assertWhileStatement = assertWhileStatement; -exports.assertWithStatement = assertWithStatement; -exports.assertAssignmentPattern = assertAssignmentPattern; -exports.assertArrayPattern = assertArrayPattern; -exports.assertArrowFunctionExpression = assertArrowFunctionExpression; -exports.assertClassBody = assertClassBody; -exports.assertClassDeclaration = assertClassDeclaration; -exports.assertClassExpression = assertClassExpression; -exports.assertExportAllDeclaration = assertExportAllDeclaration; -exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration; -exports.assertExportNamedDeclaration = assertExportNamedDeclaration; -exports.assertExportSpecifier = assertExportSpecifier; -exports.assertForOfStatement = assertForOfStatement; -exports.assertImportDeclaration = assertImportDeclaration; -exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier; -exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; -exports.assertImportSpecifier = assertImportSpecifier; -exports.assertMetaProperty = assertMetaProperty; -exports.assertClassMethod = assertClassMethod; -exports.assertObjectPattern = assertObjectPattern; -exports.assertSpreadElement = assertSpreadElement; -exports.assertSuper = assertSuper; -exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression; -exports.assertTemplateElement = assertTemplateElement; -exports.assertTemplateLiteral = assertTemplateLiteral; -exports.assertYieldExpression = assertYieldExpression; -exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation; -exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation; -exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; -exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; -exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; -exports.assertClassImplements = assertClassImplements; -exports.assertDeclareClass = assertDeclareClass; -exports.assertDeclareFunction = assertDeclareFunction; -exports.assertDeclareInterface = assertDeclareInterface; -exports.assertDeclareModule = assertDeclareModule; -exports.assertDeclareModuleExports = assertDeclareModuleExports; -exports.assertDeclareTypeAlias = assertDeclareTypeAlias; -exports.assertDeclareOpaqueType = assertDeclareOpaqueType; -exports.assertDeclareVariable = assertDeclareVariable; -exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration; -exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; -exports.assertDeclaredPredicate = assertDeclaredPredicate; -exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation; -exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; -exports.assertFunctionTypeParam = assertFunctionTypeParam; -exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation; -exports.assertInferredPredicate = assertInferredPredicate; -exports.assertInterfaceExtends = assertInterfaceExtends; -exports.assertInterfaceDeclaration = assertInterfaceDeclaration; -exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; -exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation; -exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; -exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation; -exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; -exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation; -exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation; -exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty; -exports.assertObjectTypeIndexer = assertObjectTypeIndexer; -exports.assertObjectTypeProperty = assertObjectTypeProperty; -exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; -exports.assertOpaqueType = assertOpaqueType; -exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; -exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; -exports.assertStringTypeAnnotation = assertStringTypeAnnotation; -exports.assertThisTypeAnnotation = assertThisTypeAnnotation; -exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation; -exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; -exports.assertTypeAlias = assertTypeAlias; -exports.assertTypeAnnotation = assertTypeAnnotation; -exports.assertTypeCastExpression = assertTypeCastExpression; -exports.assertTypeParameter = assertTypeParameter; -exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration; -exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation; -exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation; -exports.assertVariance = assertVariance; -exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation; -exports.assertJSXAttribute = assertJSXAttribute; -exports.assertJSXClosingElement = assertJSXClosingElement; -exports.assertJSXElement = assertJSXElement; -exports.assertJSXEmptyExpression = assertJSXEmptyExpression; -exports.assertJSXExpressionContainer = assertJSXExpressionContainer; -exports.assertJSXSpreadChild = assertJSXSpreadChild; -exports.assertJSXIdentifier = assertJSXIdentifier; -exports.assertJSXMemberExpression = assertJSXMemberExpression; -exports.assertJSXNamespacedName = assertJSXNamespacedName; -exports.assertJSXOpeningElement = assertJSXOpeningElement; -exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute; -exports.assertJSXText = assertJSXText; -exports.assertJSXFragment = assertJSXFragment; -exports.assertJSXOpeningFragment = assertJSXOpeningFragment; -exports.assertJSXClosingFragment = assertJSXClosingFragment; -exports.assertNoop = assertNoop; -exports.assertParenthesizedExpression = assertParenthesizedExpression; -exports.assertAwaitExpression = assertAwaitExpression; -exports.assertBindExpression = assertBindExpression; -exports.assertClassProperty = assertClassProperty; -exports.assertOptionalMemberExpression = assertOptionalMemberExpression; -exports.assertOptionalCallExpression = assertOptionalCallExpression; -exports.assertClassPrivateProperty = assertClassPrivateProperty; -exports.assertImport = assertImport; -exports.assertDecorator = assertDecorator; -exports.assertDoExpression = assertDoExpression; -exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier; -exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; -exports.assertPrivateName = assertPrivateName; -exports.assertTSParameterProperty = assertTSParameterProperty; -exports.assertTSDeclareFunction = assertTSDeclareFunction; -exports.assertTSDeclareMethod = assertTSDeclareMethod; -exports.assertTSQualifiedName = assertTSQualifiedName; -exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; -exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; -exports.assertTSPropertySignature = assertTSPropertySignature; -exports.assertTSMethodSignature = assertTSMethodSignature; -exports.assertTSIndexSignature = assertTSIndexSignature; -exports.assertTSAnyKeyword = assertTSAnyKeyword; -exports.assertTSNumberKeyword = assertTSNumberKeyword; -exports.assertTSObjectKeyword = assertTSObjectKeyword; -exports.assertTSBooleanKeyword = assertTSBooleanKeyword; -exports.assertTSStringKeyword = assertTSStringKeyword; -exports.assertTSSymbolKeyword = assertTSSymbolKeyword; -exports.assertTSVoidKeyword = assertTSVoidKeyword; -exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword; -exports.assertTSNullKeyword = assertTSNullKeyword; -exports.assertTSNeverKeyword = assertTSNeverKeyword; -exports.assertTSThisType = assertTSThisType; -exports.assertTSFunctionType = assertTSFunctionType; -exports.assertTSConstructorType = assertTSConstructorType; -exports.assertTSTypeReference = assertTSTypeReference; -exports.assertTSTypePredicate = assertTSTypePredicate; -exports.assertTSTypeQuery = assertTSTypeQuery; -exports.assertTSTypeLiteral = assertTSTypeLiteral; -exports.assertTSArrayType = assertTSArrayType; -exports.assertTSTupleType = assertTSTupleType; -exports.assertTSUnionType = assertTSUnionType; -exports.assertTSIntersectionType = assertTSIntersectionType; -exports.assertTSConditionalType = assertTSConditionalType; -exports.assertTSInferType = assertTSInferType; -exports.assertTSParenthesizedType = assertTSParenthesizedType; -exports.assertTSTypeOperator = assertTSTypeOperator; -exports.assertTSIndexedAccessType = assertTSIndexedAccessType; -exports.assertTSMappedType = assertTSMappedType; -exports.assertTSLiteralType = assertTSLiteralType; -exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; -exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; -exports.assertTSInterfaceBody = assertTSInterfaceBody; -exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; -exports.assertTSAsExpression = assertTSAsExpression; -exports.assertTSTypeAssertion = assertTSTypeAssertion; -exports.assertTSEnumDeclaration = assertTSEnumDeclaration; -exports.assertTSEnumMember = assertTSEnumMember; -exports.assertTSModuleDeclaration = assertTSModuleDeclaration; -exports.assertTSModuleBlock = assertTSModuleBlock; -exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; -exports.assertTSExternalModuleReference = assertTSExternalModuleReference; -exports.assertTSNonNullExpression = assertTSNonNullExpression; -exports.assertTSExportAssignment = assertTSExportAssignment; -exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; -exports.assertTSTypeAnnotation = assertTSTypeAnnotation; -exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; -exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; -exports.assertTSTypeParameter = assertTSTypeParameter; -exports.assertExpression = assertExpression; -exports.assertBinary = assertBinary; -exports.assertScopable = assertScopable; -exports.assertBlockParent = assertBlockParent; -exports.assertBlock = assertBlock; -exports.assertStatement = assertStatement; -exports.assertTerminatorless = assertTerminatorless; -exports.assertCompletionStatement = assertCompletionStatement; -exports.assertConditional = assertConditional; -exports.assertLoop = assertLoop; -exports.assertWhile = assertWhile; -exports.assertExpressionWrapper = assertExpressionWrapper; -exports.assertFor = assertFor; -exports.assertForXStatement = assertForXStatement; -exports.assertFunction = assertFunction; -exports.assertFunctionParent = assertFunctionParent; -exports.assertPureish = assertPureish; -exports.assertDeclaration = assertDeclaration; -exports.assertPatternLike = assertPatternLike; -exports.assertLVal = assertLVal; -exports.assertTSEntityName = assertTSEntityName; -exports.assertLiteral = assertLiteral; -exports.assertImmutable = assertImmutable; -exports.assertUserWhitespacable = assertUserWhitespacable; -exports.assertMethod = assertMethod; -exports.assertObjectMember = assertObjectMember; -exports.assertProperty = assertProperty; -exports.assertUnaryLike = assertUnaryLike; -exports.assertPattern = assertPattern; -exports.assertClass = assertClass; -exports.assertModuleDeclaration = assertModuleDeclaration; -exports.assertExportDeclaration = assertExportDeclaration; -exports.assertModuleSpecifier = assertModuleSpecifier; -exports.assertFlow = assertFlow; -exports.assertFlowType = assertFlowType; -exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation; -exports.assertFlowDeclaration = assertFlowDeclaration; -exports.assertFlowPredicate = assertFlowPredicate; -exports.assertJSX = assertJSX; -exports.assertPrivate = assertPrivate; -exports.assertTSTypeElement = assertTSTypeElement; -exports.assertTSType = assertTSType; -exports.assertNumberLiteral = assertNumberLiteral; -exports.assertRegexLiteral = assertRegexLiteral; -exports.assertRestProperty = assertRestProperty; -exports.assertSpreadProperty = assertSpreadProperty; - -var _is = _interopRequireDefault(require("../../validators/is")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function assert(type, node, opts) { - if (!(0, _is.default)(type, node, opts)) { - throw new Error("Expected type \"" + type + "\" with option " + JSON.stringify(opts) + ", but instead got \"" + node.type + "\"."); - } -} - -function assertArrayExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ArrayExpression", node, opts); -} - -function assertAssignmentExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("AssignmentExpression", node, opts); -} - -function assertBinaryExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("BinaryExpression", node, opts); -} - -function assertDirective(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Directive", node, opts); -} - -function assertDirectiveLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DirectiveLiteral", node, opts); -} - -function assertBlockStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("BlockStatement", node, opts); -} - -function assertBreakStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("BreakStatement", node, opts); -} - -function assertCallExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("CallExpression", node, opts); -} - -function assertCatchClause(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("CatchClause", node, opts); -} - -function assertConditionalExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ConditionalExpression", node, opts); -} - -function assertContinueStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ContinueStatement", node, opts); -} - -function assertDebuggerStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DebuggerStatement", node, opts); -} - -function assertDoWhileStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DoWhileStatement", node, opts); -} - -function assertEmptyStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("EmptyStatement", node, opts); -} - -function assertExpressionStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExpressionStatement", node, opts); -} - -function assertFile(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("File", node, opts); -} - -function assertForInStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ForInStatement", node, opts); -} - -function assertForStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ForStatement", node, opts); -} - -function assertFunctionDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FunctionDeclaration", node, opts); -} - -function assertFunctionExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FunctionExpression", node, opts); -} - -function assertIdentifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Identifier", node, opts); -} - -function assertIfStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("IfStatement", node, opts); -} - -function assertLabeledStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("LabeledStatement", node, opts); -} - -function assertStringLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("StringLiteral", node, opts); -} - -function assertNumericLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("NumericLiteral", node, opts); -} - -function assertNullLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("NullLiteral", node, opts); -} - -function assertBooleanLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("BooleanLiteral", node, opts); -} - -function assertRegExpLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("RegExpLiteral", node, opts); -} - -function assertLogicalExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("LogicalExpression", node, opts); -} - -function assertMemberExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("MemberExpression", node, opts); -} - -function assertNewExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("NewExpression", node, opts); -} - -function assertProgram(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Program", node, opts); -} - -function assertObjectExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectExpression", node, opts); -} - -function assertObjectMethod(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectMethod", node, opts); -} - -function assertObjectProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectProperty", node, opts); -} - -function assertRestElement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("RestElement", node, opts); -} - -function assertReturnStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ReturnStatement", node, opts); -} - -function assertSequenceExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("SequenceExpression", node, opts); -} - -function assertSwitchCase(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("SwitchCase", node, opts); -} - -function assertSwitchStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("SwitchStatement", node, opts); -} - -function assertThisExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ThisExpression", node, opts); -} - -function assertThrowStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ThrowStatement", node, opts); -} - -function assertTryStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TryStatement", node, opts); -} - -function assertUnaryExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("UnaryExpression", node, opts); -} - -function assertUpdateExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("UpdateExpression", node, opts); -} - -function assertVariableDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("VariableDeclaration", node, opts); -} - -function assertVariableDeclarator(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("VariableDeclarator", node, opts); -} - -function assertWhileStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("WhileStatement", node, opts); -} - -function assertWithStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("WithStatement", node, opts); -} - -function assertAssignmentPattern(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("AssignmentPattern", node, opts); -} - -function assertArrayPattern(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ArrayPattern", node, opts); -} - -function assertArrowFunctionExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ArrowFunctionExpression", node, opts); -} - -function assertClassBody(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ClassBody", node, opts); -} - -function assertClassDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ClassDeclaration", node, opts); -} - -function assertClassExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ClassExpression", node, opts); -} - -function assertExportAllDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExportAllDeclaration", node, opts); -} - -function assertExportDefaultDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExportDefaultDeclaration", node, opts); -} - -function assertExportNamedDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExportNamedDeclaration", node, opts); -} - -function assertExportSpecifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExportSpecifier", node, opts); -} - -function assertForOfStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ForOfStatement", node, opts); -} - -function assertImportDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ImportDeclaration", node, opts); -} - -function assertImportDefaultSpecifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ImportDefaultSpecifier", node, opts); -} - -function assertImportNamespaceSpecifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ImportNamespaceSpecifier", node, opts); -} - -function assertImportSpecifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ImportSpecifier", node, opts); -} - -function assertMetaProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("MetaProperty", node, opts); -} - -function assertClassMethod(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ClassMethod", node, opts); -} - -function assertObjectPattern(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectPattern", node, opts); -} - -function assertSpreadElement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("SpreadElement", node, opts); -} - -function assertSuper(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Super", node, opts); -} - -function assertTaggedTemplateExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TaggedTemplateExpression", node, opts); -} - -function assertTemplateElement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TemplateElement", node, opts); -} - -function assertTemplateLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TemplateLiteral", node, opts); -} - -function assertYieldExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("YieldExpression", node, opts); -} - -function assertAnyTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("AnyTypeAnnotation", node, opts); -} - -function assertArrayTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ArrayTypeAnnotation", node, opts); -} - -function assertBooleanTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("BooleanTypeAnnotation", node, opts); -} - -function assertBooleanLiteralTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("BooleanLiteralTypeAnnotation", node, opts); -} - -function assertNullLiteralTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("NullLiteralTypeAnnotation", node, opts); -} - -function assertClassImplements(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ClassImplements", node, opts); -} - -function assertDeclareClass(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareClass", node, opts); -} - -function assertDeclareFunction(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareFunction", node, opts); -} - -function assertDeclareInterface(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareInterface", node, opts); -} - -function assertDeclareModule(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareModule", node, opts); -} - -function assertDeclareModuleExports(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareModuleExports", node, opts); -} - -function assertDeclareTypeAlias(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareTypeAlias", node, opts); -} - -function assertDeclareOpaqueType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareOpaqueType", node, opts); -} - -function assertDeclareVariable(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareVariable", node, opts); -} - -function assertDeclareExportDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareExportDeclaration", node, opts); -} - -function assertDeclareExportAllDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclareExportAllDeclaration", node, opts); -} - -function assertDeclaredPredicate(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DeclaredPredicate", node, opts); -} - -function assertExistsTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExistsTypeAnnotation", node, opts); -} - -function assertFunctionTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FunctionTypeAnnotation", node, opts); -} - -function assertFunctionTypeParam(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FunctionTypeParam", node, opts); -} - -function assertGenericTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("GenericTypeAnnotation", node, opts); -} - -function assertInferredPredicate(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("InferredPredicate", node, opts); -} - -function assertInterfaceExtends(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("InterfaceExtends", node, opts); -} - -function assertInterfaceDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("InterfaceDeclaration", node, opts); -} - -function assertIntersectionTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("IntersectionTypeAnnotation", node, opts); -} - -function assertMixedTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("MixedTypeAnnotation", node, opts); -} - -function assertEmptyTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("EmptyTypeAnnotation", node, opts); -} - -function assertNullableTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("NullableTypeAnnotation", node, opts); -} - -function assertNumberLiteralTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("NumberLiteralTypeAnnotation", node, opts); -} - -function assertNumberTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("NumberTypeAnnotation", node, opts); -} - -function assertObjectTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectTypeAnnotation", node, opts); -} - -function assertObjectTypeCallProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectTypeCallProperty", node, opts); -} - -function assertObjectTypeIndexer(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectTypeIndexer", node, opts); -} - -function assertObjectTypeProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectTypeProperty", node, opts); -} - -function assertObjectTypeSpreadProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectTypeSpreadProperty", node, opts); -} - -function assertOpaqueType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("OpaqueType", node, opts); -} - -function assertQualifiedTypeIdentifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("QualifiedTypeIdentifier", node, opts); -} - -function assertStringLiteralTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("StringLiteralTypeAnnotation", node, opts); -} - -function assertStringTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("StringTypeAnnotation", node, opts); -} - -function assertThisTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ThisTypeAnnotation", node, opts); -} - -function assertTupleTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TupleTypeAnnotation", node, opts); -} - -function assertTypeofTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TypeofTypeAnnotation", node, opts); -} - -function assertTypeAlias(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TypeAlias", node, opts); -} - -function assertTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TypeAnnotation", node, opts); -} - -function assertTypeCastExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TypeCastExpression", node, opts); -} - -function assertTypeParameter(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TypeParameter", node, opts); -} - -function assertTypeParameterDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TypeParameterDeclaration", node, opts); -} - -function assertTypeParameterInstantiation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TypeParameterInstantiation", node, opts); -} - -function assertUnionTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("UnionTypeAnnotation", node, opts); -} - -function assertVariance(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Variance", node, opts); -} - -function assertVoidTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("VoidTypeAnnotation", node, opts); -} - -function assertJSXAttribute(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXAttribute", node, opts); -} - -function assertJSXClosingElement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXClosingElement", node, opts); -} - -function assertJSXElement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXElement", node, opts); -} - -function assertJSXEmptyExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXEmptyExpression", node, opts); -} - -function assertJSXExpressionContainer(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXExpressionContainer", node, opts); -} - -function assertJSXSpreadChild(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXSpreadChild", node, opts); -} - -function assertJSXIdentifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXIdentifier", node, opts); -} - -function assertJSXMemberExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXMemberExpression", node, opts); -} - -function assertJSXNamespacedName(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXNamespacedName", node, opts); -} - -function assertJSXOpeningElement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXOpeningElement", node, opts); -} - -function assertJSXSpreadAttribute(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXSpreadAttribute", node, opts); -} - -function assertJSXText(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXText", node, opts); -} - -function assertJSXFragment(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXFragment", node, opts); -} - -function assertJSXOpeningFragment(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXOpeningFragment", node, opts); -} - -function assertJSXClosingFragment(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSXClosingFragment", node, opts); -} - -function assertNoop(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Noop", node, opts); -} - -function assertParenthesizedExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ParenthesizedExpression", node, opts); -} - -function assertAwaitExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("AwaitExpression", node, opts); -} - -function assertBindExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("BindExpression", node, opts); -} - -function assertClassProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ClassProperty", node, opts); -} - -function assertOptionalMemberExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("OptionalMemberExpression", node, opts); -} - -function assertOptionalCallExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("OptionalCallExpression", node, opts); -} - -function assertClassPrivateProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ClassPrivateProperty", node, opts); -} - -function assertImport(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Import", node, opts); -} - -function assertDecorator(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Decorator", node, opts); -} - -function assertDoExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("DoExpression", node, opts); -} - -function assertExportDefaultSpecifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExportDefaultSpecifier", node, opts); -} - -function assertExportNamespaceSpecifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExportNamespaceSpecifier", node, opts); -} - -function assertPrivateName(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("PrivateName", node, opts); -} - -function assertTSParameterProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSParameterProperty", node, opts); -} - -function assertTSDeclareFunction(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSDeclareFunction", node, opts); -} - -function assertTSDeclareMethod(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSDeclareMethod", node, opts); -} - -function assertTSQualifiedName(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSQualifiedName", node, opts); -} - -function assertTSCallSignatureDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSCallSignatureDeclaration", node, opts); -} - -function assertTSConstructSignatureDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSConstructSignatureDeclaration", node, opts); -} - -function assertTSPropertySignature(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSPropertySignature", node, opts); -} - -function assertTSMethodSignature(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSMethodSignature", node, opts); -} - -function assertTSIndexSignature(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSIndexSignature", node, opts); -} - -function assertTSAnyKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSAnyKeyword", node, opts); -} - -function assertTSNumberKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSNumberKeyword", node, opts); -} - -function assertTSObjectKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSObjectKeyword", node, opts); -} - -function assertTSBooleanKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSBooleanKeyword", node, opts); -} - -function assertTSStringKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSStringKeyword", node, opts); -} - -function assertTSSymbolKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSSymbolKeyword", node, opts); -} - -function assertTSVoidKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSVoidKeyword", node, opts); -} - -function assertTSUndefinedKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSUndefinedKeyword", node, opts); -} - -function assertTSNullKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSNullKeyword", node, opts); -} - -function assertTSNeverKeyword(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSNeverKeyword", node, opts); -} - -function assertTSThisType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSThisType", node, opts); -} - -function assertTSFunctionType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSFunctionType", node, opts); -} - -function assertTSConstructorType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSConstructorType", node, opts); -} - -function assertTSTypeReference(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeReference", node, opts); -} - -function assertTSTypePredicate(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypePredicate", node, opts); -} - -function assertTSTypeQuery(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeQuery", node, opts); -} - -function assertTSTypeLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeLiteral", node, opts); -} - -function assertTSArrayType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSArrayType", node, opts); -} - -function assertTSTupleType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTupleType", node, opts); -} - -function assertTSUnionType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSUnionType", node, opts); -} - -function assertTSIntersectionType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSIntersectionType", node, opts); -} - -function assertTSConditionalType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSConditionalType", node, opts); -} - -function assertTSInferType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSInferType", node, opts); -} - -function assertTSParenthesizedType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSParenthesizedType", node, opts); -} - -function assertTSTypeOperator(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeOperator", node, opts); -} - -function assertTSIndexedAccessType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSIndexedAccessType", node, opts); -} - -function assertTSMappedType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSMappedType", node, opts); -} - -function assertTSLiteralType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSLiteralType", node, opts); -} - -function assertTSExpressionWithTypeArguments(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSExpressionWithTypeArguments", node, opts); -} - -function assertTSInterfaceDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSInterfaceDeclaration", node, opts); -} - -function assertTSInterfaceBody(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSInterfaceBody", node, opts); -} - -function assertTSTypeAliasDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeAliasDeclaration", node, opts); -} - -function assertTSAsExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSAsExpression", node, opts); -} - -function assertTSTypeAssertion(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeAssertion", node, opts); -} - -function assertTSEnumDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSEnumDeclaration", node, opts); -} - -function assertTSEnumMember(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSEnumMember", node, opts); -} - -function assertTSModuleDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSModuleDeclaration", node, opts); -} - -function assertTSModuleBlock(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSModuleBlock", node, opts); -} - -function assertTSImportEqualsDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSImportEqualsDeclaration", node, opts); -} - -function assertTSExternalModuleReference(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSExternalModuleReference", node, opts); -} - -function assertTSNonNullExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSNonNullExpression", node, opts); -} - -function assertTSExportAssignment(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSExportAssignment", node, opts); -} - -function assertTSNamespaceExportDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSNamespaceExportDeclaration", node, opts); -} - -function assertTSTypeAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeAnnotation", node, opts); -} - -function assertTSTypeParameterInstantiation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeParameterInstantiation", node, opts); -} - -function assertTSTypeParameterDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeParameterDeclaration", node, opts); -} - -function assertTSTypeParameter(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeParameter", node, opts); -} - -function assertExpression(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Expression", node, opts); -} - -function assertBinary(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Binary", node, opts); -} - -function assertScopable(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Scopable", node, opts); -} - -function assertBlockParent(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("BlockParent", node, opts); -} - -function assertBlock(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Block", node, opts); -} - -function assertStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Statement", node, opts); -} - -function assertTerminatorless(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Terminatorless", node, opts); -} - -function assertCompletionStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("CompletionStatement", node, opts); -} - -function assertConditional(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Conditional", node, opts); -} - -function assertLoop(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Loop", node, opts); -} - -function assertWhile(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("While", node, opts); -} - -function assertExpressionWrapper(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExpressionWrapper", node, opts); -} - -function assertFor(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("For", node, opts); -} - -function assertForXStatement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ForXStatement", node, opts); -} - -function assertFunction(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Function", node, opts); -} - -function assertFunctionParent(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FunctionParent", node, opts); -} - -function assertPureish(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Pureish", node, opts); -} - -function assertDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Declaration", node, opts); -} - -function assertPatternLike(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("PatternLike", node, opts); -} - -function assertLVal(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("LVal", node, opts); -} - -function assertTSEntityName(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSEntityName", node, opts); -} - -function assertLiteral(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Literal", node, opts); -} - -function assertImmutable(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Immutable", node, opts); -} - -function assertUserWhitespacable(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("UserWhitespacable", node, opts); -} - -function assertMethod(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Method", node, opts); -} - -function assertObjectMember(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ObjectMember", node, opts); -} - -function assertProperty(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Property", node, opts); -} - -function assertUnaryLike(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("UnaryLike", node, opts); -} - -function assertPattern(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Pattern", node, opts); -} - -function assertClass(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Class", node, opts); -} - -function assertModuleDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ModuleDeclaration", node, opts); -} - -function assertExportDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ExportDeclaration", node, opts); -} - -function assertModuleSpecifier(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("ModuleSpecifier", node, opts); -} - -function assertFlow(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Flow", node, opts); -} - -function assertFlowType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FlowType", node, opts); -} - -function assertFlowBaseAnnotation(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FlowBaseAnnotation", node, opts); -} - -function assertFlowDeclaration(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FlowDeclaration", node, opts); -} - -function assertFlowPredicate(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("FlowPredicate", node, opts); -} - -function assertJSX(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("JSX", node, opts); -} - -function assertPrivate(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("Private", node, opts); -} - -function assertTSTypeElement(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSTypeElement", node, opts); -} - -function assertTSType(node, opts) { - if (opts === void 0) { - opts = {}; - } - - assert("TSType", node, opts); -} - -function assertNumberLiteral(node, opts) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - assert("NumberLiteral", node, opts); -} - -function assertRegexLiteral(node, opts) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - assert("RegexLiteral", node, opts); -} - -function assertRestProperty(node, opts) { - console.trace("The node type RestProperty has been renamed to RestElement"); - assert("RestProperty", node, opts); -} - -function assertSpreadProperty(node, opts) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - assert("SpreadProperty", node, opts); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/builder.js b/node_modules/@babel/types/lib/builders/builder.js deleted file mode 100644 index 95bcefa..0000000 --- a/node_modules/@babel/types/lib/builders/builder.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = builder; - -function _clone() { - var data = _interopRequireDefault(require("lodash/clone")); - - _clone = function _clone() { - return data; - }; - - return data; -} - -var _definitions = require("../definitions"); - -var _validate = _interopRequireDefault(require("../validators/validate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function builder(type) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var keys = _definitions.BUILDER_KEYS[type]; - var countArgs = args.length; - - if (countArgs > keys.length) { - throw new Error(type + ": Too many arguments passed. Received " + countArgs + " but can receive no more than " + keys.length); - } - - var node = { - type: type - }; - var i = 0; - keys.forEach(function (key) { - var field = _definitions.NODE_FIELDS[type][key]; - var arg; - if (i < countArgs) arg = args[i]; - if (arg === undefined) arg = (0, _clone().default)(field.default); - node[key] = arg; - i++; - }); - - for (var key in node) { - (0, _validate.default)(node, key, node[key]); - } - - return node; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/generated/index.js b/node_modules/@babel/types/lib/builders/generated/index.js deleted file mode 100644 index 2f8dc29..0000000 --- a/node_modules/@babel/types/lib/builders/generated/index.js +++ /dev/null @@ -1,1934 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.arrayExpression = exports.ArrayExpression = ArrayExpression; -exports.assignmentExpression = exports.AssignmentExpression = AssignmentExpression; -exports.binaryExpression = exports.BinaryExpression = BinaryExpression; -exports.directive = exports.Directive = Directive; -exports.directiveLiteral = exports.DirectiveLiteral = DirectiveLiteral; -exports.blockStatement = exports.BlockStatement = BlockStatement; -exports.breakStatement = exports.BreakStatement = BreakStatement; -exports.callExpression = exports.CallExpression = CallExpression; -exports.catchClause = exports.CatchClause = CatchClause; -exports.conditionalExpression = exports.ConditionalExpression = ConditionalExpression; -exports.continueStatement = exports.ContinueStatement = ContinueStatement; -exports.debuggerStatement = exports.DebuggerStatement = DebuggerStatement; -exports.doWhileStatement = exports.DoWhileStatement = DoWhileStatement; -exports.emptyStatement = exports.EmptyStatement = EmptyStatement; -exports.expressionStatement = exports.ExpressionStatement = ExpressionStatement; -exports.file = exports.File = File; -exports.forInStatement = exports.ForInStatement = ForInStatement; -exports.forStatement = exports.ForStatement = ForStatement; -exports.functionDeclaration = exports.FunctionDeclaration = FunctionDeclaration; -exports.functionExpression = exports.FunctionExpression = FunctionExpression; -exports.identifier = exports.Identifier = Identifier; -exports.ifStatement = exports.IfStatement = IfStatement; -exports.labeledStatement = exports.LabeledStatement = LabeledStatement; -exports.stringLiteral = exports.StringLiteral = StringLiteral; -exports.numericLiteral = exports.NumericLiteral = NumericLiteral; -exports.nullLiteral = exports.NullLiteral = NullLiteral; -exports.booleanLiteral = exports.BooleanLiteral = BooleanLiteral; -exports.regExpLiteral = exports.RegExpLiteral = RegExpLiteral; -exports.logicalExpression = exports.LogicalExpression = LogicalExpression; -exports.memberExpression = exports.MemberExpression = MemberExpression; -exports.newExpression = exports.NewExpression = NewExpression; -exports.program = exports.Program = Program; -exports.objectExpression = exports.ObjectExpression = ObjectExpression; -exports.objectMethod = exports.ObjectMethod = ObjectMethod; -exports.objectProperty = exports.ObjectProperty = ObjectProperty; -exports.restElement = exports.RestElement = RestElement; -exports.returnStatement = exports.ReturnStatement = ReturnStatement; -exports.sequenceExpression = exports.SequenceExpression = SequenceExpression; -exports.switchCase = exports.SwitchCase = SwitchCase; -exports.switchStatement = exports.SwitchStatement = SwitchStatement; -exports.thisExpression = exports.ThisExpression = ThisExpression; -exports.throwStatement = exports.ThrowStatement = ThrowStatement; -exports.tryStatement = exports.TryStatement = TryStatement; -exports.unaryExpression = exports.UnaryExpression = UnaryExpression; -exports.updateExpression = exports.UpdateExpression = UpdateExpression; -exports.variableDeclaration = exports.VariableDeclaration = VariableDeclaration; -exports.variableDeclarator = exports.VariableDeclarator = VariableDeclarator; -exports.whileStatement = exports.WhileStatement = WhileStatement; -exports.withStatement = exports.WithStatement = WithStatement; -exports.assignmentPattern = exports.AssignmentPattern = AssignmentPattern; -exports.arrayPattern = exports.ArrayPattern = ArrayPattern; -exports.arrowFunctionExpression = exports.ArrowFunctionExpression = ArrowFunctionExpression; -exports.classBody = exports.ClassBody = ClassBody; -exports.classDeclaration = exports.ClassDeclaration = ClassDeclaration; -exports.classExpression = exports.ClassExpression = ClassExpression; -exports.exportAllDeclaration = exports.ExportAllDeclaration = ExportAllDeclaration; -exports.exportDefaultDeclaration = exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.exportNamedDeclaration = exports.ExportNamedDeclaration = ExportNamedDeclaration; -exports.exportSpecifier = exports.ExportSpecifier = ExportSpecifier; -exports.forOfStatement = exports.ForOfStatement = ForOfStatement; -exports.importDeclaration = exports.ImportDeclaration = ImportDeclaration; -exports.importDefaultSpecifier = exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.importNamespaceSpecifier = exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; -exports.importSpecifier = exports.ImportSpecifier = ImportSpecifier; -exports.metaProperty = exports.MetaProperty = MetaProperty; -exports.classMethod = exports.ClassMethod = ClassMethod; -exports.objectPattern = exports.ObjectPattern = ObjectPattern; -exports.spreadElement = exports.SpreadElement = SpreadElement; -exports.super = exports.Super = Super; -exports.taggedTemplateExpression = exports.TaggedTemplateExpression = TaggedTemplateExpression; -exports.templateElement = exports.TemplateElement = TemplateElement; -exports.templateLiteral = exports.TemplateLiteral = TemplateLiteral; -exports.yieldExpression = exports.YieldExpression = YieldExpression; -exports.anyTypeAnnotation = exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.arrayTypeAnnotation = exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.booleanTypeAnnotation = exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.booleanLiteralTypeAnnotation = exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.nullLiteralTypeAnnotation = exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.classImplements = exports.ClassImplements = ClassImplements; -exports.declareClass = exports.DeclareClass = DeclareClass; -exports.declareFunction = exports.DeclareFunction = DeclareFunction; -exports.declareInterface = exports.DeclareInterface = DeclareInterface; -exports.declareModule = exports.DeclareModule = DeclareModule; -exports.declareModuleExports = exports.DeclareModuleExports = DeclareModuleExports; -exports.declareTypeAlias = exports.DeclareTypeAlias = DeclareTypeAlias; -exports.declareOpaqueType = exports.DeclareOpaqueType = DeclareOpaqueType; -exports.declareVariable = exports.DeclareVariable = DeclareVariable; -exports.declareExportDeclaration = exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.declareExportAllDeclaration = exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.declaredPredicate = exports.DeclaredPredicate = DeclaredPredicate; -exports.existsTypeAnnotation = exports.ExistsTypeAnnotation = ExistsTypeAnnotation; -exports.functionTypeAnnotation = exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.functionTypeParam = exports.FunctionTypeParam = FunctionTypeParam; -exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnotation; -exports.inferredPredicate = exports.InferredPredicate = InferredPredicate; -exports.interfaceExtends = exports.InterfaceExtends = InterfaceExtends; -exports.interfaceDeclaration = exports.InterfaceDeclaration = InterfaceDeclaration; -exports.intersectionTypeAnnotation = exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.mixedTypeAnnotation = exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.emptyTypeAnnotation = exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.numberLiteralTypeAnnotation = exports.NumberLiteralTypeAnnotation = NumberLiteralTypeAnnotation; -exports.numberTypeAnnotation = exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.objectTypeAnnotation = exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.objectTypeCallProperty = exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.objectTypeIndexer = exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.objectTypeProperty = exports.ObjectTypeProperty = ObjectTypeProperty; -exports.objectTypeSpreadProperty = exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.opaqueType = exports.OpaqueType = OpaqueType; -exports.qualifiedTypeIdentifier = exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.stringLiteralTypeAnnotation = exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation; -exports.stringTypeAnnotation = exports.StringTypeAnnotation = StringTypeAnnotation; -exports.thisTypeAnnotation = exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.tupleTypeAnnotation = exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.typeofTypeAnnotation = exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.typeAlias = exports.TypeAlias = TypeAlias; -exports.typeAnnotation = exports.TypeAnnotation = TypeAnnotation; -exports.typeCastExpression = exports.TypeCastExpression = TypeCastExpression; -exports.typeParameter = exports.TypeParameter = TypeParameter; -exports.typeParameterDeclaration = exports.TypeParameterDeclaration = TypeParameterDeclaration; -exports.typeParameterInstantiation = exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.unionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.variance = exports.Variance = Variance; -exports.voidTypeAnnotation = exports.VoidTypeAnnotation = VoidTypeAnnotation; -exports.jSXAttribute = exports.jsxAttribute = exports.JSXAttribute = JSXAttribute; -exports.jSXClosingElement = exports.jsxClosingElement = exports.JSXClosingElement = JSXClosingElement; -exports.jSXElement = exports.jsxElement = exports.JSXElement = JSXElement; -exports.jSXEmptyExpression = exports.jsxEmptyExpression = exports.JSXEmptyExpression = JSXEmptyExpression; -exports.jSXExpressionContainer = exports.jsxExpressionContainer = exports.JSXExpressionContainer = JSXExpressionContainer; -exports.jSXSpreadChild = exports.jsxSpreadChild = exports.JSXSpreadChild = JSXSpreadChild; -exports.jSXIdentifier = exports.jsxIdentifier = exports.JSXIdentifier = JSXIdentifier; -exports.jSXMemberExpression = exports.jsxMemberExpression = exports.JSXMemberExpression = JSXMemberExpression; -exports.jSXNamespacedName = exports.jsxNamespacedName = exports.JSXNamespacedName = JSXNamespacedName; -exports.jSXOpeningElement = exports.jsxOpeningElement = exports.JSXOpeningElement = JSXOpeningElement; -exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = exports.JSXSpreadAttribute = JSXSpreadAttribute; -exports.jSXText = exports.jsxText = exports.JSXText = JSXText; -exports.jSXFragment = exports.jsxFragment = exports.JSXFragment = JSXFragment; -exports.jSXOpeningFragment = exports.jsxOpeningFragment = exports.JSXOpeningFragment = JSXOpeningFragment; -exports.jSXClosingFragment = exports.jsxClosingFragment = exports.JSXClosingFragment = JSXClosingFragment; -exports.noop = exports.Noop = Noop; -exports.parenthesizedExpression = exports.ParenthesizedExpression = ParenthesizedExpression; -exports.awaitExpression = exports.AwaitExpression = AwaitExpression; -exports.bindExpression = exports.BindExpression = BindExpression; -exports.classProperty = exports.ClassProperty = ClassProperty; -exports.optionalMemberExpression = exports.OptionalMemberExpression = OptionalMemberExpression; -exports.optionalCallExpression = exports.OptionalCallExpression = OptionalCallExpression; -exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty; -exports.import = exports.Import = Import; -exports.decorator = exports.Decorator = Decorator; -exports.doExpression = exports.DoExpression = DoExpression; -exports.exportDefaultSpecifier = exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.exportNamespaceSpecifier = exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; -exports.privateName = exports.PrivateName = PrivateName; -exports.tSParameterProperty = exports.tsParameterProperty = exports.TSParameterProperty = TSParameterProperty; -exports.tSDeclareFunction = exports.tsDeclareFunction = exports.TSDeclareFunction = TSDeclareFunction; -exports.tSDeclareMethod = exports.tsDeclareMethod = exports.TSDeclareMethod = TSDeclareMethod; -exports.tSQualifiedName = exports.tsQualifiedName = exports.TSQualifiedName = TSQualifiedName; -exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; -exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySignature = TSPropertySignature; -exports.tSMethodSignature = exports.tsMethodSignature = exports.TSMethodSignature = TSMethodSignature; -exports.tSIndexSignature = exports.tsIndexSignature = exports.TSIndexSignature = TSIndexSignature; -exports.tSAnyKeyword = exports.tsAnyKeyword = exports.TSAnyKeyword = TSAnyKeyword; -exports.tSNumberKeyword = exports.tsNumberKeyword = exports.TSNumberKeyword = TSNumberKeyword; -exports.tSObjectKeyword = exports.tsObjectKeyword = exports.TSObjectKeyword = TSObjectKeyword; -exports.tSBooleanKeyword = exports.tsBooleanKeyword = exports.TSBooleanKeyword = TSBooleanKeyword; -exports.tSStringKeyword = exports.tsStringKeyword = exports.TSStringKeyword = TSStringKeyword; -exports.tSSymbolKeyword = exports.tsSymbolKeyword = exports.TSSymbolKeyword = TSSymbolKeyword; -exports.tSVoidKeyword = exports.tsVoidKeyword = exports.TSVoidKeyword = TSVoidKeyword; -exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.tSNullKeyword = exports.tsNullKeyword = exports.TSNullKeyword = TSNullKeyword; -exports.tSNeverKeyword = exports.tsNeverKeyword = exports.TSNeverKeyword = TSNeverKeyword; -exports.tSThisType = exports.tsThisType = exports.TSThisType = TSThisType; -exports.tSFunctionType = exports.tsFunctionType = exports.TSFunctionType = TSFunctionType; -exports.tSConstructorType = exports.tsConstructorType = exports.TSConstructorType = TSConstructorType; -exports.tSTypeReference = exports.tsTypeReference = exports.TSTypeReference = TSTypeReference; -exports.tSTypePredicate = exports.tsTypePredicate = exports.TSTypePredicate = TSTypePredicate; -exports.tSTypeQuery = exports.tsTypeQuery = exports.TSTypeQuery = TSTypeQuery; -exports.tSTypeLiteral = exports.tsTypeLiteral = exports.TSTypeLiteral = TSTypeLiteral; -exports.tSArrayType = exports.tsArrayType = exports.TSArrayType = TSArrayType; -exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType; -exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType; -exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType; -exports.tSConditionalType = exports.tsConditionalType = exports.TSConditionalType = TSConditionalType; -exports.tSInferType = exports.tsInferType = exports.TSInferType = TSInferType; -exports.tSParenthesizedType = exports.tsParenthesizedType = exports.TSParenthesizedType = TSParenthesizedType; -exports.tSTypeOperator = exports.tsTypeOperator = exports.TSTypeOperator = TSTypeOperator; -exports.tSIndexedAccessType = exports.tsIndexedAccessType = exports.TSIndexedAccessType = TSIndexedAccessType; -exports.tSMappedType = exports.tsMappedType = exports.TSMappedType = TSMappedType; -exports.tSLiteralType = exports.tsLiteralType = exports.TSLiteralType = TSLiteralType; -exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; -exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = exports.TSInterfaceDeclaration = TSInterfaceDeclaration; -exports.tSInterfaceBody = exports.tsInterfaceBody = exports.TSInterfaceBody = TSInterfaceBody; -exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; -exports.tSAsExpression = exports.tsAsExpression = exports.TSAsExpression = TSAsExpression; -exports.tSTypeAssertion = exports.tsTypeAssertion = exports.TSTypeAssertion = TSTypeAssertion; -exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaration = TSEnumDeclaration; -exports.tSEnumMember = exports.tsEnumMember = exports.TSEnumMember = TSEnumMember; -exports.tSModuleDeclaration = exports.tsModuleDeclaration = exports.TSModuleDeclaration = TSModuleDeclaration; -exports.tSModuleBlock = exports.tsModuleBlock = exports.TSModuleBlock = TSModuleBlock; -exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; -exports.tSExternalModuleReference = exports.tsExternalModuleReference = exports.TSExternalModuleReference = TSExternalModuleReference; -exports.tSNonNullExpression = exports.tsNonNullExpression = exports.TSNonNullExpression = TSNonNullExpression; -exports.tSExportAssignment = exports.tsExportAssignment = exports.TSExportAssignment = TSExportAssignment; -exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; -exports.tSTypeAnnotation = exports.tsTypeAnnotation = exports.TSTypeAnnotation = TSTypeAnnotation; -exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; -exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = exports.TSTypeParameterDeclaration = TSTypeParameterDeclaration; -exports.tSTypeParameter = exports.tsTypeParameter = exports.TSTypeParameter = TSTypeParameter; -exports.numberLiteral = exports.NumberLiteral = NumberLiteral; -exports.regexLiteral = exports.RegexLiteral = RegexLiteral; -exports.restProperty = exports.RestProperty = RestProperty; -exports.spreadProperty = exports.SpreadProperty = SpreadProperty; - -var _builder = _interopRequireDefault(require("../builder")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function ArrayExpression() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _builder.default.apply(void 0, ["ArrayExpression"].concat(args)); -} - -function AssignmentExpression() { - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - return _builder.default.apply(void 0, ["AssignmentExpression"].concat(args)); -} - -function BinaryExpression() { - for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - return _builder.default.apply(void 0, ["BinaryExpression"].concat(args)); -} - -function Directive() { - for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - args[_key4] = arguments[_key4]; - } - - return _builder.default.apply(void 0, ["Directive"].concat(args)); -} - -function DirectiveLiteral() { - for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { - args[_key5] = arguments[_key5]; - } - - return _builder.default.apply(void 0, ["DirectiveLiteral"].concat(args)); -} - -function BlockStatement() { - for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { - args[_key6] = arguments[_key6]; - } - - return _builder.default.apply(void 0, ["BlockStatement"].concat(args)); -} - -function BreakStatement() { - for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { - args[_key7] = arguments[_key7]; - } - - return _builder.default.apply(void 0, ["BreakStatement"].concat(args)); -} - -function CallExpression() { - for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { - args[_key8] = arguments[_key8]; - } - - return _builder.default.apply(void 0, ["CallExpression"].concat(args)); -} - -function CatchClause() { - for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { - args[_key9] = arguments[_key9]; - } - - return _builder.default.apply(void 0, ["CatchClause"].concat(args)); -} - -function ConditionalExpression() { - for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { - args[_key10] = arguments[_key10]; - } - - return _builder.default.apply(void 0, ["ConditionalExpression"].concat(args)); -} - -function ContinueStatement() { - for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) { - args[_key11] = arguments[_key11]; - } - - return _builder.default.apply(void 0, ["ContinueStatement"].concat(args)); -} - -function DebuggerStatement() { - for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) { - args[_key12] = arguments[_key12]; - } - - return _builder.default.apply(void 0, ["DebuggerStatement"].concat(args)); -} - -function DoWhileStatement() { - for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) { - args[_key13] = arguments[_key13]; - } - - return _builder.default.apply(void 0, ["DoWhileStatement"].concat(args)); -} - -function EmptyStatement() { - for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) { - args[_key14] = arguments[_key14]; - } - - return _builder.default.apply(void 0, ["EmptyStatement"].concat(args)); -} - -function ExpressionStatement() { - for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) { - args[_key15] = arguments[_key15]; - } - - return _builder.default.apply(void 0, ["ExpressionStatement"].concat(args)); -} - -function File() { - for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) { - args[_key16] = arguments[_key16]; - } - - return _builder.default.apply(void 0, ["File"].concat(args)); -} - -function ForInStatement() { - for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) { - args[_key17] = arguments[_key17]; - } - - return _builder.default.apply(void 0, ["ForInStatement"].concat(args)); -} - -function ForStatement() { - for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) { - args[_key18] = arguments[_key18]; - } - - return _builder.default.apply(void 0, ["ForStatement"].concat(args)); -} - -function FunctionDeclaration() { - for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) { - args[_key19] = arguments[_key19]; - } - - return _builder.default.apply(void 0, ["FunctionDeclaration"].concat(args)); -} - -function FunctionExpression() { - for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) { - args[_key20] = arguments[_key20]; - } - - return _builder.default.apply(void 0, ["FunctionExpression"].concat(args)); -} - -function Identifier() { - for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) { - args[_key21] = arguments[_key21]; - } - - return _builder.default.apply(void 0, ["Identifier"].concat(args)); -} - -function IfStatement() { - for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) { - args[_key22] = arguments[_key22]; - } - - return _builder.default.apply(void 0, ["IfStatement"].concat(args)); -} - -function LabeledStatement() { - for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) { - args[_key23] = arguments[_key23]; - } - - return _builder.default.apply(void 0, ["LabeledStatement"].concat(args)); -} - -function StringLiteral() { - for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) { - args[_key24] = arguments[_key24]; - } - - return _builder.default.apply(void 0, ["StringLiteral"].concat(args)); -} - -function NumericLiteral() { - for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) { - args[_key25] = arguments[_key25]; - } - - return _builder.default.apply(void 0, ["NumericLiteral"].concat(args)); -} - -function NullLiteral() { - for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) { - args[_key26] = arguments[_key26]; - } - - return _builder.default.apply(void 0, ["NullLiteral"].concat(args)); -} - -function BooleanLiteral() { - for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) { - args[_key27] = arguments[_key27]; - } - - return _builder.default.apply(void 0, ["BooleanLiteral"].concat(args)); -} - -function RegExpLiteral() { - for (var _len28 = arguments.length, args = new Array(_len28), _key28 = 0; _key28 < _len28; _key28++) { - args[_key28] = arguments[_key28]; - } - - return _builder.default.apply(void 0, ["RegExpLiteral"].concat(args)); -} - -function LogicalExpression() { - for (var _len29 = arguments.length, args = new Array(_len29), _key29 = 0; _key29 < _len29; _key29++) { - args[_key29] = arguments[_key29]; - } - - return _builder.default.apply(void 0, ["LogicalExpression"].concat(args)); -} - -function MemberExpression() { - for (var _len30 = arguments.length, args = new Array(_len30), _key30 = 0; _key30 < _len30; _key30++) { - args[_key30] = arguments[_key30]; - } - - return _builder.default.apply(void 0, ["MemberExpression"].concat(args)); -} - -function NewExpression() { - for (var _len31 = arguments.length, args = new Array(_len31), _key31 = 0; _key31 < _len31; _key31++) { - args[_key31] = arguments[_key31]; - } - - return _builder.default.apply(void 0, ["NewExpression"].concat(args)); -} - -function Program() { - for (var _len32 = arguments.length, args = new Array(_len32), _key32 = 0; _key32 < _len32; _key32++) { - args[_key32] = arguments[_key32]; - } - - return _builder.default.apply(void 0, ["Program"].concat(args)); -} - -function ObjectExpression() { - for (var _len33 = arguments.length, args = new Array(_len33), _key33 = 0; _key33 < _len33; _key33++) { - args[_key33] = arguments[_key33]; - } - - return _builder.default.apply(void 0, ["ObjectExpression"].concat(args)); -} - -function ObjectMethod() { - for (var _len34 = arguments.length, args = new Array(_len34), _key34 = 0; _key34 < _len34; _key34++) { - args[_key34] = arguments[_key34]; - } - - return _builder.default.apply(void 0, ["ObjectMethod"].concat(args)); -} - -function ObjectProperty() { - for (var _len35 = arguments.length, args = new Array(_len35), _key35 = 0; _key35 < _len35; _key35++) { - args[_key35] = arguments[_key35]; - } - - return _builder.default.apply(void 0, ["ObjectProperty"].concat(args)); -} - -function RestElement() { - for (var _len36 = arguments.length, args = new Array(_len36), _key36 = 0; _key36 < _len36; _key36++) { - args[_key36] = arguments[_key36]; - } - - return _builder.default.apply(void 0, ["RestElement"].concat(args)); -} - -function ReturnStatement() { - for (var _len37 = arguments.length, args = new Array(_len37), _key37 = 0; _key37 < _len37; _key37++) { - args[_key37] = arguments[_key37]; - } - - return _builder.default.apply(void 0, ["ReturnStatement"].concat(args)); -} - -function SequenceExpression() { - for (var _len38 = arguments.length, args = new Array(_len38), _key38 = 0; _key38 < _len38; _key38++) { - args[_key38] = arguments[_key38]; - } - - return _builder.default.apply(void 0, ["SequenceExpression"].concat(args)); -} - -function SwitchCase() { - for (var _len39 = arguments.length, args = new Array(_len39), _key39 = 0; _key39 < _len39; _key39++) { - args[_key39] = arguments[_key39]; - } - - return _builder.default.apply(void 0, ["SwitchCase"].concat(args)); -} - -function SwitchStatement() { - for (var _len40 = arguments.length, args = new Array(_len40), _key40 = 0; _key40 < _len40; _key40++) { - args[_key40] = arguments[_key40]; - } - - return _builder.default.apply(void 0, ["SwitchStatement"].concat(args)); -} - -function ThisExpression() { - for (var _len41 = arguments.length, args = new Array(_len41), _key41 = 0; _key41 < _len41; _key41++) { - args[_key41] = arguments[_key41]; - } - - return _builder.default.apply(void 0, ["ThisExpression"].concat(args)); -} - -function ThrowStatement() { - for (var _len42 = arguments.length, args = new Array(_len42), _key42 = 0; _key42 < _len42; _key42++) { - args[_key42] = arguments[_key42]; - } - - return _builder.default.apply(void 0, ["ThrowStatement"].concat(args)); -} - -function TryStatement() { - for (var _len43 = arguments.length, args = new Array(_len43), _key43 = 0; _key43 < _len43; _key43++) { - args[_key43] = arguments[_key43]; - } - - return _builder.default.apply(void 0, ["TryStatement"].concat(args)); -} - -function UnaryExpression() { - for (var _len44 = arguments.length, args = new Array(_len44), _key44 = 0; _key44 < _len44; _key44++) { - args[_key44] = arguments[_key44]; - } - - return _builder.default.apply(void 0, ["UnaryExpression"].concat(args)); -} - -function UpdateExpression() { - for (var _len45 = arguments.length, args = new Array(_len45), _key45 = 0; _key45 < _len45; _key45++) { - args[_key45] = arguments[_key45]; - } - - return _builder.default.apply(void 0, ["UpdateExpression"].concat(args)); -} - -function VariableDeclaration() { - for (var _len46 = arguments.length, args = new Array(_len46), _key46 = 0; _key46 < _len46; _key46++) { - args[_key46] = arguments[_key46]; - } - - return _builder.default.apply(void 0, ["VariableDeclaration"].concat(args)); -} - -function VariableDeclarator() { - for (var _len47 = arguments.length, args = new Array(_len47), _key47 = 0; _key47 < _len47; _key47++) { - args[_key47] = arguments[_key47]; - } - - return _builder.default.apply(void 0, ["VariableDeclarator"].concat(args)); -} - -function WhileStatement() { - for (var _len48 = arguments.length, args = new Array(_len48), _key48 = 0; _key48 < _len48; _key48++) { - args[_key48] = arguments[_key48]; - } - - return _builder.default.apply(void 0, ["WhileStatement"].concat(args)); -} - -function WithStatement() { - for (var _len49 = arguments.length, args = new Array(_len49), _key49 = 0; _key49 < _len49; _key49++) { - args[_key49] = arguments[_key49]; - } - - return _builder.default.apply(void 0, ["WithStatement"].concat(args)); -} - -function AssignmentPattern() { - for (var _len50 = arguments.length, args = new Array(_len50), _key50 = 0; _key50 < _len50; _key50++) { - args[_key50] = arguments[_key50]; - } - - return _builder.default.apply(void 0, ["AssignmentPattern"].concat(args)); -} - -function ArrayPattern() { - for (var _len51 = arguments.length, args = new Array(_len51), _key51 = 0; _key51 < _len51; _key51++) { - args[_key51] = arguments[_key51]; - } - - return _builder.default.apply(void 0, ["ArrayPattern"].concat(args)); -} - -function ArrowFunctionExpression() { - for (var _len52 = arguments.length, args = new Array(_len52), _key52 = 0; _key52 < _len52; _key52++) { - args[_key52] = arguments[_key52]; - } - - return _builder.default.apply(void 0, ["ArrowFunctionExpression"].concat(args)); -} - -function ClassBody() { - for (var _len53 = arguments.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) { - args[_key53] = arguments[_key53]; - } - - return _builder.default.apply(void 0, ["ClassBody"].concat(args)); -} - -function ClassDeclaration() { - for (var _len54 = arguments.length, args = new Array(_len54), _key54 = 0; _key54 < _len54; _key54++) { - args[_key54] = arguments[_key54]; - } - - return _builder.default.apply(void 0, ["ClassDeclaration"].concat(args)); -} - -function ClassExpression() { - for (var _len55 = arguments.length, args = new Array(_len55), _key55 = 0; _key55 < _len55; _key55++) { - args[_key55] = arguments[_key55]; - } - - return _builder.default.apply(void 0, ["ClassExpression"].concat(args)); -} - -function ExportAllDeclaration() { - for (var _len56 = arguments.length, args = new Array(_len56), _key56 = 0; _key56 < _len56; _key56++) { - args[_key56] = arguments[_key56]; - } - - return _builder.default.apply(void 0, ["ExportAllDeclaration"].concat(args)); -} - -function ExportDefaultDeclaration() { - for (var _len57 = arguments.length, args = new Array(_len57), _key57 = 0; _key57 < _len57; _key57++) { - args[_key57] = arguments[_key57]; - } - - return _builder.default.apply(void 0, ["ExportDefaultDeclaration"].concat(args)); -} - -function ExportNamedDeclaration() { - for (var _len58 = arguments.length, args = new Array(_len58), _key58 = 0; _key58 < _len58; _key58++) { - args[_key58] = arguments[_key58]; - } - - return _builder.default.apply(void 0, ["ExportNamedDeclaration"].concat(args)); -} - -function ExportSpecifier() { - for (var _len59 = arguments.length, args = new Array(_len59), _key59 = 0; _key59 < _len59; _key59++) { - args[_key59] = arguments[_key59]; - } - - return _builder.default.apply(void 0, ["ExportSpecifier"].concat(args)); -} - -function ForOfStatement() { - for (var _len60 = arguments.length, args = new Array(_len60), _key60 = 0; _key60 < _len60; _key60++) { - args[_key60] = arguments[_key60]; - } - - return _builder.default.apply(void 0, ["ForOfStatement"].concat(args)); -} - -function ImportDeclaration() { - for (var _len61 = arguments.length, args = new Array(_len61), _key61 = 0; _key61 < _len61; _key61++) { - args[_key61] = arguments[_key61]; - } - - return _builder.default.apply(void 0, ["ImportDeclaration"].concat(args)); -} - -function ImportDefaultSpecifier() { - for (var _len62 = arguments.length, args = new Array(_len62), _key62 = 0; _key62 < _len62; _key62++) { - args[_key62] = arguments[_key62]; - } - - return _builder.default.apply(void 0, ["ImportDefaultSpecifier"].concat(args)); -} - -function ImportNamespaceSpecifier() { - for (var _len63 = arguments.length, args = new Array(_len63), _key63 = 0; _key63 < _len63; _key63++) { - args[_key63] = arguments[_key63]; - } - - return _builder.default.apply(void 0, ["ImportNamespaceSpecifier"].concat(args)); -} - -function ImportSpecifier() { - for (var _len64 = arguments.length, args = new Array(_len64), _key64 = 0; _key64 < _len64; _key64++) { - args[_key64] = arguments[_key64]; - } - - return _builder.default.apply(void 0, ["ImportSpecifier"].concat(args)); -} - -function MetaProperty() { - for (var _len65 = arguments.length, args = new Array(_len65), _key65 = 0; _key65 < _len65; _key65++) { - args[_key65] = arguments[_key65]; - } - - return _builder.default.apply(void 0, ["MetaProperty"].concat(args)); -} - -function ClassMethod() { - for (var _len66 = arguments.length, args = new Array(_len66), _key66 = 0; _key66 < _len66; _key66++) { - args[_key66] = arguments[_key66]; - } - - return _builder.default.apply(void 0, ["ClassMethod"].concat(args)); -} - -function ObjectPattern() { - for (var _len67 = arguments.length, args = new Array(_len67), _key67 = 0; _key67 < _len67; _key67++) { - args[_key67] = arguments[_key67]; - } - - return _builder.default.apply(void 0, ["ObjectPattern"].concat(args)); -} - -function SpreadElement() { - for (var _len68 = arguments.length, args = new Array(_len68), _key68 = 0; _key68 < _len68; _key68++) { - args[_key68] = arguments[_key68]; - } - - return _builder.default.apply(void 0, ["SpreadElement"].concat(args)); -} - -function Super() { - for (var _len69 = arguments.length, args = new Array(_len69), _key69 = 0; _key69 < _len69; _key69++) { - args[_key69] = arguments[_key69]; - } - - return _builder.default.apply(void 0, ["Super"].concat(args)); -} - -function TaggedTemplateExpression() { - for (var _len70 = arguments.length, args = new Array(_len70), _key70 = 0; _key70 < _len70; _key70++) { - args[_key70] = arguments[_key70]; - } - - return _builder.default.apply(void 0, ["TaggedTemplateExpression"].concat(args)); -} - -function TemplateElement() { - for (var _len71 = arguments.length, args = new Array(_len71), _key71 = 0; _key71 < _len71; _key71++) { - args[_key71] = arguments[_key71]; - } - - return _builder.default.apply(void 0, ["TemplateElement"].concat(args)); -} - -function TemplateLiteral() { - for (var _len72 = arguments.length, args = new Array(_len72), _key72 = 0; _key72 < _len72; _key72++) { - args[_key72] = arguments[_key72]; - } - - return _builder.default.apply(void 0, ["TemplateLiteral"].concat(args)); -} - -function YieldExpression() { - for (var _len73 = arguments.length, args = new Array(_len73), _key73 = 0; _key73 < _len73; _key73++) { - args[_key73] = arguments[_key73]; - } - - return _builder.default.apply(void 0, ["YieldExpression"].concat(args)); -} - -function AnyTypeAnnotation() { - for (var _len74 = arguments.length, args = new Array(_len74), _key74 = 0; _key74 < _len74; _key74++) { - args[_key74] = arguments[_key74]; - } - - return _builder.default.apply(void 0, ["AnyTypeAnnotation"].concat(args)); -} - -function ArrayTypeAnnotation() { - for (var _len75 = arguments.length, args = new Array(_len75), _key75 = 0; _key75 < _len75; _key75++) { - args[_key75] = arguments[_key75]; - } - - return _builder.default.apply(void 0, ["ArrayTypeAnnotation"].concat(args)); -} - -function BooleanTypeAnnotation() { - for (var _len76 = arguments.length, args = new Array(_len76), _key76 = 0; _key76 < _len76; _key76++) { - args[_key76] = arguments[_key76]; - } - - return _builder.default.apply(void 0, ["BooleanTypeAnnotation"].concat(args)); -} - -function BooleanLiteralTypeAnnotation() { - for (var _len77 = arguments.length, args = new Array(_len77), _key77 = 0; _key77 < _len77; _key77++) { - args[_key77] = arguments[_key77]; - } - - return _builder.default.apply(void 0, ["BooleanLiteralTypeAnnotation"].concat(args)); -} - -function NullLiteralTypeAnnotation() { - for (var _len78 = arguments.length, args = new Array(_len78), _key78 = 0; _key78 < _len78; _key78++) { - args[_key78] = arguments[_key78]; - } - - return _builder.default.apply(void 0, ["NullLiteralTypeAnnotation"].concat(args)); -} - -function ClassImplements() { - for (var _len79 = arguments.length, args = new Array(_len79), _key79 = 0; _key79 < _len79; _key79++) { - args[_key79] = arguments[_key79]; - } - - return _builder.default.apply(void 0, ["ClassImplements"].concat(args)); -} - -function DeclareClass() { - for (var _len80 = arguments.length, args = new Array(_len80), _key80 = 0; _key80 < _len80; _key80++) { - args[_key80] = arguments[_key80]; - } - - return _builder.default.apply(void 0, ["DeclareClass"].concat(args)); -} - -function DeclareFunction() { - for (var _len81 = arguments.length, args = new Array(_len81), _key81 = 0; _key81 < _len81; _key81++) { - args[_key81] = arguments[_key81]; - } - - return _builder.default.apply(void 0, ["DeclareFunction"].concat(args)); -} - -function DeclareInterface() { - for (var _len82 = arguments.length, args = new Array(_len82), _key82 = 0; _key82 < _len82; _key82++) { - args[_key82] = arguments[_key82]; - } - - return _builder.default.apply(void 0, ["DeclareInterface"].concat(args)); -} - -function DeclareModule() { - for (var _len83 = arguments.length, args = new Array(_len83), _key83 = 0; _key83 < _len83; _key83++) { - args[_key83] = arguments[_key83]; - } - - return _builder.default.apply(void 0, ["DeclareModule"].concat(args)); -} - -function DeclareModuleExports() { - for (var _len84 = arguments.length, args = new Array(_len84), _key84 = 0; _key84 < _len84; _key84++) { - args[_key84] = arguments[_key84]; - } - - return _builder.default.apply(void 0, ["DeclareModuleExports"].concat(args)); -} - -function DeclareTypeAlias() { - for (var _len85 = arguments.length, args = new Array(_len85), _key85 = 0; _key85 < _len85; _key85++) { - args[_key85] = arguments[_key85]; - } - - return _builder.default.apply(void 0, ["DeclareTypeAlias"].concat(args)); -} - -function DeclareOpaqueType() { - for (var _len86 = arguments.length, args = new Array(_len86), _key86 = 0; _key86 < _len86; _key86++) { - args[_key86] = arguments[_key86]; - } - - return _builder.default.apply(void 0, ["DeclareOpaqueType"].concat(args)); -} - -function DeclareVariable() { - for (var _len87 = arguments.length, args = new Array(_len87), _key87 = 0; _key87 < _len87; _key87++) { - args[_key87] = arguments[_key87]; - } - - return _builder.default.apply(void 0, ["DeclareVariable"].concat(args)); -} - -function DeclareExportDeclaration() { - for (var _len88 = arguments.length, args = new Array(_len88), _key88 = 0; _key88 < _len88; _key88++) { - args[_key88] = arguments[_key88]; - } - - return _builder.default.apply(void 0, ["DeclareExportDeclaration"].concat(args)); -} - -function DeclareExportAllDeclaration() { - for (var _len89 = arguments.length, args = new Array(_len89), _key89 = 0; _key89 < _len89; _key89++) { - args[_key89] = arguments[_key89]; - } - - return _builder.default.apply(void 0, ["DeclareExportAllDeclaration"].concat(args)); -} - -function DeclaredPredicate() { - for (var _len90 = arguments.length, args = new Array(_len90), _key90 = 0; _key90 < _len90; _key90++) { - args[_key90] = arguments[_key90]; - } - - return _builder.default.apply(void 0, ["DeclaredPredicate"].concat(args)); -} - -function ExistsTypeAnnotation() { - for (var _len91 = arguments.length, args = new Array(_len91), _key91 = 0; _key91 < _len91; _key91++) { - args[_key91] = arguments[_key91]; - } - - return _builder.default.apply(void 0, ["ExistsTypeAnnotation"].concat(args)); -} - -function FunctionTypeAnnotation() { - for (var _len92 = arguments.length, args = new Array(_len92), _key92 = 0; _key92 < _len92; _key92++) { - args[_key92] = arguments[_key92]; - } - - return _builder.default.apply(void 0, ["FunctionTypeAnnotation"].concat(args)); -} - -function FunctionTypeParam() { - for (var _len93 = arguments.length, args = new Array(_len93), _key93 = 0; _key93 < _len93; _key93++) { - args[_key93] = arguments[_key93]; - } - - return _builder.default.apply(void 0, ["FunctionTypeParam"].concat(args)); -} - -function GenericTypeAnnotation() { - for (var _len94 = arguments.length, args = new Array(_len94), _key94 = 0; _key94 < _len94; _key94++) { - args[_key94] = arguments[_key94]; - } - - return _builder.default.apply(void 0, ["GenericTypeAnnotation"].concat(args)); -} - -function InferredPredicate() { - for (var _len95 = arguments.length, args = new Array(_len95), _key95 = 0; _key95 < _len95; _key95++) { - args[_key95] = arguments[_key95]; - } - - return _builder.default.apply(void 0, ["InferredPredicate"].concat(args)); -} - -function InterfaceExtends() { - for (var _len96 = arguments.length, args = new Array(_len96), _key96 = 0; _key96 < _len96; _key96++) { - args[_key96] = arguments[_key96]; - } - - return _builder.default.apply(void 0, ["InterfaceExtends"].concat(args)); -} - -function InterfaceDeclaration() { - for (var _len97 = arguments.length, args = new Array(_len97), _key97 = 0; _key97 < _len97; _key97++) { - args[_key97] = arguments[_key97]; - } - - return _builder.default.apply(void 0, ["InterfaceDeclaration"].concat(args)); -} - -function IntersectionTypeAnnotation() { - for (var _len98 = arguments.length, args = new Array(_len98), _key98 = 0; _key98 < _len98; _key98++) { - args[_key98] = arguments[_key98]; - } - - return _builder.default.apply(void 0, ["IntersectionTypeAnnotation"].concat(args)); -} - -function MixedTypeAnnotation() { - for (var _len99 = arguments.length, args = new Array(_len99), _key99 = 0; _key99 < _len99; _key99++) { - args[_key99] = arguments[_key99]; - } - - return _builder.default.apply(void 0, ["MixedTypeAnnotation"].concat(args)); -} - -function EmptyTypeAnnotation() { - for (var _len100 = arguments.length, args = new Array(_len100), _key100 = 0; _key100 < _len100; _key100++) { - args[_key100] = arguments[_key100]; - } - - return _builder.default.apply(void 0, ["EmptyTypeAnnotation"].concat(args)); -} - -function NullableTypeAnnotation() { - for (var _len101 = arguments.length, args = new Array(_len101), _key101 = 0; _key101 < _len101; _key101++) { - args[_key101] = arguments[_key101]; - } - - return _builder.default.apply(void 0, ["NullableTypeAnnotation"].concat(args)); -} - -function NumberLiteralTypeAnnotation() { - for (var _len102 = arguments.length, args = new Array(_len102), _key102 = 0; _key102 < _len102; _key102++) { - args[_key102] = arguments[_key102]; - } - - return _builder.default.apply(void 0, ["NumberLiteralTypeAnnotation"].concat(args)); -} - -function NumberTypeAnnotation() { - for (var _len103 = arguments.length, args = new Array(_len103), _key103 = 0; _key103 < _len103; _key103++) { - args[_key103] = arguments[_key103]; - } - - return _builder.default.apply(void 0, ["NumberTypeAnnotation"].concat(args)); -} - -function ObjectTypeAnnotation() { - for (var _len104 = arguments.length, args = new Array(_len104), _key104 = 0; _key104 < _len104; _key104++) { - args[_key104] = arguments[_key104]; - } - - return _builder.default.apply(void 0, ["ObjectTypeAnnotation"].concat(args)); -} - -function ObjectTypeCallProperty() { - for (var _len105 = arguments.length, args = new Array(_len105), _key105 = 0; _key105 < _len105; _key105++) { - args[_key105] = arguments[_key105]; - } - - return _builder.default.apply(void 0, ["ObjectTypeCallProperty"].concat(args)); -} - -function ObjectTypeIndexer() { - for (var _len106 = arguments.length, args = new Array(_len106), _key106 = 0; _key106 < _len106; _key106++) { - args[_key106] = arguments[_key106]; - } - - return _builder.default.apply(void 0, ["ObjectTypeIndexer"].concat(args)); -} - -function ObjectTypeProperty() { - for (var _len107 = arguments.length, args = new Array(_len107), _key107 = 0; _key107 < _len107; _key107++) { - args[_key107] = arguments[_key107]; - } - - return _builder.default.apply(void 0, ["ObjectTypeProperty"].concat(args)); -} - -function ObjectTypeSpreadProperty() { - for (var _len108 = arguments.length, args = new Array(_len108), _key108 = 0; _key108 < _len108; _key108++) { - args[_key108] = arguments[_key108]; - } - - return _builder.default.apply(void 0, ["ObjectTypeSpreadProperty"].concat(args)); -} - -function OpaqueType() { - for (var _len109 = arguments.length, args = new Array(_len109), _key109 = 0; _key109 < _len109; _key109++) { - args[_key109] = arguments[_key109]; - } - - return _builder.default.apply(void 0, ["OpaqueType"].concat(args)); -} - -function QualifiedTypeIdentifier() { - for (var _len110 = arguments.length, args = new Array(_len110), _key110 = 0; _key110 < _len110; _key110++) { - args[_key110] = arguments[_key110]; - } - - return _builder.default.apply(void 0, ["QualifiedTypeIdentifier"].concat(args)); -} - -function StringLiteralTypeAnnotation() { - for (var _len111 = arguments.length, args = new Array(_len111), _key111 = 0; _key111 < _len111; _key111++) { - args[_key111] = arguments[_key111]; - } - - return _builder.default.apply(void 0, ["StringLiteralTypeAnnotation"].concat(args)); -} - -function StringTypeAnnotation() { - for (var _len112 = arguments.length, args = new Array(_len112), _key112 = 0; _key112 < _len112; _key112++) { - args[_key112] = arguments[_key112]; - } - - return _builder.default.apply(void 0, ["StringTypeAnnotation"].concat(args)); -} - -function ThisTypeAnnotation() { - for (var _len113 = arguments.length, args = new Array(_len113), _key113 = 0; _key113 < _len113; _key113++) { - args[_key113] = arguments[_key113]; - } - - return _builder.default.apply(void 0, ["ThisTypeAnnotation"].concat(args)); -} - -function TupleTypeAnnotation() { - for (var _len114 = arguments.length, args = new Array(_len114), _key114 = 0; _key114 < _len114; _key114++) { - args[_key114] = arguments[_key114]; - } - - return _builder.default.apply(void 0, ["TupleTypeAnnotation"].concat(args)); -} - -function TypeofTypeAnnotation() { - for (var _len115 = arguments.length, args = new Array(_len115), _key115 = 0; _key115 < _len115; _key115++) { - args[_key115] = arguments[_key115]; - } - - return _builder.default.apply(void 0, ["TypeofTypeAnnotation"].concat(args)); -} - -function TypeAlias() { - for (var _len116 = arguments.length, args = new Array(_len116), _key116 = 0; _key116 < _len116; _key116++) { - args[_key116] = arguments[_key116]; - } - - return _builder.default.apply(void 0, ["TypeAlias"].concat(args)); -} - -function TypeAnnotation() { - for (var _len117 = arguments.length, args = new Array(_len117), _key117 = 0; _key117 < _len117; _key117++) { - args[_key117] = arguments[_key117]; - } - - return _builder.default.apply(void 0, ["TypeAnnotation"].concat(args)); -} - -function TypeCastExpression() { - for (var _len118 = arguments.length, args = new Array(_len118), _key118 = 0; _key118 < _len118; _key118++) { - args[_key118] = arguments[_key118]; - } - - return _builder.default.apply(void 0, ["TypeCastExpression"].concat(args)); -} - -function TypeParameter() { - for (var _len119 = arguments.length, args = new Array(_len119), _key119 = 0; _key119 < _len119; _key119++) { - args[_key119] = arguments[_key119]; - } - - return _builder.default.apply(void 0, ["TypeParameter"].concat(args)); -} - -function TypeParameterDeclaration() { - for (var _len120 = arguments.length, args = new Array(_len120), _key120 = 0; _key120 < _len120; _key120++) { - args[_key120] = arguments[_key120]; - } - - return _builder.default.apply(void 0, ["TypeParameterDeclaration"].concat(args)); -} - -function TypeParameterInstantiation() { - for (var _len121 = arguments.length, args = new Array(_len121), _key121 = 0; _key121 < _len121; _key121++) { - args[_key121] = arguments[_key121]; - } - - return _builder.default.apply(void 0, ["TypeParameterInstantiation"].concat(args)); -} - -function UnionTypeAnnotation() { - for (var _len122 = arguments.length, args = new Array(_len122), _key122 = 0; _key122 < _len122; _key122++) { - args[_key122] = arguments[_key122]; - } - - return _builder.default.apply(void 0, ["UnionTypeAnnotation"].concat(args)); -} - -function Variance() { - for (var _len123 = arguments.length, args = new Array(_len123), _key123 = 0; _key123 < _len123; _key123++) { - args[_key123] = arguments[_key123]; - } - - return _builder.default.apply(void 0, ["Variance"].concat(args)); -} - -function VoidTypeAnnotation() { - for (var _len124 = arguments.length, args = new Array(_len124), _key124 = 0; _key124 < _len124; _key124++) { - args[_key124] = arguments[_key124]; - } - - return _builder.default.apply(void 0, ["VoidTypeAnnotation"].concat(args)); -} - -function JSXAttribute() { - for (var _len125 = arguments.length, args = new Array(_len125), _key125 = 0; _key125 < _len125; _key125++) { - args[_key125] = arguments[_key125]; - } - - return _builder.default.apply(void 0, ["JSXAttribute"].concat(args)); -} - -function JSXClosingElement() { - for (var _len126 = arguments.length, args = new Array(_len126), _key126 = 0; _key126 < _len126; _key126++) { - args[_key126] = arguments[_key126]; - } - - return _builder.default.apply(void 0, ["JSXClosingElement"].concat(args)); -} - -function JSXElement() { - for (var _len127 = arguments.length, args = new Array(_len127), _key127 = 0; _key127 < _len127; _key127++) { - args[_key127] = arguments[_key127]; - } - - return _builder.default.apply(void 0, ["JSXElement"].concat(args)); -} - -function JSXEmptyExpression() { - for (var _len128 = arguments.length, args = new Array(_len128), _key128 = 0; _key128 < _len128; _key128++) { - args[_key128] = arguments[_key128]; - } - - return _builder.default.apply(void 0, ["JSXEmptyExpression"].concat(args)); -} - -function JSXExpressionContainer() { - for (var _len129 = arguments.length, args = new Array(_len129), _key129 = 0; _key129 < _len129; _key129++) { - args[_key129] = arguments[_key129]; - } - - return _builder.default.apply(void 0, ["JSXExpressionContainer"].concat(args)); -} - -function JSXSpreadChild() { - for (var _len130 = arguments.length, args = new Array(_len130), _key130 = 0; _key130 < _len130; _key130++) { - args[_key130] = arguments[_key130]; - } - - return _builder.default.apply(void 0, ["JSXSpreadChild"].concat(args)); -} - -function JSXIdentifier() { - for (var _len131 = arguments.length, args = new Array(_len131), _key131 = 0; _key131 < _len131; _key131++) { - args[_key131] = arguments[_key131]; - } - - return _builder.default.apply(void 0, ["JSXIdentifier"].concat(args)); -} - -function JSXMemberExpression() { - for (var _len132 = arguments.length, args = new Array(_len132), _key132 = 0; _key132 < _len132; _key132++) { - args[_key132] = arguments[_key132]; - } - - return _builder.default.apply(void 0, ["JSXMemberExpression"].concat(args)); -} - -function JSXNamespacedName() { - for (var _len133 = arguments.length, args = new Array(_len133), _key133 = 0; _key133 < _len133; _key133++) { - args[_key133] = arguments[_key133]; - } - - return _builder.default.apply(void 0, ["JSXNamespacedName"].concat(args)); -} - -function JSXOpeningElement() { - for (var _len134 = arguments.length, args = new Array(_len134), _key134 = 0; _key134 < _len134; _key134++) { - args[_key134] = arguments[_key134]; - } - - return _builder.default.apply(void 0, ["JSXOpeningElement"].concat(args)); -} - -function JSXSpreadAttribute() { - for (var _len135 = arguments.length, args = new Array(_len135), _key135 = 0; _key135 < _len135; _key135++) { - args[_key135] = arguments[_key135]; - } - - return _builder.default.apply(void 0, ["JSXSpreadAttribute"].concat(args)); -} - -function JSXText() { - for (var _len136 = arguments.length, args = new Array(_len136), _key136 = 0; _key136 < _len136; _key136++) { - args[_key136] = arguments[_key136]; - } - - return _builder.default.apply(void 0, ["JSXText"].concat(args)); -} - -function JSXFragment() { - for (var _len137 = arguments.length, args = new Array(_len137), _key137 = 0; _key137 < _len137; _key137++) { - args[_key137] = arguments[_key137]; - } - - return _builder.default.apply(void 0, ["JSXFragment"].concat(args)); -} - -function JSXOpeningFragment() { - for (var _len138 = arguments.length, args = new Array(_len138), _key138 = 0; _key138 < _len138; _key138++) { - args[_key138] = arguments[_key138]; - } - - return _builder.default.apply(void 0, ["JSXOpeningFragment"].concat(args)); -} - -function JSXClosingFragment() { - for (var _len139 = arguments.length, args = new Array(_len139), _key139 = 0; _key139 < _len139; _key139++) { - args[_key139] = arguments[_key139]; - } - - return _builder.default.apply(void 0, ["JSXClosingFragment"].concat(args)); -} - -function Noop() { - for (var _len140 = arguments.length, args = new Array(_len140), _key140 = 0; _key140 < _len140; _key140++) { - args[_key140] = arguments[_key140]; - } - - return _builder.default.apply(void 0, ["Noop"].concat(args)); -} - -function ParenthesizedExpression() { - for (var _len141 = arguments.length, args = new Array(_len141), _key141 = 0; _key141 < _len141; _key141++) { - args[_key141] = arguments[_key141]; - } - - return _builder.default.apply(void 0, ["ParenthesizedExpression"].concat(args)); -} - -function AwaitExpression() { - for (var _len142 = arguments.length, args = new Array(_len142), _key142 = 0; _key142 < _len142; _key142++) { - args[_key142] = arguments[_key142]; - } - - return _builder.default.apply(void 0, ["AwaitExpression"].concat(args)); -} - -function BindExpression() { - for (var _len143 = arguments.length, args = new Array(_len143), _key143 = 0; _key143 < _len143; _key143++) { - args[_key143] = arguments[_key143]; - } - - return _builder.default.apply(void 0, ["BindExpression"].concat(args)); -} - -function ClassProperty() { - for (var _len144 = arguments.length, args = new Array(_len144), _key144 = 0; _key144 < _len144; _key144++) { - args[_key144] = arguments[_key144]; - } - - return _builder.default.apply(void 0, ["ClassProperty"].concat(args)); -} - -function OptionalMemberExpression() { - for (var _len145 = arguments.length, args = new Array(_len145), _key145 = 0; _key145 < _len145; _key145++) { - args[_key145] = arguments[_key145]; - } - - return _builder.default.apply(void 0, ["OptionalMemberExpression"].concat(args)); -} - -function OptionalCallExpression() { - for (var _len146 = arguments.length, args = new Array(_len146), _key146 = 0; _key146 < _len146; _key146++) { - args[_key146] = arguments[_key146]; - } - - return _builder.default.apply(void 0, ["OptionalCallExpression"].concat(args)); -} - -function ClassPrivateProperty() { - for (var _len147 = arguments.length, args = new Array(_len147), _key147 = 0; _key147 < _len147; _key147++) { - args[_key147] = arguments[_key147]; - } - - return _builder.default.apply(void 0, ["ClassPrivateProperty"].concat(args)); -} - -function Import() { - for (var _len148 = arguments.length, args = new Array(_len148), _key148 = 0; _key148 < _len148; _key148++) { - args[_key148] = arguments[_key148]; - } - - return _builder.default.apply(void 0, ["Import"].concat(args)); -} - -function Decorator() { - for (var _len149 = arguments.length, args = new Array(_len149), _key149 = 0; _key149 < _len149; _key149++) { - args[_key149] = arguments[_key149]; - } - - return _builder.default.apply(void 0, ["Decorator"].concat(args)); -} - -function DoExpression() { - for (var _len150 = arguments.length, args = new Array(_len150), _key150 = 0; _key150 < _len150; _key150++) { - args[_key150] = arguments[_key150]; - } - - return _builder.default.apply(void 0, ["DoExpression"].concat(args)); -} - -function ExportDefaultSpecifier() { - for (var _len151 = arguments.length, args = new Array(_len151), _key151 = 0; _key151 < _len151; _key151++) { - args[_key151] = arguments[_key151]; - } - - return _builder.default.apply(void 0, ["ExportDefaultSpecifier"].concat(args)); -} - -function ExportNamespaceSpecifier() { - for (var _len152 = arguments.length, args = new Array(_len152), _key152 = 0; _key152 < _len152; _key152++) { - args[_key152] = arguments[_key152]; - } - - return _builder.default.apply(void 0, ["ExportNamespaceSpecifier"].concat(args)); -} - -function PrivateName() { - for (var _len153 = arguments.length, args = new Array(_len153), _key153 = 0; _key153 < _len153; _key153++) { - args[_key153] = arguments[_key153]; - } - - return _builder.default.apply(void 0, ["PrivateName"].concat(args)); -} - -function TSParameterProperty() { - for (var _len154 = arguments.length, args = new Array(_len154), _key154 = 0; _key154 < _len154; _key154++) { - args[_key154] = arguments[_key154]; - } - - return _builder.default.apply(void 0, ["TSParameterProperty"].concat(args)); -} - -function TSDeclareFunction() { - for (var _len155 = arguments.length, args = new Array(_len155), _key155 = 0; _key155 < _len155; _key155++) { - args[_key155] = arguments[_key155]; - } - - return _builder.default.apply(void 0, ["TSDeclareFunction"].concat(args)); -} - -function TSDeclareMethod() { - for (var _len156 = arguments.length, args = new Array(_len156), _key156 = 0; _key156 < _len156; _key156++) { - args[_key156] = arguments[_key156]; - } - - return _builder.default.apply(void 0, ["TSDeclareMethod"].concat(args)); -} - -function TSQualifiedName() { - for (var _len157 = arguments.length, args = new Array(_len157), _key157 = 0; _key157 < _len157; _key157++) { - args[_key157] = arguments[_key157]; - } - - return _builder.default.apply(void 0, ["TSQualifiedName"].concat(args)); -} - -function TSCallSignatureDeclaration() { - for (var _len158 = arguments.length, args = new Array(_len158), _key158 = 0; _key158 < _len158; _key158++) { - args[_key158] = arguments[_key158]; - } - - return _builder.default.apply(void 0, ["TSCallSignatureDeclaration"].concat(args)); -} - -function TSConstructSignatureDeclaration() { - for (var _len159 = arguments.length, args = new Array(_len159), _key159 = 0; _key159 < _len159; _key159++) { - args[_key159] = arguments[_key159]; - } - - return _builder.default.apply(void 0, ["TSConstructSignatureDeclaration"].concat(args)); -} - -function TSPropertySignature() { - for (var _len160 = arguments.length, args = new Array(_len160), _key160 = 0; _key160 < _len160; _key160++) { - args[_key160] = arguments[_key160]; - } - - return _builder.default.apply(void 0, ["TSPropertySignature"].concat(args)); -} - -function TSMethodSignature() { - for (var _len161 = arguments.length, args = new Array(_len161), _key161 = 0; _key161 < _len161; _key161++) { - args[_key161] = arguments[_key161]; - } - - return _builder.default.apply(void 0, ["TSMethodSignature"].concat(args)); -} - -function TSIndexSignature() { - for (var _len162 = arguments.length, args = new Array(_len162), _key162 = 0; _key162 < _len162; _key162++) { - args[_key162] = arguments[_key162]; - } - - return _builder.default.apply(void 0, ["TSIndexSignature"].concat(args)); -} - -function TSAnyKeyword() { - for (var _len163 = arguments.length, args = new Array(_len163), _key163 = 0; _key163 < _len163; _key163++) { - args[_key163] = arguments[_key163]; - } - - return _builder.default.apply(void 0, ["TSAnyKeyword"].concat(args)); -} - -function TSNumberKeyword() { - for (var _len164 = arguments.length, args = new Array(_len164), _key164 = 0; _key164 < _len164; _key164++) { - args[_key164] = arguments[_key164]; - } - - return _builder.default.apply(void 0, ["TSNumberKeyword"].concat(args)); -} - -function TSObjectKeyword() { - for (var _len165 = arguments.length, args = new Array(_len165), _key165 = 0; _key165 < _len165; _key165++) { - args[_key165] = arguments[_key165]; - } - - return _builder.default.apply(void 0, ["TSObjectKeyword"].concat(args)); -} - -function TSBooleanKeyword() { - for (var _len166 = arguments.length, args = new Array(_len166), _key166 = 0; _key166 < _len166; _key166++) { - args[_key166] = arguments[_key166]; - } - - return _builder.default.apply(void 0, ["TSBooleanKeyword"].concat(args)); -} - -function TSStringKeyword() { - for (var _len167 = arguments.length, args = new Array(_len167), _key167 = 0; _key167 < _len167; _key167++) { - args[_key167] = arguments[_key167]; - } - - return _builder.default.apply(void 0, ["TSStringKeyword"].concat(args)); -} - -function TSSymbolKeyword() { - for (var _len168 = arguments.length, args = new Array(_len168), _key168 = 0; _key168 < _len168; _key168++) { - args[_key168] = arguments[_key168]; - } - - return _builder.default.apply(void 0, ["TSSymbolKeyword"].concat(args)); -} - -function TSVoidKeyword() { - for (var _len169 = arguments.length, args = new Array(_len169), _key169 = 0; _key169 < _len169; _key169++) { - args[_key169] = arguments[_key169]; - } - - return _builder.default.apply(void 0, ["TSVoidKeyword"].concat(args)); -} - -function TSUndefinedKeyword() { - for (var _len170 = arguments.length, args = new Array(_len170), _key170 = 0; _key170 < _len170; _key170++) { - args[_key170] = arguments[_key170]; - } - - return _builder.default.apply(void 0, ["TSUndefinedKeyword"].concat(args)); -} - -function TSNullKeyword() { - for (var _len171 = arguments.length, args = new Array(_len171), _key171 = 0; _key171 < _len171; _key171++) { - args[_key171] = arguments[_key171]; - } - - return _builder.default.apply(void 0, ["TSNullKeyword"].concat(args)); -} - -function TSNeverKeyword() { - for (var _len172 = arguments.length, args = new Array(_len172), _key172 = 0; _key172 < _len172; _key172++) { - args[_key172] = arguments[_key172]; - } - - return _builder.default.apply(void 0, ["TSNeverKeyword"].concat(args)); -} - -function TSThisType() { - for (var _len173 = arguments.length, args = new Array(_len173), _key173 = 0; _key173 < _len173; _key173++) { - args[_key173] = arguments[_key173]; - } - - return _builder.default.apply(void 0, ["TSThisType"].concat(args)); -} - -function TSFunctionType() { - for (var _len174 = arguments.length, args = new Array(_len174), _key174 = 0; _key174 < _len174; _key174++) { - args[_key174] = arguments[_key174]; - } - - return _builder.default.apply(void 0, ["TSFunctionType"].concat(args)); -} - -function TSConstructorType() { - for (var _len175 = arguments.length, args = new Array(_len175), _key175 = 0; _key175 < _len175; _key175++) { - args[_key175] = arguments[_key175]; - } - - return _builder.default.apply(void 0, ["TSConstructorType"].concat(args)); -} - -function TSTypeReference() { - for (var _len176 = arguments.length, args = new Array(_len176), _key176 = 0; _key176 < _len176; _key176++) { - args[_key176] = arguments[_key176]; - } - - return _builder.default.apply(void 0, ["TSTypeReference"].concat(args)); -} - -function TSTypePredicate() { - for (var _len177 = arguments.length, args = new Array(_len177), _key177 = 0; _key177 < _len177; _key177++) { - args[_key177] = arguments[_key177]; - } - - return _builder.default.apply(void 0, ["TSTypePredicate"].concat(args)); -} - -function TSTypeQuery() { - for (var _len178 = arguments.length, args = new Array(_len178), _key178 = 0; _key178 < _len178; _key178++) { - args[_key178] = arguments[_key178]; - } - - return _builder.default.apply(void 0, ["TSTypeQuery"].concat(args)); -} - -function TSTypeLiteral() { - for (var _len179 = arguments.length, args = new Array(_len179), _key179 = 0; _key179 < _len179; _key179++) { - args[_key179] = arguments[_key179]; - } - - return _builder.default.apply(void 0, ["TSTypeLiteral"].concat(args)); -} - -function TSArrayType() { - for (var _len180 = arguments.length, args = new Array(_len180), _key180 = 0; _key180 < _len180; _key180++) { - args[_key180] = arguments[_key180]; - } - - return _builder.default.apply(void 0, ["TSArrayType"].concat(args)); -} - -function TSTupleType() { - for (var _len181 = arguments.length, args = new Array(_len181), _key181 = 0; _key181 < _len181; _key181++) { - args[_key181] = arguments[_key181]; - } - - return _builder.default.apply(void 0, ["TSTupleType"].concat(args)); -} - -function TSUnionType() { - for (var _len182 = arguments.length, args = new Array(_len182), _key182 = 0; _key182 < _len182; _key182++) { - args[_key182] = arguments[_key182]; - } - - return _builder.default.apply(void 0, ["TSUnionType"].concat(args)); -} - -function TSIntersectionType() { - for (var _len183 = arguments.length, args = new Array(_len183), _key183 = 0; _key183 < _len183; _key183++) { - args[_key183] = arguments[_key183]; - } - - return _builder.default.apply(void 0, ["TSIntersectionType"].concat(args)); -} - -function TSConditionalType() { - for (var _len184 = arguments.length, args = new Array(_len184), _key184 = 0; _key184 < _len184; _key184++) { - args[_key184] = arguments[_key184]; - } - - return _builder.default.apply(void 0, ["TSConditionalType"].concat(args)); -} - -function TSInferType() { - for (var _len185 = arguments.length, args = new Array(_len185), _key185 = 0; _key185 < _len185; _key185++) { - args[_key185] = arguments[_key185]; - } - - return _builder.default.apply(void 0, ["TSInferType"].concat(args)); -} - -function TSParenthesizedType() { - for (var _len186 = arguments.length, args = new Array(_len186), _key186 = 0; _key186 < _len186; _key186++) { - args[_key186] = arguments[_key186]; - } - - return _builder.default.apply(void 0, ["TSParenthesizedType"].concat(args)); -} - -function TSTypeOperator() { - for (var _len187 = arguments.length, args = new Array(_len187), _key187 = 0; _key187 < _len187; _key187++) { - args[_key187] = arguments[_key187]; - } - - return _builder.default.apply(void 0, ["TSTypeOperator"].concat(args)); -} - -function TSIndexedAccessType() { - for (var _len188 = arguments.length, args = new Array(_len188), _key188 = 0; _key188 < _len188; _key188++) { - args[_key188] = arguments[_key188]; - } - - return _builder.default.apply(void 0, ["TSIndexedAccessType"].concat(args)); -} - -function TSMappedType() { - for (var _len189 = arguments.length, args = new Array(_len189), _key189 = 0; _key189 < _len189; _key189++) { - args[_key189] = arguments[_key189]; - } - - return _builder.default.apply(void 0, ["TSMappedType"].concat(args)); -} - -function TSLiteralType() { - for (var _len190 = arguments.length, args = new Array(_len190), _key190 = 0; _key190 < _len190; _key190++) { - args[_key190] = arguments[_key190]; - } - - return _builder.default.apply(void 0, ["TSLiteralType"].concat(args)); -} - -function TSExpressionWithTypeArguments() { - for (var _len191 = arguments.length, args = new Array(_len191), _key191 = 0; _key191 < _len191; _key191++) { - args[_key191] = arguments[_key191]; - } - - return _builder.default.apply(void 0, ["TSExpressionWithTypeArguments"].concat(args)); -} - -function TSInterfaceDeclaration() { - for (var _len192 = arguments.length, args = new Array(_len192), _key192 = 0; _key192 < _len192; _key192++) { - args[_key192] = arguments[_key192]; - } - - return _builder.default.apply(void 0, ["TSInterfaceDeclaration"].concat(args)); -} - -function TSInterfaceBody() { - for (var _len193 = arguments.length, args = new Array(_len193), _key193 = 0; _key193 < _len193; _key193++) { - args[_key193] = arguments[_key193]; - } - - return _builder.default.apply(void 0, ["TSInterfaceBody"].concat(args)); -} - -function TSTypeAliasDeclaration() { - for (var _len194 = arguments.length, args = new Array(_len194), _key194 = 0; _key194 < _len194; _key194++) { - args[_key194] = arguments[_key194]; - } - - return _builder.default.apply(void 0, ["TSTypeAliasDeclaration"].concat(args)); -} - -function TSAsExpression() { - for (var _len195 = arguments.length, args = new Array(_len195), _key195 = 0; _key195 < _len195; _key195++) { - args[_key195] = arguments[_key195]; - } - - return _builder.default.apply(void 0, ["TSAsExpression"].concat(args)); -} - -function TSTypeAssertion() { - for (var _len196 = arguments.length, args = new Array(_len196), _key196 = 0; _key196 < _len196; _key196++) { - args[_key196] = arguments[_key196]; - } - - return _builder.default.apply(void 0, ["TSTypeAssertion"].concat(args)); -} - -function TSEnumDeclaration() { - for (var _len197 = arguments.length, args = new Array(_len197), _key197 = 0; _key197 < _len197; _key197++) { - args[_key197] = arguments[_key197]; - } - - return _builder.default.apply(void 0, ["TSEnumDeclaration"].concat(args)); -} - -function TSEnumMember() { - for (var _len198 = arguments.length, args = new Array(_len198), _key198 = 0; _key198 < _len198; _key198++) { - args[_key198] = arguments[_key198]; - } - - return _builder.default.apply(void 0, ["TSEnumMember"].concat(args)); -} - -function TSModuleDeclaration() { - for (var _len199 = arguments.length, args = new Array(_len199), _key199 = 0; _key199 < _len199; _key199++) { - args[_key199] = arguments[_key199]; - } - - return _builder.default.apply(void 0, ["TSModuleDeclaration"].concat(args)); -} - -function TSModuleBlock() { - for (var _len200 = arguments.length, args = new Array(_len200), _key200 = 0; _key200 < _len200; _key200++) { - args[_key200] = arguments[_key200]; - } - - return _builder.default.apply(void 0, ["TSModuleBlock"].concat(args)); -} - -function TSImportEqualsDeclaration() { - for (var _len201 = arguments.length, args = new Array(_len201), _key201 = 0; _key201 < _len201; _key201++) { - args[_key201] = arguments[_key201]; - } - - return _builder.default.apply(void 0, ["TSImportEqualsDeclaration"].concat(args)); -} - -function TSExternalModuleReference() { - for (var _len202 = arguments.length, args = new Array(_len202), _key202 = 0; _key202 < _len202; _key202++) { - args[_key202] = arguments[_key202]; - } - - return _builder.default.apply(void 0, ["TSExternalModuleReference"].concat(args)); -} - -function TSNonNullExpression() { - for (var _len203 = arguments.length, args = new Array(_len203), _key203 = 0; _key203 < _len203; _key203++) { - args[_key203] = arguments[_key203]; - } - - return _builder.default.apply(void 0, ["TSNonNullExpression"].concat(args)); -} - -function TSExportAssignment() { - for (var _len204 = arguments.length, args = new Array(_len204), _key204 = 0; _key204 < _len204; _key204++) { - args[_key204] = arguments[_key204]; - } - - return _builder.default.apply(void 0, ["TSExportAssignment"].concat(args)); -} - -function TSNamespaceExportDeclaration() { - for (var _len205 = arguments.length, args = new Array(_len205), _key205 = 0; _key205 < _len205; _key205++) { - args[_key205] = arguments[_key205]; - } - - return _builder.default.apply(void 0, ["TSNamespaceExportDeclaration"].concat(args)); -} - -function TSTypeAnnotation() { - for (var _len206 = arguments.length, args = new Array(_len206), _key206 = 0; _key206 < _len206; _key206++) { - args[_key206] = arguments[_key206]; - } - - return _builder.default.apply(void 0, ["TSTypeAnnotation"].concat(args)); -} - -function TSTypeParameterInstantiation() { - for (var _len207 = arguments.length, args = new Array(_len207), _key207 = 0; _key207 < _len207; _key207++) { - args[_key207] = arguments[_key207]; - } - - return _builder.default.apply(void 0, ["TSTypeParameterInstantiation"].concat(args)); -} - -function TSTypeParameterDeclaration() { - for (var _len208 = arguments.length, args = new Array(_len208), _key208 = 0; _key208 < _len208; _key208++) { - args[_key208] = arguments[_key208]; - } - - return _builder.default.apply(void 0, ["TSTypeParameterDeclaration"].concat(args)); -} - -function TSTypeParameter() { - for (var _len209 = arguments.length, args = new Array(_len209), _key209 = 0; _key209 < _len209; _key209++) { - args[_key209] = arguments[_key209]; - } - - return _builder.default.apply(void 0, ["TSTypeParameter"].concat(args)); -} - -function NumberLiteral() { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - - for (var _len210 = arguments.length, args = new Array(_len210), _key210 = 0; _key210 < _len210; _key210++) { - args[_key210] = arguments[_key210]; - } - - return NumberLiteral.apply(void 0, ["NumberLiteral"].concat(args)); -} - -function RegexLiteral() { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - - for (var _len211 = arguments.length, args = new Array(_len211), _key211 = 0; _key211 < _len211; _key211++) { - args[_key211] = arguments[_key211]; - } - - return RegexLiteral.apply(void 0, ["RegexLiteral"].concat(args)); -} - -function RestProperty() { - console.trace("The node type RestProperty has been renamed to RestElement"); - - for (var _len212 = arguments.length, args = new Array(_len212), _key212 = 0; _key212 < _len212; _key212++) { - args[_key212] = arguments[_key212]; - } - - return RestProperty.apply(void 0, ["RestProperty"].concat(args)); -} - -function SpreadProperty() { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - - for (var _len213 = arguments.length, args = new Array(_len213), _key213 = 0; _key213 < _len213; _key213++) { - args[_key213] = arguments[_key213]; - } - - return SpreadProperty.apply(void 0, ["SpreadProperty"].concat(args)); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneNode.js b/node_modules/@babel/types/lib/clone/cloneNode.js deleted file mode 100644 index 2c79c91..0000000 --- a/node_modules/@babel/types/lib/clone/cloneNode.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneNode; - -var _definitions = require("../definitions"); - -var has = Function.call.bind(Object.prototype.hasOwnProperty); - -function cloneIfNode(obj, deep) { - if (obj && typeof obj.type === "string" && obj.type !== "CommentLine" && obj.type !== "CommentBlock") { - return cloneNode(obj, deep); - } - - return obj; -} - -function cloneIfNodeOrArray(obj, deep) { - if (Array.isArray(obj)) { - return obj.map(function (node) { - return cloneIfNode(node, deep); - }); - } - - return cloneIfNode(obj, deep); -} - -function cloneNode(node, deep) { - if (deep === void 0) { - deep = true; - } - - if (!node) return node; - var type = node.type; - var newNode = { - type: type - }; - - if (type === "Identifier") { - newNode.name = node.name; - } else if (!has(_definitions.NODE_FIELDS, type)) { - throw new Error("Unknown node type: \"" + type + "\""); - } else { - var _arr = Object.keys(_definitions.NODE_FIELDS[type]); - - for (var _i = 0; _i < _arr.length; _i++) { - var field = _arr[_i]; - - if (has(node, field)) { - newNode[field] = deep ? cloneIfNodeOrArray(node[field], true) : node[field]; - } - } - } - - if (has(node, "loc")) { - newNode.loc = node.loc; - } - - if (has(node, "leadingComments")) { - newNode.leadingComments = node.leadingComments; - } - - if (has(node, "innerComments")) { - newNode.innerComments = node.innerCmments; - } - - if (has(node, "trailingComments")) { - newNode.trailingComments = node.trailingComments; - } - - if (has(node, "extra")) { - newNode.extra = Object.assign({}, node.extra); - } - - return newNode; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/constants/generated/index.js b/node_modules/@babel/types/lib/constants/generated/index.js deleted file mode 100644 index d1ff64a..0000000 --- a/node_modules/@babel/types/lib/constants/generated/index.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0; - -var _definitions = require("../../definitions"); - -var EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; -exports.EXPRESSION_TYPES = EXPRESSION_TYPES; -var BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; -exports.BINARY_TYPES = BINARY_TYPES; -var SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; -exports.SCOPABLE_TYPES = SCOPABLE_TYPES; -var BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; -exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; -var BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; -exports.BLOCK_TYPES = BLOCK_TYPES; -var STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; -exports.STATEMENT_TYPES = STATEMENT_TYPES; -var TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; -exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; -var COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; -exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; -var CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; -exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; -var LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; -exports.LOOP_TYPES = LOOP_TYPES; -var WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; -exports.WHILE_TYPES = WHILE_TYPES; -var EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; -exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; -var FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; -exports.FOR_TYPES = FOR_TYPES; -var FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; -exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; -var FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; -exports.FUNCTION_TYPES = FUNCTION_TYPES; -var FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; -exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; -var PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; -exports.PUREISH_TYPES = PUREISH_TYPES; -var DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; -exports.DECLARATION_TYPES = DECLARATION_TYPES; -var PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; -exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; -var LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; -exports.LVAL_TYPES = LVAL_TYPES; -var TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; -exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; -var LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; -exports.LITERAL_TYPES = LITERAL_TYPES; -var IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; -exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; -var USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; -exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; -var METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; -exports.METHOD_TYPES = METHOD_TYPES; -var OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; -exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; -var PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; -exports.PROPERTY_TYPES = PROPERTY_TYPES; -var UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; -exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; -var PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; -exports.PATTERN_TYPES = PATTERN_TYPES; -var CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; -exports.CLASS_TYPES = CLASS_TYPES; -var MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; -exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; -var EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; -exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; -var MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; -exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; -var FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; -exports.FLOW_TYPES = FLOW_TYPES; -var FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; -exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; -var FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; -exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; -var FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; -exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; -var FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; -exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; -var JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; -exports.JSX_TYPES = JSX_TYPES; -var PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; -exports.PRIVATE_TYPES = PRIVATE_TYPES; -var TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; -exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; -var TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; -exports.TSTYPE_TYPES = TSTYPE_TYPES; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/constants/index.js b/node_modules/@babel/types/lib/constants/index.js deleted file mode 100644 index 3b80017..0000000 --- a/node_modules/@babel/types/lib/constants/index.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0; -var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; -exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; -var FLATTENABLE_KEYS = ["body", "expressions"]; -exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; -var FOR_INIT_KEYS = ["left", "init"]; -exports.FOR_INIT_KEYS = FOR_INIT_KEYS; -var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; -exports.COMMENT_KEYS = COMMENT_KEYS; -var LOGICAL_OPERATORS = ["||", "&&", "??"]; -exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; -var UPDATE_OPERATORS = ["++", "--"]; -exports.UPDATE_OPERATORS = UPDATE_OPERATORS; -var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; -exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; -var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; -exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; -var COMPARISON_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS.concat(["in", "instanceof"]); -exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; -var BOOLEAN_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS.concat(BOOLEAN_NUMBER_BINARY_OPERATORS); -exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; -var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; -exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; -var BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS); -exports.BINARY_OPERATORS = BINARY_OPERATORS; -var BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; -exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; -var NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; -exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; -var STRING_UNARY_OPERATORS = ["typeof"]; -exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; -var UNARY_OPERATORS = ["void", "throw"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS); -exports.UNARY_OPERATORS = UNARY_OPERATORS; -var INHERIT_KEYS = { - optional: ["typeAnnotation", "typeParameters", "returnType"], - force: ["start", "loc", "end"] -}; -exports.INHERIT_KEYS = INHERIT_KEYS; -var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); -exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; -var NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); -exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js deleted file mode 100644 index 2bc9ba6..0000000 --- a/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = gatherSequenceExpressions; - -var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -var _cloneNode = _interopRequireDefault(require("../clone/cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function gatherSequenceExpressions(nodes, scope, declars) { - var exprs = []; - var ensureLastUndefined = true; - - for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var node = _ref; - ensureLastUndefined = false; - - if ((0, _generated.isExpression)(node)) { - exprs.push(node); - } else if ((0, _generated.isExpressionStatement)(node)) { - exprs.push(node.expression); - } else if ((0, _generated.isVariableDeclaration)(node)) { - if (node.kind !== "var") return; - var _arr = node.declarations; - - for (var _i2 = 0; _i2 < _arr.length; _i2++) { - var declar = _arr[_i2]; - var bindings = (0, _getBindingIdentifiers.default)(declar); - - for (var key in bindings) { - declars.push({ - kind: node.kind, - id: (0, _cloneNode.default)(bindings[key]) - }); - } - - if (declar.init) { - exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); - } - } - - ensureLastUndefined = true; - } else if ((0, _generated.isIfStatement)(node)) { - var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); - var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); - if (!consequent || !alternate) return; - exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); - } else if ((0, _generated.isBlockStatement)(node)) { - var body = gatherSequenceExpressions(node.body, scope, declars); - if (!body) return; - exprs.push(body); - } else if ((0, _generated.isEmptyStatement)(node)) { - ensureLastUndefined = true; - } else { - return; - } - } - - if (ensureLastUndefined) { - exprs.push(scope.buildUndefinedNode()); - } - - if (exprs.length === 1) { - return exprs[0]; - } else { - return (0, _generated2.sequenceExpression)(exprs); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/node_modules/@babel/types/lib/converters/toSequenceExpression.js deleted file mode 100644 index 2875568..0000000 --- a/node_modules/@babel/types/lib/converters/toSequenceExpression.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toSequenceExpression; - -var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toSequenceExpression(nodes, scope) { - if (!nodes || !nodes.length) return; - var declars = []; - var result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); - if (!result) return; - - for (var _i = 0; _i < declars.length; _i++) { - var declar = declars[_i]; - scope.push(declar); - } - - return result; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/valueToNode.js b/node_modules/@babel/types/lib/converters/valueToNode.js deleted file mode 100644 index df27a37..0000000 --- a/node_modules/@babel/types/lib/converters/valueToNode.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = valueToNode; - -function _isPlainObject() { - var data = _interopRequireDefault(require("lodash/isPlainObject")); - - _isPlainObject = function _isPlainObject() { - return data; - }; - - return data; -} - -function _isRegExp() { - var data = _interopRequireDefault(require("lodash/isRegExp")); - - _isRegExp = function _isRegExp() { - return data; - }; - - return data; -} - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -var _generated = require("../builders/generated"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function valueToNode(value) { - if (value === undefined) { - return (0, _generated.identifier)("undefined"); - } - - if (value === true || value === false) { - return (0, _generated.booleanLiteral)(value); - } - - if (value === null) { - return (0, _generated.nullLiteral)(); - } - - if (typeof value === "string") { - return (0, _generated.stringLiteral)(value); - } - - if (typeof value === "number") { - return (0, _generated.numericLiteral)(value); - } - - if ((0, _isRegExp().default)(value)) { - var pattern = value.source; - var flags = value.toString().match(/\/([a-z]+|)$/)[1]; - return (0, _generated.regExpLiteral)(pattern, flags); - } - - if (Array.isArray(value)) { - return (0, _generated.arrayExpression)(value.map(valueToNode)); - } - - if ((0, _isPlainObject().default)(value)) { - var props = []; - - for (var key in value) { - var nodeKey = void 0; - - if ((0, _isValidIdentifier.default)(key)) { - nodeKey = (0, _generated.identifier)(key); - } else { - nodeKey = (0, _generated.stringLiteral)(key); - } - - props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); - } - - return (0, _generated.objectExpression)(props); - } - - throw new Error("don't know how to turn this value into a node"); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/core.js b/node_modules/@babel/types/lib/definitions/core.js deleted file mode 100644 index 11d3b45..0000000 --- a/node_modules/@babel/types/lib/definitions/core.js +++ /dev/null @@ -1,705 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0; - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -var _constants = require("../constants"); - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -(0, _utils.default)("ArrayExpression", { - fields: { - elements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), - default: [] - } - }, - visitor: ["elements"], - aliases: ["Expression"] -}); -(0, _utils.default)("AssignmentExpression", { - fields: { - operator: { - validate: (0, _utils.assertValueType)("string") - }, - left: { - validate: (0, _utils.assertNodeType)("LVal") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Expression"] -}); -(0, _utils.default)("BinaryExpression", { - builder: ["operator", "left", "right"], - fields: { - operator: { - validate: _utils.assertOneOf.apply(void 0, _constants.BINARY_OPERATORS) - }, - left: { - validate: (0, _utils.assertNodeType)("Expression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - visitor: ["left", "right"], - aliases: ["Binary", "Expression"] -}); -(0, _utils.default)("Directive", { - visitor: ["value"], - fields: { - value: { - validate: (0, _utils.assertNodeType)("DirectiveLiteral") - } - } -}); -(0, _utils.default)("DirectiveLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("BlockStatement", { - builder: ["body", "directives"], - visitor: ["directives", "body"], - fields: { - directives: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block", "Statement"] -}); -(0, _utils.default)("BreakStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); -(0, _utils.default)("CallExpression", { - visitor: ["callee", "arguments", "typeParameters"], - builder: ["callee", "arguments"], - aliases: ["Expression"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName"))) - }, - optional: { - validate: (0, _utils.assertOneOf)(true, false), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("CatchClause", { - visitor: ["param", "body"], - fields: { - param: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }, - aliases: ["Scopable", "BlockParent"] -}); -(0, _utils.default)("ConditionalExpression", { - visitor: ["test", "consequent", "alternate"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _utils.assertNodeType)("Expression") - }, - alternate: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - aliases: ["Expression", "Conditional"] -}); -(0, _utils.default)("ContinueStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); -(0, _utils.default)("DebuggerStatement", { - aliases: ["Statement"] -}); -(0, _utils.default)("DoWhileStatement", { - visitor: ["test", "body"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - }, - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] -}); -(0, _utils.default)("EmptyStatement", { - aliases: ["Statement"] -}); -(0, _utils.default)("ExpressionStatement", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - aliases: ["Statement", "ExpressionWrapper"] -}); -(0, _utils.default)("File", { - builder: ["program", "comments", "tokens"], - visitor: ["program"], - fields: { - program: { - validate: (0, _utils.assertNodeType)("Program") - } - } -}); -(0, _utils.default)("ForInStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("ForStatement", { - visitor: ["init", "test", "update", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], - fields: { - init: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), - optional: true - }, - test: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - update: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -var functionCommon = { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("LVal"))) - }, - generator: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - }, - async: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - } -}; -exports.functionCommon = functionCommon; -var functionTypeAnnotationCommon = { - returnType: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), - optional: true - } -}; -exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon; - -var functionDeclarationCommon = _objectSpread({}, functionCommon, { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } -}); - -exports.functionDeclarationCommon = functionDeclarationCommon; -(0, _utils.default)("FunctionDeclaration", { - builder: ["id", "params", "body", "generator", "async"], - visitor: ["id", "params", "body", "returnType", "typeParameters"], - fields: _objectSpread({}, functionDeclarationCommon, functionTypeAnnotationCommon, { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }), - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] -}); -(0, _utils.default)("FunctionExpression", { - inherits: "FunctionDeclaration", - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: _objectSpread({}, functionCommon, functionTypeAnnotationCommon, { - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -var patternLikeCommon = { - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - } -}; -exports.patternLikeCommon = patternLikeCommon; -(0, _utils.default)("Identifier", { - builder: ["name"], - visitor: ["typeAnnotation"], - aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], - fields: _objectSpread({}, patternLikeCommon, { - name: { - validate: (0, _utils.chain)(function (node, key, val) { - if (!(0, _isValidIdentifier.default)(val)) {} - }, (0, _utils.assertValueType)("string")) - }, - optional: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }) -}); -(0, _utils.default)("IfStatement", { - visitor: ["test", "consequent", "alternate"], - aliases: ["Statement", "Conditional"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _utils.assertNodeType)("Statement") - }, - alternate: { - optional: true, - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("LabeledStatement", { - visitor: ["label", "body"], - aliases: ["Statement"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("StringLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("NumericLiteral", { - builder: ["value"], - deprecatedAlias: "NumberLiteral", - fields: { - value: { - validate: (0, _utils.assertValueType)("number") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("NullLiteral", { - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("BooleanLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("boolean") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("RegExpLiteral", { - builder: ["pattern", "flags"], - deprecatedAlias: "RegexLiteral", - aliases: ["Expression", "Literal"], - fields: { - pattern: { - validate: (0, _utils.assertValueType)("string") - }, - flags: { - validate: (0, _utils.assertValueType)("string"), - default: "" - } - } -}); -(0, _utils.default)("LogicalExpression", { - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Binary", "Expression"], - fields: { - operator: { - validate: _utils.assertOneOf.apply(void 0, _constants.LOGICAL_OPERATORS) - }, - left: { - validate: (0, _utils.assertNodeType)("Expression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("MemberExpression", { - builder: ["object", "property", "computed", "optional"], - visitor: ["object", "property"], - aliases: ["Expression", "LVal"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - property: { - validate: function () { - var normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); - var computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - var validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - computed: { - default: false - }, - optional: { - validate: (0, _utils.assertOneOf)(true, false), - optional: true - } - } -}); -(0, _utils.default)("NewExpression", { - inherits: "CallExpression" -}); -(0, _utils.default)("Program", { - visitor: ["directives", "body"], - builder: ["body", "directives", "sourceType"], - fields: { - sourceFile: { - validate: (0, _utils.assertValueType)("string") - }, - sourceType: { - validate: (0, _utils.assertOneOf)("script", "module"), - default: "script" - }, - directives: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block"] -}); -(0, _utils.default)("ObjectExpression", { - visitor: ["properties"], - aliases: ["Expression"], - fields: { - properties: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) - } - } -}); -(0, _utils.default)("ObjectMethod", { - builder: ["kind", "key", "params", "body", "computed"], - fields: _objectSpread({}, functionCommon, functionTypeAnnotationCommon, { - kind: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("method", "get", "set")), - default: "method" - }, - computed: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - key: { - validate: function () { - var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - var computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - var validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }), - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] -}); -(0, _utils.default)("ObjectProperty", { - builder: ["key", "value", "computed", "shorthand", "decorators"], - fields: { - computed: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - key: { - validate: function () { - var normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - var computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - var validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - value: { - validate: (0, _utils.assertNodeType)("Expression", "PatternLike") - }, - shorthand: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }, - visitor: ["key", "value", "decorators"], - aliases: ["UserWhitespacable", "Property", "ObjectMember"] -}); -(0, _utils.default)("RestElement", { - visitor: ["argument", "typeAnnotation"], - builder: ["argument"], - aliases: ["LVal", "PatternLike"], - deprecatedAlias: "RestProperty", - fields: _objectSpread({}, patternLikeCommon, { - argument: { - validate: (0, _utils.assertNodeType)("LVal") - } - }) -}); -(0, _utils.default)("ReturnStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - } - } -}); -(0, _utils.default)("SequenceExpression", { - visitor: ["expressions"], - fields: { - expressions: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) - } - }, - aliases: ["Expression"] -}); -(0, _utils.default)("SwitchCase", { - visitor: ["test", "consequent"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - consequent: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - } -}); -(0, _utils.default)("SwitchStatement", { - visitor: ["discriminant", "cases"], - aliases: ["Statement", "BlockParent", "Scopable"], - fields: { - discriminant: { - validate: (0, _utils.assertNodeType)("Expression") - }, - cases: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) - } - } -}); -(0, _utils.default)("ThisExpression", { - aliases: ["Expression"] -}); -(0, _utils.default)("ThrowStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("TryStatement", { - visitor: ["block", "handler", "finalizer"], - aliases: ["Statement"], - fields: { - block: { - validate: (0, _utils.assertNodeType)("BlockStatement") - }, - handler: { - optional: true, - validate: (0, _utils.assertNodeType)("CatchClause") - }, - finalizer: { - optional: true, - validate: (0, _utils.assertNodeType)("BlockStatement") - } - } -}); -(0, _utils.default)("UnaryExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: true - }, - argument: { - validate: (0, _utils.assertNodeType)("Expression") - }, - operator: { - validate: _utils.assertOneOf.apply(void 0, _constants.UNARY_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["UnaryLike", "Expression"] -}); -(0, _utils.default)("UpdateExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: false - }, - argument: { - validate: (0, _utils.assertNodeType)("Expression") - }, - operator: { - validate: _utils.assertOneOf.apply(void 0, _constants.UPDATE_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["Expression"] -}); -(0, _utils.default)("VariableDeclaration", { - builder: ["kind", "declarations"], - visitor: ["declarations"], - aliases: ["Statement", "Declaration"], - fields: { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - kind: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("var", "let", "const")) - }, - declarations: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) - } - } -}); -(0, _utils.default)("VariableDeclarator", { - visitor: ["id", "init"], - fields: { - id: { - validate: (0, _utils.assertNodeType)("LVal") - }, - definite: { - optional: true, - validate: (0, _utils.assertValueType)("boolean") - }, - init: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("WhileStatement", { - visitor: ["test", "body"], - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") - } - } -}); -(0, _utils.default)("WithStatement", { - visitor: ["object", "body"], - aliases: ["Statement"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") - } - } -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/experimental.js b/node_modules/@babel/types/lib/definitions/experimental.js deleted file mode 100644 index e345d9b..0000000 --- a/node_modules/@babel/types/lib/definitions/experimental.js +++ /dev/null @@ -1,165 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _es = require("./es2015"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -(0, _utils.default)("AwaitExpression", { - builder: ["argument"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("BindExpression", { - visitor: ["object", "callee"], - aliases: ["Expression"], - fields: {} -}); -(0, _utils.default)("ClassProperty", { - visitor: ["key", "value", "typeAnnotation", "decorators"], - builder: ["key", "value", "typeAnnotation", "decorators", "computed"], - aliases: ["Property"], - fields: _objectSpread({}, _es.classMethodOrPropertyCommon, { - value: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - definite: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - }, - readonly: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }) -}); -(0, _utils.default)("OptionalMemberExpression", { - builder: ["object", "property", "computed", "optional"], - visitor: ["object", "property"], - aliases: ["Expression"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - property: { - validate: function () { - var normal = (0, _utils.assertNodeType)("Identifier"); - var computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - var validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - computed: { - default: false - }, - optional: { - validate: (0, _utils.assertValueType)("boolean") - } - } -}); -(0, _utils.default)("OptionalCallExpression", { - visitor: ["callee", "arguments", "typeParameters"], - builder: ["callee", "arguments", "optional"], - aliases: ["Expression"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName"))) - }, - optional: { - validate: (0, _utils.assertValueType)("boolean") - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("ClassPrivateProperty", { - visitor: ["key", "value"], - builder: ["key", "value"], - aliases: ["Property", "Private"], - fields: { - key: { - validate: (0, _utils.assertNodeType)("PrivateName") - }, - value: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - } - } -}); -(0, _utils.default)("Import", { - aliases: ["Expression"] -}); -(0, _utils.default)("Decorator", { - visitor: ["callee", "arguments"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - }, - arguments: { - optional: true, - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))) - } - } -}); -(0, _utils.default)("DoExpression", { - visitor: ["body"], - aliases: ["Expression"], - fields: { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - } -}); -(0, _utils.default)("ExportDefaultSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ExportNamespaceSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("PrivateName", { - visitor: ["id"], - aliases: ["Private"], - fields: { - id: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/flow.js b/node_modules/@babel/types/lib/definitions/flow.js deleted file mode 100644 index 00d305f..0000000 --- a/node_modules/@babel/types/lib/definitions/flow.js +++ /dev/null @@ -1,368 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -var defineInterfaceishType = function defineInterfaceishType(name, typeParameterType) { - if (typeParameterType === void 0) { - typeParameterType = "TypeParameterDeclaration"; - } - - (0, _utils.default)(name, { - builder: ["id", "typeParameters", "extends", "body"], - visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)(typeParameterType), - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), - body: (0, _utils.validateType)("ObjectTypeAnnotation") - } - }); -}; - -(0, _utils.default)("AnyTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ArrayTypeAnnotation", { - visitor: ["elementType"], - aliases: ["Flow", "FlowType"], - fields: { - elementType: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("BooleanTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("BooleanLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("NullLiteralTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ClassImplements", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -defineInterfaceishType("DeclareClass", "TypeParameterInstantiation"); -(0, _utils.default)("DeclareFunction", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") - } -}); -defineInterfaceishType("DeclareInterface"); -(0, _utils.default)("DeclareModule", { - builder: ["id", "body", "kind"], - visitor: ["id", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - body: (0, _utils.validateType)("BlockStatement"), - kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) - } -}); -(0, _utils.default)("DeclareModuleExports", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - typeAnnotation: (0, _utils.validateType)("TypeAnnotation") - } -}); -(0, _utils.default)("DeclareTypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - right: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("DeclareOpaqueType", { - visitor: ["id", "typeParameters", "supertype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - supertype: (0, _utils.validateOptionalType)("FlowType") - } -}); -(0, _utils.default)("DeclareVariable", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); -(0, _utils.default)("DeclareExportDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - declaration: (0, _utils.validateOptionalType)("Flow"), - specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), - source: (0, _utils.validateOptionalType)("StringLiteral"), - default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("DeclareExportAllDeclaration", { - visitor: ["source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - source: (0, _utils.validateType)("StringLiteral"), - exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)(["type", "value"])) - } -}); -(0, _utils.default)("DeclaredPredicate", { - visitor: ["value"], - aliases: ["Flow", "FlowPredicate"], - fields: { - value: (0, _utils.validateType)("Flow") - } -}); -(0, _utils.default)("ExistsTypeAnnotation", { - aliases: ["Flow", "FlowType"] -}); -(0, _utils.default)("FunctionTypeAnnotation", { - visitor: ["typeParameters", "params", "rest", "returnType"], - aliases: ["Flow", "FlowType"], - fields: { - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), - rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), - returnType: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("FunctionTypeParam", { - visitor: ["name", "typeAnnotation"], - aliases: ["Flow"], - fields: { - name: (0, _utils.validateOptionalType)("Identifier"), - typeAnnotation: (0, _utils.validateType)("FlowType"), - optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("GenericTypeAnnotation", { - visitor: ["id", "typeParameters"], - aliases: ["Flow", "FlowType"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -(0, _utils.default)("InferredPredicate", { - aliases: ["Flow", "FlowPredicate"] -}); -(0, _utils.default)("InterfaceExtends", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -defineInterfaceishType("InterfaceDeclaration"); -(0, _utils.default)("IntersectionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("MixedTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("EmptyTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("NullableTypeAnnotation", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowType"], - fields: { - typeAnnotation: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("NumberLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("number")) - } -}); -(0, _utils.default)("NumberTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ObjectTypeAnnotation", { - visitor: ["properties", "indexers", "callProperties"], - aliases: ["Flow", "FlowType"], - builder: ["properties", "indexers", "callProperties", "exact"], - fields: { - properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), - indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), - callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), - exact: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - } - } -}); -(0, _utils.default)("ObjectTypeCallProperty", { - visitor: ["value"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - value: (0, _utils.validateType)("FlowType"), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeIndexer", { - visitor: ["id", "key", "value", "variance"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - id: (0, _utils.validateOptionalType)("Identifier"), - key: (0, _utils.validateType)("FlowType"), - value: (0, _utils.validateType)("FlowType"), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("ObjectTypeProperty", { - visitor: ["key", "value", "variance"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - value: (0, _utils.validateType)("FlowType"), - kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("ObjectTypeSpreadProperty", { - visitor: ["argument"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - argument: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("OpaqueType", { - visitor: ["id", "typeParameters", "supertype", "impltype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - supertype: (0, _utils.validateOptionalType)("FlowType"), - impltype: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("QualifiedTypeIdentifier", { - visitor: ["id", "qualification"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) - } -}); -(0, _utils.default)("StringLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("string")) - } -}); -(0, _utils.default)("StringTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ThisTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("TupleTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("TypeofTypeAnnotation", { - visitor: ["argument"], - aliases: ["Flow", "FlowType"], - fields: { - argument: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - right: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeAnnotation", { - aliases: ["Flow"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeCastExpression", { - visitor: ["expression", "typeAnnotation"], - aliases: ["Flow", "ExpressionWrapper", "Expression"], - fields: { - expression: (0, _utils.validateType)("Expression"), - typeAnnotation: (0, _utils.validateType)("TypeAnnotation") - } -}); -(0, _utils.default)("TypeParameter", { - aliases: ["Flow"], - visitor: ["bound", "default", "variance"], - fields: { - name: (0, _utils.validate)((0, _utils.assertValueType)("string")), - bound: (0, _utils.validateOptionalType)("TypeAnnotation"), - default: (0, _utils.validateOptionalType)("FlowType"), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("TypeParameterDeclaration", { - aliases: ["Flow"], - visitor: ["params"], - fields: { - params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) - } -}); -(0, _utils.default)("TypeParameterInstantiation", { - aliases: ["Flow"], - visitor: ["params"], - fields: { - params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("UnionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("Variance", { - aliases: ["Flow"], - builder: ["kind"], - fields: { - kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) - } -}); -(0, _utils.default)("VoidTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/index.js b/node_modules/@babel/types/lib/definitions/index.js deleted file mode 100644 index 5c6ba23..0000000 --- a/node_modules/@babel/types/lib/definitions/index.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "VISITOR_KEYS", { - enumerable: true, - get: function get() { - return _utils.VISITOR_KEYS; - } -}); -Object.defineProperty(exports, "ALIAS_KEYS", { - enumerable: true, - get: function get() { - return _utils.ALIAS_KEYS; - } -}); -Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", { - enumerable: true, - get: function get() { - return _utils.FLIPPED_ALIAS_KEYS; - } -}); -Object.defineProperty(exports, "NODE_FIELDS", { - enumerable: true, - get: function get() { - return _utils.NODE_FIELDS; - } -}); -Object.defineProperty(exports, "BUILDER_KEYS", { - enumerable: true, - get: function get() { - return _utils.BUILDER_KEYS; - } -}); -Object.defineProperty(exports, "DEPRECATED_KEYS", { - enumerable: true, - get: function get() { - return _utils.DEPRECATED_KEYS; - } -}); -exports.TYPES = void 0; - -function _toFastProperties() { - var data = _interopRequireDefault(require("to-fast-properties")); - - _toFastProperties = function _toFastProperties() { - return data; - }; - - return data; -} - -require("./core"); - -require("./es2015"); - -require("./flow"); - -require("./jsx"); - -require("./misc"); - -require("./experimental"); - -require("./typescript"); - -var _utils = require("./utils"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _toFastProperties().default)(_utils.VISITOR_KEYS); -(0, _toFastProperties().default)(_utils.ALIAS_KEYS); -(0, _toFastProperties().default)(_utils.FLIPPED_ALIAS_KEYS); -(0, _toFastProperties().default)(_utils.NODE_FIELDS); -(0, _toFastProperties().default)(_utils.BUILDER_KEYS); -(0, _toFastProperties().default)(_utils.DEPRECATED_KEYS); -var TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS)); -exports.TYPES = TYPES; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/jsx.js b/node_modules/@babel/types/lib/definitions/jsx.js deleted file mode 100644 index 0ed8978..0000000 --- a/node_modules/@babel/types/lib/definitions/jsx.js +++ /dev/null @@ -1,156 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("JSXAttribute", { - visitor: ["name", "value"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") - }, - value: { - optional: true, - validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") - } - } -}); -(0, _utils.default)("JSXClosingElement", { - visitor: ["name"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression") - } - } -}); -(0, _utils.default)("JSXElement", { - builder: ["openingElement", "closingElement", "children", "selfClosing"], - visitor: ["openingElement", "children", "closingElement"], - aliases: ["JSX", "Immutable", "Expression"], - fields: { - openingElement: { - validate: (0, _utils.assertNodeType)("JSXOpeningElement") - }, - closingElement: { - optional: true, - validate: (0, _utils.assertNodeType)("JSXClosingElement") - }, - children: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) - } - } -}); -(0, _utils.default)("JSXEmptyExpression", { - aliases: ["JSX"] -}); -(0, _utils.default)("JSXExpressionContainer", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("JSXSpreadChild", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("JSXIdentifier", { - builder: ["name"], - aliases: ["JSX"], - fields: { - name: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("JSXMemberExpression", { - visitor: ["object", "property"], - aliases: ["JSX"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") - }, - property: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - } - } -}); -(0, _utils.default)("JSXNamespacedName", { - visitor: ["namespace", "name"], - aliases: ["JSX"], - fields: { - namespace: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - }, - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - } - } -}); -(0, _utils.default)("JSXOpeningElement", { - builder: ["name", "attributes", "selfClosing"], - visitor: ["name", "attributes"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression") - }, - selfClosing: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - }, - attributes: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) - } - } -}); -(0, _utils.default)("JSXSpreadAttribute", { - visitor: ["argument"], - aliases: ["JSX"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("JSXText", { - aliases: ["JSX", "Immutable"], - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("JSXFragment", { - builder: ["openingFragment", "closingFragment", "children"], - visitor: ["openingFragment", "children", "closingFragment"], - aliases: ["JSX", "Immutable", "Expression"], - fields: { - openingFragment: { - validate: (0, _utils.assertNodeType)("JSXOpeningFragment") - }, - closingFragment: { - validate: (0, _utils.assertNodeType)("JSXClosingFragment") - }, - children: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) - } - } -}); -(0, _utils.default)("JSXOpeningFragment", { - aliases: ["JSX", "Immutable"] -}); -(0, _utils.default)("JSXClosingFragment", { - aliases: ["JSX", "Immutable"] -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/misc.js b/node_modules/@babel/types/lib/definitions/misc.js deleted file mode 100644 index 714f297..0000000 --- a/node_modules/@babel/types/lib/definitions/misc.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("Noop", { - visitor: [] -}); -(0, _utils.default)("ParenthesizedExpression", { - visitor: ["expression"], - aliases: ["Expression", "ExpressionWrapper"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/typescript.js b/node_modules/@babel/types/lib/definitions/typescript.js deleted file mode 100644 index fb78fb7..0000000 --- a/node_modules/@babel/types/lib/definitions/typescript.js +++ /dev/null @@ -1,393 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _core = require("./core"); - -var _es = require("./es2015"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var bool = (0, _utils.assertValueType)("boolean"); -var tSFunctionTypeAnnotationCommon = { - returnType: { - validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), - optional: true - } -}; -(0, _utils.default)("TSParameterProperty", { - aliases: ["LVal"], - visitor: ["parameter"], - fields: { - accessibility: { - validate: (0, _utils.assertOneOf)("public", "private", "protected"), - optional: true - }, - readonly: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - parameter: { - validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") - } - } -}); -(0, _utils.default)("TSDeclareFunction", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "params", "returnType"], - fields: _objectSpread({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) -}); -(0, _utils.default)("TSDeclareMethod", { - visitor: ["decorators", "key", "typeParameters", "params", "returnType"], - fields: _objectSpread({}, _es.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) -}); -(0, _utils.default)("TSQualifiedName", { - aliases: ["TSEntityName"], - visitor: ["left", "right"], - fields: { - left: (0, _utils.validateType)("TSEntityName"), - right: (0, _utils.validateType)("Identifier") - } -}); -var signatureDeclarationCommon = { - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") -}; -var callConstructSignatureDeclaration = { - aliases: ["TSTypeElement"], - visitor: ["typeParameters", "parameters", "typeAnnotation"], - fields: signatureDeclarationCommon -}; -(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration); -(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); -var namedTypeElementCommon = { - key: (0, _utils.validateType)("Expression"), - computed: (0, _utils.validate)(bool), - optional: (0, _utils.validateOptional)(bool) -}; -(0, _utils.default)("TSPropertySignature", { - aliases: ["TSTypeElement"], - visitor: ["key", "typeAnnotation", "initializer"], - fields: _objectSpread({}, namedTypeElementCommon, { - readonly: (0, _utils.validateOptional)(bool), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), - initializer: (0, _utils.validateOptionalType)("Expression") - }) -}); -(0, _utils.default)("TSMethodSignature", { - aliases: ["TSTypeElement"], - visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], - fields: _objectSpread({}, signatureDeclarationCommon, namedTypeElementCommon) -}); -(0, _utils.default)("TSIndexSignature", { - aliases: ["TSTypeElement"], - visitor: ["parameters", "typeAnnotation"], - fields: { - readonly: (0, _utils.validateOptional)(bool), - parameters: (0, _utils.validateArrayOfType)("Identifier"), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") - } -}); -var tsKeywordTypes = ["TSAnyKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSVoidKeyword", "TSUndefinedKeyword", "TSNullKeyword", "TSNeverKeyword"]; - -for (var _i = 0; _i < tsKeywordTypes.length; _i++) { - var type = tsKeywordTypes[_i]; - (0, _utils.default)(type, { - aliases: ["TSType"], - visitor: [], - fields: {} - }); -} - -(0, _utils.default)("TSThisType", { - aliases: ["TSType"], - visitor: [], - fields: {} -}); -var fnOrCtr = { - aliases: ["TSType"], - visitor: ["typeParameters", "typeAnnotation"], - fields: signatureDeclarationCommon -}; -(0, _utils.default)("TSFunctionType", fnOrCtr); -(0, _utils.default)("TSConstructorType", fnOrCtr); -(0, _utils.default)("TSTypeReference", { - aliases: ["TSType"], - visitor: ["typeName", "typeParameters"], - fields: { - typeName: (0, _utils.validateType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSTypePredicate", { - aliases: ["TSType"], - visitor: ["parameterName", "typeAnnotation"], - fields: { - parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), - typeAnnotation: (0, _utils.validateType)("TSTypeAnnotation") - } -}); -(0, _utils.default)("TSTypeQuery", { - aliases: ["TSType"], - visitor: ["exprName"], - fields: { - exprName: (0, _utils.validateType)("TSEntityName") - } -}); -(0, _utils.default)("TSTypeLiteral", { - aliases: ["TSType"], - visitor: ["members"], - fields: { - members: (0, _utils.validateArrayOfType)("TSTypeElement") - } -}); -(0, _utils.default)("TSArrayType", { - aliases: ["TSType"], - visitor: ["elementType"], - fields: { - elementType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTupleType", { - aliases: ["TSType"], - visitor: ["elementTypes"], - fields: { - elementTypes: (0, _utils.validateArrayOfType)("TSType") - } -}); -var unionOrIntersection = { - aliases: ["TSType"], - visitor: ["types"], - fields: { - types: (0, _utils.validateArrayOfType)("TSType") - } -}; -(0, _utils.default)("TSUnionType", unionOrIntersection); -(0, _utils.default)("TSIntersectionType", unionOrIntersection); -(0, _utils.default)("TSConditionalType", { - aliases: ["TSType"], - visitor: ["checkType", "extendsType", "trueType", "falseType"], - fields: { - checkType: (0, _utils.validateType)("TSType"), - extendsType: (0, _utils.validateType)("TSType"), - trueType: (0, _utils.validateType)("TSType"), - falseType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSInferType", { - aliases: ["TSType"], - visitor: ["typeParameter"], - fields: { - typeParameter: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSParenthesizedType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTypeOperator", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSIndexedAccessType", { - aliases: ["TSType"], - visitor: ["objectType", "indexType"], - fields: { - objectType: (0, _utils.validateType)("TSType"), - indexType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSMappedType", { - aliases: ["TSType"], - visitor: ["typeParameter", "typeAnnotation"], - fields: { - readonly: (0, _utils.validateOptional)(bool), - typeParameter: (0, _utils.validateType)("TSTypeParameter"), - optional: (0, _utils.validateOptional)(bool), - typeAnnotation: (0, _utils.validateOptionalType)("TSType") - } -}); -(0, _utils.default)("TSLiteralType", { - aliases: ["TSType"], - visitor: ["literal"], - fields: { - literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"]) - } -}); -(0, _utils.default)("TSExpressionWithTypeArguments", { - aliases: ["TSType"], - visitor: ["expression", "typeParameters"], - fields: { - expression: (0, _utils.validateType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSInterfaceDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "extends", "body"], - fields: { - declare: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), - body: (0, _utils.validateType)("TSInterfaceBody") - } -}); -(0, _utils.default)("TSInterfaceBody", { - visitor: ["body"], - fields: { - body: (0, _utils.validateArrayOfType)("TSTypeElement") - } -}); -(0, _utils.default)("TSTypeAliasDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "typeAnnotation"], - fields: { - declare: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSAsExpression", { - aliases: ["Expression"], - visitor: ["expression", "typeAnnotation"], - fields: { - expression: (0, _utils.validateType)("Expression"), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTypeAssertion", { - aliases: ["Expression"], - visitor: ["typeAnnotation", "expression"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType"), - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSEnumDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "members"], - fields: { - declare: (0, _utils.validateOptional)(bool), - const: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - members: (0, _utils.validateArrayOfType)("TSEnumMember"), - initializer: (0, _utils.validateOptionalType)("Expression") - } -}); -(0, _utils.default)("TSEnumMember", { - visitor: ["id", "initializer"], - fields: { - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - initializer: (0, _utils.validateOptionalType)("Expression") - } -}); -(0, _utils.default)("TSModuleDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "body"], - fields: { - declare: (0, _utils.validateOptional)(bool), - global: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) - } -}); -(0, _utils.default)("TSModuleBlock", { - visitor: ["body"], - fields: { - body: (0, _utils.validateArrayOfType)("Statement") - } -}); -(0, _utils.default)("TSImportEqualsDeclaration", { - aliases: ["Statement"], - visitor: ["id", "moduleReference"], - fields: { - isExport: (0, _utils.validate)(bool), - id: (0, _utils.validateType)("Identifier"), - moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]) - } -}); -(0, _utils.default)("TSExternalModuleReference", { - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("StringLiteral") - } -}); -(0, _utils.default)("TSNonNullExpression", { - aliases: ["Expression"], - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSExportAssignment", { - aliases: ["Statement"], - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSNamespaceExportDeclaration", { - aliases: ["Statement"], - visitor: ["id"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); -(0, _utils.default)("TSTypeAnnotation", { - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TSType") - } - } -}); -(0, _utils.default)("TSTypeParameterInstantiation", { - visitor: ["params"], - fields: { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) - } - } -}); -(0, _utils.default)("TSTypeParameterDeclaration", { - visitor: ["params"], - fields: { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) - } - } -}); -(0, _utils.default)("TSTypeParameter", { - visitor: ["constraint", "default"], - fields: { - name: { - validate: (0, _utils.assertValueType)("string") - }, - constraint: { - validate: (0, _utils.assertNodeType)("TSType"), - optional: true - }, - default: { - validate: (0, _utils.assertNodeType)("TSType"), - optional: true - } - } -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/utils.js b/node_modules/@babel/types/lib/definitions/utils.js deleted file mode 100644 index 5fbd017..0000000 --- a/node_modules/@babel/types/lib/definitions/utils.js +++ /dev/null @@ -1,248 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.typeIs = typeIs; -exports.validateType = validateType; -exports.validateOptional = validateOptional; -exports.validateOptionalType = validateOptionalType; -exports.arrayOf = arrayOf; -exports.arrayOfType = arrayOfType; -exports.validateArrayOfType = validateArrayOfType; -exports.assertEach = assertEach; -exports.assertOneOf = assertOneOf; -exports.assertNodeType = assertNodeType; -exports.assertNodeOrValueType = assertNodeOrValueType; -exports.assertValueType = assertValueType; -exports.chain = chain; -exports.default = defineType; -exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0; - -var _is = _interopRequireDefault(require("../validators/is")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var VISITOR_KEYS = {}; -exports.VISITOR_KEYS = VISITOR_KEYS; -var ALIAS_KEYS = {}; -exports.ALIAS_KEYS = ALIAS_KEYS; -var FLIPPED_ALIAS_KEYS = {}; -exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; -var NODE_FIELDS = {}; -exports.NODE_FIELDS = NODE_FIELDS; -var BUILDER_KEYS = {}; -exports.BUILDER_KEYS = BUILDER_KEYS; -var DEPRECATED_KEYS = {}; -exports.DEPRECATED_KEYS = DEPRECATED_KEYS; - -function getType(val) { - if (Array.isArray(val)) { - return "array"; - } else if (val === null) { - return "null"; - } else if (val === undefined) { - return "undefined"; - } else { - return typeof val; - } -} - -function validate(validate) { - return { - validate: validate - }; -} - -function typeIs(typeName) { - return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType.apply(void 0, typeName); -} - -function validateType(typeName) { - return validate(typeIs(typeName)); -} - -function validateOptional(validate) { - return { - validate: validate, - optional: true - }; -} - -function validateOptionalType(typeName) { - return { - validate: typeIs(typeName), - optional: true - }; -} - -function arrayOf(elementType) { - return chain(assertValueType("array"), assertEach(elementType)); -} - -function arrayOfType(typeName) { - return arrayOf(typeIs(typeName)); -} - -function validateArrayOfType(typeName) { - return validate(arrayOfType(typeName)); -} - -function assertEach(callback) { - function validator(node, key, val) { - if (!Array.isArray(val)) return; - - for (var i = 0; i < val.length; i++) { - callback(node, key + "[" + i + "]", val[i]); - } - } - - validator.each = callback; - return validator; -} - -function assertOneOf() { - for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) { - values[_key] = arguments[_key]; - } - - function validate(node, key, val) { - if (values.indexOf(val) < 0) { - throw new TypeError("Property " + key + " expected value to be one of " + JSON.stringify(values) + " but got " + JSON.stringify(val)); - } - } - - validate.oneOf = values; - return validate; -} - -function assertNodeType() { - for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - types[_key2] = arguments[_key2]; - } - - function validate(node, key, val) { - var valid = false; - - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - - if ((0, _is.default)(type, val)) { - valid = true; - break; - } - } - - if (!valid) { - throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " " + ("but instead got " + JSON.stringify(val && val.type))); - } - } - - validate.oneOfNodeTypes = types; - return validate; -} - -function assertNodeOrValueType() { - for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - types[_key3] = arguments[_key3]; - } - - function validate(node, key, val) { - var valid = false; - - for (var _i2 = 0; _i2 < types.length; _i2++) { - var type = types[_i2]; - - if (getType(val) === type || (0, _is.default)(type, val)) { - valid = true; - break; - } - } - - if (!valid) { - throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " " + ("but instead got " + JSON.stringify(val && val.type))); - } - } - - validate.oneOfNodeOrValueTypes = types; - return validate; -} - -function assertValueType(type) { - function validate(node, key, val) { - var valid = getType(val) === type; - - if (!valid) { - throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val)); - } - } - - validate.type = type; - return validate; -} - -function chain() { - for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - fns[_key4] = arguments[_key4]; - } - - function validate() { - for (var _i3 = 0; _i3 < fns.length; _i3++) { - var fn = fns[_i3]; - fn.apply(void 0, arguments); - } - } - - validate.chainOf = fns; - return validate; -} - -function defineType(type, opts) { - if (opts === void 0) { - opts = {}; - } - - var inherits = opts.inherits && store[opts.inherits] || {}; - var fields = opts.fields || inherits.fields || {}; - var visitor = opts.visitor || inherits.visitor || []; - var aliases = opts.aliases || inherits.aliases || []; - var builder = opts.builder || inherits.builder || opts.visitor || []; - - if (opts.deprecatedAlias) { - DEPRECATED_KEYS[opts.deprecatedAlias] = type; - } - - var _arr = visitor.concat(builder); - - for (var _i4 = 0; _i4 < _arr.length; _i4++) { - var _key5 = _arr[_i4]; - fields[_key5] = fields[_key5] || {}; - } - - for (var key in fields) { - var field = fields[key]; - - if (builder.indexOf(key) === -1) { - field.optional = true; - } - - if (field.default === undefined) { - field.default = null; - } else if (!field.validate) { - field.validate = assertValueType(getType(field.default)); - } - } - - VISITOR_KEYS[type] = opts.visitor = visitor; - BUILDER_KEYS[type] = opts.builder = builder; - NODE_FIELDS[type] = opts.fields = fields; - ALIAS_KEYS[type] = opts.aliases = aliases; - aliases.forEach(function (alias) { - FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; - FLIPPED_ALIAS_KEYS[alias].push(type); - }); - store[type] = opts; -} - -var store = {}; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/index.d.ts b/node_modules/@babel/types/lib/index.d.ts deleted file mode 100644 index 957d62e..0000000 --- a/node_modules/@babel/types/lib/index.d.ts +++ /dev/null @@ -1,1880 +0,0 @@ -// NOTE: This file is autogenerated. Do not modify. -// See scripts/generators/typescript.js for script used. - -interface BaseComment { - value: string; - start: number; - end: number; - loc: SourceLocation; - type: "BlockComment" | "LineComment"; -} - -export interface BlockComment extends BaseComment { - type: "BlockComment"; -} - -export interface LineComment extends BaseComment { - type: "LineComment"; -} - -export type Comment = BlockComment | LineComment; - -export interface SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -interface BaseNode { - leadingComments: ReadonlyArray | null; - innerComments: ReadonlyArray | null; - trailingComments: ReadonlyArray | null; - start: number | null; - end: number | null; - loc: SourceLocation | null; - type: Node["type"]; -} - -export type Node = AnyTypeAnnotation | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | InferredPredicate | InterfaceDeclaration | InterfaceExtends | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | MixedTypeAnnotation | ModuleDeclaration | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Statement | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | TSAnyKeyword | TSArrayType | TSAsExpression | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TryStatement | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression; - -export interface ArrayExpression extends BaseNode { - type: "ArrayExpression"; - elements: Array; -} - -export interface AssignmentExpression extends BaseNode { - type: "AssignmentExpression"; - operator: string; - left: LVal; - right: Expression; -} - -export interface BinaryExpression extends BaseNode { - type: "BinaryExpression"; - operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; - left: Expression; - right: Expression; -} - -export interface Directive extends BaseNode { - type: "Directive"; - value: DirectiveLiteral; -} - -export interface DirectiveLiteral extends BaseNode { - type: "DirectiveLiteral"; - value: string; -} - -export interface BlockStatement extends BaseNode { - type: "BlockStatement"; - body: Array; - directives: Array; -} - -export interface BreakStatement extends BaseNode { - type: "BreakStatement"; - label: Identifier | null; -} - -export interface CallExpression extends BaseNode { - type: "CallExpression"; - callee: Expression; - arguments: Array; - optional: true | false | null; - typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; -} - -export interface CatchClause extends BaseNode { - type: "CatchClause"; - param: Identifier | null; - body: BlockStatement; -} - -export interface ConditionalExpression extends BaseNode { - type: "ConditionalExpression"; - test: Expression; - consequent: Expression; - alternate: Expression; -} - -export interface ContinueStatement extends BaseNode { - type: "ContinueStatement"; - label: Identifier | null; -} - -export interface DebuggerStatement extends BaseNode { - type: "DebuggerStatement"; -} - -export interface DoWhileStatement extends BaseNode { - type: "DoWhileStatement"; - test: Expression; - body: Statement; -} - -export interface EmptyStatement extends BaseNode { - type: "EmptyStatement"; -} - -export interface ExpressionStatement extends BaseNode { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface File extends BaseNode { - type: "File"; - program: Program; - comments: any; - tokens: any; -} - -export interface ForInStatement extends BaseNode { - type: "ForInStatement"; - left: VariableDeclaration | LVal; - right: Expression; - body: Statement; -} - -export interface ForStatement extends BaseNode { - type: "ForStatement"; - init: VariableDeclaration | Expression | null; - test: Expression | null; - update: Expression | null; - body: Statement; -} - -export interface FunctionDeclaration extends BaseNode { - type: "FunctionDeclaration"; - id: Identifier | null; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - declare: boolean | null; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface FunctionExpression extends BaseNode { - type: "FunctionExpression"; - id: Identifier | null; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface Identifier extends BaseNode { - type: "Identifier"; - name: string; - decorators: Array | null; - optional: boolean | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface IfStatement extends BaseNode { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate: Statement | null; -} - -export interface LabeledStatement extends BaseNode { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface StringLiteral extends BaseNode { - type: "StringLiteral"; - value: string; -} - -export interface NumericLiteral extends BaseNode { - type: "NumericLiteral"; - value: number; -} - -export interface NullLiteral extends BaseNode { - type: "NullLiteral"; -} - -export interface BooleanLiteral extends BaseNode { - type: "BooleanLiteral"; - value: boolean; -} - -export interface RegExpLiteral extends BaseNode { - type: "RegExpLiteral"; - pattern: string; - flags: string; -} - -export interface LogicalExpression extends BaseNode { - type: "LogicalExpression"; - operator: "||" | "&&" | "??"; - left: Expression; - right: Expression; -} - -export interface MemberExpression extends BaseNode { - type: "MemberExpression"; - object: Expression; - property: any; - computed: boolean; - optional: true | false | null; -} - -export interface NewExpression extends BaseNode { - type: "NewExpression"; - callee: Expression; - arguments: Array; - optional: true | false | null; - typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; -} - -export interface Program extends BaseNode { - type: "Program"; - body: Array; - directives: Array; - sourceType: "script" | "module"; - sourceFile: string | null; -} - -export interface ObjectExpression extends BaseNode { - type: "ObjectExpression"; - properties: Array; -} - -export interface ObjectMethod extends BaseNode { - type: "ObjectMethod"; - kind: "method" | "get" | "set"; - key: any; - params: Array; - body: BlockStatement; - computed: boolean; - async: boolean; - decorators: Array | null; - generator: boolean; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ObjectProperty extends BaseNode { - type: "ObjectProperty"; - key: any; - value: Expression | PatternLike; - computed: boolean; - shorthand: boolean; - decorators: Array | null; -} - -export interface RestElement extends BaseNode { - type: "RestElement"; - argument: LVal; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ReturnStatement extends BaseNode { - type: "ReturnStatement"; - argument: Expression | null; -} - -export interface SequenceExpression extends BaseNode { - type: "SequenceExpression"; - expressions: Array; -} - -export interface SwitchCase extends BaseNode { - type: "SwitchCase"; - test: Expression | null; - consequent: Array; -} - -export interface SwitchStatement extends BaseNode { - type: "SwitchStatement"; - discriminant: Expression; - cases: Array; -} - -export interface ThisExpression extends BaseNode { - type: "ThisExpression"; -} - -export interface ThrowStatement extends BaseNode { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends BaseNode { - type: "TryStatement"; - block: BlockStatement; - handler: CatchClause | null; - finalizer: BlockStatement | null; -} - -export interface UnaryExpression extends BaseNode { - type: "UnaryExpression"; - operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; - argument: Expression; - prefix: boolean; -} - -export interface UpdateExpression extends BaseNode { - type: "UpdateExpression"; - operator: "++" | "--"; - argument: Expression; - prefix: boolean; -} - -export interface VariableDeclaration extends BaseNode { - type: "VariableDeclaration"; - kind: "var" | "let" | "const"; - declarations: Array; - declare: boolean | null; -} - -export interface VariableDeclarator extends BaseNode { - type: "VariableDeclarator"; - id: LVal; - init: Expression | null; - definite: boolean | null; -} - -export interface WhileStatement extends BaseNode { - type: "WhileStatement"; - test: Expression; - body: BlockStatement | Statement; -} - -export interface WithStatement extends BaseNode { - type: "WithStatement"; - object: Expression; - body: BlockStatement | Statement; -} - -export interface AssignmentPattern extends BaseNode { - type: "AssignmentPattern"; - left: Identifier | ObjectPattern | ArrayPattern; - right: Expression; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ArrayPattern extends BaseNode { - type: "ArrayPattern"; - elements: Array; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ArrowFunctionExpression extends BaseNode { - type: "ArrowFunctionExpression"; - params: Array; - body: BlockStatement | Expression; - async: boolean; - expression: boolean | null; - generator: boolean; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ClassBody extends BaseNode { - type: "ClassBody"; - body: Array; -} - -export interface ClassDeclaration extends BaseNode { - type: "ClassDeclaration"; - id: Identifier | null; - superClass: Expression | null; - body: ClassBody; - decorators: Array | null; - abstract: boolean | null; - declare: boolean | null; - mixins: any | null; - superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ClassExpression extends BaseNode { - type: "ClassExpression"; - id: Identifier | null; - superClass: Expression | null; - body: ClassBody; - decorators: Array | null; - mixins: any | null; - superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ExportAllDeclaration extends BaseNode { - type: "ExportAllDeclaration"; - source: StringLiteral; -} - -export interface ExportDefaultDeclaration extends BaseNode { - type: "ExportDefaultDeclaration"; - declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression; -} - -export interface ExportNamedDeclaration extends BaseNode { - type: "ExportNamedDeclaration"; - declaration: Declaration | null; - specifiers: Array; - source: StringLiteral | null; -} - -export interface ExportSpecifier extends BaseNode { - type: "ExportSpecifier"; - local: Identifier; - exported: Identifier; -} - -export interface ForOfStatement extends BaseNode { - type: "ForOfStatement"; - left: VariableDeclaration | LVal; - right: Expression; - body: Statement; -} - -export interface ImportDeclaration extends BaseNode { - type: "ImportDeclaration"; - specifiers: Array; - source: StringLiteral; -} - -export interface ImportDefaultSpecifier extends BaseNode { - type: "ImportDefaultSpecifier"; - local: Identifier; -} - -export interface ImportNamespaceSpecifier extends BaseNode { - type: "ImportNamespaceSpecifier"; - local: Identifier; -} - -export interface ImportSpecifier extends BaseNode { - type: "ImportSpecifier"; - local: Identifier; - imported: Identifier; - importKind: null | "type" | "typeof" | null; -} - -export interface MetaProperty extends BaseNode { - type: "MetaProperty"; - meta: Identifier; - property: Identifier; -} - -export interface ClassMethod extends BaseNode { - type: "ClassMethod"; - kind: "get" | "set" | "method" | "constructor"; - key: Identifier | StringLiteral | NumericLiteral | Expression; - params: Array; - body: BlockStatement; - computed: boolean; - abstract: boolean | null; - access: "public" | "private" | "protected" | null; - accessibility: "public" | "private" | "protected" | null; - async: boolean; - decorators: Array | null; - generator: boolean; - optional: boolean | null; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ObjectPattern extends BaseNode { - type: "ObjectPattern"; - properties: Array; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface SpreadElement extends BaseNode { - type: "SpreadElement"; - argument: Expression; -} - -export interface Super extends BaseNode { - type: "Super"; -} - -export interface TaggedTemplateExpression extends BaseNode { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; -} - -export interface TemplateElement extends BaseNode { - type: "TemplateElement"; - value: any; - tail: boolean; -} - -export interface TemplateLiteral extends BaseNode { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; -} - -export interface YieldExpression extends BaseNode { - type: "YieldExpression"; - argument: Expression | null; - delegate: boolean; -} - -export interface AnyTypeAnnotation extends BaseNode { - type: "AnyTypeAnnotation"; -} - -export interface ArrayTypeAnnotation extends BaseNode { - type: "ArrayTypeAnnotation"; - elementType: FlowType; -} - -export interface BooleanTypeAnnotation extends BaseNode { - type: "BooleanTypeAnnotation"; -} - -export interface BooleanLiteralTypeAnnotation extends BaseNode { - type: "BooleanLiteralTypeAnnotation"; - value: boolean; -} - -export interface NullLiteralTypeAnnotation extends BaseNode { - type: "NullLiteralTypeAnnotation"; -} - -export interface ClassImplements extends BaseNode { - type: "ClassImplements"; - id: Identifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface DeclareClass extends BaseNode { - type: "DeclareClass"; - id: Identifier; - typeParameters: TypeParameterInstantiation | null; - body: ObjectTypeAnnotation; - mixins: Array | null; -} - -export interface DeclareFunction extends BaseNode { - type: "DeclareFunction"; - id: Identifier; - predicate: DeclaredPredicate | null; -} - -export interface DeclareInterface extends BaseNode { - type: "DeclareInterface"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - body: ObjectTypeAnnotation; - mixins: Array | null; -} - -export interface DeclareModule extends BaseNode { - type: "DeclareModule"; - id: Identifier | StringLiteral; - body: BlockStatement; - kind: "CommonJS" | "ES" | null; -} - -export interface DeclareModuleExports extends BaseNode { - type: "DeclareModuleExports"; - typeAnnotation: TypeAnnotation; -} - -export interface DeclareTypeAlias extends BaseNode { - type: "DeclareTypeAlias"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - right: FlowType; -} - -export interface DeclareOpaqueType extends BaseNode { - type: "DeclareOpaqueType"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - supertype: FlowType | null; -} - -export interface DeclareVariable extends BaseNode { - type: "DeclareVariable"; - id: Identifier; -} - -export interface DeclareExportDeclaration extends BaseNode { - type: "DeclareExportDeclaration"; - declaration: Flow | null; - specifiers: Array | null; - source: StringLiteral | null; -} - -export interface DeclareExportAllDeclaration extends BaseNode { - type: "DeclareExportAllDeclaration"; - source: StringLiteral; - exportKind: ["type","value"] | null; -} - -export interface DeclaredPredicate extends BaseNode { - type: "DeclaredPredicate"; - value: Flow; -} - -export interface ExistsTypeAnnotation extends BaseNode { - type: "ExistsTypeAnnotation"; -} - -export interface FunctionTypeAnnotation extends BaseNode { - type: "FunctionTypeAnnotation"; - typeParameters: TypeParameterDeclaration | null; - params: Array; - rest: FunctionTypeParam | null; - returnType: FlowType; -} - -export interface FunctionTypeParam extends BaseNode { - type: "FunctionTypeParam"; - name: Identifier | null; - typeAnnotation: FlowType; - optional: boolean | null; -} - -export interface GenericTypeAnnotation extends BaseNode { - type: "GenericTypeAnnotation"; - id: Identifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface InferredPredicate extends BaseNode { - type: "InferredPredicate"; -} - -export interface InterfaceExtends extends BaseNode { - type: "InterfaceExtends"; - id: Identifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface InterfaceDeclaration extends BaseNode { - type: "InterfaceDeclaration"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - body: ObjectTypeAnnotation; - mixins: Array | null; -} - -export interface IntersectionTypeAnnotation extends BaseNode { - type: "IntersectionTypeAnnotation"; - types: Array; -} - -export interface MixedTypeAnnotation extends BaseNode { - type: "MixedTypeAnnotation"; -} - -export interface EmptyTypeAnnotation extends BaseNode { - type: "EmptyTypeAnnotation"; -} - -export interface NullableTypeAnnotation extends BaseNode { - type: "NullableTypeAnnotation"; - typeAnnotation: FlowType; -} - -export interface NumberLiteralTypeAnnotation extends BaseNode { - type: "NumberLiteralTypeAnnotation"; - value: number; -} - -export interface NumberTypeAnnotation extends BaseNode { - type: "NumberTypeAnnotation"; -} - -export interface ObjectTypeAnnotation extends BaseNode { - type: "ObjectTypeAnnotation"; - properties: Array; - indexers: Array | null; - callProperties: Array | null; - exact: boolean; -} - -export interface ObjectTypeCallProperty extends BaseNode { - type: "ObjectTypeCallProperty"; - value: FlowType; -} - -export interface ObjectTypeIndexer extends BaseNode { - type: "ObjectTypeIndexer"; - id: Identifier | null; - key: FlowType; - value: FlowType; - variance: Variance | null; -} - -export interface ObjectTypeProperty extends BaseNode { - type: "ObjectTypeProperty"; - key: Identifier | StringLiteral; - value: FlowType; - variance: Variance | null; - kind: "init" | "get" | "set" | null; - optional: boolean | null; -} - -export interface ObjectTypeSpreadProperty extends BaseNode { - type: "ObjectTypeSpreadProperty"; - argument: FlowType; -} - -export interface OpaqueType extends BaseNode { - type: "OpaqueType"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - supertype: FlowType | null; - impltype: FlowType; -} - -export interface QualifiedTypeIdentifier extends BaseNode { - type: "QualifiedTypeIdentifier"; - id: Identifier; - qualification: Identifier | QualifiedTypeIdentifier; -} - -export interface StringLiteralTypeAnnotation extends BaseNode { - type: "StringLiteralTypeAnnotation"; - value: string; -} - -export interface StringTypeAnnotation extends BaseNode { - type: "StringTypeAnnotation"; -} - -export interface ThisTypeAnnotation extends BaseNode { - type: "ThisTypeAnnotation"; -} - -export interface TupleTypeAnnotation extends BaseNode { - type: "TupleTypeAnnotation"; - types: Array; -} - -export interface TypeofTypeAnnotation extends BaseNode { - type: "TypeofTypeAnnotation"; - argument: FlowType; -} - -export interface TypeAlias extends BaseNode { - type: "TypeAlias"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - right: FlowType; -} - -export interface TypeAnnotation extends BaseNode { - type: "TypeAnnotation"; - typeAnnotation: FlowType; -} - -export interface TypeCastExpression extends BaseNode { - type: "TypeCastExpression"; - expression: Expression; - typeAnnotation: TypeAnnotation; -} - -export interface TypeParameter extends BaseNode { - type: "TypeParameter"; - bound: TypeAnnotation | null; - variance: Variance | null; - name: string | null; -} - -export interface TypeParameterDeclaration extends BaseNode { - type: "TypeParameterDeclaration"; - params: Array; -} - -export interface TypeParameterInstantiation extends BaseNode { - type: "TypeParameterInstantiation"; - params: Array; -} - -export interface UnionTypeAnnotation extends BaseNode { - type: "UnionTypeAnnotation"; - types: Array; -} - -export interface Variance extends BaseNode { - type: "Variance"; - kind: "minus" | "plus"; -} - -export interface VoidTypeAnnotation extends BaseNode { - type: "VoidTypeAnnotation"; -} - -export interface JSXAttribute extends BaseNode { - type: "JSXAttribute"; - name: JSXIdentifier | JSXNamespacedName; - value: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null; -} - -export interface JSXClosingElement extends BaseNode { - type: "JSXClosingElement"; - name: JSXIdentifier | JSXMemberExpression; -} - -export interface JSXElement extends BaseNode { - type: "JSXElement"; - openingElement: JSXOpeningElement; - closingElement: JSXClosingElement | null; - children: Array; - selfClosing: any; -} - -export interface JSXEmptyExpression extends BaseNode { - type: "JSXEmptyExpression"; -} - -export interface JSXExpressionContainer extends BaseNode { - type: "JSXExpressionContainer"; - expression: Expression; -} - -export interface JSXSpreadChild extends BaseNode { - type: "JSXSpreadChild"; - expression: Expression; -} - -export interface JSXIdentifier extends BaseNode { - type: "JSXIdentifier"; - name: string; -} - -export interface JSXMemberExpression extends BaseNode { - type: "JSXMemberExpression"; - object: JSXMemberExpression | JSXIdentifier; - property: JSXIdentifier; -} - -export interface JSXNamespacedName extends BaseNode { - type: "JSXNamespacedName"; - namespace: JSXIdentifier; - name: JSXIdentifier; -} - -export interface JSXOpeningElement extends BaseNode { - type: "JSXOpeningElement"; - name: JSXIdentifier | JSXMemberExpression; - attributes: Array; - selfClosing: boolean; -} - -export interface JSXSpreadAttribute extends BaseNode { - type: "JSXSpreadAttribute"; - argument: Expression; -} - -export interface JSXText extends BaseNode { - type: "JSXText"; - value: string; -} - -export interface JSXFragment extends BaseNode { - type: "JSXFragment"; - openingFragment: JSXOpeningFragment; - closingFragment: JSXClosingFragment; - children: Array; -} - -export interface JSXOpeningFragment extends BaseNode { - type: "JSXOpeningFragment"; -} - -export interface JSXClosingFragment extends BaseNode { - type: "JSXClosingFragment"; -} - -export interface Noop extends BaseNode { - type: "Noop"; -} - -export interface ParenthesizedExpression extends BaseNode { - type: "ParenthesizedExpression"; - expression: Expression; -} - -export interface AwaitExpression extends BaseNode { - type: "AwaitExpression"; - argument: Expression; -} - -export interface BindExpression extends BaseNode { - type: "BindExpression"; - object: any; - callee: any; -} - -export interface ClassProperty extends BaseNode { - type: "ClassProperty"; - key: Identifier | StringLiteral | NumericLiteral | Expression; - value: Expression | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; - decorators: Array | null; - computed: boolean; - abstract: boolean | null; - accessibility: "public" | "private" | "protected" | null; - definite: boolean | null; - optional: boolean | null; - readonly: boolean | null; -} - -export interface OptionalMemberExpression extends BaseNode { - type: "OptionalMemberExpression"; - object: Expression; - property: any; - computed: boolean; - optional: boolean; -} - -export interface OptionalCallExpression extends BaseNode { - type: "OptionalCallExpression"; - callee: Expression; - arguments: Array; - optional: boolean; - typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; -} - -export interface ClassPrivateProperty extends BaseNode { - type: "ClassPrivateProperty"; - key: PrivateName; - value: Expression | null; -} - -export interface Import extends BaseNode { - type: "Import"; -} - -export interface Decorator extends BaseNode { - type: "Decorator"; - callee: Expression; - arguments: Array | null; -} - -export interface DoExpression extends BaseNode { - type: "DoExpression"; - body: BlockStatement; -} - -export interface ExportDefaultSpecifier extends BaseNode { - type: "ExportDefaultSpecifier"; - exported: Identifier; -} - -export interface ExportNamespaceSpecifier extends BaseNode { - type: "ExportNamespaceSpecifier"; - exported: Identifier; -} - -export interface PrivateName extends BaseNode { - type: "PrivateName"; - id: Identifier; -} - -export interface TSParameterProperty extends BaseNode { - type: "TSParameterProperty"; - parameter: Identifier | AssignmentPattern; - accessibility: "public" | "private" | "protected" | null; - readonly: boolean | null; -} - -export interface TSDeclareFunction extends BaseNode { - type: "TSDeclareFunction"; - id: Identifier | null; - typeParameters: TSTypeParameterDeclaration | Noop | null; - params: Array; - returnType: TSTypeAnnotation | Noop | null; - async: boolean; - declare: boolean | null; - generator: boolean; -} - -export interface TSDeclareMethod extends BaseNode { - type: "TSDeclareMethod"; - decorators: Array | null; - key: Identifier | StringLiteral | NumericLiteral | Expression; - typeParameters: TSTypeParameterDeclaration | Noop | null; - params: Array; - returnType: TSTypeAnnotation | Noop | null; - abstract: boolean | null; - access: "public" | "private" | "protected" | null; - accessibility: "public" | "private" | "protected" | null; - async: boolean; - computed: boolean; - generator: boolean; - kind: "get" | "set" | "method" | "constructor"; - optional: boolean | null; -} - -export interface TSQualifiedName extends BaseNode { - type: "TSQualifiedName"; - left: TSEntityName; - right: Identifier; -} - -export interface TSCallSignatureDeclaration extends BaseNode { - type: "TSCallSignatureDeclaration"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array | null; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSConstructSignatureDeclaration extends BaseNode { - type: "TSConstructSignatureDeclaration"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array | null; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSPropertySignature extends BaseNode { - type: "TSPropertySignature"; - key: Expression; - typeAnnotation: TSTypeAnnotation | null; - initializer: Expression | null; - computed: boolean | null; - optional: boolean | null; - readonly: boolean | null; -} - -export interface TSMethodSignature extends BaseNode { - type: "TSMethodSignature"; - key: Expression; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array | null; - typeAnnotation: TSTypeAnnotation | null; - computed: boolean | null; - optional: boolean | null; -} - -export interface TSIndexSignature extends BaseNode { - type: "TSIndexSignature"; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; - readonly: boolean | null; -} - -export interface TSAnyKeyword extends BaseNode { - type: "TSAnyKeyword"; -} - -export interface TSNumberKeyword extends BaseNode { - type: "TSNumberKeyword"; -} - -export interface TSObjectKeyword extends BaseNode { - type: "TSObjectKeyword"; -} - -export interface TSBooleanKeyword extends BaseNode { - type: "TSBooleanKeyword"; -} - -export interface TSStringKeyword extends BaseNode { - type: "TSStringKeyword"; -} - -export interface TSSymbolKeyword extends BaseNode { - type: "TSSymbolKeyword"; -} - -export interface TSVoidKeyword extends BaseNode { - type: "TSVoidKeyword"; -} - -export interface TSUndefinedKeyword extends BaseNode { - type: "TSUndefinedKeyword"; -} - -export interface TSNullKeyword extends BaseNode { - type: "TSNullKeyword"; -} - -export interface TSNeverKeyword extends BaseNode { - type: "TSNeverKeyword"; -} - -export interface TSThisType extends BaseNode { - type: "TSThisType"; -} - -export interface TSFunctionType extends BaseNode { - type: "TSFunctionType"; - typeParameters: TSTypeParameterDeclaration | null; - typeAnnotation: TSTypeAnnotation | null; - parameters: Array | null; -} - -export interface TSConstructorType extends BaseNode { - type: "TSConstructorType"; - typeParameters: TSTypeParameterDeclaration | null; - typeAnnotation: TSTypeAnnotation | null; - parameters: Array | null; -} - -export interface TSTypeReference extends BaseNode { - type: "TSTypeReference"; - typeName: TSEntityName; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSTypePredicate extends BaseNode { - type: "TSTypePredicate"; - parameterName: Identifier | TSThisType; - typeAnnotation: TSTypeAnnotation; -} - -export interface TSTypeQuery extends BaseNode { - type: "TSTypeQuery"; - exprName: TSEntityName; -} - -export interface TSTypeLiteral extends BaseNode { - type: "TSTypeLiteral"; - members: Array; -} - -export interface TSArrayType extends BaseNode { - type: "TSArrayType"; - elementType: TSType; -} - -export interface TSTupleType extends BaseNode { - type: "TSTupleType"; - elementTypes: Array; -} - -export interface TSUnionType extends BaseNode { - type: "TSUnionType"; - types: Array; -} - -export interface TSIntersectionType extends BaseNode { - type: "TSIntersectionType"; - types: Array; -} - -export interface TSConditionalType extends BaseNode { - type: "TSConditionalType"; - checkType: TSType; - extendsType: TSType; - trueType: TSType; - falseType: TSType; -} - -export interface TSInferType extends BaseNode { - type: "TSInferType"; - typeParameter: TSType; -} - -export interface TSParenthesizedType extends BaseNode { - type: "TSParenthesizedType"; - typeAnnotation: TSType; -} - -export interface TSTypeOperator extends BaseNode { - type: "TSTypeOperator"; - typeAnnotation: TSType; - operator: string | null; -} - -export interface TSIndexedAccessType extends BaseNode { - type: "TSIndexedAccessType"; - objectType: TSType; - indexType: TSType; -} - -export interface TSMappedType extends BaseNode { - type: "TSMappedType"; - typeParameter: TSTypeParameter; - typeAnnotation: TSType | null; - optional: boolean | null; - readonly: boolean | null; -} - -export interface TSLiteralType extends BaseNode { - type: "TSLiteralType"; - literal: NumericLiteral | StringLiteral | BooleanLiteral; -} - -export interface TSExpressionWithTypeArguments extends BaseNode { - type: "TSExpressionWithTypeArguments"; - expression: TSEntityName; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSInterfaceDeclaration extends BaseNode { - type: "TSInterfaceDeclaration"; - id: Identifier; - typeParameters: TSTypeParameterDeclaration | null; - body: TSInterfaceBody; - declare: boolean | null; -} - -export interface TSInterfaceBody extends BaseNode { - type: "TSInterfaceBody"; - body: Array; -} - -export interface TSTypeAliasDeclaration extends BaseNode { - type: "TSTypeAliasDeclaration"; - id: Identifier; - typeParameters: TSTypeParameterDeclaration | null; - typeAnnotation: TSType; - declare: boolean | null; -} - -export interface TSAsExpression extends BaseNode { - type: "TSAsExpression"; - expression: Expression; - typeAnnotation: TSType; -} - -export interface TSTypeAssertion extends BaseNode { - type: "TSTypeAssertion"; - typeAnnotation: TSType; - expression: Expression; -} - -export interface TSEnumDeclaration extends BaseNode { - type: "TSEnumDeclaration"; - id: Identifier; - members: Array; - declare: boolean | null; - initializer: Expression | null; -} - -export interface TSEnumMember extends BaseNode { - type: "TSEnumMember"; - id: Identifier | StringLiteral; - initializer: Expression | null; -} - -export interface TSModuleDeclaration extends BaseNode { - type: "TSModuleDeclaration"; - id: Identifier | StringLiteral; - body: TSModuleBlock | TSModuleDeclaration; - declare: boolean | null; - global: boolean | null; -} - -export interface TSModuleBlock extends BaseNode { - type: "TSModuleBlock"; - body: Array; -} - -export interface TSImportEqualsDeclaration extends BaseNode { - type: "TSImportEqualsDeclaration"; - id: Identifier; - moduleReference: TSEntityName | TSExternalModuleReference; - isExport: boolean | null; -} - -export interface TSExternalModuleReference extends BaseNode { - type: "TSExternalModuleReference"; - expression: StringLiteral; -} - -export interface TSNonNullExpression extends BaseNode { - type: "TSNonNullExpression"; - expression: Expression; -} - -export interface TSExportAssignment extends BaseNode { - type: "TSExportAssignment"; - expression: Expression; -} - -export interface TSNamespaceExportDeclaration extends BaseNode { - type: "TSNamespaceExportDeclaration"; - id: Identifier; -} - -export interface TSTypeAnnotation extends BaseNode { - type: "TSTypeAnnotation"; - typeAnnotation: TSType; -} - -export interface TSTypeParameterInstantiation extends BaseNode { - type: "TSTypeParameterInstantiation"; - params: Array; -} - -export interface TSTypeParameterDeclaration extends BaseNode { - type: "TSTypeParameterDeclaration"; - params: Array; -} - -export interface TSTypeParameter extends BaseNode { - type: "TSTypeParameter"; - constraint: TSType | null; - name: string | null; -} - -/** - * @deprecated Use `NumericLiteral` - */ -export type NumberLiteral = NumericLiteral; - -/** - * @deprecated Use `RegExpLiteral` - */ -export type RegexLiteral = RegExpLiteral; - -/** - * @deprecated Use `RestElement` - */ -export type RestProperty = RestElement; - -/** - * @deprecated Use `SpreadElement` - */ -export type SpreadProperty = SpreadElement; - -export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | TypeCastExpression | JSXElement | JSXFragment | ParenthesizedExpression | AwaitExpression | BindExpression | OptionalMemberExpression | OptionalCallExpression | Import | DoExpression | TSAsExpression | TSTypeAssertion | TSNonNullExpression; -export type Binary = BinaryExpression | LogicalExpression; -export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassDeclaration | ClassExpression | ForOfStatement | ClassMethod; -export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod; -export type Block = BlockStatement | Program; -export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration; -export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression; -export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement; -export type Conditional = ConditionalExpression | IfStatement; -export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement; -export type While = DoWhileStatement | WhileStatement; -export type ExpressionWrapper = ExpressionStatement | TypeCastExpression | ParenthesizedExpression; -export type For = ForInStatement | ForStatement | ForOfStatement; -export type ForXStatement = ForInStatement | ForOfStatement; -export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod; -export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod; -export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | ArrowFunctionExpression | ClassDeclaration | ClassExpression; -export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; -export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern; -export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty; -export type TSEntityName = Identifier | TSQualifiedName; -export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral; -export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment; -export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty; -export type Method = ObjectMethod | ClassMethod; -export type ObjectMember = ObjectMethod | ObjectProperty; -export type Property = ObjectProperty | ClassProperty | ClassPrivateProperty; -export type UnaryLike = UnaryExpression | SpreadElement; -export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern; -export type Class = ClassDeclaration | ClassExpression; -export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration; -export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; -export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier; -export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation; -export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation; -export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation; -export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias; -export type FlowPredicate = DeclaredPredicate | InferredPredicate; -export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment; -export type Private = ClassPrivateProperty | PrivateName; -export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature; -export type TSType = TSAnyKeyword | TSNumberKeyword | TSObjectKeyword | TSBooleanKeyword | TSStringKeyword | TSSymbolKeyword | TSVoidKeyword | TSUndefinedKeyword | TSNullKeyword | TSNeverKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments; -export function arrayExpression(elements?: Array): ArrayExpression; -export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression; -export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression, right: Expression): BinaryExpression; -export function directive(value: DirectiveLiteral): Directive; -export function directiveLiteral(value: string): DirectiveLiteral; -export function blockStatement(body: Array, directives?: Array): BlockStatement; -export function breakStatement(label?: Identifier | null): BreakStatement; -export function callExpression(callee: Expression, _arguments: Array, optional?: true | false | null, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): CallExpression; -export function catchClause(param: Identifier | null | undefined, body: BlockStatement): CatchClause; -export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression; -export function continueStatement(label?: Identifier | null): ContinueStatement; -export function debuggerStatement(): DebuggerStatement; -export function doWhileStatement(test: Expression, body: Statement): DoWhileStatement; -export function emptyStatement(): EmptyStatement; -export function expressionStatement(expression: Expression): ExpressionStatement; -export function file(program: Program, comments: any, tokens: any): File; -export function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement; -export function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement; -export function functionDeclaration(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean, declare?: boolean | null, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): FunctionDeclaration; -export function functionExpression(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): FunctionExpression; -export function identifier(name: string, decorators?: Array | null, optional?: boolean | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): Identifier; -export function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement; -export function labeledStatement(label: Identifier, body: Statement): LabeledStatement; -export function stringLiteral(value: string): StringLiteral; -export function numericLiteral(value: number): NumericLiteral; -export function nullLiteral(): NullLiteral; -export function booleanLiteral(value: boolean): BooleanLiteral; -export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral; -export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; -export function memberExpression(object: Expression, property: any, computed?: boolean, optional?: true | false | null): MemberExpression; -export function newExpression(callee: Expression, _arguments: Array, optional?: true | false | null, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): NewExpression; -export function program(body: Array, directives?: Array, sourceType?: "script" | "module", sourceFile?: string | null): Program; -export function objectExpression(properties: Array): ObjectExpression; -export function objectMethod(kind: "method" | "get" | "set" | undefined, key: any, params: Array, body: BlockStatement, computed?: boolean, async?: boolean, decorators?: Array | null, generator?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ObjectMethod; -export function objectProperty(key: any, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array | null): ObjectProperty; -export function restElement(argument: LVal, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): RestElement; -export function returnStatement(argument?: Expression | null): ReturnStatement; -export function sequenceExpression(expressions: Array): SequenceExpression; -export function switchCase(test: Expression | null | undefined, consequent: Array): SwitchCase; -export function switchStatement(discriminant: Expression, cases: Array): SwitchStatement; -export function thisExpression(): ThisExpression; -export function throwStatement(argument: Expression): ThrowStatement; -export function tryStatement(block: BlockStatement, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement; -export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression; -export function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression; -export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array, declare?: boolean | null): VariableDeclaration; -export function variableDeclarator(id: LVal, init?: Expression | null, definite?: boolean | null): VariableDeclarator; -export function whileStatement(test: Expression, body: BlockStatement | Statement): WhileStatement; -export function withStatement(object: Expression, body: BlockStatement | Statement): WithStatement; -export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern, right: Expression, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): AssignmentPattern; -export function arrayPattern(elements: Array, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): ArrayPattern; -export function arrowFunctionExpression(params: Array, body: BlockStatement | Expression, async?: boolean, expression?: boolean | null, generator?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ArrowFunctionExpression; -export function classBody(body: Array): ClassBody; -export function classDeclaration(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array | null, abstract?: boolean | null, declare?: boolean | null, _implements?: Array | null, mixins?: any | null, superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassDeclaration; -export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array | null, _implements?: Array | null, mixins?: any | null, superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassExpression; -export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration; -export function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration; -export function exportNamedDeclaration(declaration: Declaration | null | undefined, specifiers: Array, source?: StringLiteral | null): ExportNamedDeclaration; -export function exportSpecifier(local: Identifier, exported: Identifier): ExportSpecifier; -export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement; -export function importDeclaration(specifiers: Array, source: StringLiteral): ImportDeclaration; -export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier; -export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier; -export function importSpecifier(local: Identifier, imported: Identifier, importKind?: null | "type" | "typeof" | null): ImportSpecifier; -export function metaProperty(meta: Identifier, property: Identifier): MetaProperty; -export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array, body: BlockStatement, computed?: boolean, _static?: boolean | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, decorators?: Array | null, generator?: boolean, optional?: boolean | null, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassMethod; -export function objectPattern(properties: Array, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): ObjectPattern; -export function spreadElement(argument: Expression): SpreadElement; -export function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral): TaggedTemplateExpression; -export function templateElement(value: any, tail?: boolean): TemplateElement; -export function templateLiteral(quasis: Array, expressions: Array): TemplateLiteral; -export function yieldExpression(argument?: Expression | null, delegate?: boolean): YieldExpression; -export function anyTypeAnnotation(): AnyTypeAnnotation; -export function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation; -export function booleanTypeAnnotation(): BooleanTypeAnnotation; -export function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation; -export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation; -export function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements; -export function declareClass(id: Identifier, typeParameters: TypeParameterInstantiation | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): DeclareClass; -export function declareFunction(id: Identifier, predicate?: DeclaredPredicate | null): DeclareFunction; -export function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): DeclareInterface; -export function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule; -export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports; -export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; -export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; -export function declareVariable(id: Identifier): DeclareVariable; -export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array | null, source?: StringLiteral | null, _default?: boolean | null): DeclareExportDeclaration; -export function declareExportAllDeclaration(source: StringLiteral, exportKind?: ["type","value"] | null): DeclareExportAllDeclaration; -export function declaredPredicate(value: Flow): DeclaredPredicate; -export function existsTypeAnnotation(): ExistsTypeAnnotation; -export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; -export function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType, optional?: boolean | null): FunctionTypeParam; -export function genericTypeAnnotation(id: Identifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation; -export function inferredPredicate(): InferredPredicate; -export function interfaceExtends(id: Identifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends; -export function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): InterfaceDeclaration; -export function intersectionTypeAnnotation(types: Array): IntersectionTypeAnnotation; -export function mixedTypeAnnotation(): MixedTypeAnnotation; -export function emptyTypeAnnotation(): EmptyTypeAnnotation; -export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation; -export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation; -export function numberTypeAnnotation(): NumberTypeAnnotation; -export function objectTypeAnnotation(properties: Array, indexers?: Array | null, callProperties?: Array | null, exact?: boolean): ObjectTypeAnnotation; -export function objectTypeCallProperty(value: FlowType, _static?: boolean | null): ObjectTypeCallProperty; -export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null, _static?: boolean | null): ObjectTypeIndexer; -export function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null, kind?: "init" | "get" | "set" | null, optional?: boolean | null, _static?: boolean | null): ObjectTypeProperty; -export function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty; -export function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType; -export function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier; -export function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation; -export function stringTypeAnnotation(): StringTypeAnnotation; -export function thisTypeAnnotation(): ThisTypeAnnotation; -export function tupleTypeAnnotation(types: Array): TupleTypeAnnotation; -export function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation; -export function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias; -export function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation; -export function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression; -export function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null, name?: string | null): TypeParameter; -export function typeParameterDeclaration(params: Array): TypeParameterDeclaration; -export function typeParameterInstantiation(params: Array): TypeParameterInstantiation; -export function unionTypeAnnotation(types: Array): UnionTypeAnnotation; -export function variance(kind: "minus" | "plus"): Variance; -export function voidTypeAnnotation(): VoidTypeAnnotation; -export function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute; -export function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression): JSXClosingElement; -export function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array, selfClosing: any): JSXElement; -export function jsxEmptyExpression(): JSXEmptyExpression; -export function jsxExpressionContainer(expression: Expression): JSXExpressionContainer; -export function jsxSpreadChild(expression: Expression): JSXSpreadChild; -export function jsxIdentifier(name: string): JSXIdentifier; -export function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression; -export function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName; -export function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression, attributes: Array, selfClosing?: boolean): JSXOpeningElement; -export function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute; -export function jsxText(value: string): JSXText; -export function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array): JSXFragment; -export function jsxOpeningFragment(): JSXOpeningFragment; -export function jsxClosingFragment(): JSXClosingFragment; -export function noop(): Noop; -export function parenthesizedExpression(expression: Expression): ParenthesizedExpression; -export function awaitExpression(argument: Expression): AwaitExpression; -export function bindExpression(object: any, callee: any): BindExpression; -export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array | null, computed?: boolean, abstract?: boolean | null, accessibility?: "public" | "private" | "protected" | null, definite?: boolean | null, optional?: boolean | null, readonly?: boolean | null, _static?: boolean | null): ClassProperty; -export function optionalMemberExpression(object: Expression, property: any, computed: boolean | undefined, optional: boolean): OptionalMemberExpression; -export function optionalCallExpression(callee: Expression, _arguments: Array, optional: boolean, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): OptionalCallExpression; -export function classPrivateProperty(key: PrivateName, value?: Expression | null): ClassPrivateProperty; -export function decorator(callee: Expression, _arguments?: Array | null): Decorator; -export function doExpression(body: BlockStatement): DoExpression; -export function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier; -export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier; -export function privateName(id: Identifier): PrivateName; -export function tsParameterProperty(parameter: Identifier | AssignmentPattern, accessibility?: "public" | "private" | "protected" | null, readonly?: boolean | null): TSParameterProperty; -export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null, async?: boolean, declare?: boolean | null, generator?: boolean): TSDeclareFunction; -export function tsDeclareMethod(decorators: Array | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean | null, _static?: boolean | null): TSDeclareMethod; -export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName; -export function tsCallSignatureDeclaration(typeParameters?: TSTypeParameterDeclaration | null, parameters?: Array | null, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration; -export function tsConstructSignatureDeclaration(typeParameters?: TSTypeParameterDeclaration | null, parameters?: Array | null, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration; -export function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null, computed?: boolean | null, optional?: boolean | null, readonly?: boolean | null): TSPropertySignature; -export function tsMethodSignature(key: Expression, typeParameters?: TSTypeParameterDeclaration | null, parameters?: Array | null, typeAnnotation?: TSTypeAnnotation | null, computed?: boolean | null, optional?: boolean | null): TSMethodSignature; -export function tsIndexSignature(parameters: Array, typeAnnotation?: TSTypeAnnotation | null, readonly?: boolean | null): TSIndexSignature; -export function tsAnyKeyword(): TSAnyKeyword; -export function tsNumberKeyword(): TSNumberKeyword; -export function tsObjectKeyword(): TSObjectKeyword; -export function tsBooleanKeyword(): TSBooleanKeyword; -export function tsStringKeyword(): TSStringKeyword; -export function tsSymbolKeyword(): TSSymbolKeyword; -export function tsVoidKeyword(): TSVoidKeyword; -export function tsUndefinedKeyword(): TSUndefinedKeyword; -export function tsNullKeyword(): TSNullKeyword; -export function tsNeverKeyword(): TSNeverKeyword; -export function tsThisType(): TSThisType; -export function tsFunctionType(typeParameters?: TSTypeParameterDeclaration | null, typeAnnotation?: TSTypeAnnotation | null, parameters?: Array | null): TSFunctionType; -export function tsConstructorType(typeParameters?: TSTypeParameterDeclaration | null, typeAnnotation?: TSTypeAnnotation | null, parameters?: Array | null): TSConstructorType; -export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference; -export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation: TSTypeAnnotation): TSTypePredicate; -export function tsTypeQuery(exprName: TSEntityName): TSTypeQuery; -export function tsTypeLiteral(members: Array): TSTypeLiteral; -export function tsArrayType(elementType: TSType): TSArrayType; -export function tsTupleType(elementTypes: Array): TSTupleType; -export function tsUnionType(types: Array): TSUnionType; -export function tsIntersectionType(types: Array): TSIntersectionType; -export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType; -export function tsInferType(typeParameter: TSType): TSInferType; -export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType; -export function tsTypeOperator(typeAnnotation: TSType, operator?: string | null): TSTypeOperator; -export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType; -export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, optional?: boolean | null, readonly?: boolean | null): TSMappedType; -export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral): TSLiteralType; -export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments; -export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: TSInterfaceBody, declare?: boolean | null): TSInterfaceDeclaration; -export function tsInterfaceBody(body: Array): TSInterfaceBody; -export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType, declare?: boolean | null): TSTypeAliasDeclaration; -export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression; -export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion; -export function tsEnumDeclaration(id: Identifier, members: Array, _const?: boolean | null, declare?: boolean | null, initializer?: Expression | null): TSEnumDeclaration; -export function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember; -export function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration, declare?: boolean | null, global?: boolean | null): TSModuleDeclaration; -export function tsModuleBlock(body: Array): TSModuleBlock; -export function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference, isExport?: boolean | null): TSImportEqualsDeclaration; -export function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference; -export function tsNonNullExpression(expression: Expression): TSNonNullExpression; -export function tsExportAssignment(expression: Expression): TSExportAssignment; -export function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration; -export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation; -export function tsTypeParameterInstantiation(params: Array): TSTypeParameterInstantiation; -export function tsTypeParameterDeclaration(params: Array): TSTypeParameterDeclaration; -export function tsTypeParameter(constraint?: TSType | null, _default?: TSType | null, name?: string | null): TSTypeParameter; -export function isAnyTypeAnnotation(node: object, opts?: object | null): node is AnyTypeAnnotation; -export function isArrayExpression(node: object, opts?: object | null): node is ArrayExpression; -export function isArrayPattern(node: object, opts?: object | null): node is ArrayPattern; -export function isArrayTypeAnnotation(node: object, opts?: object | null): node is ArrayTypeAnnotation; -export function isArrowFunctionExpression(node: object, opts?: object | null): node is ArrowFunctionExpression; -export function isAssignmentExpression(node: object, opts?: object | null): node is AssignmentExpression; -export function isAssignmentPattern(node: object, opts?: object | null): node is AssignmentPattern; -export function isAwaitExpression(node: object, opts?: object | null): node is AwaitExpression; -export function isBinary(node: object, opts?: object | null): boolean; -export function isBinaryExpression(node: object, opts?: object | null): node is BinaryExpression; -export function isBindExpression(node: object, opts?: object | null): node is BindExpression; -export function isBlock(node: object, opts?: object | null): boolean; -export function isBlockParent(node: object, opts?: object | null): boolean; -export function isBlockStatement(node: object, opts?: object | null): node is BlockStatement; -export function isBooleanLiteral(node: object, opts?: object | null): node is BooleanLiteral; -export function isBooleanLiteralTypeAnnotation(node: object, opts?: object | null): node is BooleanLiteralTypeAnnotation; -export function isBooleanTypeAnnotation(node: object, opts?: object | null): node is BooleanTypeAnnotation; -export function isBreakStatement(node: object, opts?: object | null): node is BreakStatement; -export function isCallExpression(node: object, opts?: object | null): node is CallExpression; -export function isCatchClause(node: object, opts?: object | null): node is CatchClause; -export function isClass(node: object, opts?: object | null): boolean; -export function isClassBody(node: object, opts?: object | null): node is ClassBody; -export function isClassDeclaration(node: object, opts?: object | null): node is ClassDeclaration; -export function isClassExpression(node: object, opts?: object | null): node is ClassExpression; -export function isClassImplements(node: object, opts?: object | null): node is ClassImplements; -export function isClassMethod(node: object, opts?: object | null): node is ClassMethod; -export function isClassPrivateProperty(node: object, opts?: object | null): node is ClassPrivateProperty; -export function isClassProperty(node: object, opts?: object | null): node is ClassProperty; -export function isCompletionStatement(node: object, opts?: object | null): boolean; -export function isConditional(node: object, opts?: object | null): boolean; -export function isConditionalExpression(node: object, opts?: object | null): node is ConditionalExpression; -export function isContinueStatement(node: object, opts?: object | null): node is ContinueStatement; -export function isDebuggerStatement(node: object, opts?: object | null): node is DebuggerStatement; -export function isDeclaration(node: object, opts?: object | null): boolean; -export function isDeclareClass(node: object, opts?: object | null): node is DeclareClass; -export function isDeclareExportAllDeclaration(node: object, opts?: object | null): node is DeclareExportAllDeclaration; -export function isDeclareExportDeclaration(node: object, opts?: object | null): node is DeclareExportDeclaration; -export function isDeclareFunction(node: object, opts?: object | null): node is DeclareFunction; -export function isDeclareInterface(node: object, opts?: object | null): node is DeclareInterface; -export function isDeclareModule(node: object, opts?: object | null): node is DeclareModule; -export function isDeclareModuleExports(node: object, opts?: object | null): node is DeclareModuleExports; -export function isDeclareOpaqueType(node: object, opts?: object | null): node is DeclareOpaqueType; -export function isDeclareTypeAlias(node: object, opts?: object | null): node is DeclareTypeAlias; -export function isDeclareVariable(node: object, opts?: object | null): node is DeclareVariable; -export function isDeclaredPredicate(node: object, opts?: object | null): node is DeclaredPredicate; -export function isDecorator(node: object, opts?: object | null): node is Decorator; -export function isDirective(node: object, opts?: object | null): node is Directive; -export function isDirectiveLiteral(node: object, opts?: object | null): node is DirectiveLiteral; -export function isDoExpression(node: object, opts?: object | null): node is DoExpression; -export function isDoWhileStatement(node: object, opts?: object | null): node is DoWhileStatement; -export function isEmptyStatement(node: object, opts?: object | null): node is EmptyStatement; -export function isEmptyTypeAnnotation(node: object, opts?: object | null): node is EmptyTypeAnnotation; -export function isExistsTypeAnnotation(node: object, opts?: object | null): node is ExistsTypeAnnotation; -export function isExportAllDeclaration(node: object, opts?: object | null): node is ExportAllDeclaration; -export function isExportDeclaration(node: object, opts?: object | null): boolean; -export function isExportDefaultDeclaration(node: object, opts?: object | null): node is ExportDefaultDeclaration; -export function isExportDefaultSpecifier(node: object, opts?: object | null): node is ExportDefaultSpecifier; -export function isExportNamedDeclaration(node: object, opts?: object | null): node is ExportNamedDeclaration; -export function isExportNamespaceSpecifier(node: object, opts?: object | null): node is ExportNamespaceSpecifier; -export function isExportSpecifier(node: object, opts?: object | null): node is ExportSpecifier; -export function isExpression(node: object, opts?: object | null): boolean; -export function isExpressionStatement(node: object, opts?: object | null): node is ExpressionStatement; -export function isExpressionWrapper(node: object, opts?: object | null): boolean; -export function isFile(node: object, opts?: object | null): node is File; -export function isFlow(node: object, opts?: object | null): boolean; -export function isFlowBaseAnnotation(node: object, opts?: object | null): boolean; -export function isFlowDeclaration(node: object, opts?: object | null): boolean; -export function isFlowPredicate(node: object, opts?: object | null): boolean; -export function isFlowType(node: object, opts?: object | null): boolean; -export function isFor(node: object, opts?: object | null): boolean; -export function isForInStatement(node: object, opts?: object | null): node is ForInStatement; -export function isForOfStatement(node: object, opts?: object | null): node is ForOfStatement; -export function isForStatement(node: object, opts?: object | null): node is ForStatement; -export function isForXStatement(node: object, opts?: object | null): boolean; -export function isFunction(node: object, opts?: object | null): boolean; -export function isFunctionDeclaration(node: object, opts?: object | null): node is FunctionDeclaration; -export function isFunctionExpression(node: object, opts?: object | null): node is FunctionExpression; -export function isFunctionParent(node: object, opts?: object | null): boolean; -export function isFunctionTypeAnnotation(node: object, opts?: object | null): node is FunctionTypeAnnotation; -export function isFunctionTypeParam(node: object, opts?: object | null): node is FunctionTypeParam; -export function isGenericTypeAnnotation(node: object, opts?: object | null): node is GenericTypeAnnotation; -export function isIdentifier(node: object, opts?: object | null): node is Identifier; -export function isIfStatement(node: object, opts?: object | null): node is IfStatement; -export function isImmutable(node: object, opts?: object | null): boolean; -export function isImport(node: object, opts?: object | null): node is Import; -export function isImportDeclaration(node: object, opts?: object | null): node is ImportDeclaration; -export function isImportDefaultSpecifier(node: object, opts?: object | null): node is ImportDefaultSpecifier; -export function isImportNamespaceSpecifier(node: object, opts?: object | null): node is ImportNamespaceSpecifier; -export function isImportSpecifier(node: object, opts?: object | null): node is ImportSpecifier; -export function isInferredPredicate(node: object, opts?: object | null): node is InferredPredicate; -export function isInterfaceDeclaration(node: object, opts?: object | null): node is InterfaceDeclaration; -export function isInterfaceExtends(node: object, opts?: object | null): node is InterfaceExtends; -export function isIntersectionTypeAnnotation(node: object, opts?: object | null): node is IntersectionTypeAnnotation; -export function isJSX(node: object, opts?: object | null): boolean; -export function isJSXAttribute(node: object, opts?: object | null): node is JSXAttribute; -export function isJSXClosingElement(node: object, opts?: object | null): node is JSXClosingElement; -export function isJSXClosingFragment(node: object, opts?: object | null): node is JSXClosingFragment; -export function isJSXElement(node: object, opts?: object | null): node is JSXElement; -export function isJSXEmptyExpression(node: object, opts?: object | null): node is JSXEmptyExpression; -export function isJSXExpressionContainer(node: object, opts?: object | null): node is JSXExpressionContainer; -export function isJSXFragment(node: object, opts?: object | null): node is JSXFragment; -export function isJSXIdentifier(node: object, opts?: object | null): node is JSXIdentifier; -export function isJSXMemberExpression(node: object, opts?: object | null): node is JSXMemberExpression; -export function isJSXNamespacedName(node: object, opts?: object | null): node is JSXNamespacedName; -export function isJSXOpeningElement(node: object, opts?: object | null): node is JSXOpeningElement; -export function isJSXOpeningFragment(node: object, opts?: object | null): node is JSXOpeningFragment; -export function isJSXSpreadAttribute(node: object, opts?: object | null): node is JSXSpreadAttribute; -export function isJSXSpreadChild(node: object, opts?: object | null): node is JSXSpreadChild; -export function isJSXText(node: object, opts?: object | null): node is JSXText; -export function isLVal(node: object, opts?: object | null): boolean; -export function isLabeledStatement(node: object, opts?: object | null): node is LabeledStatement; -export function isLiteral(node: object, opts?: object | null): boolean; -export function isLogicalExpression(node: object, opts?: object | null): node is LogicalExpression; -export function isLoop(node: object, opts?: object | null): boolean; -export function isMemberExpression(node: object, opts?: object | null): node is MemberExpression; -export function isMetaProperty(node: object, opts?: object | null): node is MetaProperty; -export function isMethod(node: object, opts?: object | null): boolean; -export function isMixedTypeAnnotation(node: object, opts?: object | null): node is MixedTypeAnnotation; -export function isModuleDeclaration(node: object, opts?: object | null): boolean; -export function isModuleSpecifier(node: object, opts?: object | null): boolean; -export function isNewExpression(node: object, opts?: object | null): node is NewExpression; -export function isNoop(node: object, opts?: object | null): node is Noop; -export function isNullLiteral(node: object, opts?: object | null): node is NullLiteral; -export function isNullLiteralTypeAnnotation(node: object, opts?: object | null): node is NullLiteralTypeAnnotation; -export function isNullableTypeAnnotation(node: object, opts?: object | null): node is NullableTypeAnnotation; -export function isNumberLiteral(node: object, opts?: object | null): boolean; -export function isNumberLiteralTypeAnnotation(node: object, opts?: object | null): node is NumberLiteralTypeAnnotation; -export function isNumberTypeAnnotation(node: object, opts?: object | null): node is NumberTypeAnnotation; -export function isNumericLiteral(node: object, opts?: object | null): node is NumericLiteral; -export function isObjectExpression(node: object, opts?: object | null): node is ObjectExpression; -export function isObjectMember(node: object, opts?: object | null): boolean; -export function isObjectMethod(node: object, opts?: object | null): node is ObjectMethod; -export function isObjectPattern(node: object, opts?: object | null): node is ObjectPattern; -export function isObjectProperty(node: object, opts?: object | null): node is ObjectProperty; -export function isObjectTypeAnnotation(node: object, opts?: object | null): node is ObjectTypeAnnotation; -export function isObjectTypeCallProperty(node: object, opts?: object | null): node is ObjectTypeCallProperty; -export function isObjectTypeIndexer(node: object, opts?: object | null): node is ObjectTypeIndexer; -export function isObjectTypeProperty(node: object, opts?: object | null): node is ObjectTypeProperty; -export function isObjectTypeSpreadProperty(node: object, opts?: object | null): node is ObjectTypeSpreadProperty; -export function isOpaqueType(node: object, opts?: object | null): node is OpaqueType; -export function isOptionalCallExpression(node: object, opts?: object | null): node is OptionalCallExpression; -export function isOptionalMemberExpression(node: object, opts?: object | null): node is OptionalMemberExpression; -export function isParenthesizedExpression(node: object, opts?: object | null): node is ParenthesizedExpression; -export function isPattern(node: object, opts?: object | null): boolean; -export function isPatternLike(node: object, opts?: object | null): boolean; -export function isPrivate(node: object, opts?: object | null): boolean; -export function isPrivateName(node: object, opts?: object | null): node is PrivateName; -export function isProgram(node: object, opts?: object | null): node is Program; -export function isProperty(node: object, opts?: object | null): boolean; -export function isPureish(node: object, opts?: object | null): boolean; -export function isQualifiedTypeIdentifier(node: object, opts?: object | null): node is QualifiedTypeIdentifier; -export function isRegExpLiteral(node: object, opts?: object | null): node is RegExpLiteral; -export function isRegexLiteral(node: object, opts?: object | null): boolean; -export function isRestElement(node: object, opts?: object | null): node is RestElement; -export function isRestProperty(node: object, opts?: object | null): boolean; -export function isReturnStatement(node: object, opts?: object | null): node is ReturnStatement; -export function isScopable(node: object, opts?: object | null): boolean; -export function isSequenceExpression(node: object, opts?: object | null): node is SequenceExpression; -export function isSpreadElement(node: object, opts?: object | null): node is SpreadElement; -export function isSpreadProperty(node: object, opts?: object | null): boolean; -export function isStatement(node: object, opts?: object | null): boolean; -export function isStringLiteral(node: object, opts?: object | null): node is StringLiteral; -export function isStringLiteralTypeAnnotation(node: object, opts?: object | null): node is StringLiteralTypeAnnotation; -export function isStringTypeAnnotation(node: object, opts?: object | null): node is StringTypeAnnotation; -export function isSuper(node: object, opts?: object | null): node is Super; -export function isSwitchCase(node: object, opts?: object | null): node is SwitchCase; -export function isSwitchStatement(node: object, opts?: object | null): node is SwitchStatement; -export function isTSAnyKeyword(node: object, opts?: object | null): node is TSAnyKeyword; -export function isTSArrayType(node: object, opts?: object | null): node is TSArrayType; -export function isTSAsExpression(node: object, opts?: object | null): node is TSAsExpression; -export function isTSBooleanKeyword(node: object, opts?: object | null): node is TSBooleanKeyword; -export function isTSCallSignatureDeclaration(node: object, opts?: object | null): node is TSCallSignatureDeclaration; -export function isTSConditionalType(node: object, opts?: object | null): node is TSConditionalType; -export function isTSConstructSignatureDeclaration(node: object, opts?: object | null): node is TSConstructSignatureDeclaration; -export function isTSConstructorType(node: object, opts?: object | null): node is TSConstructorType; -export function isTSDeclareFunction(node: object, opts?: object | null): node is TSDeclareFunction; -export function isTSDeclareMethod(node: object, opts?: object | null): node is TSDeclareMethod; -export function isTSEntityName(node: object, opts?: object | null): boolean; -export function isTSEnumDeclaration(node: object, opts?: object | null): node is TSEnumDeclaration; -export function isTSEnumMember(node: object, opts?: object | null): node is TSEnumMember; -export function isTSExportAssignment(node: object, opts?: object | null): node is TSExportAssignment; -export function isTSExpressionWithTypeArguments(node: object, opts?: object | null): node is TSExpressionWithTypeArguments; -export function isTSExternalModuleReference(node: object, opts?: object | null): node is TSExternalModuleReference; -export function isTSFunctionType(node: object, opts?: object | null): node is TSFunctionType; -export function isTSImportEqualsDeclaration(node: object, opts?: object | null): node is TSImportEqualsDeclaration; -export function isTSIndexSignature(node: object, opts?: object | null): node is TSIndexSignature; -export function isTSIndexedAccessType(node: object, opts?: object | null): node is TSIndexedAccessType; -export function isTSInferType(node: object, opts?: object | null): node is TSInferType; -export function isTSInterfaceBody(node: object, opts?: object | null): node is TSInterfaceBody; -export function isTSInterfaceDeclaration(node: object, opts?: object | null): node is TSInterfaceDeclaration; -export function isTSIntersectionType(node: object, opts?: object | null): node is TSIntersectionType; -export function isTSLiteralType(node: object, opts?: object | null): node is TSLiteralType; -export function isTSMappedType(node: object, opts?: object | null): node is TSMappedType; -export function isTSMethodSignature(node: object, opts?: object | null): node is TSMethodSignature; -export function isTSModuleBlock(node: object, opts?: object | null): node is TSModuleBlock; -export function isTSModuleDeclaration(node: object, opts?: object | null): node is TSModuleDeclaration; -export function isTSNamespaceExportDeclaration(node: object, opts?: object | null): node is TSNamespaceExportDeclaration; -export function isTSNeverKeyword(node: object, opts?: object | null): node is TSNeverKeyword; -export function isTSNonNullExpression(node: object, opts?: object | null): node is TSNonNullExpression; -export function isTSNullKeyword(node: object, opts?: object | null): node is TSNullKeyword; -export function isTSNumberKeyword(node: object, opts?: object | null): node is TSNumberKeyword; -export function isTSObjectKeyword(node: object, opts?: object | null): node is TSObjectKeyword; -export function isTSParameterProperty(node: object, opts?: object | null): node is TSParameterProperty; -export function isTSParenthesizedType(node: object, opts?: object | null): node is TSParenthesizedType; -export function isTSPropertySignature(node: object, opts?: object | null): node is TSPropertySignature; -export function isTSQualifiedName(node: object, opts?: object | null): node is TSQualifiedName; -export function isTSStringKeyword(node: object, opts?: object | null): node is TSStringKeyword; -export function isTSSymbolKeyword(node: object, opts?: object | null): node is TSSymbolKeyword; -export function isTSThisType(node: object, opts?: object | null): node is TSThisType; -export function isTSTupleType(node: object, opts?: object | null): node is TSTupleType; -export function isTSType(node: object, opts?: object | null): boolean; -export function isTSTypeAliasDeclaration(node: object, opts?: object | null): node is TSTypeAliasDeclaration; -export function isTSTypeAnnotation(node: object, opts?: object | null): node is TSTypeAnnotation; -export function isTSTypeAssertion(node: object, opts?: object | null): node is TSTypeAssertion; -export function isTSTypeElement(node: object, opts?: object | null): boolean; -export function isTSTypeLiteral(node: object, opts?: object | null): node is TSTypeLiteral; -export function isTSTypeOperator(node: object, opts?: object | null): node is TSTypeOperator; -export function isTSTypeParameter(node: object, opts?: object | null): node is TSTypeParameter; -export function isTSTypeParameterDeclaration(node: object, opts?: object | null): node is TSTypeParameterDeclaration; -export function isTSTypeParameterInstantiation(node: object, opts?: object | null): node is TSTypeParameterInstantiation; -export function isTSTypePredicate(node: object, opts?: object | null): node is TSTypePredicate; -export function isTSTypeQuery(node: object, opts?: object | null): node is TSTypeQuery; -export function isTSTypeReference(node: object, opts?: object | null): node is TSTypeReference; -export function isTSUndefinedKeyword(node: object, opts?: object | null): node is TSUndefinedKeyword; -export function isTSUnionType(node: object, opts?: object | null): node is TSUnionType; -export function isTSVoidKeyword(node: object, opts?: object | null): node is TSVoidKeyword; -export function isTaggedTemplateExpression(node: object, opts?: object | null): node is TaggedTemplateExpression; -export function isTemplateElement(node: object, opts?: object | null): node is TemplateElement; -export function isTemplateLiteral(node: object, opts?: object | null): node is TemplateLiteral; -export function isTerminatorless(node: object, opts?: object | null): boolean; -export function isThisExpression(node: object, opts?: object | null): node is ThisExpression; -export function isThisTypeAnnotation(node: object, opts?: object | null): node is ThisTypeAnnotation; -export function isThrowStatement(node: object, opts?: object | null): node is ThrowStatement; -export function isTryStatement(node: object, opts?: object | null): node is TryStatement; -export function isTupleTypeAnnotation(node: object, opts?: object | null): node is TupleTypeAnnotation; -export function isTypeAlias(node: object, opts?: object | null): node is TypeAlias; -export function isTypeAnnotation(node: object, opts?: object | null): node is TypeAnnotation; -export function isTypeCastExpression(node: object, opts?: object | null): node is TypeCastExpression; -export function isTypeParameter(node: object, opts?: object | null): node is TypeParameter; -export function isTypeParameterDeclaration(node: object, opts?: object | null): node is TypeParameterDeclaration; -export function isTypeParameterInstantiation(node: object, opts?: object | null): node is TypeParameterInstantiation; -export function isTypeofTypeAnnotation(node: object, opts?: object | null): node is TypeofTypeAnnotation; -export function isUnaryExpression(node: object, opts?: object | null): node is UnaryExpression; -export function isUnaryLike(node: object, opts?: object | null): boolean; -export function isUnionTypeAnnotation(node: object, opts?: object | null): node is UnionTypeAnnotation; -export function isUpdateExpression(node: object, opts?: object | null): node is UpdateExpression; -export function isUserWhitespacable(node: object, opts?: object | null): boolean; -export function isVariableDeclaration(node: object, opts?: object | null): node is VariableDeclaration; -export function isVariableDeclarator(node: object, opts?: object | null): node is VariableDeclarator; -export function isVariance(node: object, opts?: object | null): node is Variance; -export function isVoidTypeAnnotation(node: object, opts?: object | null): node is VoidTypeAnnotation; -export function isWhile(node: object, opts?: object | null): boolean; -export function isWhileStatement(node: object, opts?: object | null): node is WhileStatement; -export function isWithStatement(node: object, opts?: object | null): node is WithStatement; -export function isYieldExpression(node: object, opts?: object | null): node is YieldExpression; -export function validate(n: Node, key: string, value: any): void; -export function clone(n: T): T; -export function cloneDeep(n: T): T; -export function removeProperties( - n: Node, - opts?: { preserveComments: boolean } | null -): void; -export function removePropertiesDeep( - n: T, - opts?: { preserveComments: boolean } | null -): T; -export type TraversalAncestors = ReadonlyArray<{ - node: Node, - key: string, - index?: number, -}>; -export type TraversalHandler = (node: Node, parent: TraversalAncestors, type: T) => void; -export type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, -}; -export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void; diff --git a/node_modules/@babel/types/lib/index.js b/node_modules/@babel/types/lib/index.js deleted file mode 100644 index f8ac6ab..0000000 --- a/node_modules/@babel/types/lib/index.js +++ /dev/null @@ -1,570 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _exportNames = { - react: true, - assertNode: true, - createTypeAnnotationBasedOnTypeof: true, - createUnionTypeAnnotation: true, - cloneNode: true, - clone: true, - cloneDeep: true, - cloneWithoutLoc: true, - addComment: true, - addComments: true, - inheritInnerComments: true, - inheritLeadingComments: true, - inheritsComments: true, - inheritTrailingComments: true, - removeComments: true, - ensureBlock: true, - toBindingIdentifierName: true, - toBlock: true, - toComputedKey: true, - toExpression: true, - toIdentifier: true, - toKeyAlias: true, - toSequenceExpression: true, - toStatement: true, - valueToNode: true, - appendToMemberExpression: true, - inherits: true, - prependToMemberExpression: true, - removeProperties: true, - removePropertiesDeep: true, - removeTypeDuplicates: true, - getBindingIdentifiers: true, - getOuterBindingIdentifiers: true, - traverse: true, - traverseFast: true, - shallowEqual: true, - is: true, - isBinding: true, - isBlockScoped: true, - isImmutable: true, - isLet: true, - isNode: true, - isNodesEquivalent: true, - isReferenced: true, - isScope: true, - isSpecifierDefault: true, - isType: true, - isValidES3Identifier: true, - isValidIdentifier: true, - isVar: true, - matchesPattern: true, - validate: true, - buildMatchMemberExpression: true -}; -Object.defineProperty(exports, "assertNode", { - enumerable: true, - get: function get() { - return _assertNode.default; - } -}); -Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { - enumerable: true, - get: function get() { - return _createTypeAnnotationBasedOnTypeof.default; - } -}); -Object.defineProperty(exports, "createUnionTypeAnnotation", { - enumerable: true, - get: function get() { - return _createUnionTypeAnnotation.default; - } -}); -Object.defineProperty(exports, "cloneNode", { - enumerable: true, - get: function get() { - return _cloneNode.default; - } -}); -Object.defineProperty(exports, "clone", { - enumerable: true, - get: function get() { - return _clone.default; - } -}); -Object.defineProperty(exports, "cloneDeep", { - enumerable: true, - get: function get() { - return _cloneDeep.default; - } -}); -Object.defineProperty(exports, "cloneWithoutLoc", { - enumerable: true, - get: function get() { - return _cloneWithoutLoc.default; - } -}); -Object.defineProperty(exports, "addComment", { - enumerable: true, - get: function get() { - return _addComment.default; - } -}); -Object.defineProperty(exports, "addComments", { - enumerable: true, - get: function get() { - return _addComments.default; - } -}); -Object.defineProperty(exports, "inheritInnerComments", { - enumerable: true, - get: function get() { - return _inheritInnerComments.default; - } -}); -Object.defineProperty(exports, "inheritLeadingComments", { - enumerable: true, - get: function get() { - return _inheritLeadingComments.default; - } -}); -Object.defineProperty(exports, "inheritsComments", { - enumerable: true, - get: function get() { - return _inheritsComments.default; - } -}); -Object.defineProperty(exports, "inheritTrailingComments", { - enumerable: true, - get: function get() { - return _inheritTrailingComments.default; - } -}); -Object.defineProperty(exports, "removeComments", { - enumerable: true, - get: function get() { - return _removeComments.default; - } -}); -Object.defineProperty(exports, "ensureBlock", { - enumerable: true, - get: function get() { - return _ensureBlock.default; - } -}); -Object.defineProperty(exports, "toBindingIdentifierName", { - enumerable: true, - get: function get() { - return _toBindingIdentifierName.default; - } -}); -Object.defineProperty(exports, "toBlock", { - enumerable: true, - get: function get() { - return _toBlock.default; - } -}); -Object.defineProperty(exports, "toComputedKey", { - enumerable: true, - get: function get() { - return _toComputedKey.default; - } -}); -Object.defineProperty(exports, "toExpression", { - enumerable: true, - get: function get() { - return _toExpression.default; - } -}); -Object.defineProperty(exports, "toIdentifier", { - enumerable: true, - get: function get() { - return _toIdentifier.default; - } -}); -Object.defineProperty(exports, "toKeyAlias", { - enumerable: true, - get: function get() { - return _toKeyAlias.default; - } -}); -Object.defineProperty(exports, "toSequenceExpression", { - enumerable: true, - get: function get() { - return _toSequenceExpression.default; - } -}); -Object.defineProperty(exports, "toStatement", { - enumerable: true, - get: function get() { - return _toStatement.default; - } -}); -Object.defineProperty(exports, "valueToNode", { - enumerable: true, - get: function get() { - return _valueToNode.default; - } -}); -Object.defineProperty(exports, "appendToMemberExpression", { - enumerable: true, - get: function get() { - return _appendToMemberExpression.default; - } -}); -Object.defineProperty(exports, "inherits", { - enumerable: true, - get: function get() { - return _inherits.default; - } -}); -Object.defineProperty(exports, "prependToMemberExpression", { - enumerable: true, - get: function get() { - return _prependToMemberExpression.default; - } -}); -Object.defineProperty(exports, "removeProperties", { - enumerable: true, - get: function get() { - return _removeProperties.default; - } -}); -Object.defineProperty(exports, "removePropertiesDeep", { - enumerable: true, - get: function get() { - return _removePropertiesDeep.default; - } -}); -Object.defineProperty(exports, "removeTypeDuplicates", { - enumerable: true, - get: function get() { - return _removeTypeDuplicates.default; - } -}); -Object.defineProperty(exports, "getBindingIdentifiers", { - enumerable: true, - get: function get() { - return _getBindingIdentifiers.default; - } -}); -Object.defineProperty(exports, "getOuterBindingIdentifiers", { - enumerable: true, - get: function get() { - return _getOuterBindingIdentifiers.default; - } -}); -Object.defineProperty(exports, "traverse", { - enumerable: true, - get: function get() { - return _traverse.default; - } -}); -Object.defineProperty(exports, "traverseFast", { - enumerable: true, - get: function get() { - return _traverseFast.default; - } -}); -Object.defineProperty(exports, "shallowEqual", { - enumerable: true, - get: function get() { - return _shallowEqual.default; - } -}); -Object.defineProperty(exports, "is", { - enumerable: true, - get: function get() { - return _is.default; - } -}); -Object.defineProperty(exports, "isBinding", { - enumerable: true, - get: function get() { - return _isBinding.default; - } -}); -Object.defineProperty(exports, "isBlockScoped", { - enumerable: true, - get: function get() { - return _isBlockScoped.default; - } -}); -Object.defineProperty(exports, "isImmutable", { - enumerable: true, - get: function get() { - return _isImmutable.default; - } -}); -Object.defineProperty(exports, "isLet", { - enumerable: true, - get: function get() { - return _isLet.default; - } -}); -Object.defineProperty(exports, "isNode", { - enumerable: true, - get: function get() { - return _isNode.default; - } -}); -Object.defineProperty(exports, "isNodesEquivalent", { - enumerable: true, - get: function get() { - return _isNodesEquivalent.default; - } -}); -Object.defineProperty(exports, "isReferenced", { - enumerable: true, - get: function get() { - return _isReferenced.default; - } -}); -Object.defineProperty(exports, "isScope", { - enumerable: true, - get: function get() { - return _isScope.default; - } -}); -Object.defineProperty(exports, "isSpecifierDefault", { - enumerable: true, - get: function get() { - return _isSpecifierDefault.default; - } -}); -Object.defineProperty(exports, "isType", { - enumerable: true, - get: function get() { - return _isType.default; - } -}); -Object.defineProperty(exports, "isValidES3Identifier", { - enumerable: true, - get: function get() { - return _isValidES3Identifier.default; - } -}); -Object.defineProperty(exports, "isValidIdentifier", { - enumerable: true, - get: function get() { - return _isValidIdentifier.default; - } -}); -Object.defineProperty(exports, "isVar", { - enumerable: true, - get: function get() { - return _isVar.default; - } -}); -Object.defineProperty(exports, "matchesPattern", { - enumerable: true, - get: function get() { - return _matchesPattern.default; - } -}); -Object.defineProperty(exports, "validate", { - enumerable: true, - get: function get() { - return _validate.default; - } -}); -Object.defineProperty(exports, "buildMatchMemberExpression", { - enumerable: true, - get: function get() { - return _buildMatchMemberExpression.default; - } -}); -exports.react = void 0; - -var _isReactComponent = _interopRequireDefault(require("./validators/react/isReactComponent")); - -var _isCompatTag = _interopRequireDefault(require("./validators/react/isCompatTag")); - -var _buildChildren = _interopRequireDefault(require("./builders/react/buildChildren")); - -var _assertNode = _interopRequireDefault(require("./asserts/assertNode")); - -var _generated = require("./asserts/generated"); - -Object.keys(_generated).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _generated[key]; - } - }); -}); - -var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof")); - -var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation")); - -var _generated2 = require("./builders/generated"); - -Object.keys(_generated2).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _generated2[key]; - } - }); -}); - -var _cloneNode = _interopRequireDefault(require("./clone/cloneNode")); - -var _clone = _interopRequireDefault(require("./clone/clone")); - -var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep")); - -var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc")); - -var _addComment = _interopRequireDefault(require("./comments/addComment")); - -var _addComments = _interopRequireDefault(require("./comments/addComments")); - -var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments")); - -var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments")); - -var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments")); - -var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments")); - -var _removeComments = _interopRequireDefault(require("./comments/removeComments")); - -var _generated3 = require("./constants/generated"); - -Object.keys(_generated3).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _generated3[key]; - } - }); -}); - -var _constants = require("./constants"); - -Object.keys(_constants).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _constants[key]; - } - }); -}); - -var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock")); - -var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName")); - -var _toBlock = _interopRequireDefault(require("./converters/toBlock")); - -var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey")); - -var _toExpression = _interopRequireDefault(require("./converters/toExpression")); - -var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier")); - -var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias")); - -var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression")); - -var _toStatement = _interopRequireDefault(require("./converters/toStatement")); - -var _valueToNode = _interopRequireDefault(require("./converters/valueToNode")); - -var _definitions = require("./definitions"); - -Object.keys(_definitions).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _definitions[key]; - } - }); -}); - -var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression")); - -var _inherits = _interopRequireDefault(require("./modifications/inherits")); - -var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression")); - -var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties")); - -var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep")); - -var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates")); - -var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers")); - -var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers")); - -var _traverse = _interopRequireDefault(require("./traverse/traverse")); - -var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast")); - -var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual")); - -var _is = _interopRequireDefault(require("./validators/is")); - -var _isBinding = _interopRequireDefault(require("./validators/isBinding")); - -var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped")); - -var _isImmutable = _interopRequireDefault(require("./validators/isImmutable")); - -var _isLet = _interopRequireDefault(require("./validators/isLet")); - -var _isNode = _interopRequireDefault(require("./validators/isNode")); - -var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent")); - -var _isReferenced = _interopRequireDefault(require("./validators/isReferenced")); - -var _isScope = _interopRequireDefault(require("./validators/isScope")); - -var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault")); - -var _isType = _interopRequireDefault(require("./validators/isType")); - -var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier")); - -var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier")); - -var _isVar = _interopRequireDefault(require("./validators/isVar")); - -var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern")); - -var _validate = _interopRequireDefault(require("./validators/validate")); - -var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression")); - -var _generated4 = require("./validators/generated"); - -Object.keys(_generated4).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _generated4[key]; - } - }); -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var react = { - isReactComponent: _isReactComponent.default, - isCompatTag: _isCompatTag.default, - buildChildren: _buildChildren.default -}; -exports.react = react; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/index.js.flow b/node_modules/@babel/types/lib/index.js.flow deleted file mode 100644 index bd5fde6..0000000 --- a/node_modules/@babel/types/lib/index.js.flow +++ /dev/null @@ -1,1851 +0,0 @@ -// NOTE: This file is autogenerated. Do not modify. -// See scripts/generators/flow.js for script used. - -declare class BabelNodeComment { - value: string; - start: number; - end: number; - loc: BabelNodeSourceLocation; -} - -declare class BabelNodeBlockComment extends BabelNodeComment { - type: "BlockComment"; -} - -declare class BabelNodeLineComment extends BabelNodeComment { - type: "LineComment"; -} - -declare class BabelNodeSourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -declare class BabelNode { - leadingComments?: Array; - innerComments?: Array; - trailingComments?: Array; - start: ?number; - end: ?number; - loc: ?BabelNodeSourceLocation; -} - -declare class BabelNodeArrayExpression extends BabelNode { - type: "ArrayExpression"; - elements?: Array; -} - -declare class BabelNodeAssignmentExpression extends BabelNode { - type: "AssignmentExpression"; - operator: string; - left: BabelNodeLVal; - right: BabelNodeExpression; -} - -declare class BabelNodeBinaryExpression extends BabelNode { - type: "BinaryExpression"; - operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; - left: BabelNodeExpression; - right: BabelNodeExpression; -} - -declare class BabelNodeDirective extends BabelNode { - type: "Directive"; - value: BabelNodeDirectiveLiteral; -} - -declare class BabelNodeDirectiveLiteral extends BabelNode { - type: "DirectiveLiteral"; - value: string; -} - -declare class BabelNodeBlockStatement extends BabelNode { - type: "BlockStatement"; - body: Array; - directives?: Array; -} - -declare class BabelNodeBreakStatement extends BabelNode { - type: "BreakStatement"; - label?: BabelNodeIdentifier; -} - -declare class BabelNodeCallExpression extends BabelNode { - type: "CallExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional?: true | false; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeCatchClause extends BabelNode { - type: "CatchClause"; - param?: BabelNodeIdentifier; - body: BabelNodeBlockStatement; -} - -declare class BabelNodeConditionalExpression extends BabelNode { - type: "ConditionalExpression"; - test: BabelNodeExpression; - consequent: BabelNodeExpression; - alternate: BabelNodeExpression; -} - -declare class BabelNodeContinueStatement extends BabelNode { - type: "ContinueStatement"; - label?: BabelNodeIdentifier; -} - -declare class BabelNodeDebuggerStatement extends BabelNode { - type: "DebuggerStatement"; -} - -declare class BabelNodeDoWhileStatement extends BabelNode { - type: "DoWhileStatement"; - test: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeEmptyStatement extends BabelNode { - type: "EmptyStatement"; -} - -declare class BabelNodeExpressionStatement extends BabelNode { - type: "ExpressionStatement"; - expression: BabelNodeExpression; -} - -declare class BabelNodeFile extends BabelNode { - type: "File"; - program: BabelNodeProgram; - comments: any; - tokens: any; -} - -declare class BabelNodeForInStatement extends BabelNode { - type: "ForInStatement"; - left: BabelNodeVariableDeclaration | BabelNodeLVal; - right: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeForStatement extends BabelNode { - type: "ForStatement"; - init?: BabelNodeVariableDeclaration | BabelNodeExpression; - test?: BabelNodeExpression; - update?: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeFunctionDeclaration extends BabelNode { - type: "FunctionDeclaration"; - id?: BabelNodeIdentifier; - params: Array; - body: BabelNodeBlockStatement; - generator?: boolean; - async?: boolean; - declare?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeFunctionExpression extends BabelNode { - type: "FunctionExpression"; - id?: BabelNodeIdentifier; - params: Array; - body: BabelNodeBlockStatement; - generator?: boolean; - async?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeIdentifier extends BabelNode { - type: "Identifier"; - name: string; - decorators?: Array; - optional?: boolean; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeIfStatement extends BabelNode { - type: "IfStatement"; - test: BabelNodeExpression; - consequent: BabelNodeStatement; - alternate?: BabelNodeStatement; -} - -declare class BabelNodeLabeledStatement extends BabelNode { - type: "LabeledStatement"; - label: BabelNodeIdentifier; - body: BabelNodeStatement; -} - -declare class BabelNodeStringLiteral extends BabelNode { - type: "StringLiteral"; - value: string; -} - -declare class BabelNodeNumericLiteral extends BabelNode { - type: "NumericLiteral"; - value: number; -} - -declare class BabelNodeNullLiteral extends BabelNode { - type: "NullLiteral"; -} - -declare class BabelNodeBooleanLiteral extends BabelNode { - type: "BooleanLiteral"; - value: boolean; -} - -declare class BabelNodeRegExpLiteral extends BabelNode { - type: "RegExpLiteral"; - pattern: string; - flags?: string; -} - -declare class BabelNodeLogicalExpression extends BabelNode { - type: "LogicalExpression"; - operator: "||" | "&&" | "??"; - left: BabelNodeExpression; - right: BabelNodeExpression; -} - -declare class BabelNodeMemberExpression extends BabelNode { - type: "MemberExpression"; - object: BabelNodeExpression; - property: any; - computed?: boolean; - optional?: true | false; -} - -declare class BabelNodeNewExpression extends BabelNode { - type: "NewExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional?: true | false; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeProgram extends BabelNode { - type: "Program"; - body: Array; - directives?: Array; - sourceType?: "script" | "module"; - sourceFile?: string; -} - -declare class BabelNodeObjectExpression extends BabelNode { - type: "ObjectExpression"; - properties: Array; -} - -declare class BabelNodeObjectMethod extends BabelNode { - type: "ObjectMethod"; - kind?: "method" | "get" | "set"; - key: any; - params: Array; - body: BabelNodeBlockStatement; - computed?: boolean; - async?: boolean; - decorators?: Array; - generator?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeObjectProperty extends BabelNode { - type: "ObjectProperty"; - key: any; - value: BabelNodeExpression | BabelNodePatternLike; - computed?: boolean; - shorthand?: boolean; - decorators?: Array; -} - -declare class BabelNodeRestElement extends BabelNode { - type: "RestElement"; - argument: BabelNodeLVal; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeReturnStatement extends BabelNode { - type: "ReturnStatement"; - argument?: BabelNodeExpression; -} - -declare class BabelNodeSequenceExpression extends BabelNode { - type: "SequenceExpression"; - expressions: Array; -} - -declare class BabelNodeSwitchCase extends BabelNode { - type: "SwitchCase"; - test?: BabelNodeExpression; - consequent: Array; -} - -declare class BabelNodeSwitchStatement extends BabelNode { - type: "SwitchStatement"; - discriminant: BabelNodeExpression; - cases: Array; -} - -declare class BabelNodeThisExpression extends BabelNode { - type: "ThisExpression"; -} - -declare class BabelNodeThrowStatement extends BabelNode { - type: "ThrowStatement"; - argument: BabelNodeExpression; -} - -declare class BabelNodeTryStatement extends BabelNode { - type: "TryStatement"; - block: BabelNodeBlockStatement; - handler?: BabelNodeCatchClause; - finalizer?: BabelNodeBlockStatement; -} - -declare class BabelNodeUnaryExpression extends BabelNode { - type: "UnaryExpression"; - operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; - argument: BabelNodeExpression; - prefix?: boolean; -} - -declare class BabelNodeUpdateExpression extends BabelNode { - type: "UpdateExpression"; - operator: "++" | "--"; - argument: BabelNodeExpression; - prefix?: boolean; -} - -declare class BabelNodeVariableDeclaration extends BabelNode { - type: "VariableDeclaration"; - kind: "var" | "let" | "const"; - declarations: Array; - declare?: boolean; -} - -declare class BabelNodeVariableDeclarator extends BabelNode { - type: "VariableDeclarator"; - id: BabelNodeLVal; - init?: BabelNodeExpression; - definite?: boolean; -} - -declare class BabelNodeWhileStatement extends BabelNode { - type: "WhileStatement"; - test: BabelNodeExpression; - body: BabelNodeBlockStatement | BabelNodeStatement; -} - -declare class BabelNodeWithStatement extends BabelNode { - type: "WithStatement"; - object: BabelNodeExpression; - body: BabelNodeBlockStatement | BabelNodeStatement; -} - -declare class BabelNodeAssignmentPattern extends BabelNode { - type: "AssignmentPattern"; - left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern; - right: BabelNodeExpression; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeArrayPattern extends BabelNode { - type: "ArrayPattern"; - elements: Array; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeArrowFunctionExpression extends BabelNode { - type: "ArrowFunctionExpression"; - params: Array; - body: BabelNodeBlockStatement | BabelNodeExpression; - async?: boolean; - expression?: boolean; - generator?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeClassBody extends BabelNode { - type: "ClassBody"; - body: Array; -} - -declare class BabelNodeClassDeclaration extends BabelNode { - type: "ClassDeclaration"; - id?: BabelNodeIdentifier; - superClass?: BabelNodeExpression; - body: BabelNodeClassBody; - decorators?: Array; - abstract?: boolean; - declare?: boolean; - mixins?: any; - superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeClassExpression extends BabelNode { - type: "ClassExpression"; - id?: BabelNodeIdentifier; - superClass?: BabelNodeExpression; - body: BabelNodeClassBody; - decorators?: Array; - mixins?: any; - superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeExportAllDeclaration extends BabelNode { - type: "ExportAllDeclaration"; - source: BabelNodeStringLiteral; -} - -declare class BabelNodeExportDefaultDeclaration extends BabelNode { - type: "ExportDefaultDeclaration"; - declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression; -} - -declare class BabelNodeExportNamedDeclaration extends BabelNode { - type: "ExportNamedDeclaration"; - declaration?: BabelNodeDeclaration; - specifiers: Array; - source?: BabelNodeStringLiteral; -} - -declare class BabelNodeExportSpecifier extends BabelNode { - type: "ExportSpecifier"; - local: BabelNodeIdentifier; - exported: BabelNodeIdentifier; -} - -declare class BabelNodeForOfStatement extends BabelNode { - type: "ForOfStatement"; - left: BabelNodeVariableDeclaration | BabelNodeLVal; - right: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeImportDeclaration extends BabelNode { - type: "ImportDeclaration"; - specifiers: Array; - source: BabelNodeStringLiteral; -} - -declare class BabelNodeImportDefaultSpecifier extends BabelNode { - type: "ImportDefaultSpecifier"; - local: BabelNodeIdentifier; -} - -declare class BabelNodeImportNamespaceSpecifier extends BabelNode { - type: "ImportNamespaceSpecifier"; - local: BabelNodeIdentifier; -} - -declare class BabelNodeImportSpecifier extends BabelNode { - type: "ImportSpecifier"; - local: BabelNodeIdentifier; - imported: BabelNodeIdentifier; - importKind?: null | "type" | "typeof"; -} - -declare class BabelNodeMetaProperty extends BabelNode { - type: "MetaProperty"; - meta: BabelNodeIdentifier; - property: BabelNodeIdentifier; -} - -declare class BabelNodeClassMethod extends BabelNode { - type: "ClassMethod"; - kind?: "get" | "set" | "method" | "constructor"; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - params: Array; - body: BabelNodeBlockStatement; - computed?: boolean; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - decorators?: Array; - generator?: boolean; - optional?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeObjectPattern extends BabelNode { - type: "ObjectPattern"; - properties: Array; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeSpreadElement extends BabelNode { - type: "SpreadElement"; - argument: BabelNodeExpression; -} - -declare class BabelNodeSuper extends BabelNode { - type: "Super"; -} - -declare class BabelNodeTaggedTemplateExpression extends BabelNode { - type: "TaggedTemplateExpression"; - tag: BabelNodeExpression; - quasi: BabelNodeTemplateLiteral; -} - -declare class BabelNodeTemplateElement extends BabelNode { - type: "TemplateElement"; - value: any; - tail?: boolean; -} - -declare class BabelNodeTemplateLiteral extends BabelNode { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; -} - -declare class BabelNodeYieldExpression extends BabelNode { - type: "YieldExpression"; - argument?: BabelNodeExpression; - delegate?: boolean; -} - -declare class BabelNodeAnyTypeAnnotation extends BabelNode { - type: "AnyTypeAnnotation"; -} - -declare class BabelNodeArrayTypeAnnotation extends BabelNode { - type: "ArrayTypeAnnotation"; - elementType: BabelNodeFlowType; -} - -declare class BabelNodeBooleanTypeAnnotation extends BabelNode { - type: "BooleanTypeAnnotation"; -} - -declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode { - type: "BooleanLiteralTypeAnnotation"; - value: boolean; -} - -declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode { - type: "NullLiteralTypeAnnotation"; -} - -declare class BabelNodeClassImplements extends BabelNode { - type: "ClassImplements"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeDeclareClass extends BabelNode { - type: "DeclareClass"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeDeclareFunction extends BabelNode { - type: "DeclareFunction"; - id: BabelNodeIdentifier; - predicate?: BabelNodeDeclaredPredicate; -} - -declare class BabelNodeDeclareInterface extends BabelNode { - type: "DeclareInterface"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeDeclareModule extends BabelNode { - type: "DeclareModule"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - body: BabelNodeBlockStatement; - kind?: "CommonJS" | "ES"; -} - -declare class BabelNodeDeclareModuleExports extends BabelNode { - type: "DeclareModuleExports"; - typeAnnotation: BabelNodeTypeAnnotation; -} - -declare class BabelNodeDeclareTypeAlias extends BabelNode { - type: "DeclareTypeAlias"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - right: BabelNodeFlowType; -} - -declare class BabelNodeDeclareOpaqueType extends BabelNode { - type: "DeclareOpaqueType"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - supertype?: BabelNodeFlowType; -} - -declare class BabelNodeDeclareVariable extends BabelNode { - type: "DeclareVariable"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeDeclareExportDeclaration extends BabelNode { - type: "DeclareExportDeclaration"; - declaration?: BabelNodeFlow; - specifiers?: Array; - source?: BabelNodeStringLiteral; -} - -declare class BabelNodeDeclareExportAllDeclaration extends BabelNode { - type: "DeclareExportAllDeclaration"; - source: BabelNodeStringLiteral; - exportKind?: ["type","value"]; -} - -declare class BabelNodeDeclaredPredicate extends BabelNode { - type: "DeclaredPredicate"; - value: BabelNodeFlow; -} - -declare class BabelNodeExistsTypeAnnotation extends BabelNode { - type: "ExistsTypeAnnotation"; -} - -declare class BabelNodeFunctionTypeAnnotation extends BabelNode { - type: "FunctionTypeAnnotation"; - typeParameters?: BabelNodeTypeParameterDeclaration; - params: Array; - rest?: BabelNodeFunctionTypeParam; - returnType: BabelNodeFlowType; -} - -declare class BabelNodeFunctionTypeParam extends BabelNode { - type: "FunctionTypeParam"; - name?: BabelNodeIdentifier; - typeAnnotation: BabelNodeFlowType; - optional?: boolean; -} - -declare class BabelNodeGenericTypeAnnotation extends BabelNode { - type: "GenericTypeAnnotation"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeInferredPredicate extends BabelNode { - type: "InferredPredicate"; -} - -declare class BabelNodeInterfaceExtends extends BabelNode { - type: "InterfaceExtends"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeInterfaceDeclaration extends BabelNode { - type: "InterfaceDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeIntersectionTypeAnnotation extends BabelNode { - type: "IntersectionTypeAnnotation"; - types: Array; -} - -declare class BabelNodeMixedTypeAnnotation extends BabelNode { - type: "MixedTypeAnnotation"; -} - -declare class BabelNodeEmptyTypeAnnotation extends BabelNode { - type: "EmptyTypeAnnotation"; -} - -declare class BabelNodeNullableTypeAnnotation extends BabelNode { - type: "NullableTypeAnnotation"; - typeAnnotation: BabelNodeFlowType; -} - -declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode { - type: "NumberLiteralTypeAnnotation"; - value: number; -} - -declare class BabelNodeNumberTypeAnnotation extends BabelNode { - type: "NumberTypeAnnotation"; -} - -declare class BabelNodeObjectTypeAnnotation extends BabelNode { - type: "ObjectTypeAnnotation"; - properties: Array; - indexers?: Array; - callProperties?: Array; - exact?: boolean; -} - -declare class BabelNodeObjectTypeCallProperty extends BabelNode { - type: "ObjectTypeCallProperty"; - value: BabelNodeFlowType; -} - -declare class BabelNodeObjectTypeIndexer extends BabelNode { - type: "ObjectTypeIndexer"; - id?: BabelNodeIdentifier; - key: BabelNodeFlowType; - value: BabelNodeFlowType; - variance?: BabelNodeVariance; -} - -declare class BabelNodeObjectTypeProperty extends BabelNode { - type: "ObjectTypeProperty"; - key: BabelNodeIdentifier | BabelNodeStringLiteral; - value: BabelNodeFlowType; - variance?: BabelNodeVariance; - kind?: "init" | "get" | "set"; - optional?: boolean; -} - -declare class BabelNodeObjectTypeSpreadProperty extends BabelNode { - type: "ObjectTypeSpreadProperty"; - argument: BabelNodeFlowType; -} - -declare class BabelNodeOpaqueType extends BabelNode { - type: "OpaqueType"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - supertype?: BabelNodeFlowType; - impltype: BabelNodeFlowType; -} - -declare class BabelNodeQualifiedTypeIdentifier extends BabelNode { - type: "QualifiedTypeIdentifier"; - id: BabelNodeIdentifier; - qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; -} - -declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode { - type: "StringLiteralTypeAnnotation"; - value: string; -} - -declare class BabelNodeStringTypeAnnotation extends BabelNode { - type: "StringTypeAnnotation"; -} - -declare class BabelNodeThisTypeAnnotation extends BabelNode { - type: "ThisTypeAnnotation"; -} - -declare class BabelNodeTupleTypeAnnotation extends BabelNode { - type: "TupleTypeAnnotation"; - types: Array; -} - -declare class BabelNodeTypeofTypeAnnotation extends BabelNode { - type: "TypeofTypeAnnotation"; - argument: BabelNodeFlowType; -} - -declare class BabelNodeTypeAlias extends BabelNode { - type: "TypeAlias"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - right: BabelNodeFlowType; -} - -declare class BabelNodeTypeAnnotation extends BabelNode { - type: "TypeAnnotation"; - typeAnnotation: BabelNodeFlowType; -} - -declare class BabelNodeTypeCastExpression extends BabelNode { - type: "TypeCastExpression"; - expression: BabelNodeExpression; - typeAnnotation: BabelNodeTypeAnnotation; -} - -declare class BabelNodeTypeParameter extends BabelNode { - type: "TypeParameter"; - bound?: BabelNodeTypeAnnotation; - variance?: BabelNodeVariance; - name?: string; -} - -declare class BabelNodeTypeParameterDeclaration extends BabelNode { - type: "TypeParameterDeclaration"; - params: Array; -} - -declare class BabelNodeTypeParameterInstantiation extends BabelNode { - type: "TypeParameterInstantiation"; - params: Array; -} - -declare class BabelNodeUnionTypeAnnotation extends BabelNode { - type: "UnionTypeAnnotation"; - types: Array; -} - -declare class BabelNodeVariance extends BabelNode { - type: "Variance"; - kind: "minus" | "plus"; -} - -declare class BabelNodeVoidTypeAnnotation extends BabelNode { - type: "VoidTypeAnnotation"; -} - -declare class BabelNodeJSXAttribute extends BabelNode { - type: "JSXAttribute"; - name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName; - value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer; -} - -declare class BabelNodeJSXClosingElement extends BabelNode { - type: "JSXClosingElement"; - name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression; -} - -declare class BabelNodeJSXElement extends BabelNode { - type: "JSXElement"; - openingElement: BabelNodeJSXOpeningElement; - closingElement?: BabelNodeJSXClosingElement; - children: Array; - selfClosing: any; -} - -declare class BabelNodeJSXEmptyExpression extends BabelNode { - type: "JSXEmptyExpression"; -} - -declare class BabelNodeJSXExpressionContainer extends BabelNode { - type: "JSXExpressionContainer"; - expression: BabelNodeExpression; -} - -declare class BabelNodeJSXSpreadChild extends BabelNode { - type: "JSXSpreadChild"; - expression: BabelNodeExpression; -} - -declare class BabelNodeJSXIdentifier extends BabelNode { - type: "JSXIdentifier"; - name: string; -} - -declare class BabelNodeJSXMemberExpression extends BabelNode { - type: "JSXMemberExpression"; - object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier; - property: BabelNodeJSXIdentifier; -} - -declare class BabelNodeJSXNamespacedName extends BabelNode { - type: "JSXNamespacedName"; - namespace: BabelNodeJSXIdentifier; - name: BabelNodeJSXIdentifier; -} - -declare class BabelNodeJSXOpeningElement extends BabelNode { - type: "JSXOpeningElement"; - name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression; - attributes: Array; - selfClosing?: boolean; -} - -declare class BabelNodeJSXSpreadAttribute extends BabelNode { - type: "JSXSpreadAttribute"; - argument: BabelNodeExpression; -} - -declare class BabelNodeJSXText extends BabelNode { - type: "JSXText"; - value: string; -} - -declare class BabelNodeJSXFragment extends BabelNode { - type: "JSXFragment"; - openingFragment: BabelNodeJSXOpeningFragment; - closingFragment: BabelNodeJSXClosingFragment; - children: Array; -} - -declare class BabelNodeJSXOpeningFragment extends BabelNode { - type: "JSXOpeningFragment"; -} - -declare class BabelNodeJSXClosingFragment extends BabelNode { - type: "JSXClosingFragment"; -} - -declare class BabelNodeNoop extends BabelNode { - type: "Noop"; -} - -declare class BabelNodeParenthesizedExpression extends BabelNode { - type: "ParenthesizedExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodeAwaitExpression extends BabelNode { - type: "AwaitExpression"; - argument: BabelNodeExpression; -} - -declare class BabelNodeBindExpression extends BabelNode { - type: "BindExpression"; - object: any; - callee: any; -} - -declare class BabelNodeClassProperty extends BabelNode { - type: "ClassProperty"; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - value?: BabelNodeExpression; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - decorators?: Array; - computed?: boolean; - abstract?: boolean; - accessibility?: "public" | "private" | "protected"; - definite?: boolean; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeOptionalMemberExpression extends BabelNode { - type: "OptionalMemberExpression"; - object: BabelNodeExpression; - property: any; - computed?: boolean; - optional: boolean; -} - -declare class BabelNodeOptionalCallExpression extends BabelNode { - type: "OptionalCallExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional: boolean; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeClassPrivateProperty extends BabelNode { - type: "ClassPrivateProperty"; - key: BabelNodePrivateName; - value?: BabelNodeExpression; -} - -declare class BabelNodeImport extends BabelNode { - type: "Import"; -} - -declare class BabelNodeDecorator extends BabelNode { - type: "Decorator"; - callee: BabelNodeExpression; - arguments?: Array; -} - -declare class BabelNodeDoExpression extends BabelNode { - type: "DoExpression"; - body: BabelNodeBlockStatement; -} - -declare class BabelNodeExportDefaultSpecifier extends BabelNode { - type: "ExportDefaultSpecifier"; - exported: BabelNodeIdentifier; -} - -declare class BabelNodeExportNamespaceSpecifier extends BabelNode { - type: "ExportNamespaceSpecifier"; - exported: BabelNodeIdentifier; -} - -declare class BabelNodePrivateName extends BabelNode { - type: "PrivateName"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeTSParameterProperty extends BabelNode { - type: "TSParameterProperty"; - parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern; - accessibility?: "public" | "private" | "protected"; - readonly?: boolean; -} - -declare class BabelNodeTSDeclareFunction extends BabelNode { - type: "TSDeclareFunction"; - id?: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; - params: Array; - returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; - async?: boolean; - declare?: boolean; - generator?: boolean; -} - -declare class BabelNodeTSDeclareMethod extends BabelNode { - type: "TSDeclareMethod"; - decorators?: Array; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; - params: Array; - returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - computed?: boolean; - generator?: boolean; - kind?: "get" | "set" | "method" | "constructor"; - optional?: boolean; -} - -declare class BabelNodeTSQualifiedName extends BabelNode { - type: "TSQualifiedName"; - left: BabelNodeTSEntityName; - right: BabelNodeIdentifier; -} - -declare class BabelNodeTSCallSignatureDeclaration extends BabelNode { - type: "TSCallSignatureDeclaration"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters?: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode { - type: "TSConstructSignatureDeclaration"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters?: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSPropertySignature extends BabelNode { - type: "TSPropertySignature"; - key: BabelNodeExpression; - typeAnnotation?: BabelNodeTSTypeAnnotation; - initializer?: BabelNodeExpression; - computed?: boolean; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeTSMethodSignature extends BabelNode { - type: "TSMethodSignature"; - key: BabelNodeExpression; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters?: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; - computed?: boolean; - optional?: boolean; -} - -declare class BabelNodeTSIndexSignature extends BabelNode { - type: "TSIndexSignature"; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; - readonly?: boolean; -} - -declare class BabelNodeTSAnyKeyword extends BabelNode { - type: "TSAnyKeyword"; -} - -declare class BabelNodeTSNumberKeyword extends BabelNode { - type: "TSNumberKeyword"; -} - -declare class BabelNodeTSObjectKeyword extends BabelNode { - type: "TSObjectKeyword"; -} - -declare class BabelNodeTSBooleanKeyword extends BabelNode { - type: "TSBooleanKeyword"; -} - -declare class BabelNodeTSStringKeyword extends BabelNode { - type: "TSStringKeyword"; -} - -declare class BabelNodeTSSymbolKeyword extends BabelNode { - type: "TSSymbolKeyword"; -} - -declare class BabelNodeTSVoidKeyword extends BabelNode { - type: "TSVoidKeyword"; -} - -declare class BabelNodeTSUndefinedKeyword extends BabelNode { - type: "TSUndefinedKeyword"; -} - -declare class BabelNodeTSNullKeyword extends BabelNode { - type: "TSNullKeyword"; -} - -declare class BabelNodeTSNeverKeyword extends BabelNode { - type: "TSNeverKeyword"; -} - -declare class BabelNodeTSThisType extends BabelNode { - type: "TSThisType"; -} - -declare class BabelNodeTSFunctionType extends BabelNode { - type: "TSFunctionType"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - typeAnnotation?: BabelNodeTSTypeAnnotation; - parameters?: Array; -} - -declare class BabelNodeTSConstructorType extends BabelNode { - type: "TSConstructorType"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - typeAnnotation?: BabelNodeTSTypeAnnotation; - parameters?: Array; -} - -declare class BabelNodeTSTypeReference extends BabelNode { - type: "TSTypeReference"; - typeName: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSTypePredicate extends BabelNode { - type: "TSTypePredicate"; - parameterName: BabelNodeIdentifier | BabelNodeTSThisType; - typeAnnotation: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSTypeQuery extends BabelNode { - type: "TSTypeQuery"; - exprName: BabelNodeTSEntityName; -} - -declare class BabelNodeTSTypeLiteral extends BabelNode { - type: "TSTypeLiteral"; - members: Array; -} - -declare class BabelNodeTSArrayType extends BabelNode { - type: "TSArrayType"; - elementType: BabelNodeTSType; -} - -declare class BabelNodeTSTupleType extends BabelNode { - type: "TSTupleType"; - elementTypes: Array; -} - -declare class BabelNodeTSUnionType extends BabelNode { - type: "TSUnionType"; - types: Array; -} - -declare class BabelNodeTSIntersectionType extends BabelNode { - type: "TSIntersectionType"; - types: Array; -} - -declare class BabelNodeTSConditionalType extends BabelNode { - type: "TSConditionalType"; - checkType: BabelNodeTSType; - extendsType: BabelNodeTSType; - trueType: BabelNodeTSType; - falseType: BabelNodeTSType; -} - -declare class BabelNodeTSInferType extends BabelNode { - type: "TSInferType"; - typeParameter: BabelNodeTSType; -} - -declare class BabelNodeTSParenthesizedType extends BabelNode { - type: "TSParenthesizedType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeOperator extends BabelNode { - type: "TSTypeOperator"; - typeAnnotation: BabelNodeTSType; - operator?: string; -} - -declare class BabelNodeTSIndexedAccessType extends BabelNode { - type: "TSIndexedAccessType"; - objectType: BabelNodeTSType; - indexType: BabelNodeTSType; -} - -declare class BabelNodeTSMappedType extends BabelNode { - type: "TSMappedType"; - typeParameter: BabelNodeTSTypeParameter; - typeAnnotation?: BabelNodeTSType; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeTSLiteralType extends BabelNode { - type: "TSLiteralType"; - literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral; -} - -declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode { - type: "TSExpressionWithTypeArguments"; - expression: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSInterfaceDeclaration extends BabelNode { - type: "TSInterfaceDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - body: BabelNodeTSInterfaceBody; - declare?: boolean; -} - -declare class BabelNodeTSInterfaceBody extends BabelNode { - type: "TSInterfaceBody"; - body: Array; -} - -declare class BabelNodeTSTypeAliasDeclaration extends BabelNode { - type: "TSTypeAliasDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - typeAnnotation: BabelNodeTSType; - declare?: boolean; -} - -declare class BabelNodeTSAsExpression extends BabelNode { - type: "TSAsExpression"; - expression: BabelNodeExpression; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeAssertion extends BabelNode { - type: "TSTypeAssertion"; - typeAnnotation: BabelNodeTSType; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSEnumDeclaration extends BabelNode { - type: "TSEnumDeclaration"; - id: BabelNodeIdentifier; - members: Array; - declare?: boolean; - initializer?: BabelNodeExpression; -} - -declare class BabelNodeTSEnumMember extends BabelNode { - type: "TSEnumMember"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - initializer?: BabelNodeExpression; -} - -declare class BabelNodeTSModuleDeclaration extends BabelNode { - type: "TSModuleDeclaration"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration; - declare?: boolean; - global?: boolean; -} - -declare class BabelNodeTSModuleBlock extends BabelNode { - type: "TSModuleBlock"; - body: Array; -} - -declare class BabelNodeTSImportEqualsDeclaration extends BabelNode { - type: "TSImportEqualsDeclaration"; - id: BabelNodeIdentifier; - moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference; - isExport?: boolean; -} - -declare class BabelNodeTSExternalModuleReference extends BabelNode { - type: "TSExternalModuleReference"; - expression: BabelNodeStringLiteral; -} - -declare class BabelNodeTSNonNullExpression extends BabelNode { - type: "TSNonNullExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSExportAssignment extends BabelNode { - type: "TSExportAssignment"; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode { - type: "TSNamespaceExportDeclaration"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeTSTypeAnnotation extends BabelNode { - type: "TSTypeAnnotation"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeParameterInstantiation extends BabelNode { - type: "TSTypeParameterInstantiation"; - params: Array; -} - -declare class BabelNodeTSTypeParameterDeclaration extends BabelNode { - type: "TSTypeParameterDeclaration"; - params: Array; -} - -declare class BabelNodeTSTypeParameter extends BabelNode { - type: "TSTypeParameter"; - constraint?: BabelNodeTSType; - name?: string; -} - -type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeParenthesizedExpression | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression; -type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression; -type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeForOfStatement | BabelNodeClassMethod; -type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod; -type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram; -type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration; -type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression; -type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement; -type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement; -type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement; -type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement; -type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeTypeCastExpression | BabelNodeParenthesizedExpression; -type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement; -type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement; -type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod; -type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod; -type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression; -type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration; -type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; -type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty; -type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName; -type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral; -type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment; -type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty; -type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod; -type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty; -type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty; -type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement; -type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; -type BabelNodeClass = BabelNodeClassDeclaration | BabelNodeClassExpression; -type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration; -type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration; -type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier; -type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias; -type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate; -type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment; -type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodePrivateName; -type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature; -type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSVoidKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSNullKeyword | BabelNodeTSNeverKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments; - -declare module "@babel/types" { - declare function arrayExpression(elements?: Array): BabelNodeArrayExpression; - declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression; - declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression; - declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective; - declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral; - declare function blockStatement(body: Array, directives?: Array): BabelNodeBlockStatement; - declare function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement; - declare function callExpression(callee: BabelNodeExpression, _arguments: Array, optional?: true | false, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeCallExpression; - declare function catchClause(param?: BabelNodeIdentifier, body: BabelNodeBlockStatement): BabelNodeCatchClause; - declare function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression; - declare function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement; - declare function debuggerStatement(): BabelNodeDebuggerStatement; - declare function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement; - declare function emptyStatement(): BabelNodeEmptyStatement; - declare function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement; - declare function file(program: BabelNodeProgram, comments: any, tokens: any): BabelNodeFile; - declare function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement; - declare function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement; - declare function functionDeclaration(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, declare?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionDeclaration; - declare function functionExpression(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionExpression; - declare function identifier(name: string, decorators?: Array, optional?: boolean, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeIdentifier; - declare function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement; - declare function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement; - declare function stringLiteral(value: string): BabelNodeStringLiteral; - declare function numericLiteral(value: number): BabelNodeNumericLiteral; - declare function nullLiteral(): BabelNodeNullLiteral; - declare function booleanLiteral(value: boolean): BabelNodeBooleanLiteral; - declare function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral; - declare function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression; - declare function memberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional?: true | false): BabelNodeMemberExpression; - declare function newExpression(callee: BabelNodeExpression, _arguments: Array, optional?: true | false, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeNewExpression; - declare function program(body: Array, directives?: Array, sourceType?: "script" | "module", sourceFile?: string): BabelNodeProgram; - declare function objectExpression(properties: Array): BabelNodeObjectExpression; - declare function objectMethod(kind?: "method" | "get" | "set", key: any, params: Array, body: BabelNodeBlockStatement, computed?: boolean, async?: boolean, decorators?: Array, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeObjectMethod; - declare function objectProperty(key: any, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array): BabelNodeObjectProperty; - declare function restElement(argument: BabelNodeLVal, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeRestElement; - declare function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement; - declare function sequenceExpression(expressions: Array): BabelNodeSequenceExpression; - declare function switchCase(test?: BabelNodeExpression, consequent: Array): BabelNodeSwitchCase; - declare function switchStatement(discriminant: BabelNodeExpression, cases: Array): BabelNodeSwitchStatement; - declare function thisExpression(): BabelNodeThisExpression; - declare function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement; - declare function tryStatement(block: BabelNodeBlockStatement, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement; - declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression; - declare function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression; - declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array, declare?: boolean): BabelNodeVariableDeclaration; - declare function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression, definite?: boolean): BabelNodeVariableDeclarator; - declare function whileStatement(test: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWhileStatement; - declare function withStatement(object: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWithStatement; - declare function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern, right: BabelNodeExpression, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeAssignmentPattern; - declare function arrayPattern(elements: Array, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeArrayPattern; - declare function arrowFunctionExpression(params: Array, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean, expression?: boolean, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeArrowFunctionExpression; - declare function classBody(body: Array): BabelNodeClassBody; - declare function classDeclaration(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array, abstract?: boolean, declare?: boolean, _implements?: Array, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassDeclaration; - declare function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array, _implements?: Array, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassExpression; - declare function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration; - declare function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration; - declare function exportNamedDeclaration(declaration?: BabelNodeDeclaration, specifiers: Array, source?: BabelNodeStringLiteral): BabelNodeExportNamedDeclaration; - declare function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier): BabelNodeExportSpecifier; - declare function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement; - declare function importDeclaration(specifiers: Array, source: BabelNodeStringLiteral): BabelNodeImportDeclaration; - declare function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier; - declare function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier; - declare function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier, importKind?: null | "type" | "typeof"): BabelNodeImportSpecifier; - declare function metaProperty(meta: BabelNodeIdentifier, property: BabelNodeIdentifier): BabelNodeMetaProperty; - declare function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, decorators?: Array, generator?: boolean, optional?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassMethod; - declare function objectPattern(properties: Array, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeObjectPattern; - declare function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement; - declare function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral): BabelNodeTaggedTemplateExpression; - declare function templateElement(value: any, tail?: boolean): BabelNodeTemplateElement; - declare function templateLiteral(quasis: Array, expressions: Array): BabelNodeTemplateLiteral; - declare function yieldExpression(argument?: BabelNodeExpression, delegate?: boolean): BabelNodeYieldExpression; - declare function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation; - declare function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation; - declare function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation; - declare function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation; - declare function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation; - declare function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements; - declare function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeDeclareClass; - declare function declareFunction(id: BabelNodeIdentifier, predicate?: BabelNodeDeclaredPredicate): BabelNodeDeclareFunction; - declare function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeDeclareInterface; - declare function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule; - declare function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports; - declare function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias; - declare function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType; - declare function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable; - declare function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array, source?: BabelNodeStringLiteral, _default?: boolean): BabelNodeDeclareExportDeclaration; - declare function declareExportAllDeclaration(source: BabelNodeStringLiteral, exportKind?: ["type","value"]): BabelNodeDeclareExportAllDeclaration; - declare function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate; - declare function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation; - declare function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation; - declare function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType, optional?: boolean): BabelNodeFunctionTypeParam; - declare function genericTypeAnnotation(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation; - declare function inferredPredicate(): BabelNodeInferredPredicate; - declare function interfaceExtends(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends; - declare function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeInterfaceDeclaration; - declare function intersectionTypeAnnotation(types: Array): BabelNodeIntersectionTypeAnnotation; - declare function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation; - declare function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation; - declare function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation; - declare function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation; - declare function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation; - declare function objectTypeAnnotation(properties: Array, indexers?: Array, callProperties?: Array, exact?: boolean): BabelNodeObjectTypeAnnotation; - declare function objectTypeCallProperty(value: BabelNodeFlowType, _static?: boolean): BabelNodeObjectTypeCallProperty; - declare function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance, _static?: boolean): BabelNodeObjectTypeIndexer; - declare function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance, kind?: "init" | "get" | "set", optional?: boolean, _static?: boolean): BabelNodeObjectTypeProperty; - declare function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty; - declare function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType; - declare function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier; - declare function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation; - declare function stringTypeAnnotation(): BabelNodeStringTypeAnnotation; - declare function thisTypeAnnotation(): BabelNodeThisTypeAnnotation; - declare function tupleTypeAnnotation(types: Array): BabelNodeTupleTypeAnnotation; - declare function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation; - declare function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias; - declare function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation; - declare function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression; - declare function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance, name?: string): BabelNodeTypeParameter; - declare function typeParameterDeclaration(params: Array): BabelNodeTypeParameterDeclaration; - declare function typeParameterInstantiation(params: Array): BabelNodeTypeParameterInstantiation; - declare function unionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation; - declare function variance(kind: "minus" | "plus"): BabelNodeVariance; - declare function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation; - declare function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute; - declare function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression): BabelNodeJSXClosingElement; - declare function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array, selfClosing: any): BabelNodeJSXElement; - declare function jsxEmptyExpression(): BabelNodeJSXEmptyExpression; - declare function jsxExpressionContainer(expression: BabelNodeExpression): BabelNodeJSXExpressionContainer; - declare function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild; - declare function jsxIdentifier(name: string): BabelNodeJSXIdentifier; - declare function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression; - declare function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName; - declare function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression, attributes: Array, selfClosing?: boolean): BabelNodeJSXOpeningElement; - declare function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute; - declare function jsxText(value: string): BabelNodeJSXText; - declare function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array): BabelNodeJSXFragment; - declare function jsxOpeningFragment(): BabelNodeJSXOpeningFragment; - declare function jsxClosingFragment(): BabelNodeJSXClosingFragment; - declare function noop(): BabelNodeNoop; - declare function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression; - declare function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression; - declare function bindExpression(object: any, callee: any): BabelNodeBindExpression; - declare function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array, computed?: boolean, abstract?: boolean, accessibility?: "public" | "private" | "protected", definite?: boolean, optional?: boolean, readonly?: boolean, _static?: boolean): BabelNodeClassProperty; - declare function optionalMemberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression; - declare function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array, optional: boolean, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeOptionalCallExpression; - declare function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression): BabelNodeClassPrivateProperty; - declare function decorator(callee: BabelNodeExpression, _arguments?: Array): BabelNodeDecorator; - declare function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression; - declare function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier; - declare function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier; - declare function privateName(id: BabelNodeIdentifier): BabelNodePrivateName; - declare function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern, accessibility?: "public" | "private" | "protected", readonly?: boolean): BabelNodeTSParameterProperty; - declare function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, async?: boolean, declare?: boolean, generator?: boolean): BabelNodeTSDeclareFunction; - declare function tsDeclareMethod(decorators?: Array, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean, _static?: boolean): BabelNodeTSDeclareMethod; - declare function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName; - declare function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters?: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration; - declare function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters?: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration; - declare function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression, computed?: boolean, optional?: boolean, readonly?: boolean): BabelNodeTSPropertySignature; - declare function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters?: Array, typeAnnotation?: BabelNodeTSTypeAnnotation, computed?: boolean, optional?: boolean): BabelNodeTSMethodSignature; - declare function tsIndexSignature(parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation, readonly?: boolean): BabelNodeTSIndexSignature; - declare function tsAnyKeyword(): BabelNodeTSAnyKeyword; - declare function tsNumberKeyword(): BabelNodeTSNumberKeyword; - declare function tsObjectKeyword(): BabelNodeTSObjectKeyword; - declare function tsBooleanKeyword(): BabelNodeTSBooleanKeyword; - declare function tsStringKeyword(): BabelNodeTSStringKeyword; - declare function tsSymbolKeyword(): BabelNodeTSSymbolKeyword; - declare function tsVoidKeyword(): BabelNodeTSVoidKeyword; - declare function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword; - declare function tsNullKeyword(): BabelNodeTSNullKeyword; - declare function tsNeverKeyword(): BabelNodeTSNeverKeyword; - declare function tsThisType(): BabelNodeTSThisType; - declare function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation?: BabelNodeTSTypeAnnotation, parameters?: Array): BabelNodeTSFunctionType; - declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation?: BabelNodeTSTypeAnnotation, parameters?: Array): BabelNodeTSConstructorType; - declare function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference; - declare function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation: BabelNodeTSTypeAnnotation): BabelNodeTSTypePredicate; - declare function tsTypeQuery(exprName: BabelNodeTSEntityName): BabelNodeTSTypeQuery; - declare function tsTypeLiteral(members: Array): BabelNodeTSTypeLiteral; - declare function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType; - declare function tsTupleType(elementTypes: Array): BabelNodeTSTupleType; - declare function tsUnionType(types: Array): BabelNodeTSUnionType; - declare function tsIntersectionType(types: Array): BabelNodeTSIntersectionType; - declare function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType; - declare function tsInferType(typeParameter: BabelNodeTSType): BabelNodeTSInferType; - declare function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType; - declare function tsTypeOperator(typeAnnotation: BabelNodeTSType, operator?: string): BabelNodeTSTypeOperator; - declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType; - declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType, optional?: boolean, readonly?: boolean): BabelNodeTSMappedType; - declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType; - declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments; - declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array, body: BabelNodeTSInterfaceBody, declare?: boolean): BabelNodeTSInterfaceDeclaration; - declare function tsInterfaceBody(body: Array): BabelNodeTSInterfaceBody; - declare function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType, declare?: boolean): BabelNodeTSTypeAliasDeclaration; - declare function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression; - declare function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion; - declare function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array, _const?: boolean, declare?: boolean, initializer?: BabelNodeExpression): BabelNodeTSEnumDeclaration; - declare function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember; - declare function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration, declare?: boolean, global?: boolean): BabelNodeTSModuleDeclaration; - declare function tsModuleBlock(body: Array): BabelNodeTSModuleBlock; - declare function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference, isExport?: boolean): BabelNodeTSImportEqualsDeclaration; - declare function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference; - declare function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression; - declare function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment; - declare function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration; - declare function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation; - declare function tsTypeParameterInstantiation(params: Array): BabelNodeTSTypeParameterInstantiation; - declare function tsTypeParameterDeclaration(params: Array): BabelNodeTSTypeParameterDeclaration; - declare function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name?: string): BabelNodeTSTypeParameter; - declare function isArrayExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression) - declare function isAssignmentExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression) - declare function isBinaryExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression) - declare function isDirective(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective) - declare function isDirectiveLiteral(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral) - declare function isBlockStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement) - declare function isBreakStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement) - declare function isCallExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression) - declare function isCatchClause(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause) - declare function isConditionalExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression) - declare function isContinueStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement) - declare function isDebuggerStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement) - declare function isDoWhileStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement) - declare function isEmptyStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement) - declare function isExpressionStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement) - declare function isFile(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile) - declare function isForInStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement) - declare function isForStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement) - declare function isFunctionDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration) - declare function isFunctionExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression) - declare function isIdentifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier) - declare function isIfStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement) - declare function isLabeledStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement) - declare function isStringLiteral(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral) - declare function isNumericLiteral(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral) - declare function isNullLiteral(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral) - declare function isBooleanLiteral(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral) - declare function isRegExpLiteral(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral) - declare function isLogicalExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression) - declare function isMemberExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression) - declare function isNewExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression) - declare function isProgram(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram) - declare function isObjectExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression) - declare function isObjectMethod(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod) - declare function isObjectProperty(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty) - declare function isRestElement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement) - declare function isReturnStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement) - declare function isSequenceExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression) - declare function isSwitchCase(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase) - declare function isSwitchStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement) - declare function isThisExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression) - declare function isThrowStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement) - declare function isTryStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement) - declare function isUnaryExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression) - declare function isUpdateExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression) - declare function isVariableDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration) - declare function isVariableDeclarator(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator) - declare function isWhileStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement) - declare function isWithStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement) - declare function isAssignmentPattern(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern) - declare function isArrayPattern(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern) - declare function isArrowFunctionExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression) - declare function isClassBody(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody) - declare function isClassDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration) - declare function isClassExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression) - declare function isExportAllDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration) - declare function isExportDefaultDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration) - declare function isExportNamedDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration) - declare function isExportSpecifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier) - declare function isForOfStatement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement) - declare function isImportDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration) - declare function isImportDefaultSpecifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier) - declare function isImportNamespaceSpecifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier) - declare function isImportSpecifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier) - declare function isMetaProperty(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty) - declare function isClassMethod(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod) - declare function isObjectPattern(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern) - declare function isSpreadElement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement) - declare function isSuper(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper) - declare function isTaggedTemplateExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression) - declare function isTemplateElement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement) - declare function isTemplateLiteral(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral) - declare function isYieldExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression) - declare function isAnyTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation) - declare function isArrayTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation) - declare function isBooleanTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation) - declare function isBooleanLiteralTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation) - declare function isNullLiteralTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation) - declare function isClassImplements(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements) - declare function isDeclareClass(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass) - declare function isDeclareFunction(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction) - declare function isDeclareInterface(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface) - declare function isDeclareModule(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule) - declare function isDeclareModuleExports(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports) - declare function isDeclareTypeAlias(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias) - declare function isDeclareOpaqueType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType) - declare function isDeclareVariable(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable) - declare function isDeclareExportDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration) - declare function isDeclareExportAllDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration) - declare function isDeclaredPredicate(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate) - declare function isExistsTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation) - declare function isFunctionTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation) - declare function isFunctionTypeParam(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam) - declare function isGenericTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation) - declare function isInferredPredicate(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate) - declare function isInterfaceExtends(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends) - declare function isInterfaceDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration) - declare function isIntersectionTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation) - declare function isMixedTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation) - declare function isEmptyTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation) - declare function isNullableTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation) - declare function isNumberLiteralTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation) - declare function isNumberTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation) - declare function isObjectTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation) - declare function isObjectTypeCallProperty(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty) - declare function isObjectTypeIndexer(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer) - declare function isObjectTypeProperty(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty) - declare function isObjectTypeSpreadProperty(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty) - declare function isOpaqueType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType) - declare function isQualifiedTypeIdentifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier) - declare function isStringLiteralTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation) - declare function isStringTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation) - declare function isThisTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation) - declare function isTupleTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation) - declare function isTypeofTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation) - declare function isTypeAlias(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias) - declare function isTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation) - declare function isTypeCastExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression) - declare function isTypeParameter(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter) - declare function isTypeParameterDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration) - declare function isTypeParameterInstantiation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation) - declare function isUnionTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation) - declare function isVariance(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance) - declare function isVoidTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation) - declare function isJSXAttribute(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute) - declare function isJSXClosingElement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement) - declare function isJSXElement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement) - declare function isJSXEmptyExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression) - declare function isJSXExpressionContainer(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer) - declare function isJSXSpreadChild(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild) - declare function isJSXIdentifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier) - declare function isJSXMemberExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression) - declare function isJSXNamespacedName(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName) - declare function isJSXOpeningElement(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement) - declare function isJSXSpreadAttribute(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute) - declare function isJSXText(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText) - declare function isJSXFragment(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment) - declare function isJSXOpeningFragment(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment) - declare function isJSXClosingFragment(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment) - declare function isNoop(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop) - declare function isParenthesizedExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression) - declare function isAwaitExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression) - declare function isBindExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression) - declare function isClassProperty(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty) - declare function isOptionalMemberExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression) - declare function isOptionalCallExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression) - declare function isClassPrivateProperty(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty) - declare function isImport(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport) - declare function isDecorator(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator) - declare function isDoExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression) - declare function isExportDefaultSpecifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier) - declare function isExportNamespaceSpecifier(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier) - declare function isPrivateName(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName) - declare function isTSParameterProperty(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty) - declare function isTSDeclareFunction(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction) - declare function isTSDeclareMethod(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod) - declare function isTSQualifiedName(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName) - declare function isTSCallSignatureDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration) - declare function isTSConstructSignatureDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration) - declare function isTSPropertySignature(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature) - declare function isTSMethodSignature(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature) - declare function isTSIndexSignature(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature) - declare function isTSAnyKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword) - declare function isTSNumberKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword) - declare function isTSObjectKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword) - declare function isTSBooleanKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword) - declare function isTSStringKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword) - declare function isTSSymbolKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword) - declare function isTSVoidKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword) - declare function isTSUndefinedKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword) - declare function isTSNullKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword) - declare function isTSNeverKeyword(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword) - declare function isTSThisType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType) - declare function isTSFunctionType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType) - declare function isTSConstructorType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType) - declare function isTSTypeReference(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference) - declare function isTSTypePredicate(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate) - declare function isTSTypeQuery(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery) - declare function isTSTypeLiteral(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral) - declare function isTSArrayType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType) - declare function isTSTupleType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType) - declare function isTSUnionType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType) - declare function isTSIntersectionType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType) - declare function isTSConditionalType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType) - declare function isTSInferType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType) - declare function isTSParenthesizedType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType) - declare function isTSTypeOperator(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator) - declare function isTSIndexedAccessType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType) - declare function isTSMappedType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType) - declare function isTSLiteralType(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType) - declare function isTSExpressionWithTypeArguments(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments) - declare function isTSInterfaceDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration) - declare function isTSInterfaceBody(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody) - declare function isTSTypeAliasDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration) - declare function isTSAsExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression) - declare function isTSTypeAssertion(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion) - declare function isTSEnumDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration) - declare function isTSEnumMember(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember) - declare function isTSModuleDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration) - declare function isTSModuleBlock(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock) - declare function isTSImportEqualsDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration) - declare function isTSExternalModuleReference(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference) - declare function isTSNonNullExpression(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression) - declare function isTSExportAssignment(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment) - declare function isTSNamespaceExportDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration) - declare function isTSTypeAnnotation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation) - declare function isTSTypeParameterInstantiation(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation) - declare function isTSTypeParameterDeclaration(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration) - declare function isTSTypeParameter(node: Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter) - declare function isExpression(node: Object, opts?: ?Object): boolean - declare function isBinary(node: Object, opts?: ?Object): boolean - declare function isScopable(node: Object, opts?: ?Object): boolean - declare function isBlockParent(node: Object, opts?: ?Object): boolean - declare function isBlock(node: Object, opts?: ?Object): boolean - declare function isStatement(node: Object, opts?: ?Object): boolean - declare function isTerminatorless(node: Object, opts?: ?Object): boolean - declare function isCompletionStatement(node: Object, opts?: ?Object): boolean - declare function isConditional(node: Object, opts?: ?Object): boolean - declare function isLoop(node: Object, opts?: ?Object): boolean - declare function isWhile(node: Object, opts?: ?Object): boolean - declare function isExpressionWrapper(node: Object, opts?: ?Object): boolean - declare function isFor(node: Object, opts?: ?Object): boolean - declare function isForXStatement(node: Object, opts?: ?Object): boolean - declare function isFunction(node: Object, opts?: ?Object): boolean - declare function isFunctionParent(node: Object, opts?: ?Object): boolean - declare function isPureish(node: Object, opts?: ?Object): boolean - declare function isDeclaration(node: Object, opts?: ?Object): boolean - declare function isPatternLike(node: Object, opts?: ?Object): boolean - declare function isLVal(node: Object, opts?: ?Object): boolean - declare function isTSEntityName(node: Object, opts?: ?Object): boolean - declare function isLiteral(node: Object, opts?: ?Object): boolean - declare function isImmutable(node: Object, opts?: ?Object): boolean - declare function isUserWhitespacable(node: Object, opts?: ?Object): boolean - declare function isMethod(node: Object, opts?: ?Object): boolean - declare function isObjectMember(node: Object, opts?: ?Object): boolean - declare function isProperty(node: Object, opts?: ?Object): boolean - declare function isUnaryLike(node: Object, opts?: ?Object): boolean - declare function isPattern(node: Object, opts?: ?Object): boolean - declare function isClass(node: Object, opts?: ?Object): boolean - declare function isModuleDeclaration(node: Object, opts?: ?Object): boolean - declare function isExportDeclaration(node: Object, opts?: ?Object): boolean - declare function isModuleSpecifier(node: Object, opts?: ?Object): boolean - declare function isFlow(node: Object, opts?: ?Object): boolean - declare function isFlowType(node: Object, opts?: ?Object): boolean - declare function isFlowBaseAnnotation(node: Object, opts?: ?Object): boolean - declare function isFlowDeclaration(node: Object, opts?: ?Object): boolean - declare function isFlowPredicate(node: Object, opts?: ?Object): boolean - declare function isJSX(node: Object, opts?: ?Object): boolean - declare function isPrivate(node: Object, opts?: ?Object): boolean - declare function isTSTypeElement(node: Object, opts?: ?Object): boolean - declare function isTSType(node: Object, opts?: ?Object): boolean - declare function isNumberLiteral(node: Object, opts?: ?Object): boolean - declare function isRegexLiteral(node: Object, opts?: ?Object): boolean - declare function isRestProperty(node: Object, opts?: ?Object): boolean - declare function isSpreadProperty(node: Object, opts?: ?Object): boolean - declare function validate(n: BabelNode, key: string, value: mixed): void; - declare function clone(n: T): T; - declare function cloneDeep(n: T): T; - declare function removeProperties(n: T, opts: ?{}): void; - declare function removePropertiesDeep(n: T, opts: ?{}): T; - declare type TraversalAncestors = Array<{ - node: BabelNode, - key: string, - index?: number, - }>; - declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; - declare type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - }; - declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void; -} diff --git a/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js b/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js deleted file mode 100644 index 3255434..0000000 --- a/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = appendToMemberExpression; - -var _generated = require("../builders/generated"); - -function appendToMemberExpression(member, append, computed) { - if (computed === void 0) { - computed = false; - } - - member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); - member.property = append; - member.computed = !!computed; - return member; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/inherits.js b/node_modules/@babel/types/lib/modifications/inherits.js deleted file mode 100644 index 25210d7..0000000 --- a/node_modules/@babel/types/lib/modifications/inherits.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inherits; - -var _constants = require("../constants"); - -var _inheritsComments = _interopRequireDefault(require("../comments/inheritsComments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inherits(child, parent) { - if (!child || !parent) return child; - var _arr = _constants.INHERIT_KEYS.optional; - - for (var _i = 0; _i < _arr.length; _i++) { - var _key = _arr[_i]; - - if (child[_key] == null) { - child[_key] = parent[_key]; - } - } - - for (var key in parent) { - if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; - } - - var _arr2 = _constants.INHERIT_KEYS.force; - - for (var _i2 = 0; _i2 < _arr2.length; _i2++) { - var _key2 = _arr2[_i2]; - child[_key2] = parent[_key2]; - } - - (0, _inheritsComments.default)(child, parent); - return child; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/removeProperties.js b/node_modules/@babel/types/lib/modifications/removeProperties.js deleted file mode 100644 index 0fe50ec..0000000 --- a/node_modules/@babel/types/lib/modifications/removeProperties.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removeProperties; - -var _constants = require("../constants"); - -var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; - -var CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); - -function removeProperties(node, opts) { - if (opts === void 0) { - opts = {}; - } - - var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; - - for (var _iterator = map, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var _key = _ref; - if (node[_key] != null) node[_key] = undefined; - } - - for (var key in node) { - if (key[0] === "_" && node[key] != null) node[key] = undefined; - } - - var symbols = Object.getOwnPropertySymbols(node); - - for (var _iterator2 = symbols, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var sym = _ref2; - node[sym] = null; - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/traverse/traverse.js b/node_modules/@babel/types/lib/traverse/traverse.js deleted file mode 100644 index cc086a0..0000000 --- a/node_modules/@babel/types/lib/traverse/traverse.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverse; - -var _definitions = require("../definitions"); - -function traverse(node, handlers, state) { - if (typeof handlers === "function") { - handlers = { - enter: handlers - }; - } - - var _ref = handlers, - enter = _ref.enter, - exit = _ref.exit; - traverseSimpleImpl(node, enter, exit, state, []); -} - -function traverseSimpleImpl(node, enter, exit, state, ancestors) { - var keys = _definitions.VISITOR_KEYS[node.type]; - if (!keys) return; - if (enter) enter(node, ancestors, state); - - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var _key = _ref2; - var subNode = node[_key]; - - if (Array.isArray(subNode)) { - for (var i = 0; i < subNode.length; i++) { - var child = subNode[i]; - if (!child) continue; - ancestors.push({ - node: node, - key: _key, - index: i - }); - traverseSimpleImpl(child, enter, exit, state, ancestors); - ancestors.pop(); - } - } else if (subNode) { - ancestors.push({ - node: node, - key: _key - }); - traverseSimpleImpl(subNode, enter, exit, state, ancestors); - ancestors.pop(); - } - } - - if (exit) exit(node, ancestors, state); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/traverse/traverseFast.js b/node_modules/@babel/types/lib/traverse/traverseFast.js deleted file mode 100644 index 725cbf8..0000000 --- a/node_modules/@babel/types/lib/traverse/traverseFast.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverseFast; - -var _definitions = require("../definitions"); - -function traverseFast(node, enter, opts) { - if (!node) return; - var keys = _definitions.VISITOR_KEYS[node.type]; - if (!keys) return; - opts = opts || {}; - enter(node, opts); - - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var key = _ref; - var subNode = node[key]; - - if (Array.isArray(subNode)) { - for (var _iterator2 = subNode, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _node = _ref2; - traverseFast(_node, enter, opts); - } - } else { - traverseFast(subNode, enter, opts); - } - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js b/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js deleted file mode 100644 index 5d17656..0000000 --- a/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cleanJSXElementLiteralChild; - -var _generated = require("../../builders/generated"); - -function cleanJSXElementLiteralChild(child, args) { - var lines = child.value.split(/\r\n|\n|\r/); - var lastNonEmptyLine = 0; - - for (var i = 0; i < lines.length; i++) { - if (lines[i].match(/[^ \t]/)) { - lastNonEmptyLine = i; - } - } - - var str = ""; - - for (var _i = 0; _i < lines.length; _i++) { - var line = lines[_i]; - var isFirstLine = _i === 0; - var isLastLine = _i === lines.length - 1; - var isLastNonEmptyLine = _i === lastNonEmptyLine; - var trimmedLine = line.replace(/\t/g, " "); - - if (!isFirstLine) { - trimmedLine = trimmedLine.replace(/^[ ]+/, ""); - } - - if (!isLastLine) { - trimmedLine = trimmedLine.replace(/[ ]+$/, ""); - } - - if (trimmedLine) { - if (!isLastNonEmptyLine) { - trimmedLine += " "; - } - - str += trimmedLine; - } - } - - if (str) args.push((0, _generated.stringLiteral)(str)); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/shallowEqual.js b/node_modules/@babel/types/lib/utils/shallowEqual.js deleted file mode 100644 index 28a39ca..0000000 --- a/node_modules/@babel/types/lib/utils/shallowEqual.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = shallowEqual; - -function shallowEqual(actual, expected) { - var keys = Object.keys(expected); - var _arr = keys; - - for (var _i = 0; _i < _arr.length; _i++) { - var key = _arr[_i]; - - if (actual[key] !== expected[key]) { - return false; - } - } - - return true; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js deleted file mode 100644 index 4652e41..0000000 --- a/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = buildMatchMemberExpression; - -var _matchesPattern = _interopRequireDefault(require("./matchesPattern")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function buildMatchMemberExpression(match, allowPartial) { - var parts = match.split("."); - return function (member) { - return (0, _matchesPattern.default)(member, parts, allowPartial); - }; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/generated/index.js b/node_modules/@babel/types/lib/validators/generated/index.js deleted file mode 100644 index cfae1a8..0000000 --- a/node_modules/@babel/types/lib/validators/generated/index.js +++ /dev/null @@ -1,4093 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isArrayExpression = isArrayExpression; -exports.isAssignmentExpression = isAssignmentExpression; -exports.isBinaryExpression = isBinaryExpression; -exports.isDirective = isDirective; -exports.isDirectiveLiteral = isDirectiveLiteral; -exports.isBlockStatement = isBlockStatement; -exports.isBreakStatement = isBreakStatement; -exports.isCallExpression = isCallExpression; -exports.isCatchClause = isCatchClause; -exports.isConditionalExpression = isConditionalExpression; -exports.isContinueStatement = isContinueStatement; -exports.isDebuggerStatement = isDebuggerStatement; -exports.isDoWhileStatement = isDoWhileStatement; -exports.isEmptyStatement = isEmptyStatement; -exports.isExpressionStatement = isExpressionStatement; -exports.isFile = isFile; -exports.isForInStatement = isForInStatement; -exports.isForStatement = isForStatement; -exports.isFunctionDeclaration = isFunctionDeclaration; -exports.isFunctionExpression = isFunctionExpression; -exports.isIdentifier = isIdentifier; -exports.isIfStatement = isIfStatement; -exports.isLabeledStatement = isLabeledStatement; -exports.isStringLiteral = isStringLiteral; -exports.isNumericLiteral = isNumericLiteral; -exports.isNullLiteral = isNullLiteral; -exports.isBooleanLiteral = isBooleanLiteral; -exports.isRegExpLiteral = isRegExpLiteral; -exports.isLogicalExpression = isLogicalExpression; -exports.isMemberExpression = isMemberExpression; -exports.isNewExpression = isNewExpression; -exports.isProgram = isProgram; -exports.isObjectExpression = isObjectExpression; -exports.isObjectMethod = isObjectMethod; -exports.isObjectProperty = isObjectProperty; -exports.isRestElement = isRestElement; -exports.isReturnStatement = isReturnStatement; -exports.isSequenceExpression = isSequenceExpression; -exports.isSwitchCase = isSwitchCase; -exports.isSwitchStatement = isSwitchStatement; -exports.isThisExpression = isThisExpression; -exports.isThrowStatement = isThrowStatement; -exports.isTryStatement = isTryStatement; -exports.isUnaryExpression = isUnaryExpression; -exports.isUpdateExpression = isUpdateExpression; -exports.isVariableDeclaration = isVariableDeclaration; -exports.isVariableDeclarator = isVariableDeclarator; -exports.isWhileStatement = isWhileStatement; -exports.isWithStatement = isWithStatement; -exports.isAssignmentPattern = isAssignmentPattern; -exports.isArrayPattern = isArrayPattern; -exports.isArrowFunctionExpression = isArrowFunctionExpression; -exports.isClassBody = isClassBody; -exports.isClassDeclaration = isClassDeclaration; -exports.isClassExpression = isClassExpression; -exports.isExportAllDeclaration = isExportAllDeclaration; -exports.isExportDefaultDeclaration = isExportDefaultDeclaration; -exports.isExportNamedDeclaration = isExportNamedDeclaration; -exports.isExportSpecifier = isExportSpecifier; -exports.isForOfStatement = isForOfStatement; -exports.isImportDeclaration = isImportDeclaration; -exports.isImportDefaultSpecifier = isImportDefaultSpecifier; -exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier; -exports.isImportSpecifier = isImportSpecifier; -exports.isMetaProperty = isMetaProperty; -exports.isClassMethod = isClassMethod; -exports.isObjectPattern = isObjectPattern; -exports.isSpreadElement = isSpreadElement; -exports.isSuper = isSuper; -exports.isTaggedTemplateExpression = isTaggedTemplateExpression; -exports.isTemplateElement = isTemplateElement; -exports.isTemplateLiteral = isTemplateLiteral; -exports.isYieldExpression = isYieldExpression; -exports.isAnyTypeAnnotation = isAnyTypeAnnotation; -exports.isArrayTypeAnnotation = isArrayTypeAnnotation; -exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation; -exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; -exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; -exports.isClassImplements = isClassImplements; -exports.isDeclareClass = isDeclareClass; -exports.isDeclareFunction = isDeclareFunction; -exports.isDeclareInterface = isDeclareInterface; -exports.isDeclareModule = isDeclareModule; -exports.isDeclareModuleExports = isDeclareModuleExports; -exports.isDeclareTypeAlias = isDeclareTypeAlias; -exports.isDeclareOpaqueType = isDeclareOpaqueType; -exports.isDeclareVariable = isDeclareVariable; -exports.isDeclareExportDeclaration = isDeclareExportDeclaration; -exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; -exports.isDeclaredPredicate = isDeclaredPredicate; -exports.isExistsTypeAnnotation = isExistsTypeAnnotation; -exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation; -exports.isFunctionTypeParam = isFunctionTypeParam; -exports.isGenericTypeAnnotation = isGenericTypeAnnotation; -exports.isInferredPredicate = isInferredPredicate; -exports.isInterfaceExtends = isInterfaceExtends; -exports.isInterfaceDeclaration = isInterfaceDeclaration; -exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; -exports.isMixedTypeAnnotation = isMixedTypeAnnotation; -exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation; -exports.isNullableTypeAnnotation = isNullableTypeAnnotation; -exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; -exports.isNumberTypeAnnotation = isNumberTypeAnnotation; -exports.isObjectTypeAnnotation = isObjectTypeAnnotation; -exports.isObjectTypeCallProperty = isObjectTypeCallProperty; -exports.isObjectTypeIndexer = isObjectTypeIndexer; -exports.isObjectTypeProperty = isObjectTypeProperty; -exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; -exports.isOpaqueType = isOpaqueType; -exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; -exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; -exports.isStringTypeAnnotation = isStringTypeAnnotation; -exports.isThisTypeAnnotation = isThisTypeAnnotation; -exports.isTupleTypeAnnotation = isTupleTypeAnnotation; -exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation; -exports.isTypeAlias = isTypeAlias; -exports.isTypeAnnotation = isTypeAnnotation; -exports.isTypeCastExpression = isTypeCastExpression; -exports.isTypeParameter = isTypeParameter; -exports.isTypeParameterDeclaration = isTypeParameterDeclaration; -exports.isTypeParameterInstantiation = isTypeParameterInstantiation; -exports.isUnionTypeAnnotation = isUnionTypeAnnotation; -exports.isVariance = isVariance; -exports.isVoidTypeAnnotation = isVoidTypeAnnotation; -exports.isJSXAttribute = isJSXAttribute; -exports.isJSXClosingElement = isJSXClosingElement; -exports.isJSXElement = isJSXElement; -exports.isJSXEmptyExpression = isJSXEmptyExpression; -exports.isJSXExpressionContainer = isJSXExpressionContainer; -exports.isJSXSpreadChild = isJSXSpreadChild; -exports.isJSXIdentifier = isJSXIdentifier; -exports.isJSXMemberExpression = isJSXMemberExpression; -exports.isJSXNamespacedName = isJSXNamespacedName; -exports.isJSXOpeningElement = isJSXOpeningElement; -exports.isJSXSpreadAttribute = isJSXSpreadAttribute; -exports.isJSXText = isJSXText; -exports.isJSXFragment = isJSXFragment; -exports.isJSXOpeningFragment = isJSXOpeningFragment; -exports.isJSXClosingFragment = isJSXClosingFragment; -exports.isNoop = isNoop; -exports.isParenthesizedExpression = isParenthesizedExpression; -exports.isAwaitExpression = isAwaitExpression; -exports.isBindExpression = isBindExpression; -exports.isClassProperty = isClassProperty; -exports.isOptionalMemberExpression = isOptionalMemberExpression; -exports.isOptionalCallExpression = isOptionalCallExpression; -exports.isClassPrivateProperty = isClassPrivateProperty; -exports.isImport = isImport; -exports.isDecorator = isDecorator; -exports.isDoExpression = isDoExpression; -exports.isExportDefaultSpecifier = isExportDefaultSpecifier; -exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier; -exports.isPrivateName = isPrivateName; -exports.isTSParameterProperty = isTSParameterProperty; -exports.isTSDeclareFunction = isTSDeclareFunction; -exports.isTSDeclareMethod = isTSDeclareMethod; -exports.isTSQualifiedName = isTSQualifiedName; -exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; -exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; -exports.isTSPropertySignature = isTSPropertySignature; -exports.isTSMethodSignature = isTSMethodSignature; -exports.isTSIndexSignature = isTSIndexSignature; -exports.isTSAnyKeyword = isTSAnyKeyword; -exports.isTSNumberKeyword = isTSNumberKeyword; -exports.isTSObjectKeyword = isTSObjectKeyword; -exports.isTSBooleanKeyword = isTSBooleanKeyword; -exports.isTSStringKeyword = isTSStringKeyword; -exports.isTSSymbolKeyword = isTSSymbolKeyword; -exports.isTSVoidKeyword = isTSVoidKeyword; -exports.isTSUndefinedKeyword = isTSUndefinedKeyword; -exports.isTSNullKeyword = isTSNullKeyword; -exports.isTSNeverKeyword = isTSNeverKeyword; -exports.isTSThisType = isTSThisType; -exports.isTSFunctionType = isTSFunctionType; -exports.isTSConstructorType = isTSConstructorType; -exports.isTSTypeReference = isTSTypeReference; -exports.isTSTypePredicate = isTSTypePredicate; -exports.isTSTypeQuery = isTSTypeQuery; -exports.isTSTypeLiteral = isTSTypeLiteral; -exports.isTSArrayType = isTSArrayType; -exports.isTSTupleType = isTSTupleType; -exports.isTSUnionType = isTSUnionType; -exports.isTSIntersectionType = isTSIntersectionType; -exports.isTSConditionalType = isTSConditionalType; -exports.isTSInferType = isTSInferType; -exports.isTSParenthesizedType = isTSParenthesizedType; -exports.isTSTypeOperator = isTSTypeOperator; -exports.isTSIndexedAccessType = isTSIndexedAccessType; -exports.isTSMappedType = isTSMappedType; -exports.isTSLiteralType = isTSLiteralType; -exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; -exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; -exports.isTSInterfaceBody = isTSInterfaceBody; -exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; -exports.isTSAsExpression = isTSAsExpression; -exports.isTSTypeAssertion = isTSTypeAssertion; -exports.isTSEnumDeclaration = isTSEnumDeclaration; -exports.isTSEnumMember = isTSEnumMember; -exports.isTSModuleDeclaration = isTSModuleDeclaration; -exports.isTSModuleBlock = isTSModuleBlock; -exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; -exports.isTSExternalModuleReference = isTSExternalModuleReference; -exports.isTSNonNullExpression = isTSNonNullExpression; -exports.isTSExportAssignment = isTSExportAssignment; -exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; -exports.isTSTypeAnnotation = isTSTypeAnnotation; -exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; -exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; -exports.isTSTypeParameter = isTSTypeParameter; -exports.isExpression = isExpression; -exports.isBinary = isBinary; -exports.isScopable = isScopable; -exports.isBlockParent = isBlockParent; -exports.isBlock = isBlock; -exports.isStatement = isStatement; -exports.isTerminatorless = isTerminatorless; -exports.isCompletionStatement = isCompletionStatement; -exports.isConditional = isConditional; -exports.isLoop = isLoop; -exports.isWhile = isWhile; -exports.isExpressionWrapper = isExpressionWrapper; -exports.isFor = isFor; -exports.isForXStatement = isForXStatement; -exports.isFunction = isFunction; -exports.isFunctionParent = isFunctionParent; -exports.isPureish = isPureish; -exports.isDeclaration = isDeclaration; -exports.isPatternLike = isPatternLike; -exports.isLVal = isLVal; -exports.isTSEntityName = isTSEntityName; -exports.isLiteral = isLiteral; -exports.isImmutable = isImmutable; -exports.isUserWhitespacable = isUserWhitespacable; -exports.isMethod = isMethod; -exports.isObjectMember = isObjectMember; -exports.isProperty = isProperty; -exports.isUnaryLike = isUnaryLike; -exports.isPattern = isPattern; -exports.isClass = isClass; -exports.isModuleDeclaration = isModuleDeclaration; -exports.isExportDeclaration = isExportDeclaration; -exports.isModuleSpecifier = isModuleSpecifier; -exports.isFlow = isFlow; -exports.isFlowType = isFlowType; -exports.isFlowBaseAnnotation = isFlowBaseAnnotation; -exports.isFlowDeclaration = isFlowDeclaration; -exports.isFlowPredicate = isFlowPredicate; -exports.isJSX = isJSX; -exports.isPrivate = isPrivate; -exports.isTSTypeElement = isTSTypeElement; -exports.isTSType = isTSType; -exports.isNumberLiteral = isNumberLiteral; -exports.isRegexLiteral = isRegexLiteral; -exports.isRestProperty = isRestProperty; -exports.isSpreadProperty = isSpreadProperty; - -var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isArrayExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ArrayExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAssignmentExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "AssignmentExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBinaryExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "BinaryExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDirective(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Directive") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDirectiveLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DirectiveLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlockStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "BlockStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBreakStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "BreakStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCallExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "CallExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCatchClause(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "CatchClause") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isConditionalExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ConditionalExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isContinueStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ContinueStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDebuggerStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DebuggerStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDoWhileStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DoWhileStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEmptyStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "EmptyStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpressionStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExpressionStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFile(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "File") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForInStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ForInStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ForStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FunctionDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FunctionExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIdentifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Identifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIfStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "IfStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLabeledStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "LabeledStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "StringLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumericLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "NumericLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "NullLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "BooleanLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRegExpLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "RegExpLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLogicalExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "LogicalExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMemberExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "MemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNewExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "NewExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isProgram(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Program") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectMethod(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRestElement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "RestElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isReturnStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ReturnStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSequenceExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "SequenceExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSwitchCase(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "SwitchCase") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSwitchStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "SwitchStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThisExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ThisExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThrowStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ThrowStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTryStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TryStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnaryExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "UnaryExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUpdateExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "UpdateExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariableDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "VariableDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariableDeclarator(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "VariableDeclarator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWhileStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "WhileStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWithStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "WithStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAssignmentPattern(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "AssignmentPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrayPattern(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ArrayPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrowFunctionExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ArrowFunctionExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassBody(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ClassBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ClassDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ClassExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportAllDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExportAllDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDefaultDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExportDefaultDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportNamedDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExportNamedDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportSpecifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExportSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForOfStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ForOfStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ImportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportDefaultSpecifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ImportDefaultSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportNamespaceSpecifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ImportNamespaceSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportSpecifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ImportSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMetaProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "MetaProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassMethod(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ClassMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectPattern(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSpreadElement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "SpreadElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSuper(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Super") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTaggedTemplateExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TaggedTemplateExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTemplateElement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TemplateElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTemplateLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TemplateLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isYieldExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "YieldExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAnyTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "AnyTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrayTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ArrayTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "BooleanTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanLiteralTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "BooleanLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullLiteralTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "NullLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassImplements(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ClassImplements") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareClass(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareClass") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareFunction(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareInterface(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareInterface") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareModule(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareModule") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareModuleExports(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareModuleExports") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareTypeAlias(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareTypeAlias") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareOpaqueType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareOpaqueType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareVariable(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareVariable") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareExportDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareExportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareExportAllDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclareExportAllDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclaredPredicate(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DeclaredPredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExistsTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExistsTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FunctionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionTypeParam(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FunctionTypeParam") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isGenericTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "GenericTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInferredPredicate(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "InferredPredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceExtends(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "InterfaceExtends") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "InterfaceDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIntersectionTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "IntersectionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMixedTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "MixedTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEmptyTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "EmptyTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullableTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "NullableTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberLiteralTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "NumberLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "NumberTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeCallProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectTypeCallProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeIndexer(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectTypeIndexer") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectTypeProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeSpreadProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectTypeSpreadProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOpaqueType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "OpaqueType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isQualifiedTypeIdentifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "QualifiedTypeIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringLiteralTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "StringLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "StringTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThisTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ThisTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTupleTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TupleTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeofTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TypeofTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeAlias(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TypeAlias") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeCastExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TypeCastExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameter(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TypeParameter") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameterDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TypeParameterDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameterInstantiation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TypeParameterInstantiation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnionTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "UnionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariance(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Variance") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVoidTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "VoidTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXAttribute(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXAttribute") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXClosingElement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXClosingElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXElement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXEmptyExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXEmptyExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXExpressionContainer(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXExpressionContainer") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXSpreadChild(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXSpreadChild") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXIdentifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXMemberExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXMemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXNamespacedName(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXNamespacedName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXOpeningElement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXOpeningElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXSpreadAttribute(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXSpreadAttribute") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXText(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXText") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXFragment(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXOpeningFragment(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXOpeningFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXClosingFragment(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSXClosingFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNoop(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Noop") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isParenthesizedExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ParenthesizedExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAwaitExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "AwaitExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBindExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "BindExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ClassProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOptionalMemberExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "OptionalMemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOptionalCallExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "OptionalCallExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassPrivateProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ClassPrivateProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImport(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Import") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDecorator(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Decorator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDoExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "DoExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDefaultSpecifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExportDefaultSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportNamespaceSpecifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExportNamespaceSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPrivateName(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "PrivateName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSParameterProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSParameterProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSDeclareFunction(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSDeclareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSDeclareMethod(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSDeclareMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSQualifiedName(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSQualifiedName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSCallSignatureDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSCallSignatureDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConstructSignatureDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSConstructSignatureDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSPropertySignature(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSPropertySignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSMethodSignature(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSMethodSignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIndexSignature(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSIndexSignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSAnyKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSAnyKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNumberKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSNumberKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSObjectKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSObjectKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSBooleanKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSBooleanKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSStringKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSStringKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSSymbolKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSSymbolKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSVoidKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSVoidKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUndefinedKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSUndefinedKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNullKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSNullKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNeverKeyword(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSNeverKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSThisType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSThisType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSFunctionType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSFunctionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConstructorType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSConstructorType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeReference(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypePredicate(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypePredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeQuery(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeQuery") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSArrayType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSArrayType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTupleType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTupleType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUnionType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSUnionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIntersectionType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSIntersectionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConditionalType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSConditionalType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInferType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSInferType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSParenthesizedType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSParenthesizedType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeOperator(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeOperator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIndexedAccessType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSIndexedAccessType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSMappedType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSMappedType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSLiteralType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSLiteralType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExpressionWithTypeArguments(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSExpressionWithTypeArguments") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInterfaceDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSInterfaceDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInterfaceBody(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSInterfaceBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAliasDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeAliasDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSAsExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSAsExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAssertion(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeAssertion") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEnumDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSEnumDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEnumMember(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSEnumMember") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSModuleDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSModuleDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSModuleBlock(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSModuleBlock") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSImportEqualsDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSImportEqualsDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExternalModuleReference(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSExternalModuleReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNonNullExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSNonNullExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExportAssignment(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSExportAssignment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNamespaceExportDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSNamespaceExportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameterInstantiation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeParameterInstantiation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameterDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeParameterDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameter(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeParameter") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpression(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "ParenthesizedExpression" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBinary(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isScopable(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlockParent(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlock(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTerminatorless(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCompletionStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isConditional(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLoop(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWhile(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpressionWrapper(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "TypeCastExpression" === nodeType || "ParenthesizedExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFor(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForXStatement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunction(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionParent(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPureish(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPatternLike(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLVal(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEntityName(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLiteral(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImmutable(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUserWhitespacable(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMethod(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectMember(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isProperty(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnaryLike(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPattern(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClass(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Class" || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isModuleDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isModuleSpecifier(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlow(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowBaseAnnotation(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowDeclaration(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowPredicate(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSX(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPrivate(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "PrivateName" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeElement(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSType(node, opts) { - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberLiteral(node, opts) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "NumberLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRegexLiteral(node, opts) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "RegexLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRestProperty(node, opts) { - console.trace("The node type RestProperty has been renamed to RestElement"); - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "RestProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSpreadProperty(node, opts) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - if (!node) return false; - var nodeType = node.type; - - if (nodeType === "SpreadProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/is.js b/node_modules/@babel/types/lib/validators/is.js deleted file mode 100644 index b608e2e..0000000 --- a/node_modules/@babel/types/lib/validators/is.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = is; - -var _shallowEqual = _interopRequireDefault(require("../utils/shallowEqual")); - -var _isType = _interopRequireDefault(require("./isType")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function is(type, node, opts) { - if (!node) return false; - var matches = (0, _isType.default)(node.type, type); - if (!matches) return false; - - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isBinding.js b/node_modules/@babel/types/lib/validators/isBinding.js deleted file mode 100644 index 56cb992..0000000 --- a/node_modules/@babel/types/lib/validators/isBinding.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isBinding; - -var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isBinding(node, parent) { - var keys = _getBindingIdentifiers.default.keys[parent.type]; - - if (keys) { - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var val = parent[key]; - - if (Array.isArray(val)) { - if (val.indexOf(node) >= 0) return true; - } else { - if (val === node) return true; - } - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/node_modules/@babel/types/lib/validators/isNodesEquivalent.js deleted file mode 100644 index ff2cbb6..0000000 --- a/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isNodesEquivalent; - -var _definitions = require("../definitions"); - -function isNodesEquivalent(a, b) { - if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { - return a === b; - } - - if (a.type !== b.type) { - return false; - } - - var fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); - - for (var _i = 0; _i < fields.length; _i++) { - var field = fields[_i]; - - if (typeof a[field] !== typeof b[field]) { - return false; - } - - if (Array.isArray(a[field])) { - if (!Array.isArray(b[field])) { - return false; - } - - if (a[field].length !== b[field].length) { - return false; - } - - for (var i = 0; i < a[field].length; i++) { - if (!isNodesEquivalent(a[field][i], b[field][i])) { - return false; - } - } - - continue; - } - - if (!isNodesEquivalent(a[field], b[field])) { - return false; - } - } - - return true; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isType.js b/node_modules/@babel/types/lib/validators/isType.js deleted file mode 100644 index 5eb0dd8..0000000 --- a/node_modules/@babel/types/lib/validators/isType.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isType; - -var _definitions = require("../definitions"); - -function isType(nodeType, targetType) { - if (nodeType === targetType) return true; - if (_definitions.ALIAS_KEYS[targetType]) return false; - var aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; - - if (aliases) { - if (aliases[0] === nodeType) return true; - - for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var alias = _ref; - if (nodeType === alias) return true; - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/node_modules/@babel/types/lib/validators/isValidES3Identifier.js deleted file mode 100644 index 4949c98..0000000 --- a/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isValidES3Identifier; - -var _isValidIdentifier = _interopRequireDefault(require("./isValidIdentifier")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]); - -function isValidES3Identifier(name) { - return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/matchesPattern.js b/node_modules/@babel/types/lib/validators/matchesPattern.js deleted file mode 100644 index 3b8899a..0000000 --- a/node_modules/@babel/types/lib/validators/matchesPattern.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = matchesPattern; - -var _generated = require("./generated"); - -function matchesPattern(member, match, allowPartial) { - if (!(0, _generated.isMemberExpression)(member)) return false; - var parts = Array.isArray(match) ? match : match.split("."); - var nodes = []; - var node; - - for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { - nodes.push(node.property); - } - - nodes.push(node); - if (nodes.length < parts.length) return false; - if (!allowPartial && nodes.length > parts.length) return false; - - for (var i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { - var _node = nodes[j]; - var value = void 0; - - if ((0, _generated.isIdentifier)(_node)) { - value = _node.name; - } else if ((0, _generated.isStringLiteral)(_node)) { - value = _node.value; - } else { - return false; - } - - if (parts[i] !== value) return false; - } - - return true; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/node_modules/@babel/types/lib/validators/react/isReactComponent.js deleted file mode 100644 index b89c473..0000000 --- a/node_modules/@babel/types/lib/validators/react/isReactComponent.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _buildMatchMemberExpression = _interopRequireDefault(require("../buildMatchMemberExpression")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); -var _default = isReactComponent; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/types/node_modules/to-fast-properties/package.json b/node_modules/@babel/types/node_modules/to-fast-properties/package.json deleted file mode 100644 index 981805f..0000000 --- a/node_modules/@babel/types/node_modules/to-fast-properties/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "to-fast-properties@^2.0.0", - "_id": "to-fast-properties@2.0.0", - "_inBundle": false, - "_integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "_location": "/@babel/types/to-fast-properties", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "to-fast-properties@^2.0.0", - "name": "to-fast-properties", - "escapedName": "to-fast-properties", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/@babel/types" - ], - "_resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "_shasum": "dc5e698cbd079265bc73e0377681a4e4e83f616e", - "_spec": "to-fast-properties@^2.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/types", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/to-fast-properties/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Force V8 to use fast properties for an object", - "devDependencies": { - "ava": "0.0.4" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/to-fast-properties#readme", - "keywords": [ - "object", - "obj", - "properties", - "props", - "v8", - "optimize", - "fast", - "convert", - "mode" - ], - "license": "MIT", - "name": "to-fast-properties", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/to-fast-properties.git" - }, - "scripts": { - "test": "node --allow-natives-syntax test.js" - }, - "version": "2.0.0" -} diff --git a/node_modules/@babel/types/package.json b/node_modules/@babel/types/package.json deleted file mode 100644 index aa9782f..0000000 --- a/node_modules/@babel/types/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "@babel/types@7.0.0-beta.46", - "_id": "@babel/types@7.0.0-beta.46", - "_inBundle": false, - "_integrity": "sha512-uA5aruF2KKsJxToWdDpftsrPOIQtoGrGno2hiaeO9JRvfT9xZdK11nPoC+/RF9emNzmNbWn4HCRdCY+McT5Nbw==", - "_location": "/@babel/types", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/types@7.0.0-beta.46", - "name": "@babel/types", - "escapedName": "@babel%2ftypes", - "scope": "@babel", - "rawSpec": "7.0.0-beta.46", - "saveSpec": null, - "fetchSpec": "7.0.0-beta.46" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/generator", - "/@babel/helper-function-name", - "/@babel/helper-get-function-arity", - "/@babel/helper-split-export-declaration", - "/@babel/helpers", - "/@babel/template", - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.46.tgz", - "_shasum": "eb84399a699af9fcb244440cce78e1acbeb40e0c", - "_spec": "@babel/types@7.0.0-beta.46", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bundleDependencies": false, - "dependencies": { - "esutils": "^2.0.2", - "lodash": "^4.2.0", - "to-fast-properties": "^2.0.0" - }, - "deprecated": false, - "description": "Babel Types is a Lodash-esque utility library for AST nodes", - "devDependencies": { - "@babel/generator": "7.0.0-beta.46", - "babylon": "7.0.0-beta.46" - }, - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/types", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-types" - }, - "types": "lib/index.d.ts", - "version": "7.0.0-beta.46" -} diff --git a/node_modules/@babel/types/scripts/generateTypeHelpers.js b/node_modules/@babel/types/scripts/generateTypeHelpers.js deleted file mode 100644 index e122145..0000000 --- a/node_modules/@babel/types/scripts/generateTypeHelpers.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -const fs = require("fs"); -const path = require("path"); -const generateBuilders = require("./generators/generateBuilders"); -const generateValidators = require("./generators/generateValidators"); -const generateAsserts = require("./generators/generateAsserts"); -const generateConstants = require("./generators/generateConstants"); -const format = require("./utils/formatCode"); - -const baseDir = path.join(__dirname, "../src"); - -function writeFile(content, location) { - const file = path.join(baseDir, location); - - try { - fs.mkdirSync(path.dirname(file)); - } catch (error) { - if (error.code !== "EEXIST") { - throw error; - } - } - - fs.writeFileSync(file, format(content, file)); -} - -console.log("Generating @babel/types dynamic functions"); - -writeFile(generateBuilders(), "builders/generated/index.js"); -writeFile(generateValidators(), "validators/generated/index.js"); -writeFile(generateAsserts(), "asserts/generated/index.js"); -writeFile(generateConstants(), "constants/generated/index.js"); diff --git a/node_modules/@babel/types/scripts/generators/generateValidators.js b/node_modules/@babel/types/scripts/generators/generateValidators.js deleted file mode 100644 index 0f02f0c..0000000 --- a/node_modules/@babel/types/scripts/generators/generateValidators.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); - -function addIsHelper(type, aliasKeys, deprecated) { - const targetType = JSON.stringify(type); - let aliasSource = ""; - if (aliasKeys) { - aliasSource = - " || " + - aliasKeys.map(JSON.stringify).join(" === nodeType || ") + - " === nodeType"; - } - - return `export function is${type}(node: Object, opts?: Object): boolean { - ${deprecated || ""} - if (!node) return false; - - const nodeType = node.type; - if (nodeType === ${targetType}${aliasSource}) { - if (typeof opts === "undefined") { - return true; - } else { - return shallowEqual(node, opts); - } - } - - return false; - } - `; -} - -module.exports = function generateValidators() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import shallowEqual from "../../utils/shallowEqual";\n\n`; - - Object.keys(definitions.VISITOR_KEYS).forEach(type => { - output += addIsHelper(type); - }); - - Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { - output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]); - }); - - Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { - const newType = definitions.DEPRECATED_KEYS[type]; - const deprecated = `console.trace("The node type ${type} has been renamed to ${newType}");`; - output += addIsHelper(type, null, deprecated); - }); - - return output; -}; diff --git a/node_modules/@babel/types/scripts/utils/formatCode.js b/node_modules/@babel/types/scripts/utils/formatCode.js deleted file mode 100644 index 9d279e6..0000000 --- a/node_modules/@babel/types/scripts/utils/formatCode.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -const prettier = require("prettier"); - -module.exports = function formatCode(code, filename) { - filename = filename || __filename; - const prettierConfig = prettier.resolveConfig.sync(filename); - - return prettier.format(code, prettierConfig); -}; diff --git a/node_modules/abab/CHANGELOG.md b/node_modules/abab/CHANGELOG.md index cc62a65..4f5eb56 100644 --- a/node_modules/abab/CHANGELOG.md +++ b/node_modules/abab/CHANGELOG.md @@ -1,3 +1,12 @@ +## 2.0.0 + +Modernization updates thanks to @TimothyGu: + +- Use jsdom's eslint config, remove jscs +- Move syntax to ES6 +- Remove Babel +- Via: https://github.com/jsdom/abab/pull/26 + ## 1.0.4 - Added license file diff --git a/node_modules/abab/README.md b/node_modules/abab/README.md index 2d9c1b5..1bd8c45 100644 --- a/node_modules/abab/README.md +++ b/node_modules/abab/README.md @@ -1,10 +1,8 @@ -# abab +# abab [![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab) -[![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab) +A JavaScript module that implements `window.atob` and `window.btoa` according the forgiving-base64 algorithm in the [Infra Standard](https://infra.spec.whatwg.org/#forgiving-base64). The original code was forked from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html). -A module that implements `window.atob` and `window.btoa` according to the [WHATWG spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob). The code is originally from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html). - -Compatibility: Node.js version 3+ and all major browsers (using browserify or webpack) +Compatibility: Node.js version 3+ and all major browsers. Install with `npm`: @@ -17,14 +15,14 @@ npm install abab ### `btoa` (base64 encode) ```js -const btoa = require('abab').btoa; +const { btoa } = require('abab'); btoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ==' ``` ### `atob` (base64 decode) ```js -const atob = require('abab').atob; +const { atob } = require('abab'); atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!' ``` @@ -37,8 +35,8 @@ atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!' If you want to include just one of the methods to save bytes in your client-side code, you can `require` the desired module directly. ```js -var atob = require('abab/lib/atob'); -var btoa = require('abab/lib/btoa'); +const atob = require('abab/lib/atob'); +const btoa = require('abab/lib/btoa'); ``` ----- diff --git a/node_modules/abab/index.js b/node_modules/abab/index.js index 16342c4..49d5ae9 100644 --- a/node_modules/abab/index.js +++ b/node_modules/abab/index.js @@ -1,9 +1,9 @@ -'use strict'; +"use strict"; -var atob = require('./lib/atob'); -var btoa = require('./lib/btoa'); +const atob = require("./lib/atob"); +const btoa = require("./lib/btoa"); module.exports = { - atob: atob, - btoa: btoa + atob, + btoa }; diff --git a/node_modules/abab/lib/atob.js b/node_modules/abab/lib/atob.js index ba2528f..3491898 100644 --- a/node_modules/abab/lib/atob.js +++ b/node_modules/abab/lib/atob.js @@ -1,81 +1,78 @@ -'use strict'; +"use strict"; /** - * Implementation of atob() according to the HTML spec, except that instead of - * throwing INVALID_CHARACTER_ERR we return null. + * Implementation of atob() according to the HTML and Infra specs, except that + * instead of throwing INVALID_CHARACTER_ERR we return null. */ -function atob(input) { - // WebIDL requires DOMStrings to just be converted using ECMAScript - // ToString, which in our case amounts to calling String(). - input = String(input); - // "Remove all space characters from input." - input = input.replace(/[ \t\n\f\r]/g, ''); - // "If the length of input divides by 4 leaving no remainder, then: if - // input ends with one or two U+003D EQUALS SIGN (=) characters, remove - // them from input." - if (input.length % 4 == 0 && /==?$/.test(input)) { - input = input.replace(/==?$/, ''); +function atob(data) { + // Web IDL requires DOMStrings to just be converted using ECMAScript + // ToString, which in our case amounts to using a template literal. + data = `${data}`; + // "Remove all ASCII whitespace from data." + data = data.replace(/[ \t\n\f\r]/g, ""); + // "If data's length divides by 4 leaving no remainder, then: if data ends + // with one or two U+003D (=) code points, then remove them from data." + if (data.length % 4 === 0) { + data = data.replace(/==?$/, ""); } - // "If the length of input divides by 4 leaving a remainder of 1, throw an - // INVALID_CHARACTER_ERR exception and abort these steps." + // "If data's length divides by 4 leaving a remainder of 1, then return + // failure." // - // "If input contains a character that is not in the following list of - // characters and character ranges, throw an INVALID_CHARACTER_ERR - // exception and abort these steps: + // "If data contains a code point that is not one of // - // U+002B PLUS SIGN (+) - // U+002F SOLIDUS (/) - // U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9) - // U+0041 LATIN CAPITAL LETTER A to U+005A LATIN CAPITAL LETTER Z - // U+0061 LATIN SMALL LETTER A to U+007A LATIN SMALL LETTER Z" - if (input.length % 4 == 1 || !/^[+/0-9A-Za-z]*$/.test(input)) { + // U+002B (+) + // U+002F (/) + // ASCII alphanumeric + // + // then return failure." + if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) { return null; } - // "Let output be a string, initially empty." - var output = ''; - // "Let buffer be a buffer that can have bits appended to it, initially - // empty." + // "Let output be an empty byte sequence." + let output = ""; + // "Let buffer be an empty buffer that can have bits appended to it." // // We append bits via left-shift and or. accumulatedBits is used to track // when we've gotten to 24 bits. - var buffer = 0; - var accumulatedBits = 0; - // "While position does not point past the end of input, run these - // substeps:" - for (var i = 0; i < input.length; i++) { - // "Find the character pointed to by position in the first column of - // the following table. Let n be the number given in the second cell of - // the same row." + let buffer = 0; + let accumulatedBits = 0; + // "Let position be a position variable for data, initially pointing at the + // start of data." + // + // "While position does not point past the end of data:" + for (let i = 0; i < data.length; i++) { + // "Find the code point pointed to by position in the second column of + // Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in + // the first cell of the same row. // - // "Append to buffer the six bits corresponding to number, most - // significant bit first." + // "Append to buffer the six bits corresponding to n, most significant bit + // first." // - // atobLookup() implements the table from the spec. + // atobLookup() implements the table from RFC 4648. buffer <<= 6; - buffer |= atobLookup(input[i]); - // "If buffer has accumulated 24 bits, interpret them as three 8-bit - // big-endian numbers. Append the three characters with code points - // equal to those numbers to output, in the same order, and then empty - // buffer." + buffer |= atobLookup(data[i]); accumulatedBits += 6; - if (accumulatedBits == 24) { + // "If buffer has accumulated 24 bits, interpret them as three 8-bit + // big-endian numbers. Append three bytes with values equal to those + // numbers to output, in the same order, and then empty buffer." + if (accumulatedBits === 24) { output += String.fromCharCode((buffer & 0xff0000) >> 16); output += String.fromCharCode((buffer & 0xff00) >> 8); output += String.fromCharCode(buffer & 0xff); buffer = accumulatedBits = 0; } - // "Advance position by one character." + // "Advance position by 1." } - // "If buffer is not empty, it contains either 12 or 18 bits. If it - // contains 12 bits, discard the last four and interpret the remaining - // eight as an 8-bit big-endian number. If it contains 18 bits, discard the - // last two and interpret the remaining 16 as two 8-bit big-endian numbers. - // Append the one or two characters with code points equal to those one or - // two numbers to output, in the same order." - if (accumulatedBits == 12) { + // "If buffer is not empty, it contains either 12 or 18 bits. If it contains + // 12 bits, then discard the last four and interpret the remaining eight as + // an 8-bit big-endian number. If it contains 18 bits, then discard the last + // two and interpret the remaining 16 as two 8-bit big-endian numbers. Append + // the one or two bytes with values equal to those one or two numbers to + // output, in the same order." + if (accumulatedBits === 12) { buffer >>= 4; output += String.fromCharCode(buffer); - } else if (accumulatedBits == 18) { + } else if (accumulatedBits === 18) { buffer >>= 2; output += String.fromCharCode((buffer & 0xff00) >> 8); output += String.fromCharCode(buffer & 0xff); @@ -89,21 +86,22 @@ function atob(input) { */ function atobLookup(chr) { if (/[A-Z]/.test(chr)) { - return chr.charCodeAt(0) - 'A'.charCodeAt(0); + return chr.charCodeAt(0) - "A".charCodeAt(0); } if (/[a-z]/.test(chr)) { - return chr.charCodeAt(0) - 'a'.charCodeAt(0) + 26; + return chr.charCodeAt(0) - "a".charCodeAt(0) + 26; } if (/[0-9]/.test(chr)) { - return chr.charCodeAt(0) - '0'.charCodeAt(0) + 52; + return chr.charCodeAt(0) - "0".charCodeAt(0) + 52; } - if (chr == '+') { + if (chr === "+") { return 62; } - if (chr == '/') { + if (chr === "/") { return 63; } // Throw exception; should not be hit in tests + return undefined; } module.exports = atob; diff --git a/node_modules/abab/lib/btoa.js b/node_modules/abab/lib/btoa.js index bc5b665..85dd966 100644 --- a/node_modules/abab/lib/btoa.js +++ b/node_modules/abab/lib/btoa.js @@ -1,23 +1,23 @@ -'use strict'; +"use strict"; /** - * btoa() as defined by the HTML5 spec, which mostly just references RFC4648. + * btoa() as defined by the HTML and Infra specs, which mostly just references + * RFC 4648. */ function btoa(s) { - var i; - // String conversion as required by WebIDL. - s = String(s); - // "The btoa() method must throw an INVALID_CHARACTER_ERR exception if the - // method's first argument contains any character whose code point is - // greater than U+00FF." + let i; + // String conversion as required by Web IDL. + s = `${s}`; + // "The btoa() method must throw an "InvalidCharacterError" DOMException if + // data contains any character whose code point is greater than U+00FF." for (i = 0; i < s.length; i++) { if (s.charCodeAt(i) > 255) { return null; } } - var out = ''; + let out = ""; for (i = 0; i < s.length; i += 3) { - var groupsOfSix = [undefined, undefined, undefined, undefined]; + const groupsOfSix = [undefined, undefined, undefined, undefined]; groupsOfSix[0] = s.charCodeAt(i) >> 2; groupsOfSix[1] = (s.charCodeAt(i) & 0x03) << 4; if (s.length > i + 1) { @@ -28,9 +28,9 @@ function btoa(s) { groupsOfSix[2] |= s.charCodeAt(i + 2) >> 6; groupsOfSix[3] = s.charCodeAt(i + 2) & 0x3f; } - for (var j = 0; j < groupsOfSix.length; j++) { - if (typeof groupsOfSix[j] == 'undefined') { - out += '='; + for (let j = 0; j < groupsOfSix.length; j++) { + if (typeof groupsOfSix[j] === "undefined") { + out += "="; } else { out += btoaLookup(groupsOfSix[j]); } @@ -45,21 +45,22 @@ function btoa(s) { */ function btoaLookup(idx) { if (idx < 26) { - return String.fromCharCode(idx + 'A'.charCodeAt(0)); + return String.fromCharCode(idx + "A".charCodeAt(0)); } if (idx < 52) { - return String.fromCharCode(idx - 26 + 'a'.charCodeAt(0)); + return String.fromCharCode(idx - 26 + "a".charCodeAt(0)); } if (idx < 62) { - return String.fromCharCode(idx - 52 + '0'.charCodeAt(0)); + return String.fromCharCode(idx - 52 + "0".charCodeAt(0)); } - if (idx == 62) { - return '+'; + if (idx === 62) { + return "+"; } - if (idx == 63) { - return '/'; + if (idx === 63) { + return "/"; } // Throw INVALID_CHARACTER_ERR exception here -- won't be hit in the tests. + return undefined; } module.exports = btoa; diff --git a/node_modules/abab/package.json b/node_modules/abab/package.json index fa2efde..1f647fc 100644 --- a/node_modules/abab/package.json +++ b/node_modules/abab/package.json @@ -1,28 +1,28 @@ { - "_from": "abab@^1.0.4", - "_id": "abab@1.0.4", + "_from": "abab@^2.0.0", + "_id": "abab@2.0.0", "_inBundle": false, - "_integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=", + "_integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", "_location": "/abab", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "abab@^1.0.4", + "raw": "abab@^2.0.0", "name": "abab", "escapedName": "abab", - "rawSpec": "^1.0.4", + "rawSpec": "^2.0.0", "saveSpec": null, - "fetchSpec": "^1.0.4" + "fetchSpec": "^2.0.0" }, "_requiredBy": [ "/data-urls", "/jsdom" ], - "_resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", - "_shasum": "5faad9c2c07f60dd76770f71cf025b62a63cfd4e", - "_spec": "abab@^1.0.4", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom", + "_resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", + "_shasum": "aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f", + "_spec": "abab@^2.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom", "author": { "name": "Jeff Carpenter", "email": "gcarpenterv@gmail.com" @@ -34,19 +34,14 @@ "deprecated": false, "description": "WHATWG spec-compliant implementations of window.atob and window.btoa.", "devDependencies": { - "babel-core": "^6.1.4", - "babel-loader": "^6.1.0", - "babel-preset-es2015": "^6.1.4", - "eslint": "^1.3.1", - "jscs": "^2.1.1", - "karma": "^0.13.10", - "karma-cli": "^0.1.1", - "karma-firefox-launcher": "^0.1.6", - "karma-mocha": "^0.2.0", - "karma-sauce-launcher": "^0.2.14", - "karma-webpack": "^1.7.0", - "mocha": "^2.2.5", - "webpack": "^1.12.2" + "eslint": "^4.19.1", + "karma": "^2.0.0", + "karma-cli": "^1.0.1", + "karma-firefox-launcher": "^1.1.0", + "karma-mocha": "^1.3.0", + "karma-webpack": "^3.0.0", + "mocha": "^5.1.0", + "webpack": "^4.5.0" }, "files": [ "index.js", @@ -58,7 +53,7 @@ "btoa", "browser" ], - "license": "ISC", + "license": "SEE LICENSE IN LICENSE.md", "main": "index.js", "name": "abab", "repository": { @@ -67,9 +62,9 @@ }, "scripts": { "karma": "karma start", - "lint": "jscs . && eslint .", + "lint": "eslint .", "mocha": "mocha test/node", "test": "npm run lint && npm run mocha && npm run karma" }, - "version": "1.0.4" + "version": "2.0.0" } diff --git a/node_modules/acorn-globals/index.js b/node_modules/acorn-globals/index.js index 658ff68..cd02e37 100644 --- a/node_modules/acorn-globals/index.js +++ b/node_modules/acorn-globals/index.js @@ -1,7 +1,7 @@ 'use strict'; var acorn = require('acorn'); -var walk = require('acorn/dist/walk'); +var walk = require('acorn-walk'); function isScope(node) { return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration' || node.type === 'ArrowFunctionExpression' || node.type === 'Program'; @@ -53,7 +53,7 @@ function findGlobals(source, options) { if (node.id) { fn.locals[node.id.name] = true; } - } + }; var declarePattern = function (node, parent) { switch (node.type) { case 'Identifier': @@ -79,11 +79,11 @@ function findGlobals(source, options) { default: throw new Error('Unrecognized pattern type: ' + node.type); } - } + }; var declareModuleSpecifier = function (node, parents) { ast.locals = ast.locals || {}; ast.locals[node.local.name] = true; - } + }; walk.ancestor(ast, { 'VariableDeclaration': function (node, parents) { var parent = null; @@ -139,7 +139,7 @@ function findGlobals(source, options) { return; } } - node.parents = parents; + node.parents = parents.slice(); globals.push(node); } walk.ancestor(ast, { @@ -151,7 +151,7 @@ function findGlobals(source, options) { return; } } - node.parents = parents; + node.parents = parents.slice(); globals.push(node); } }); diff --git a/node_modules/acorn-globals/package.json b/node_modules/acorn-globals/package.json index 7c85761..a522723 100644 --- a/node_modules/acorn-globals/package.json +++ b/node_modules/acorn-globals/package.json @@ -1,27 +1,27 @@ { - "_from": "acorn-globals@^4.1.0", - "_id": "acorn-globals@4.1.0", + "_from": "acorn-globals@^4.3.0", + "_id": "acorn-globals@4.3.0", "_inBundle": false, - "_integrity": "sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ==", + "_integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==", "_location": "/acorn-globals", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "acorn-globals@^4.1.0", + "raw": "acorn-globals@^4.3.0", "name": "acorn-globals", "escapedName": "acorn-globals", - "rawSpec": "^4.1.0", + "rawSpec": "^4.3.0", "saveSpec": null, - "fetchSpec": "^4.1.0" + "fetchSpec": "^4.3.0" }, "_requiredBy": [ "/jsdom" ], - "_resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.1.0.tgz", - "_shasum": "ab716025dbe17c54d3ef81d32ece2b2d99fe2538", - "_spec": "acorn-globals@^4.1.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom", + "_resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz", + "_shasum": "e3b6f8da3c1552a95ae627571f7dd6923bb54103", + "_spec": "acorn-globals@^4.3.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom", "author": { "name": "ForbesLindesay" }, @@ -30,7 +30,8 @@ }, "bundleDependencies": false, "dependencies": { - "acorn": "^5.0.0" + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" }, "deprecated": false, "description": "Detect global variables in JavaScript using acorn", @@ -61,5 +62,5 @@ "scripts": { "test": "node test" }, - "version": "4.1.0" + "version": "4.3.0" } diff --git a/node_modules/acorn-walk/CHANGELOG.md b/node_modules/acorn-walk/CHANGELOG.md new file mode 100644 index 0000000..525950b --- /dev/null +++ b/node_modules/acorn-walk/CHANGELOG.md @@ -0,0 +1,97 @@ +## 6.1.0 (2018-09-28) + +### New features + +The walker now walks `TemplateElement` nodes. + +## 6.0.1 (2018-09-14) + +### Bug fixes + +Fix bad "main" field in package.json. + +## 6.0.0 (2018-09-14) + +### Breaking changes + +This is now a separate package, `acorn-walk`, rather than part of the main `acorn` package. + +The `ScopeBody` and `ScopeExpression` meta-node-types are no longer supported. + +## 5.7.1 (2018-06-15) + +### Bug fixes + +Make sure the walker and bin files are rebuilt on release (the previous release didn't get the up-to-date versions). + +## 5.7.0 (2018-06-15) + +### Bug fixes + +Fix crash in walker when walking a binding-less catch node. + +## 5.6.2 (2018-06-05) + +### Bug fixes + +In the walker, go back to allowing the `baseVisitor` argument to be null to default to the default base everywhere. + +## 5.6.1 (2018-06-01) + +### Bug fixes + +Fix regression when passing `null` as fourth argument to `walk.recursive`. + +## 5.6.0 (2018-05-31) + +### Bug fixes + +Fix a bug in the walker that caused a crash when walking an object pattern spread. + +## 5.5.1 (2018-03-06) + +### Bug fixes + +Fix regression in walker causing property values in object patterns to be walked as expressions. + +## 5.5.0 (2018-02-27) + +### Bug fixes + +Support object spread in the AST walker. + +## 5.4.1 (2018-02-02) + +### Bug fixes + +5.4.0 somehow accidentally included an old version of walk.js. + +## 5.2.0 (2017-10-30) + +### Bug fixes + +The `full` and `fullAncestor` walkers no longer visit nodes multiple times. + +## 5.1.0 (2017-07-05) + +### New features + +New walker functions `full` and `fullAncestor`. + +## 3.2.0 (2016-06-07) + +### New features + +Make it possible to use `visit.ancestor` with a walk state. + +## 3.1.0 (2016-04-18) + +### New features + +The walker now allows defining handlers for `CatchClause` nodes. + +## 2.5.2 (2015-10-27) + +### Fixes + +Fix bug where the walker walked an exported `let` statement as an expression. diff --git a/node_modules/acorn-walk/LICENSE b/node_modules/acorn-walk/LICENSE new file mode 100644 index 0000000..2c0632b --- /dev/null +++ b/node_modules/acorn-walk/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2018 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/acorn-walk/README.md b/node_modules/acorn-walk/README.md new file mode 100644 index 0000000..2b94bec --- /dev/null +++ b/node_modules/acorn-walk/README.md @@ -0,0 +1,126 @@ +# Acorn AST walker + +An abstract syntax tree walker for the +[ESTree](https://github.com/estree/estree) format. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/acornjs/acorn/blob/master/LICENSE). + +You are welcome to +[report bugs](https://github.com/acornjs/acorn/issues) or create pull +requests on [github](https://github.com/acornjs/acorn). For questions +and discussion, please use the +[Tern discussion forum](https://discuss.ternjs.net). + +## Installation + +The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): + +```sh +npm install acorn-walk +``` + +Alternately, you can download the source and build acorn yourself: + +```sh +git clone https://github.com/acornjs/acorn.git +cd acorn +npm install +``` + +## Interface + +An algorithm for recursing through a syntax tree is stored as an +object, with a property for each tree node type holding a function +that will recurse through such a node. There are several ways to run +such a walker. + +**simple**`(node, visitors, base, state)` does a 'simple' walk over a +tree. `node` should be the AST node to walk, and `visitors` an object +with properties whose names correspond to node types in the [ESTree +spec](https://github.com/estree/estree). The properties should contain +functions that will be called with the node object and, if applicable +the state at that point. The last two arguments are optional. `base` +is a walker algorithm, and `state` is a start state. The default +walker will simply visit all statements and expressions and not +produce a meaningful state. (An example of a use of state is to track +scope at each point in the tree.) + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.simple(acorn.parse("let x = 10"), { + Literal(node) { + console.log(`Found a literal: ${node.value}`) + } +}) +``` + +**ancestor**`(node, visitors, base, state)` does a 'simple' walk over +a tree, building up an array of ancestor nodes (including the current node) +and passing the array to the callbacks as a third parameter. + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.ancestor(acorn.parse("foo('hi')"), { + Literal(_, ancestors) { + console.log("This literal's ancestors are:", ancestors.map(n => n.type)) + } +}) +``` + +**recursive**`(node, state, functions, base)` does a 'recursive' +walk, where the walker functions are responsible for continuing the +walk on the child nodes of their target node. `state` is the start +state, and `functions` should contain an object that maps node types +to walker functions. Such functions are called with `(node, state, c)` +arguments, and can cause the walk to continue on a sub-node by calling +the `c` argument on it with `(node, state)` arguments. The optional +`base` argument provides the fallback walker functions for node types +that aren't handled in the `functions` object. If not given, the +default walkers will be used. + +**make**`(functions, base)` builds a new walker object by using the +walker functions in `functions` and filling in the missing ones by +taking defaults from `base`. + +**full**`(node, callback, base, state)` does a 'full' walk over a +tree, calling the callback with the arguments (node, state, type) for +each node + +**fullAncestor**`(node, callback, base, state)` does a 'full' walk +over a tree, building up an array of ancestor nodes (including the +current node) and passing the array to the callbacks as a third +parameter. + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.full(acorn.parse("1 + 1"), node => { + console.log(`There's a ${node.type} node at ${node.ch}`) +}) +``` + +**findNodeAt**`(node, start, end, test, base, state)` tries to locate +a node in a tree at the given start and/or end offsets, which +satisfies the predicate `test`. `start` and `end` can be either `null` +(as wildcard) or a number. `test` may be a string (indicating a node +type) or a function that takes `(nodeType, node)` arguments and +returns a boolean indicating whether this node is interesting. `base` +and `state` are optional, and can be used to specify a custom walker. +Nodes are tested from inner to outer, so if two nodes match the +boundaries, the inner one will be preferred. + +**findNodeAround**`(node, pos, test, base, state)` is a lot like +`findNodeAt`, but will match any node that exists 'around' (spanning) +the given position. + +**findNodeAfter**`(node, pos, test, base, state)` is similar to +`findNodeAround`, but will match all nodes *after* the given position +(testing outer nodes before inner nodes). diff --git a/node_modules/acorn/dist/walk.js b/node_modules/acorn-walk/dist/walk.js similarity index 80% rename from node_modules/acorn/dist/walk.js rename to node_modules/acorn-walk/dist/walk.js index 765e561..322a58d 100644 --- a/node_modules/acorn/dist/walk.js +++ b/node_modules/acorn-walk/dist/walk.js @@ -15,18 +15,18 @@ // }); // // to do something with all expressions. All Parser API node types -// can be used to identify node types, as well as Expression, -// Statement, and ScopeBody, which denote categories of nodes. +// can be used to identify node types, as well as Expression and +// Statement, which denote categories of nodes. // // The base argument can be used to pass a custom (recursive) // walker, and state can be used to give this walked an initial // state. -function simple(node, visitors, base, state, override) { - if (!base) { base = exports.base +function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base ; }(function c(node, st, override) { var type = override || node.type, found = visitors[type]; - base[type](node, st, c); + baseVisitor[type](node, st, c); if (found) { found(node, st); } })(node, state, override); } @@ -34,13 +34,14 @@ function simple(node, visitors, base, state, override) { // An ancestor walk keeps an array of ancestor nodes (including the // current node) and passes them to the callback as third parameter // (and also as state parameter when no other state is present). -function ancestor(node, visitors, base, state) { - if (!base) { base = exports.base; } - var ancestors = [];(function c(node, st, override) { +function ancestor(node, visitors, baseVisitor, state) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { var type = override || node.type, found = visitors[type]; - var isNew = node != ancestors[ancestors.length - 1]; + var isNew = node !== ancestors[ancestors.length - 1]; if (isNew) { ancestors.push(node); } - base[type](node, st, c); + baseVisitor[type](node, st, c); if (found) { found(node, st || ancestors, ancestors); } if (isNew) { ancestors.pop(); } })(node, state); @@ -51,15 +52,15 @@ function ancestor(node, visitors, base, state) { // threaded through the walk, and can opt how and whether to walk // their child nodes (by calling their third argument on these // nodes). -function recursive(node, state, funcs, base, override) { - var visitor = funcs ? exports.make(funcs, base) : base;(function c(node, st, override) { +function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor;(function c(node, st, override) { visitor[override || node.type](node, st, c); })(node, state, override); } function makeTest(test) { - if (typeof test == "string") - { return function (type) { return type == test; } } + if (typeof test === "string") + { return function (type) { return type === test; } } else if (!test) { return function () { return true; } } else @@ -69,24 +70,24 @@ function makeTest(test) { var Found = function Found(node, state) { this.node = node; this.state = state; }; // A full walk triggers the callback on each node -function full(node, callback, base, state, override) { - if (!base) { base = exports.base +function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base ; }(function c(node, st, override) { var type = override || node.type; - base[type](node, st, c); + baseVisitor[type](node, st, c); if (!override) { callback(node, st, type); } })(node, state, override); } // An fullAncestor walk is like an ancestor walk, but triggers // the callback on each node -function fullAncestor(node, callback, base, state) { - if (!base) { base = exports.base; } +function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } var ancestors = [];(function c(node, st, override) { var type = override || node.type; - var isNew = node != ancestors[ancestors.length - 1]; + var isNew = node !== ancestors[ancestors.length - 1]; if (isNew) { ancestors.push(node); } - base[type](node, st, c); + baseVisitor[type](node, st, c); if (!override) { callback(node, st || ancestors, ancestors, type); } if (isNew) { ancestors.pop(); } })(node, state); @@ -95,17 +96,17 @@ function fullAncestor(node, callback, base, state) { // Find a node with a given start, end, and type (all are optional, // null can be used as wildcard). Returns a {node, state} object, or // undefined when it doesn't find a matching node. -function findNodeAt(node, start, end, test, base, state) { +function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } test = makeTest(test); - if (!base) { base = exports.base; } try { (function c(node, st, override) { var type = override || node.type; if ((start == null || node.start <= start) && (end == null || node.end >= end)) - { base[type](node, st, c); } - if ((start == null || node.start == start) && - (end == null || node.end == end) && + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && test(type, node)) { throw new Found(node, st) } })(node, state); @@ -117,14 +118,14 @@ function findNodeAt(node, start, end, test, base, state) { // Find the innermost node of a given type that contains the given // position. Interface similar to findNodeAt. -function findNodeAround(node, pos, test, base, state) { +function findNodeAround(node, pos, test, baseVisitor, state) { test = makeTest(test); - if (!base) { base = exports.base; } + if (!baseVisitor) { baseVisitor = base; } try { (function c(node, st, override) { var type = override || node.type; if (node.start > pos || node.end < pos) { return } - base[type](node, st, c); + baseVisitor[type](node, st, c); if (test(type, node)) { throw new Found(node, st) } })(node, state); } catch (e) { @@ -134,15 +135,15 @@ function findNodeAround(node, pos, test, base, state) { } // Find the outermost matching node after a given position. -function findNodeAfter(node, pos, test, base, state) { +function findNodeAfter(node, pos, test, baseVisitor, state) { test = makeTest(test); - if (!base) { base = exports.base; } + if (!baseVisitor) { baseVisitor = base; } try { (function c(node, st, override) { if (node.end < pos) { return } var type = override || node.type; if (node.start >= pos && test(type, node)) { throw new Found(node, st) } - base[type](node, st, c); + baseVisitor[type](node, st, c); })(node, state); } catch (e) { if (e instanceof Found) { return e } @@ -151,15 +152,15 @@ function findNodeAfter(node, pos, test, base, state) { } // Find the outermost matching node before a given position. -function findNodeBefore(node, pos, test, base, state) { +function findNodeBefore(node, pos, test, baseVisitor, state) { test = makeTest(test); - if (!base) { base = exports.base; } + if (!baseVisitor) { baseVisitor = base; } var max;(function c(node, st, override) { if (node.start > pos) { return } var type = override || node.type; if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) { max = new Found(node, st); } - base[type](node, st, c); + baseVisitor[type](node, st, c); })(node, state); return max } @@ -173,9 +174,8 @@ var create = Object.create || function(proto) { // Used to create a custom walker. Will fill in all missing node // type properties with the defaults. -function make(funcs, base) { - if (!base) { base = exports.base; } - var visitor = create(base); +function make(funcs, baseVisitor) { + var visitor = create(baseVisitor || base); for (var type in funcs) { visitor[type] = funcs[type]; } return visitor } @@ -244,8 +244,8 @@ base.TryStatement = function (node, st, c) { if (node.finalizer) { c(node.finalizer, st, "Statement"); } }; base.CatchClause = function (node, st, c) { - c(node.param, st, "Pattern"); - c(node.body, st, "ScopeBody"); + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); }; base.WhileStatement = base.DoWhileStatement = function (node, st, c) { c(node.test, st, "Expression"); @@ -263,7 +263,7 @@ base.ForInStatement = base.ForOfStatement = function (node, st, c) { c(node.body, st, "Statement"); }; base.ForInit = function (node, st, c) { - if (node.type == "VariableDeclaration") { c(node, st); } + if (node.type === "VariableDeclaration") { c(node, st); } else { c(node, st, "Expression"); } }; base.DebuggerStatement = ignore; @@ -290,17 +290,13 @@ base.Function = function (node, st, c) { c(param, st, "Pattern"); } - c(node.body, st, node.expression ? "ScopeExpression" : "ScopeBody"); + c(node.body, st, node.expression ? "Expression" : "Statement"); }; -// FIXME drop these node types in next major version -// (They are awkward, and in ES6 every block can be a scope.) -base.ScopeBody = function (node, st, c) { return c(node, st, "Statement"); }; -base.ScopeExpression = function (node, st, c) { return c(node, st, "Expression"); }; base.Pattern = function (node, st, c) { - if (node.type == "Identifier") + if (node.type === "Identifier") { c(node, st, "VariablePattern"); } - else if (node.type == "MemberExpression") + else if (node.type === "MemberExpression") { c(node, st, "MemberPattern"); } else { c(node, st); } @@ -319,8 +315,12 @@ base.ObjectPattern = function (node, st, c) { for (var i = 0, list = node.properties; i < list.length; i += 1) { var prop = list[i]; - if (prop.computed) { c(prop.key, st, "Expression"); } - c(prop.value, st, "Pattern"); + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } } }; @@ -342,7 +342,7 @@ base.ObjectExpression = function (node, st, c) { } }; base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; -base.SequenceExpression = base.TemplateLiteral = function (node, st, c) { +base.SequenceExpression = function (node, st, c) { for (var i = 0, list = node.expressions; i < list.length; i += 1) { var expr = list[i]; @@ -350,6 +350,22 @@ base.SequenceExpression = base.TemplateLiteral = function (node, st, c) { c(expr, st, "Expression"); } }; +base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } +}; +base.TemplateElement = ignore; base.UnaryExpression = base.UpdateExpression = function (node, st, c) { c(node.argument, st, "Expression"); }; @@ -382,7 +398,7 @@ base.MemberExpression = function (node, st, c) { }; base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { if (node.declaration) - { c(node.declaration, st, node.type == "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } if (node.source) { c(node.source, st, "Expression"); } }; base.ExportAllDeclaration = function (node, st, c) { @@ -437,3 +453,4 @@ exports.base = base; Object.defineProperty(exports, '__esModule', { value: true }); }))); +//# sourceMappingURL=walk.js.map diff --git a/node_modules/acorn-walk/dist/walk.js.map b/node_modules/acorn-walk/dist/walk.js.map new file mode 100644 index 0000000..5590a29 --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"walk.js","sources":["../src/index.js"],"sourcesContent":["// AST walker module for Mozilla Parser API compatible trees\n\n// A simple walk is one where you simply specify callbacks to be\n// called on specific nodes. The last two arguments are optional. A\n// simple use would be\n//\n// walk.simple(myTree, {\n// Expression: function(node) { ... }\n// });\n//\n// to do something with all expressions. All Parser API node types\n// can be used to identify node types, as well as Expression and\n// Statement, which denote categories of nodes.\n//\n// The base argument can be used to pass a custom (recursive)\n// walker, and state can be used to give this walked an initial\n// state.\n\nexport function simple(node, visitors, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n baseVisitor[type](node, st, c)\n if (found) found(node, st)\n })(node, state, override)\n}\n\n// An ancestor walk keeps an array of ancestor nodes (including the\n// current node) and passes them to the callback as third parameter\n// (and also as state parameter when no other state is present).\nexport function ancestor(node, visitors, baseVisitor, state) {\n let ancestors = []\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (found) found(node, st || ancestors, ancestors)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// A recursive walk is one where your functions override the default\n// walkers. They can modify and replace the state parameter that's\n// threaded through the walk, and can opt how and whether to walk\n// their child nodes (by calling their third argument on these\n// nodes).\nexport function recursive(node, state, funcs, baseVisitor, override) {\n let visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor\n ;(function c(node, st, override) {\n visitor[override || node.type](node, st, c)\n })(node, state, override)\n}\n\nfunction makeTest(test) {\n if (typeof test === \"string\")\n return type => type === test\n else if (!test)\n return () => true\n else\n return test\n}\n\nclass Found {\n constructor(node, state) { this.node = node; this.state = state }\n}\n\n// A full walk triggers the callback on each node\nexport function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st, type)\n })(node, state, override)\n}\n\n// An fullAncestor walk is like an ancestor walk, but triggers\n// the callback on each node\nexport function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n let ancestors = []\n ;(function c(node, st, override) {\n let type = override || node.type\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st || ancestors, ancestors, type)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// Find a node with a given start, end, and type (all are optional,\n// null can be used as wildcard). Returns a {node, state} object, or\n// undefined when it doesn't find a matching node.\nexport function findNodeAt(node, start, end, test, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n test = makeTest(test)\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if ((start == null || node.start <= start) &&\n (end == null || node.end >= end))\n baseVisitor[type](node, st, c)\n if ((start == null || node.start === start) &&\n (end == null || node.end === end) &&\n test(type, node))\n throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the innermost node of a given type that contains the given\n// position. Interface similar to findNodeAt.\nexport function findNodeAround(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if (node.start > pos || node.end < pos) return\n baseVisitor[type](node, st, c)\n if (test(type, node)) throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node after a given position.\nexport function findNodeAfter(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n if (node.end < pos) return\n let type = override || node.type\n if (node.start >= pos && test(type, node)) throw new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node before a given position.\nexport function findNodeBefore(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n let max\n ;(function c(node, st, override) {\n if (node.start > pos) return\n let type = override || node.type\n if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))\n max = new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n return max\n}\n\n// Fallback to an Object.create polyfill for older environments.\nconst create = Object.create || function(proto) {\n function Ctor() {}\n Ctor.prototype = proto\n return new Ctor\n}\n\n// Used to create a custom walker. Will fill in all missing node\n// type properties with the defaults.\nexport function make(funcs, baseVisitor) {\n let visitor = create(baseVisitor || base)\n for (let type in funcs) visitor[type] = funcs[type]\n return visitor\n}\n\nfunction skipThrough(node, st, c) { c(node, st) }\nfunction ignore(_node, _st, _c) {}\n\n// Node walkers.\n\nexport const base = {}\n\nbase.Program = base.BlockStatement = (node, st, c) => {\n for (let stmt of node.body)\n c(stmt, st, \"Statement\")\n}\nbase.Statement = skipThrough\nbase.EmptyStatement = ignore\nbase.ExpressionStatement = base.ParenthesizedExpression =\n (node, st, c) => c(node.expression, st, \"Expression\")\nbase.IfStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Statement\")\n if (node.alternate) c(node.alternate, st, \"Statement\")\n}\nbase.LabeledStatement = (node, st, c) => c(node.body, st, \"Statement\")\nbase.BreakStatement = base.ContinueStatement = ignore\nbase.WithStatement = (node, st, c) => {\n c(node.object, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.SwitchStatement = (node, st, c) => {\n c(node.discriminant, st, \"Expression\")\n for (let cs of node.cases) {\n if (cs.test) c(cs.test, st, \"Expression\")\n for (let cons of cs.consequent)\n c(cons, st, \"Statement\")\n }\n}\nbase.SwitchCase = (node, st, c) => {\n if (node.test) c(node.test, st, \"Expression\")\n for (let cons of node.consequent)\n c(cons, st, \"Statement\")\n}\nbase.ReturnStatement = base.YieldExpression = base.AwaitExpression = (node, st, c) => {\n if (node.argument) c(node.argument, st, \"Expression\")\n}\nbase.ThrowStatement = base.SpreadElement =\n (node, st, c) => c(node.argument, st, \"Expression\")\nbase.TryStatement = (node, st, c) => {\n c(node.block, st, \"Statement\")\n if (node.handler) c(node.handler, st)\n if (node.finalizer) c(node.finalizer, st, \"Statement\")\n}\nbase.CatchClause = (node, st, c) => {\n if (node.param) c(node.param, st, \"Pattern\")\n c(node.body, st, \"Statement\")\n}\nbase.WhileStatement = base.DoWhileStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForStatement = (node, st, c) => {\n if (node.init) c(node.init, st, \"ForInit\")\n if (node.test) c(node.test, st, \"Expression\")\n if (node.update) c(node.update, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInStatement = base.ForOfStatement = (node, st, c) => {\n c(node.left, st, \"ForInit\")\n c(node.right, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInit = (node, st, c) => {\n if (node.type === \"VariableDeclaration\") c(node, st)\n else c(node, st, \"Expression\")\n}\nbase.DebuggerStatement = ignore\n\nbase.FunctionDeclaration = (node, st, c) => c(node, st, \"Function\")\nbase.VariableDeclaration = (node, st, c) => {\n for (let decl of node.declarations)\n c(decl, st)\n}\nbase.VariableDeclarator = (node, st, c) => {\n c(node.id, st, \"Pattern\")\n if (node.init) c(node.init, st, \"Expression\")\n}\n\nbase.Function = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n for (let param of node.params)\n c(param, st, \"Pattern\")\n c(node.body, st, node.expression ? \"Expression\" : \"Statement\")\n}\n\nbase.Pattern = (node, st, c) => {\n if (node.type === \"Identifier\")\n c(node, st, \"VariablePattern\")\n else if (node.type === \"MemberExpression\")\n c(node, st, \"MemberPattern\")\n else\n c(node, st)\n}\nbase.VariablePattern = ignore\nbase.MemberPattern = skipThrough\nbase.RestElement = (node, st, c) => c(node.argument, st, \"Pattern\")\nbase.ArrayPattern = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Pattern\")\n }\n}\nbase.ObjectPattern = (node, st, c) => {\n for (let prop of node.properties) {\n if (prop.type === \"Property\") {\n if (prop.computed) c(prop.key, st, \"Expression\")\n c(prop.value, st, \"Pattern\")\n } else if (prop.type === \"RestElement\") {\n c(prop.argument, st, \"Pattern\")\n }\n }\n}\n\nbase.Expression = skipThrough\nbase.ThisExpression = base.Super = base.MetaProperty = ignore\nbase.ArrayExpression = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Expression\")\n }\n}\nbase.ObjectExpression = (node, st, c) => {\n for (let prop of node.properties)\n c(prop, st)\n}\nbase.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration\nbase.SequenceExpression = (node, st, c) => {\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateLiteral = (node, st, c) => {\n for (let quasi of node.quasis)\n c(quasi, st)\n\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateElement = ignore\nbase.UnaryExpression = base.UpdateExpression = (node, st, c) => {\n c(node.argument, st, \"Expression\")\n}\nbase.BinaryExpression = base.LogicalExpression = (node, st, c) => {\n c(node.left, st, \"Expression\")\n c(node.right, st, \"Expression\")\n}\nbase.AssignmentExpression = base.AssignmentPattern = (node, st, c) => {\n c(node.left, st, \"Pattern\")\n c(node.right, st, \"Expression\")\n}\nbase.ConditionalExpression = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Expression\")\n c(node.alternate, st, \"Expression\")\n}\nbase.NewExpression = base.CallExpression = (node, st, c) => {\n c(node.callee, st, \"Expression\")\n if (node.arguments)\n for (let arg of node.arguments)\n c(arg, st, \"Expression\")\n}\nbase.MemberExpression = (node, st, c) => {\n c(node.object, st, \"Expression\")\n if (node.computed) c(node.property, st, \"Expression\")\n}\nbase.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => {\n if (node.declaration)\n c(node.declaration, st, node.type === \"ExportNamedDeclaration\" || node.declaration.id ? \"Statement\" : \"Expression\")\n if (node.source) c(node.source, st, \"Expression\")\n}\nbase.ExportAllDeclaration = (node, st, c) => {\n c(node.source, st, \"Expression\")\n}\nbase.ImportDeclaration = (node, st, c) => {\n for (let spec of node.specifiers)\n c(spec, st)\n c(node.source, st, \"Expression\")\n}\nbase.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore\n\nbase.TaggedTemplateExpression = (node, st, c) => {\n c(node.tag, st, \"Expression\")\n c(node.quasi, st, \"Expression\")\n}\nbase.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, \"Class\")\nbase.Class = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n if (node.superClass) c(node.superClass, st, \"Expression\")\n c(node.body, st)\n}\nbase.ClassBody = (node, st, c) => {\n for (let elt of node.body)\n c(elt, st)\n}\nbase.MethodDefinition = base.Property = (node, st, c) => {\n if (node.computed) c(node.key, st, \"Expression\")\n c(node.value, st, \"Expression\")\n}\n"],"names":["let","const"],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;AAkBA,AAAO,SAAS,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACnE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxD,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;;AAKD,AAAO,SAAS,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC3DA,IAAI,SAAS,GAAG,GAAE;EAClB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxDA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAC,EAAA;IAClD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;;;AAOD,AAAO,SAAS,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE;EACnEA,IAAI,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,IAAI,SAAS,CAAC,GAAG,WAAW,CACxE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC5C,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;AAED,SAAS,QAAQ,CAAC,IAAI,EAAE;EACtB,IAAI,OAAO,IAAI,KAAK,QAAQ;IAC1B,EAAA,OAAO,UAAA,IAAI,EAAC,SAAG,IAAI,KAAK,IAAI,GAAA,EAAA;OACzB,IAAI,CAAC,IAAI;IACZ,EAAA,OAAO,YAAG,SAAG,IAAI,GAAA,EAAA;;IAEjB,EAAA,OAAO,IAAI,EAAA;CACd;;AAED,IAAM,KAAK,GAAC,cACC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAK,EAAE,CAAA;;;AAInE,AAAO,SAAS,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACjE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAC,EAAA;GACxC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;AAID,AAAO,SAAS,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC/D,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,SAAS,GAAG,EAAE,CACjB,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChCA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,EAAA;IAC/D,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;AAKD,AAAO,SAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACrE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK;WACpC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;QAClC,EAAA,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC,EAAA;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK;WACrC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC;UACjC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;QAClB,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAC5B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;;AAID,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC9C,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;MAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAChD,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACjE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9B,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC1BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;MACpE,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;KAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,GAAG,CACN,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;IAC5BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;MAC1E,EAAA,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;IAC3B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;EACf,OAAO,GAAG;CACX;;;AAGDC,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,KAAK,EAAE;EAC9C,SAAS,IAAI,GAAG,EAAE;EAClB,IAAI,CAAC,SAAS,GAAG,MAAK;EACtB,OAAO,IAAI,IAAI;EAChB;;;;AAID,AAAO,SAAS,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;EACvCD,IAAI,OAAO,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAC;EACzC,KAAKA,IAAI,IAAI,IAAI,KAAK,EAAE,EAAA,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAC,EAAA;EACnD,OAAO,OAAO;CACf;;AAED,SAAS,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAE;AACjD,SAAS,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;;;;AAIlC,AAAOC,IAAM,IAAI,GAAG,GAAE;;AAEtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjD,KAAa,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAArB;IAAAD,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,SAAS,GAAG,YAAW;AAC5B,IAAI,CAAC,cAAc,GAAG,OAAM;AAC5B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,uBAAuB;EACrD,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACvD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,EAAC;EACnC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,IAAA;AACtE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,GAAG,OAAM;AACrD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,YAAY,EAAC;EACtC,KAAW,kBAAI,IAAI,CAAC,KAAK,yBAAA,EAAE;IAAtBA,IAAI,EAAE;;IACT,IAAI,EAAE,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;IACzC,KAAa,sBAAI,EAAE,CAAC,UAAU,+BAAA;MAAzB;MAAAA,IAAI,IAAI;;MACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;KAAA;GAC3B;EACF;AACD,IAAI,CAAC,UAAU,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjF,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa;EACtC,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACrD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B,IAAI,IAAI,CAAC,OAAO,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAC,EAAA;EACrC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC5C,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC1C,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACjD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,qBAAqB,EAAE,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;OAC/C,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC/B;AACD,IAAI,CAAC,iBAAiB,GAAG,OAAM;;AAE/B,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,IAAA;AACnE,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvC,KAAa,kBAAI,IAAI,CAAC,YAAY,yBAAA;IAA7B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC;EACzB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC9C;;AAED,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5B,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;GAAA;EACzB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,WAAW,EAAC;EAC/D;;AAED,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;IAC5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,iBAAiB,EAAC,EAAA;OAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB;IACvC,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAA;;IAE5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;EACd;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,aAAa,GAAG,YAAW;AAChC,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,IAAA;AACnE,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;GAC/B;EACF;AACD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA,EAAE;IAA7BA,IAAI,IAAI;;IACX,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;MAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;MAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;KAC7B,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;MACtC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAC;KAChC;GACF;EACF;;AAED,IAAI,CAAC,UAAU,GAAG,YAAW;AAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,OAAM;AAC7D,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;GAClC;EACF;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,oBAAmB;AACjF,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,KAAa,kBAAI,IAAI,CAAC,WAAW,yBAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAC;GAAA;;EAEd,KAAa,sBAAI,IAAI,CAAC,WAAW,+BAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3D,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC;EACnC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,qBAAqB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC;AACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvD,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,SAAS;IAChB,EAAA,KAAY,kBAAI,IAAI,CAAC,SAAS,yBAAA;MAAzB;QAAAA,IAAI,GAAG;;QACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;OAAA,EAAA;EAC7B;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1E,IAAI,IAAI,CAAC,WAAW;IAClB,EAAA,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,KAAK,wBAAwB,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,GAAG,YAAY,EAAC,EAAA;EACrH,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAClD;AACD,IAAI,CAAC,oBAAoB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACrC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACb,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,OAAM;;AAE5H,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5C,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;EAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,IAAA;AACpF,IAAI,CAAC,KAAK,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzB,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,IAAI,IAAI,CAAC,UAAU,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACzD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAC;EACjB;AACD,IAAI,CAAC,SAAS,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7B,KAAY,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAApB;IAAAA,IAAI,GAAG;;IACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC;GAAA;EACb;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpD,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;CAChC;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/acorn-walk/dist/walk.mjs b/node_modules/acorn-walk/dist/walk.mjs new file mode 100644 index 0000000..0f4100b --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.mjs @@ -0,0 +1,436 @@ +// AST walker module for Mozilla Parser API compatible trees + +// A simple walk is one where you simply specify callbacks to be +// called on specific nodes. The last two arguments are optional. A +// simple use would be +// +// walk.simple(myTree, { +// Expression: function(node) { ... } +// }); +// +// to do something with all expressions. All Parser API node types +// can be used to identify node types, as well as Expression and +// Statement, which denote categories of nodes. +// +// The base argument can be used to pass a custom (recursive) +// walker, and state can be used to give this walked an initial +// state. + +function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + baseVisitor[type](node, st, c); + if (found) { found(node, st); } + })(node, state, override); +} + +// An ancestor walk keeps an array of ancestor nodes (including the +// current node) and passes them to the callback as third parameter +// (and also as state parameter when no other state is present). +function ancestor(node, visitors, baseVisitor, state) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (found) { found(node, st || ancestors, ancestors); } + if (isNew) { ancestors.pop(); } + })(node, state); +} + +// A recursive walk is one where your functions override the default +// walkers. They can modify and replace the state parameter that's +// threaded through the walk, and can opt how and whether to walk +// their child nodes (by calling their third argument on these +// nodes). +function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor;(function c(node, st, override) { + visitor[override || node.type](node, st, c); + })(node, state, override); +} + +function makeTest(test) { + if (typeof test === "string") + { return function (type) { return type === test; } } + else if (!test) + { return function () { return true; } } + else + { return test } +} + +var Found = function Found(node, state) { this.node = node; this.state = state; }; + +// A full walk triggers the callback on each node +function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (!override) { callback(node, st, type); } + })(node, state, override); +} + +// An fullAncestor walk is like an ancestor walk, but triggers +// the callback on each node +function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + var ancestors = [];(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (!override) { callback(node, st || ancestors, ancestors, type); } + if (isNew) { ancestors.pop(); } + })(node, state); +} + +// Find a node with a given start, end, and type (all are optional, +// null can be used as wildcard). Returns a {node, state} object, or +// undefined when it doesn't find a matching node. +function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + test = makeTest(test); + try { + (function c(node, st, override) { + var type = override || node.type; + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && + test(type, node)) + { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the innermost node of a given type that contains the given +// position. Interface similar to findNodeAt. +function findNodeAround(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + var type = override || node.type; + if (node.start > pos || node.end < pos) { return } + baseVisitor[type](node, st, c); + if (test(type, node)) { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the outermost matching node after a given position. +function findNodeAfter(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + if (node.end < pos) { return } + var type = override || node.type; + if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + baseVisitor[type](node, st, c); + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the outermost matching node before a given position. +function findNodeBefore(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + var max;(function c(node, st, override) { + if (node.start > pos) { return } + var type = override || node.type; + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + { max = new Found(node, st); } + baseVisitor[type](node, st, c); + })(node, state); + return max +} + +// Fallback to an Object.create polyfill for older environments. +var create = Object.create || function(proto) { + function Ctor() {} + Ctor.prototype = proto; + return new Ctor +}; + +// Used to create a custom walker. Will fill in all missing node +// type properties with the defaults. +function make(funcs, baseVisitor) { + var visitor = create(baseVisitor || base); + for (var type in funcs) { visitor[type] = funcs[type]; } + return visitor +} + +function skipThrough(node, st, c) { c(node, st); } +function ignore(_node, _st, _c) {} + +// Node walkers. + +var base = {}; + +base.Program = base.BlockStatement = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var stmt = list[i]; + + c(stmt, st, "Statement"); + } +}; +base.Statement = skipThrough; +base.EmptyStatement = ignore; +base.ExpressionStatement = base.ParenthesizedExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); }; +base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) { c(node.alternate, st, "Statement"); } +}; +base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; +base.BreakStatement = base.ContinueStatement = ignore; +base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i = 0, list = node.cases; i < list.length; i += 1) { + var cs = list[i]; + + if (cs.test) { c(cs.test, st, "Expression"); } + for (var i$1 = 0, list$1 = cs.consequent; i$1 < list$1.length; i$1 += 1) + { + var cons = list$1[i$1]; + + c(cons, st, "Statement"); + } + } +}; +base.SwitchCase = function (node, st, c) { + if (node.test) { c(node.test, st, "Expression"); } + for (var i = 0, list = node.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } +}; +base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { + if (node.argument) { c(node.argument, st, "Expression"); } +}; +base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); }; +base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement"); + if (node.handler) { c(node.handler, st); } + if (node.finalizer) { c(node.finalizer, st, "Statement"); } +}; +base.CatchClause = function (node, st, c) { + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); +}; +base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.ForStatement = function (node, st, c) { + if (node.init) { c(node.init, st, "ForInit"); } + if (node.test) { c(node.test, st, "Expression"); } + if (node.update) { c(node.update, st, "Expression"); } + c(node.body, st, "Statement"); +}; +base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.ForInit = function (node, st, c) { + if (node.type === "VariableDeclaration") { c(node, st); } + else { c(node, st, "Expression"); } +}; +base.DebuggerStatement = ignore; + +base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; +base.VariableDeclaration = function (node, st, c) { + for (var i = 0, list = node.declarations; i < list.length; i += 1) + { + var decl = list[i]; + + c(decl, st); + } +}; +base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern"); + if (node.init) { c(node.init, st, "Expression"); } +}; + +base.Function = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + c(param, st, "Pattern"); + } + c(node.body, st, node.expression ? "Expression" : "Statement"); +}; + +base.Pattern = function (node, st, c) { + if (node.type === "Identifier") + { c(node, st, "VariablePattern"); } + else if (node.type === "MemberExpression") + { c(node, st, "MemberPattern"); } + else + { c(node, st); } +}; +base.VariablePattern = ignore; +base.MemberPattern = skipThrough; +base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; +base.ArrayPattern = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Pattern"); } + } +}; +base.ObjectPattern = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } + } +}; + +base.Expression = skipThrough; +base.ThisExpression = base.Super = base.MetaProperty = ignore; +base.ArrayExpression = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Expression"); } + } +}; +base.ObjectExpression = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) + { + var prop = list[i]; + + c(prop, st); + } +}; +base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; +base.SequenceExpression = function (node, st, c) { + for (var i = 0, list = node.expressions; i < list.length; i += 1) + { + var expr = list[i]; + + c(expr, st, "Expression"); + } +}; +base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } +}; +base.TemplateElement = ignore; +base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression"); +}; +base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); +}; +base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern"); + c(node.right, st, "Expression"); +}; +base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); +}; +base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) + { for (var i = 0, list = node.arguments; i < list.length; i += 1) + { + var arg = list[i]; + + c(arg, st, "Expression"); + } } +}; +base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) { c(node.property, st, "Expression"); } +}; +base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + if (node.source) { c(node.source, st, "Expression"); } +}; +base.ExportAllDeclaration = function (node, st, c) { + c(node.source, st, "Expression"); +}; +base.ImportDeclaration = function (node, st, c) { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) + { + var spec = list[i]; + + c(spec, st); + } + c(node.source, st, "Expression"); +}; +base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore; + +base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression"); + c(node.quasi, st, "Expression"); +}; +base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; +base.Class = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + if (node.superClass) { c(node.superClass, st, "Expression"); } + c(node.body, st); +}; +base.ClassBody = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var elt = list[i]; + + c(elt, st); + } +}; +base.MethodDefinition = base.Property = function (node, st, c) { + if (node.computed) { c(node.key, st, "Expression"); } + c(node.value, st, "Expression"); +}; + +export { simple, ancestor, recursive, full, fullAncestor, findNodeAt, findNodeAround, findNodeAfter, findNodeBefore, make, base }; +//# sourceMappingURL=walk.mjs.map diff --git a/node_modules/acorn-walk/dist/walk.mjs.map b/node_modules/acorn-walk/dist/walk.mjs.map new file mode 100644 index 0000000..2a94219 --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"walk.mjs","sources":["../src/index.js"],"sourcesContent":["// AST walker module for Mozilla Parser API compatible trees\n\n// A simple walk is one where you simply specify callbacks to be\n// called on specific nodes. The last two arguments are optional. A\n// simple use would be\n//\n// walk.simple(myTree, {\n// Expression: function(node) { ... }\n// });\n//\n// to do something with all expressions. All Parser API node types\n// can be used to identify node types, as well as Expression and\n// Statement, which denote categories of nodes.\n//\n// The base argument can be used to pass a custom (recursive)\n// walker, and state can be used to give this walked an initial\n// state.\n\nexport function simple(node, visitors, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n baseVisitor[type](node, st, c)\n if (found) found(node, st)\n })(node, state, override)\n}\n\n// An ancestor walk keeps an array of ancestor nodes (including the\n// current node) and passes them to the callback as third parameter\n// (and also as state parameter when no other state is present).\nexport function ancestor(node, visitors, baseVisitor, state) {\n let ancestors = []\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type, found = visitors[type]\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (found) found(node, st || ancestors, ancestors)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// A recursive walk is one where your functions override the default\n// walkers. They can modify and replace the state parameter that's\n// threaded through the walk, and can opt how and whether to walk\n// their child nodes (by calling their third argument on these\n// nodes).\nexport function recursive(node, state, funcs, baseVisitor, override) {\n let visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor\n ;(function c(node, st, override) {\n visitor[override || node.type](node, st, c)\n })(node, state, override)\n}\n\nfunction makeTest(test) {\n if (typeof test === \"string\")\n return type => type === test\n else if (!test)\n return () => true\n else\n return test\n}\n\nclass Found {\n constructor(node, state) { this.node = node; this.state = state }\n}\n\n// A full walk triggers the callback on each node\nexport function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) baseVisitor = base\n ;(function c(node, st, override) {\n let type = override || node.type\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st, type)\n })(node, state, override)\n}\n\n// An fullAncestor walk is like an ancestor walk, but triggers\n// the callback on each node\nexport function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n let ancestors = []\n ;(function c(node, st, override) {\n let type = override || node.type\n let isNew = node !== ancestors[ancestors.length - 1]\n if (isNew) ancestors.push(node)\n baseVisitor[type](node, st, c)\n if (!override) callback(node, st || ancestors, ancestors, type)\n if (isNew) ancestors.pop()\n })(node, state)\n}\n\n// Find a node with a given start, end, and type (all are optional,\n// null can be used as wildcard). Returns a {node, state} object, or\n// undefined when it doesn't find a matching node.\nexport function findNodeAt(node, start, end, test, baseVisitor, state) {\n if (!baseVisitor) baseVisitor = base\n test = makeTest(test)\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if ((start == null || node.start <= start) &&\n (end == null || node.end >= end))\n baseVisitor[type](node, st, c)\n if ((start == null || node.start === start) &&\n (end == null || node.end === end) &&\n test(type, node))\n throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the innermost node of a given type that contains the given\n// position. Interface similar to findNodeAt.\nexport function findNodeAround(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n let type = override || node.type\n if (node.start > pos || node.end < pos) return\n baseVisitor[type](node, st, c)\n if (test(type, node)) throw new Found(node, st)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node after a given position.\nexport function findNodeAfter(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n try {\n (function c(node, st, override) {\n if (node.end < pos) return\n let type = override || node.type\n if (node.start >= pos && test(type, node)) throw new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n } catch (e) {\n if (e instanceof Found) return e\n throw e\n }\n}\n\n// Find the outermost matching node before a given position.\nexport function findNodeBefore(node, pos, test, baseVisitor, state) {\n test = makeTest(test)\n if (!baseVisitor) baseVisitor = base\n let max\n ;(function c(node, st, override) {\n if (node.start > pos) return\n let type = override || node.type\n if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))\n max = new Found(node, st)\n baseVisitor[type](node, st, c)\n })(node, state)\n return max\n}\n\n// Fallback to an Object.create polyfill for older environments.\nconst create = Object.create || function(proto) {\n function Ctor() {}\n Ctor.prototype = proto\n return new Ctor\n}\n\n// Used to create a custom walker. Will fill in all missing node\n// type properties with the defaults.\nexport function make(funcs, baseVisitor) {\n let visitor = create(baseVisitor || base)\n for (let type in funcs) visitor[type] = funcs[type]\n return visitor\n}\n\nfunction skipThrough(node, st, c) { c(node, st) }\nfunction ignore(_node, _st, _c) {}\n\n// Node walkers.\n\nexport const base = {}\n\nbase.Program = base.BlockStatement = (node, st, c) => {\n for (let stmt of node.body)\n c(stmt, st, \"Statement\")\n}\nbase.Statement = skipThrough\nbase.EmptyStatement = ignore\nbase.ExpressionStatement = base.ParenthesizedExpression =\n (node, st, c) => c(node.expression, st, \"Expression\")\nbase.IfStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Statement\")\n if (node.alternate) c(node.alternate, st, \"Statement\")\n}\nbase.LabeledStatement = (node, st, c) => c(node.body, st, \"Statement\")\nbase.BreakStatement = base.ContinueStatement = ignore\nbase.WithStatement = (node, st, c) => {\n c(node.object, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.SwitchStatement = (node, st, c) => {\n c(node.discriminant, st, \"Expression\")\n for (let cs of node.cases) {\n if (cs.test) c(cs.test, st, \"Expression\")\n for (let cons of cs.consequent)\n c(cons, st, \"Statement\")\n }\n}\nbase.SwitchCase = (node, st, c) => {\n if (node.test) c(node.test, st, \"Expression\")\n for (let cons of node.consequent)\n c(cons, st, \"Statement\")\n}\nbase.ReturnStatement = base.YieldExpression = base.AwaitExpression = (node, st, c) => {\n if (node.argument) c(node.argument, st, \"Expression\")\n}\nbase.ThrowStatement = base.SpreadElement =\n (node, st, c) => c(node.argument, st, \"Expression\")\nbase.TryStatement = (node, st, c) => {\n c(node.block, st, \"Statement\")\n if (node.handler) c(node.handler, st)\n if (node.finalizer) c(node.finalizer, st, \"Statement\")\n}\nbase.CatchClause = (node, st, c) => {\n if (node.param) c(node.param, st, \"Pattern\")\n c(node.body, st, \"Statement\")\n}\nbase.WhileStatement = base.DoWhileStatement = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForStatement = (node, st, c) => {\n if (node.init) c(node.init, st, \"ForInit\")\n if (node.test) c(node.test, st, \"Expression\")\n if (node.update) c(node.update, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInStatement = base.ForOfStatement = (node, st, c) => {\n c(node.left, st, \"ForInit\")\n c(node.right, st, \"Expression\")\n c(node.body, st, \"Statement\")\n}\nbase.ForInit = (node, st, c) => {\n if (node.type === \"VariableDeclaration\") c(node, st)\n else c(node, st, \"Expression\")\n}\nbase.DebuggerStatement = ignore\n\nbase.FunctionDeclaration = (node, st, c) => c(node, st, \"Function\")\nbase.VariableDeclaration = (node, st, c) => {\n for (let decl of node.declarations)\n c(decl, st)\n}\nbase.VariableDeclarator = (node, st, c) => {\n c(node.id, st, \"Pattern\")\n if (node.init) c(node.init, st, \"Expression\")\n}\n\nbase.Function = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n for (let param of node.params)\n c(param, st, \"Pattern\")\n c(node.body, st, node.expression ? \"Expression\" : \"Statement\")\n}\n\nbase.Pattern = (node, st, c) => {\n if (node.type === \"Identifier\")\n c(node, st, \"VariablePattern\")\n else if (node.type === \"MemberExpression\")\n c(node, st, \"MemberPattern\")\n else\n c(node, st)\n}\nbase.VariablePattern = ignore\nbase.MemberPattern = skipThrough\nbase.RestElement = (node, st, c) => c(node.argument, st, \"Pattern\")\nbase.ArrayPattern = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Pattern\")\n }\n}\nbase.ObjectPattern = (node, st, c) => {\n for (let prop of node.properties) {\n if (prop.type === \"Property\") {\n if (prop.computed) c(prop.key, st, \"Expression\")\n c(prop.value, st, \"Pattern\")\n } else if (prop.type === \"RestElement\") {\n c(prop.argument, st, \"Pattern\")\n }\n }\n}\n\nbase.Expression = skipThrough\nbase.ThisExpression = base.Super = base.MetaProperty = ignore\nbase.ArrayExpression = (node, st, c) => {\n for (let elt of node.elements) {\n if (elt) c(elt, st, \"Expression\")\n }\n}\nbase.ObjectExpression = (node, st, c) => {\n for (let prop of node.properties)\n c(prop, st)\n}\nbase.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration\nbase.SequenceExpression = (node, st, c) => {\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateLiteral = (node, st, c) => {\n for (let quasi of node.quasis)\n c(quasi, st)\n\n for (let expr of node.expressions)\n c(expr, st, \"Expression\")\n}\nbase.TemplateElement = ignore\nbase.UnaryExpression = base.UpdateExpression = (node, st, c) => {\n c(node.argument, st, \"Expression\")\n}\nbase.BinaryExpression = base.LogicalExpression = (node, st, c) => {\n c(node.left, st, \"Expression\")\n c(node.right, st, \"Expression\")\n}\nbase.AssignmentExpression = base.AssignmentPattern = (node, st, c) => {\n c(node.left, st, \"Pattern\")\n c(node.right, st, \"Expression\")\n}\nbase.ConditionalExpression = (node, st, c) => {\n c(node.test, st, \"Expression\")\n c(node.consequent, st, \"Expression\")\n c(node.alternate, st, \"Expression\")\n}\nbase.NewExpression = base.CallExpression = (node, st, c) => {\n c(node.callee, st, \"Expression\")\n if (node.arguments)\n for (let arg of node.arguments)\n c(arg, st, \"Expression\")\n}\nbase.MemberExpression = (node, st, c) => {\n c(node.object, st, \"Expression\")\n if (node.computed) c(node.property, st, \"Expression\")\n}\nbase.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => {\n if (node.declaration)\n c(node.declaration, st, node.type === \"ExportNamedDeclaration\" || node.declaration.id ? \"Statement\" : \"Expression\")\n if (node.source) c(node.source, st, \"Expression\")\n}\nbase.ExportAllDeclaration = (node, st, c) => {\n c(node.source, st, \"Expression\")\n}\nbase.ImportDeclaration = (node, st, c) => {\n for (let spec of node.specifiers)\n c(spec, st)\n c(node.source, st, \"Expression\")\n}\nbase.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore\n\nbase.TaggedTemplateExpression = (node, st, c) => {\n c(node.tag, st, \"Expression\")\n c(node.quasi, st, \"Expression\")\n}\nbase.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, \"Class\")\nbase.Class = (node, st, c) => {\n if (node.id) c(node.id, st, \"Pattern\")\n if (node.superClass) c(node.superClass, st, \"Expression\")\n c(node.body, st)\n}\nbase.ClassBody = (node, st, c) => {\n for (let elt of node.body)\n c(elt, st)\n}\nbase.MethodDefinition = base.Property = (node, st, c) => {\n if (node.computed) c(node.key, st, \"Expression\")\n c(node.value, st, \"Expression\")\n}\n"],"names":["let","const"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;AAkBA,AAAO,SAAS,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACnE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxD,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;;AAKD,AAAO,SAAS,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC3DA,IAAI,SAAS,GAAG,GAAE;EAClB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAC;IACxDA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,KAAK,EAAE,EAAA,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAC,EAAA;IAClD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;;;AAOD,AAAO,SAAS,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE;EACnEA,IAAI,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,IAAI,SAAS,CAAC,GAAG,WAAW,CACxE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC5C,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;AAED,SAAS,QAAQ,CAAC,IAAI,EAAE;EACtB,IAAI,OAAO,IAAI,KAAK,QAAQ;IAC1B,EAAA,OAAO,UAAA,IAAI,EAAC,SAAG,IAAI,KAAK,IAAI,GAAA,EAAA;OACzB,IAAI,CAAC,IAAI;IACZ,EAAA,OAAO,YAAG,SAAG,IAAI,GAAA,EAAA;;IAEjB,EAAA,OAAO,IAAI,EAAA;CACd;;AAED,IAAM,KAAK,GAAC,cACC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAK,EAAE,CAAA;;;AAInE,AAAO,SAAS,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;EACjE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,IAAI;GACnC,EAAA,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAC,EAAA;GACxC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC;CAC1B;;;;AAID,AAAO,SAAS,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE;EAC/D,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,SAAS,GAAG,EAAE,CACjB,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChCA,IAAI,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAC;IACpD,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAC,EAAA;IAC/B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE,EAAA,QAAQ,CAAC,IAAI,EAAE,EAAE,IAAI,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,EAAA;IAC/D,IAAI,KAAK,EAAE,EAAA,SAAS,CAAC,GAAG,GAAE,EAAA;GAC3B,EAAE,IAAI,EAAE,KAAK,EAAC;CAChB;;;;;AAKD,AAAO,SAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACrE,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK;WACpC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;QAClC,EAAA,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC,EAAA;MAChC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK;WACrC,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC;UACjC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;QAClB,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAC5B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;;AAID,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC9C,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;MAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;KAChD,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EACjE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpC,IAAI;IACF,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;MAC9B,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;MAC1BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;MAChC,IAAI,IAAI,CAAC,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAA,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAA;MACpE,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;KAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;GAChB,CAAC,OAAO,CAAC,EAAE;IACV,IAAI,CAAC,YAAY,KAAK,EAAE,EAAA,OAAO,CAAC,EAAA;IAChC,MAAM,CAAC;GACR;CACF;;;AAGD,AAAO,SAAS,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE;EAClE,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAC;EACrB,IAAI,CAAC,WAAW,EAAE,EAAA,WAAW,GAAG,KAAI,EAAA;EACpCA,IAAI,GAAG,CACN,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE;IAC/B,IAAI,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,EAAA,MAAM,EAAA;IAC5BA,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,KAAI;IAChC,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC;MAC1E,EAAA,GAAG,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;IAC3B,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAC;GAC/B,EAAE,IAAI,EAAE,KAAK,EAAC;EACf,OAAO,GAAG;CACX;;;AAGDC,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,KAAK,EAAE;EAC9C,SAAS,IAAI,GAAG,EAAE;EAClB,IAAI,CAAC,SAAS,GAAG,MAAK;EACtB,OAAO,IAAI,IAAI;EAChB;;;;AAID,AAAO,SAAS,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE;EACvCD,IAAI,OAAO,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAC;EACzC,KAAKA,IAAI,IAAI,IAAI,KAAK,EAAE,EAAA,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAC,EAAA;EACnD,OAAO,OAAO;CACf;;AAED,SAAS,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAE;AACjD,SAAS,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;;;;AAIlC,AAAOC,IAAM,IAAI,GAAG,GAAE;;AAEtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjD,KAAa,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAArB;IAAAD,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,SAAS,GAAG,YAAW;AAC5B,IAAI,CAAC,cAAc,GAAG,OAAM;AAC5B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,uBAAuB;EACrD,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACvD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,EAAC;EACnC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,IAAA;AACtE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,GAAG,OAAM;AACrD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,EAAE,YAAY,EAAC;EACtC,KAAW,kBAAI,IAAI,CAAC,KAAK,yBAAA,EAAE;IAAtBA,IAAI,EAAE;;IACT,IAAI,EAAE,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;IACzC,KAAa,sBAAI,EAAE,CAAC,UAAU,+BAAA;MAAzB;MAAAA,IAAI,IAAI;;MACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;KAAA;GAC3B;EACF;AACD,IAAI,CAAC,UAAU,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC9B,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;GAAA;EAC3B;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjF,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa;EACtC,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,CAAC,IAAA;AACrD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B,IAAI,IAAI,CAAC,OAAO,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAC,EAAA;EACrC,IAAI,IAAI,CAAC,SAAS,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAC,EAAA;EACvD;AACD,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC5C,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EAC1C,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACjD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAC/B,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAC;EAC9B;AACD,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,qBAAqB,EAAE,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;OAC/C,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC/B;AACD,IAAI,CAAC,iBAAiB,GAAG,OAAM;;AAE/B,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,IAAA;AACnE,IAAI,CAAC,mBAAmB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvC,KAAa,kBAAI,IAAI,CAAC,YAAY,yBAAA;IAA7B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC;EACzB,IAAI,IAAI,CAAC,IAAI,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAC9C;;AAED,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5B,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;GAAA;EACzB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,GAAG,YAAY,GAAG,WAAW,EAAC;EAC/D;;AAED,IAAI,CAAC,OAAO,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;IAC5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,iBAAiB,EAAC,EAAA;OAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB;IACvC,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAA;;IAE5B,EAAA,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC,EAAA;EACd;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,aAAa,GAAG,YAAW;AAChC,IAAI,CAAC,WAAW,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,CAAC,IAAA;AACnE,IAAI,CAAC,YAAY,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAChC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;GAC/B;EACF;AACD,IAAI,CAAC,aAAa,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA,EAAE;IAA7BA,IAAI,IAAI;;IACX,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE;MAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;MAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAC;KAC7B,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;MACtC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAC;KAChC;GACF;EACF;;AAED,IAAI,CAAC,UAAU,GAAG,YAAW;AAC7B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,GAAG,OAAM;AAC7D,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAY,kBAAI,IAAI,CAAC,QAAQ,yBAAA,EAAE;IAA1BA,IAAI,GAAG;;IACV,IAAI,GAAG,EAAE,EAAA,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;GAClC;EACF;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACd;AACD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,oBAAmB;AACjF,IAAI,CAAC,kBAAkB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACtC,KAAa,kBAAI,IAAI,CAAC,WAAW,yBAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACnC,KAAc,kBAAI,IAAI,CAAC,MAAM,yBAAA;IAAxB;IAAAA,IAAI,KAAK;;IACZ,CAAC,CAAC,KAAK,EAAE,EAAE,EAAC;GAAA;;EAEd,KAAa,sBAAI,IAAI,CAAC,WAAW,+BAAA;IAA5B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;GAAA;EAC5B;AACD,IAAI,CAAC,eAAe,GAAG,OAAM;AAC7B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC3D,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC;EACnC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7D,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACjE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC;EAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,qBAAqB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,EAAC;EAC9B,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,EAAE,YAAY,EAAC;EACpC;AACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACvD,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,SAAS;IAChB,EAAA,KAAY,kBAAI,IAAI,CAAC,SAAS,yBAAA;MAAzB;QAAAA,IAAI,GAAG;;QACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;OAAA,EAAA;EAC7B;AACD,IAAI,CAAC,gBAAgB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACtD;AACD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC1E,IAAI,IAAI,CAAC,WAAW;IAClB,EAAA,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,KAAK,wBAAwB,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,GAAG,YAAY,EAAC,EAAA;EACrH,IAAI,IAAI,CAAC,MAAM,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAClD;AACD,IAAI,CAAC,oBAAoB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACxC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,iBAAiB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACrC,KAAa,kBAAI,IAAI,CAAC,UAAU,yBAAA;IAA3B;IAAAA,IAAI,IAAI;;IACX,CAAC,CAAC,IAAI,EAAE,EAAE,EAAC;GAAA;EACb,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,YAAY,EAAC;EACjC;AACD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,OAAM;;AAE5H,IAAI,CAAC,wBAAwB,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC5C,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC;EAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;EAChC;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,SAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,IAAA;AACpF,IAAI,CAAC,KAAK,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACzB,IAAI,IAAI,CAAC,EAAE,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,EAAA;EACtC,IAAI,IAAI,CAAC,UAAU,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EACzD,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAC;EACjB;AACD,IAAI,CAAC,SAAS,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EAC7B,KAAY,kBAAI,IAAI,CAAC,IAAI,yBAAA;IAApB;IAAAA,IAAI,GAAG;;IACV,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC;GAAA;EACb;AACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAC,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;EACpD,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAA,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,YAAY,EAAC,EAAA;EAChD,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,EAAC;CAChC;;;;"} \ No newline at end of file diff --git a/node_modules/acorn-walk/package.json b/node_modules/acorn-walk/package.json new file mode 100644 index 0000000..5db4ea7 --- /dev/null +++ b/node_modules/acorn-walk/package.json @@ -0,0 +1,63 @@ +{ + "_from": "acorn-walk@^6.0.1", + "_id": "acorn-walk@6.1.1", + "_inBundle": false, + "_integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", + "_location": "/acorn-walk", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "acorn-walk@^6.0.1", + "name": "acorn-walk", + "escapedName": "acorn-walk", + "rawSpec": "^6.0.1", + "saveSpec": null, + "fetchSpec": "^6.0.1" + }, + "_requiredBy": [ + "/acorn-globals" + ], + "_resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", + "_shasum": "d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913", + "_spec": "acorn-walk@^6.0.1", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\acorn-globals", + "bugs": { + "url": "https://github.com/acornjs/acorn/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ECMAScript (ESTree) AST walker", + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/acornjs/acorn", + "license": "MIT", + "main": "dist/walk.js", + "maintainers": [ + { + "name": "Marijn Haverbeke", + "email": "marijnh@gmail.com", + "url": "https://marijnhaverbeke.nl" + }, + { + "name": "Ingvar Stepanyan", + "email": "me@rreverser.com", + "url": "https://rreverser.com/" + }, + { + "name": "Adrian Heine", + "url": "http://adrianheine.de" + } + ], + "module": "dist/walk.mjs", + "name": "acorn-walk", + "repository": { + "type": "git", + "url": "git+https://github.com/acornjs/acorn.git" + }, + "scripts": { + "prepare": "cd ..; npm run build:walk" + }, + "version": "6.1.1" +} diff --git a/node_modules/acorn/AUTHORS b/node_modules/acorn/AUTHORS deleted file mode 100644 index 86c8d9b..0000000 --- a/node_modules/acorn/AUTHORS +++ /dev/null @@ -1,75 +0,0 @@ -List of Acorn contributors. Updated before every release. - -Adrian Heine -Adrian Rakovsky -Alistair Braidwood -Amila Welihinda -Andres Suarez -Angelo -Aparajita Fishman -Arian Stolwijk -Artem Govorov -Boopesh Mahendran -Bradley Heinz -Brandon Mills -Charles Hughes -Charmander -Conrad Irwin -Daniel Tschinder -David Bonnet -Domenico Matteo -ehmicky -Felix Maier -Forbes Lindesay -Gilad Peleg -impinball -Ingvar Stepanyan -Jackson Ray Hamilton -Jesse McCarthy -Jiaxing Wang -Joel Kemp -Johannes Herr -John-David Dalton -Jordan Klassen -Jürg Lehni -Kai Cataldo -keeyipchan -Keheliya Gallaba -Kevin Irish -Kevin Kwok -krator -laosb -Marek -Marijn Haverbeke -Martin Carlberg -Mat Garcia -Mathias Bynens -Mathieu 'p01' Henri -Matthew Bastien -Max Schaefer -Max Zerzouri -Mihai Bazon -Mike Rennie -naoh -Nicholas C. Zakas -Nick Fitzgerald -Olivier Thomann -Oskar Schöldström -Paul Harper -Peter Rust -PlNG -Prayag Verma -ReadmeCritic -r-e-d -Richard Gibson -Rich Harris -Sebastian McKenzie -Shahar Soel -Sheel Bedi -Simen Bekkhus -Teddy Katz -Timothy Gu -Toru Nagashima -Victor Homyakov -Wexpo Lyu -zsjforcn diff --git a/node_modules/acorn/CHANGELOG.md b/node_modules/acorn/CHANGELOG.md index f9e5a4f..1c8f79c 100644 --- a/node_modules/acorn/CHANGELOG.md +++ b/node_modules/acorn/CHANGELOG.md @@ -1,3 +1,147 @@ +## 6.1.1 (2019-02-27) + +### Bug fixes + +Fix bug that caused parsing default exports of with names to fail. + +## 6.1.0 (2019-02-08) + +### Bug fixes + +Fix scope checking when redefining a `var` as a lexical binding. + +### New features + +Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins. + +## 6.0.7 (2019-02-04) + +### Bug fixes + +Check that exported bindings are defined. + +Don't treat `\u180e` as a whitespace character. + +Check for duplicate parameter names in methods. + +Don't allow shorthand properties when they are generators or async methods. + +Forbid binding `await` in async arrow function's parameter list. + +## 6.0.6 (2019-01-30) + +### Bug fixes + +The content of class declarations and expressions is now always parsed in strict mode. + +Don't allow `let` or `const` to bind the variable name `let`. + +Treat class declarations as lexical. + +Don't allow a generator function declaration as the sole body of an `if` or `else`. + +Ignore `"use strict"` when after an empty statement. + +Allow string line continuations with special line terminator characters. + +Treat `for` bodies as part of the `for` scope when checking for conflicting bindings. + +Fix bug with parsing `yield` in a `for` loop initializer. + +Implement special cases around scope checking for functions. + +## 6.0.5 (2019-01-02) + +### Bug fixes + +Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type. + +Don't treat `let` as a keyword when the next token is `{` on the next line. + +Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on. + +## 6.0.4 (2018-11-05) + +### Bug fixes + +Further improvements to tokenizing regular expressions in corner cases. + +## 6.0.3 (2018-11-04) + +### Bug fixes + +Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression. + +Remove stray symlink in the package tarball. + +## 6.0.2 (2018-09-26) + +### Bug fixes + +Fix bug where default expressions could fail to parse inside an object destructuring assignment expression. + +## 6.0.1 (2018-09-14) + +### Bug fixes + +Fix wrong value in `version` export. + +## 6.0.0 (2018-09-14) + +### Bug fixes + +Better handle variable-redefinition checks for catch bindings and functions directly under if statements. + +Forbid `new.target` in top-level arrow functions. + +Fix issue with parsing a regexp after `yield` in some contexts. + +### New features + +The package now comes with TypeScript definitions. + +### Breaking changes + +The default value of the `ecmaVersion` option is now 9 (2018). + +Plugins work differently, and will have to be rewritten to work with this version. + +The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`). + +## 5.7.3 (2018-09-10) + +### Bug fixes + +Fix failure to tokenize regexps after expressions like `x.of`. + +Better error message for unterminated template literals. + +## 5.7.2 (2018-08-24) + +### Bug fixes + +Properly handle `allowAwaitOutsideFunction` in for statements. + +Treat function declarations at the top level of modules like let bindings. + +Don't allow async function declarations as the only statement under a label. + +## 5.7.0 (2018-06-15) + +### New features + +Upgraded to Unicode 11. + +## 5.6.0 (2018-05-31) + +### New features + +Allow U+2028 and U+2029 in string when ECMAVersion >= 10. + +Allow binding-less catch statements when ECMAVersion >= 10. + +Add `allowAwaitOutsideFunction` option for parsing top-level `await`. + ## 5.5.3 (2018-03-08) ### Bug fixes @@ -10,38 +154,20 @@ A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. -## 5.5.2 (2018-03-08) - -### Bug fixes - -A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. - ## 5.5.1 (2018-03-06) ### Bug fixes -Fix regression in walker causing property values in object patterns to be walked as expressions. - Fix misleading error message for octal escapes in template strings. ## 5.5.0 (2018-02-27) -### Bug fixes - -Support object spread in the AST walker. - ### New features The identifier character categorization is now based on Unicode version 10. Acorn will now validate the content of regular expressions, including new ES9 features. -## 5.4.1 (2018-02-02) - -### Bug fixes - -5.4.0 somehow accidentally included an old version of walk.js. - ## 5.4.0 (2018-02-01) ### Bug fixes @@ -92,8 +218,6 @@ Fix token context tracking for `class` and `function` in property-name position. Make sure `%*` isn't parsed as a valid operator. -The `full` and `fullAncestor` walkers no longer visit nodes multiple times. - Allow shorthand properties `get` and `set` to be followed by default values. Disallow `super` when not in callee or object position. @@ -130,14 +254,10 @@ Don't error when `yield` is used as a property name. Allow `async` as a shorthand object property. -Make the ES module version of the loose parser actually work. - ### New features Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9. -New walker functions `full` and `fullAncestor`. - ## 5.0.3 (2017-04-01) ### Bug fixes @@ -176,26 +296,21 @@ Allow all forms of member expressions to be parenthesized as lvalue. ### Bug fixes -Don't expect semicolons after default-exported functions or classes, -even when they are expressions. +Don't expect semicolons after default-exported functions or classes, even when they are expressions. -Check for use of `'use strict'` directives in non-simple parameter -functions, even when already in strict mode. +Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode. ## 4.0.9 (2017-02-06) ### Bug fixes -Fix incorrect error raised for parenthesized simple assignment -targets, so that `(x) = 1` parses again. +Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again. ## 4.0.8 (2017-02-03) ### Bug fixes -Solve spurious parenthesized pattern errors by temporarily erring on -the side of accepting programs that our delayed errors don't handle -correctly yet. +Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet. ## 4.0.7 (2017-02-02) @@ -203,16 +318,13 @@ correctly yet. Accept invalidly rejected code like `(x).y = 2` again. -Don't raise an error when a function _inside_ strict code has a -non-simple parameter list. +Don't raise an error when a function _inside_ strict code has a non-simple parameter list. ## 4.0.6 (2017-02-02) ### Bug fixes -Fix exponential behavior (manifesting itself as a complete hang for -even relatively small source files) introduced by the new 'use strict' -check. +Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check. ## 4.0.5 (2017-02-02) @@ -234,8 +346,6 @@ Disallow labeled declarations. ### Bug fixes -Fix issue with loading acorn_loose.js with an AMD loader. - Fix crash when `export` was followed by a keyword that can't be exported. @@ -243,8 +353,7 @@ exported. ### Bug fixes -Allow regular function declarations inside single-statement `if` -branches in loose mode. Forbid them entirely in strict mode. +Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode. Properly parse properties named `async` in ES2017 mode. @@ -256,8 +365,7 @@ Fix bug where reserved words were broken in ES2017 mode. Don't ignore period or 'e' characters after octal numbers. -Fix broken parsing for call expressions in default parameter values -of arrow functions. +Fix broken parsing for call expressions in default parameter values of arrow functions. ## 4.0.1 (2016-08-08) @@ -271,8 +379,7 @@ Fix false positives in duplicated export name errors. The default `ecmaVersion` option value is now 7. -A number of internal method signatures changed, so plugins might need -to be updated. +A number of internal method signatures changed, so plugins might need to be updated. ### Bug fixes @@ -280,8 +387,7 @@ The parser now raises errors on duplicated export names. `arguments` and `eval` can now be used in shorthand properties. -Duplicate parameter names in non-simple argument lists now always -produce an error. +Duplicate parameter names in non-simple argument lists now always produce an error. ### New features @@ -290,8 +396,7 @@ The `ecmaVersion` option now also accepts year-style version numbers Support for `async`/`await` syntax when `ecmaVersion` is >= 8. -Support for trailing commas in call expressions when `ecmaVersion` -is >= 8. +Support for trailing commas in call expressions when `ecmaVersion` is >= 8. ## 3.3.0 (2016-07-25) @@ -303,8 +408,7 @@ Fix parser crash when parsing an array pattern with a hole. ### New features -Implement check against complex argument lists in functions that -enable strict mode in ES7. +Implement check against complex argument lists in functions that enable strict mode in ES7. ## 3.2.0 (2016-06-07) @@ -315,44 +419,29 @@ environment. Properly reject shorthand properties whose name is a keyword. -Don't crash when the loose parser is called without options object. - ### New features -Visitors created with `visit.make` now have their base as _prototype_, -rather than copying properties into a fresh object. - -Make it possible to use `visit.ancestor` with a walk state. +Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object. ## 3.1.0 (2016-04-18) ### Bug fixes -Fix issue where the loose parser created invalid TemplateElement nodes -for unclosed template literals. - -Properly tokenize the division operator directly after a function -expression. +Properly tokenize the division operator directly after a function expression. Allow trailing comma in destructuring arrays. -### New features - -The walker now allows defining handlers for `CatchClause` nodes. - ## 3.0.4 (2016-02-25) ### Fixes -Allow update expressions as left-hand-side of the ES7 exponential -operator. +Allow update expressions as left-hand-side of the ES7 exponential operator. ## 3.0.2 (2016-02-10) ### Fixes -Fix bug that accidentally made `undefined` a reserved word when -parsing ES7. +Fix bug that accidentally made `undefined` a reserved word when parsing ES7. ## 3.0.0 (2016-02-10) @@ -360,26 +449,21 @@ parsing ES7. The default value of the `ecmaVersion` option is now 6 (used to be 5). -Support for comprehension syntax (which was dropped from the draft -spec) has been removed. +Support for comprehension syntax (which was dropped from the draft spec) has been removed. ### Fixes -`let` and `yield` are now “contextual keywords”, meaning you can -mostly use them as identifiers in ES5 non-strict code. +`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code. -A parenthesized class or function expression after `export default` is -now parsed correctly. +A parenthesized class or function expression after `export default` is now parsed correctly. ### New features -When `ecmaVersion` is set to 7, Acorn will parse the exponentiation -operator (`**`). +When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`). The identifier character ranges are now based on Unicode 8.0.0. -Plugins can now override the `raiseRecoverable` method to override the -way non-critical errors are handled. +Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled. ## 2.7.0 (2016-01-04) @@ -387,25 +471,12 @@ way non-critical errors are handled. Stop allowing rest parameters in setters. -Make sure the loose parser always attaches a `local` property to -`ImportNamespaceSpecifier` nodes. - Disallow `y` rexexp flag in ES5. Disallow `\00` and `\000` escapes in strict mode. Raise an error when an import name is a reserved word. -## 2.6.4 (2015-11-12) - -### Fixes - -Fix crash in loose parser when parsing invalid object pattern. - -### New features - -Support plugins in the loose parser. - ## 2.6.2 (2015-11-10) ### Fixes @@ -426,28 +497,17 @@ Forbid using a comma after a rest pattern in an array destructuring. Support parsing stdin in command-line tool. -## 2.5.2 (2015-10-27) - -### Fixes - -Fix bug where the walker walked an exported `let` statement as an -expression. - ## 2.5.0 (2015-10-27) ### Fixes Fix tokenizer support in the command-line tool. -In the loose parser, don't allow non-string-literals as import -sources. - Stop allowing `new.target` outside of functions. Remove legacy `guard` and `guardedHandler` properties from try nodes. -Stop allowing multiple `__proto__` properties on an object literal in -strict mode. +Stop allowing multiple `__proto__` properties on an object literal in strict mode. Don't allow rest parameters to be non-identifier patterns. diff --git a/node_modules/acorn/README.md b/node_modules/acorn/README.md index 276dab3..3e5f58d 100644 --- a/node_modules/acorn/README.md +++ b/node_modules/acorn/README.md @@ -1,28 +1,21 @@ # Acorn -[![Build Status](https://travis-ci.org/acornjs/acorn.svg?branch=master)](https://travis-ci.org/acornjs/acorn) -[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn) -[![CDNJS](https://img.shields.io/cdnjs/v/acorn.svg)](https://cdnjs.com/libraries/acorn) -[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) - -A tiny, fast JavaScript parser, written completely in JavaScript. +A tiny, fast JavaScript parser written in JavaScript. ## Community Acorn is open source software released under an -[MIT license](https://github.com/acornjs/acorn/blob/master/LICENSE). +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE). You are welcome to [report bugs](https://github.com/acornjs/acorn/issues) or create pull requests on [github](https://github.com/acornjs/acorn). For questions and discussion, please use the -[Tern discussion forum](https://discuss.acornjs.net). +[Tern discussion forum](https://discuss.ternjs.net). ## Installation -The easiest way to install acorn is with [`npm`][npm]. - -[npm]: https://www.npmjs.com/ +The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): ```sh npm install acorn @@ -34,44 +27,38 @@ Alternately, you can download the source and build acorn yourself: git clone https://github.com/acornjs/acorn.git cd acorn npm install -npm run build ``` -## Components +## Interface -When run in a CommonJS (node.js) or AMD environment, exported values -appear in the interfaces exposed by the individual files, as usual. -When loaded in the browser (Acorn works in any JS-enabled browser more -recent than IE5) without any kind of module management, a single -global object `acorn` will be defined, and all the exported properties -will be added to that. +**parse**`(input, options)` is the main interface to the library. The +`input` parameter is a string, `options` can be undefined or an object +setting some of the options listed below. The return value will be an +abstract syntax tree object as specified by the [ESTree +spec](https://github.com/estree/estree). -### Main parser +```javascript +let acorn = require("acorn"); +console.log(acorn.parse("1 + 1")); +``` -This is implemented in `dist/acorn.js`, and is what you get when you -`require("acorn")` in node.js. - -**parse**`(input, options)` is used to parse a JavaScript program. -The `input` parameter is a string, `options` can be undefined or an -object setting some of the options listed below. The return value will -be an abstract syntax tree object as specified by the -[ESTree spec][estree]. - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the character offset at which the -error occurred, and a `loc` object that contains a `{line, column}` +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the string offset at which the +error occurred, and a `loc` object that contains a `{line, column}` object referring to that same position. -[estree]: https://github.com/estree/estree +Options can be provided by passing a second argument, which should be +an object containing any of these fields: - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, 6 (2015), 7 (2016), 8 (2017), or 9 (2018, partial + either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial support). This influences support for strict mode, the set of reserved words, and support for new syntax features. Default is 7. **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being - implemented by Acorn. + implemented by Acorn. Other proposed new features can be implemented + through plugins. - **sourceType**: Indicate the mode the code should be parsed in. Can be either `"script"` or `"module"`. This influences global strict mode @@ -99,6 +86,11 @@ object referring to that same position. - **allowImportExportEverywhere**: By default, `import` and `export` declarations can only appear at a program's top level. Setting this option to `true` allows them anywhere where a statement is allowed. + +- **allowAwaitOutsideFunction**: By default, `await` expressions can + only appear inside `async` functions. Setting this option to + `true` allows to have top-level `await` expressions. They are + still not allowed in non-`async` functions, though. - **allowHashBang**: When this is enabled (off by default), if the code starts with the characters `#!` (as in a shellscript), the @@ -157,9 +149,10 @@ object referring to that same position. - **ranges**: Nodes have their start and end characters offsets recorded in `start` and `end` properties (directly on the node, rather than the `loc` object, which holds line/column data. To also - add a [semi-standardized][range] `range` property holding a - `[start, end]` array with the same numbers, set the `ranges` option - to `true`. + add a + [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678) + `range` property holding a `[start, end]` array with the same + numbers, set the `ranges` option to `true`. - **program**: It is possible to parse multiple files into a single AST by passing the tree produced by parsing the first file as the @@ -182,15 +175,10 @@ object referring to that same position. that have a single `expression` property containing the expression inside parentheses. -[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - **parseExpressionAt**`(input, offset, options)` will parse a single expression in a string, and return its AST. It will not complain if there is more of the string left after the expression. -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and character offset. - **tokenizer**`(input, options)` returns an object with a `getToken` method that can be called repeatedly to get the next token, a `{start, end, type, value}` object (with added `loc` property when the @@ -214,139 +202,30 @@ var tokens = [...acorn.tokenizer(str)]; **tokTypes** holds an object mapping names to the token type objects that end up in the `type` properties of tokens. -#### Note on using with [Escodegen][escodegen] +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and offset. -Escodegen supports generating comments from AST, attached in -Esprima-specific format. In order to simulate same format in -Acorn, consider following example: +### The `Parser` class + +Instances of the **`Parser`** class contain all the state and logic +that drives a parse. It has static methods `parse`, +`parseExpressionAt`, and `tokenizer` that match the top-level +functions by the same name. + +When extending the parser with plugins, you need to call these methods +on the extended version of the class. To extend a parser with plugins, +you can use its static `extend` method. ```javascript -var comments = [], tokens = []; - -var ast = acorn.parse('var x = 42; // answer', { - // collect ranges for each node - ranges: true, - // collect comments in Esprima's format - onComment: comments, - // collect token ranges - onToken: tokens -}); - -// attach comments using collected information -escodegen.attachComments(ast, comments, tokens); - -// generate code -console.log(escodegen.generate(ast, {comment: true})); -// > 'var x = 42; // answer' +var acorn = require("acorn"); +var jsx = require("acorn-jsx"); +var JSXParser = acorn.Parser.extend(jsx()); +JSXParser.parse("foo()"); ``` -[escodegen]: https://github.com/estools/escodegen - -### dist/acorn_loose.js ### - -This file implements an error-tolerant parser. It exposes a single -function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`. - -**parse_dammit**`(input, options)` takes the same arguments and -returns the same syntax tree as the `parse` function in `acorn.js`, -but never raises an error, and will do its best to parse syntactically -invalid code in as meaningful a way as it can. It'll insert identifier -nodes with name `"✖"` as placeholders in places where it can't make -sense of the input. Depends on `acorn.js`, because it uses the same -tokenizer. - -### dist/walk.js ### - -Implements an abstract syntax tree walker. Will store its interface in -`acorn.walk` when loaded without a module system. - -**simple**`(node, visitors, base, state)` does a 'simple' walk over -a tree. `node` should be the AST node to walk, and `visitors` an -object with properties whose names correspond to node types in the -[ESTree spec][estree]. The properties should contain functions -that will be called with the node object and, if applicable the state -at that point. The last two arguments are optional. `base` is a walker -algorithm, and `state` is a start state. The default walker will -simply visit all statements and expressions and not produce a -meaningful state. (An example of a use of state is to track scope at -each point in the tree.) - -```js -const acorn = require("acorn") -const walk = require("acorn/dist/walk") - -walk.simple(acorn.parse("let x = 10"), { - Literal(node) { - console.log(`Found a literal: ${node.value}`) - } -}) -``` - -**ancestor**`(node, visitors, base, state)` does a 'simple' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to the callbacks as a third parameter. - -```js -const acorn = require("acorn") -const walk = require("acorn/dist/walk") - -walk.ancestor(acorn.parse("foo('hi')"), { - Literal(_, ancestors) { - console.log("This literal's ancestors are:", - ancestors.map(n => n.type)) - } -}) -``` - -**recursive**`(node, state, functions, base)` does a 'recursive' -walk, where the walker functions are responsible for continuing the -walk on the child nodes of their target node. `state` is the start -state, and `functions` should contain an object that maps node types -to walker functions. Such functions are called with `(node, state, c)` -arguments, and can cause the walk to continue on a sub-node by calling -the `c` argument on it with `(node, state)` arguments. The optional -`base` argument provides the fallback walker functions for node types -that aren't handled in the `functions` object. If not given, the -default walkers will be used. - -**make**`(functions, base)` builds a new walker object by using the -walker functions in `functions` and filling in the missing ones by -taking defaults from `base`. - -**full**`(node, callback, base, state)` does a 'full' -walk over a tree, calling the callback with the arguments (node, state, type) -for each node - -**fullAncestor**`(node, callback, base, state)` does a 'full' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to the callbacks as a third parameter. - -```js -const acorn = require("acorn") -const walk = require("acorn/dist/walk") - -walk.full(acorn.parse("1 + 1"), node => { - console.log(`There's a ${node.type} node at ${node.ch}`) -}) -``` - -**findNodeAt**`(node, start, end, test, base, state)` tries to -locate a node in a tree at the given start and/or end offsets, which -satisfies the predicate `test`. `start` and `end` can be either `null` -(as wildcard) or a number. `test` may be a string (indicating a node -type) or a function that takes `(nodeType, node)` arguments and -returns a boolean indicating whether this node is interesting. `base` -and `state` are optional, and can be used to specify a custom walker. -Nodes are tested from inner to outer, so if two nodes match the -boundaries, the inner one will be preferred. - -**findNodeAround**`(node, pos, test, base, state)` is a lot like -`findNodeAt`, but will match any node that exists 'around' (spanning) -the given position. - -**findNodeAfter**`(node, pos, test, base, state)` is similar to -`findNodeAround`, but will match all nodes *after* the given position -(testing outer nodes before inner nodes). +The `extend` method takes any number of plugin values, and returns a +new `Parser` class that includes the extra parser logic provided by +the plugins. ## Command line interface @@ -354,8 +233,8 @@ The `bin/acorn` utility can be used to parse a file from the command line. It accepts as arguments its input file and the following options: -- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9`: Sets the ECMAScript version - to parse. Default is version 7. +- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version + to parse. Default is version 9. - `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. @@ -363,7 +242,8 @@ options: "end" subobjects, each of which contains the one-based line and zero-based column numbers in `{line, column}` form. -- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. +- `--allow-hash-bang`: If the code starts with the characters #! (as + in a shellscript), the first line will be treated as a comment. - `--compact`: No whitespace is used in the AST output. @@ -373,82 +253,11 @@ options: The utility spits out the syntax tree as JSON data. -## Build system - -Acorn is written in ECMAScript 6, as a set of small modules, in the -project's `src` directory, and compiled down to bigger ECMAScript 3 -files in `dist` using [Browserify](http://browserify.org) and -[Babel](http://babeljs.io/). If you are already using Babel, you can -consider including the modules directly. - -The command-line test runner (`npm test`) uses the ES6 modules. The -browser-based test page (`test/index.html`) uses the compiled modules. -The `bin/build-acorn.js` script builds the latter from the former. - -If you are working on Acorn, you'll probably want to try the code out -directly, without an intermediate build step. In your scripts, you can -register the Babel require shim like this: - - require("babel-core/register") - -That will allow you to directly `require` the ES6 modules. - -## Plugins - -Acorn is designed support allow plugins which, within reasonable -bounds, redefine the way the parser works. Plugins can add new token -types and new tokenizer contexts (if necessary), and extend methods in -the parser object. This is not a clean, elegant API—using it requires -an understanding of Acorn's internals, and plugins are likely to break -whenever those internals are significantly changed. But still, it is -_possible_, in this way, to create parsers for JavaScript dialects -without forking all of Acorn. And in principle it is even possible to -combine such plugins, so that if you have, for example, a plugin for -parsing types and a plugin for parsing JSX-style XML literals, you -could load them both and parse code with both JSX tags and types. - -A plugin should register itself by adding a property to -`acorn.plugins`, which holds a function. Calling `acorn.parse`, a -`plugins` option can be passed, holding an object mapping plugin names -to configuration values (or just `true` for plugins that don't take -options). After the parser object has been created, the initialization -functions for the chosen plugins are called with `(parser, -configValue)` arguments. They are expected to use the `parser.extend` -method to extend parser methods. For example, the `readToken` method -could be extended like this: - -```javascript -parser.extend("readToken", function(nextMethod) { - return function(code) { - console.log("Reading a token!") - return nextMethod.call(this, code) - } -}) -``` - -The `nextMethod` argument passed to `extend`'s second argument is the -previous value of this method, and should usually be called through to -whenever the extended method does not handle the call itself. - -Similarly, the loose parser allows plugins to register themselves via -`acorn.pluginsLoose`. The extension mechanism is the same as for the -normal parser: - -```javascript -looseParser.extend("readToken", function(nextMethod) { - return function() { - console.log("Reading a token in the loose parser!") - return nextMethod.call(this) - } -}) -``` - -### Existing plugins +## Existing plugins - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) - - [`acorn-objj`](https://github.com/cappuccino/acorn-objj): [Objective-J](http://www.cappuccino-project.org/learn/objective-j.html) language parser built as Acorn plugin - Plugins for ECMAScript proposals: +Plugins for ECMAScript proposals: - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: - [`acorn-async-iteration`](https://github.com/acornjs/acorn-async-iteration): Parse [async iteration proposal](https://github.com/tc39/proposal-async-iteration) @@ -457,9 +266,4 @@ looseParser.extend("readToken", function(nextMethod) { - [`acorn-dynamic-import`](https://github.com/kesne/acorn-dynamic-import): Parse [import() proposal](https://github.com/tc39/proposal-dynamic-import) - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator) - - [`acorn-optional-catch-binding`](https://github.com/acornjs/acorn-optional-catch-binding): Parse [optional catch binding proposal](https://github.com/tc39/proposal-optional-catch-binding) - - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods) - - [`acorn5-object-spread`](https://github.com/adrianheine/acorn5-object-spread): Parse [Object Rest/Spread Properties proposal](https://github.com/tc39/proposal-object-rest-spread) - - [`acorn-object-rest-spread`](https://github.com/victor-homyakov/acorn-object-rest-spread): Parse [Object Rest/Spread Properties proposal](https://github.com/tc39/proposal-object-rest-spread) - - [`acorn-es7`](https://github.com/angelozerr/acorn-es7): Parse [decorator syntax proposal](https://github.com/wycats/javascript-decorators) - - [`acorn-static-class-property-initializer`](https://github.com/victor-homyakov/acorn-static-class-property-initializer): Partial support for static class properties from [ES Class Fields & Static Properties Proposal](https://github.com/tc39/proposal-class-public-fields) to support static property initializers in [React components written as ES6+ classes](https://babeljs.io/blog/2015/06/07/react-on-es6-plus) + - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/node_modules/acorn/bin/_acorn.js b/node_modules/acorn/bin/_acorn.js deleted file mode 100644 index 830c389..0000000 --- a/node_modules/acorn/bin/_acorn.js +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var path = require('path'); -var fs = require('fs'); -var acorn = require('../dist/acorn.js'); - -var infile; -var forceFile; -var silent = false; -var compact = false; -var tokenize = false; -var options = {}; - -function help(status) { - var print = (status == 0) ? console.log : console.error; - print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|...|--ecma2015|--ecma2016|--ecma2017|--ecma2018|...]"); - print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]"); - process.exit(status); -} - -for (var i = 2; i < process.argv.length; ++i) { - var arg = process.argv[i]; - if ((arg == "-" || arg[0] != "-") && !infile) { infile = arg; } - else if (arg == "--" && !infile && i + 2 == process.argv.length) { forceFile = infile = process.argv[++i]; } - else if (arg == "--locations") { options.locations = true; } - else if (arg == "--allow-hash-bang") { options.allowHashBang = true; } - else if (arg == "--silent") { silent = true; } - else if (arg == "--compact") { compact = true; } - else if (arg == "--help") { help(0); } - else if (arg == "--tokenize") { tokenize = true; } - else if (arg == "--module") { options.sourceType = "module"; } - else { - var match = arg.match(/^--ecma(\d+)$/); - if (match) - { options.ecmaVersion = +match[1]; } - else - { help(1); } - } -} - -function run(code) { - var result; - try { - if (!tokenize) { - result = acorn.parse(code, options); - } else { - result = []; - var tokenizer$$1 = acorn.tokenizer(code, options), token; - do { - token = tokenizer$$1.getToken(); - result.push(token); - } while (token.type != acorn.tokTypes.eof) - } - } catch (e) { - console.error(e.message); - process.exit(1); - } - if (!silent) { console.log(JSON.stringify(result, null, compact ? null : 2)); } -} - -if (forceFile || infile && infile != "-") { - run(fs.readFileSync(infile, "utf8")); -} else { - var code = ""; - process.stdin.resume(); - process.stdin.on("data", function (chunk) { return code += chunk; }); - process.stdin.on("end", function () { return run(code); }); -} diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn index 03888d0..cf7df46 100755 --- a/node_modules/acorn/bin/acorn +++ b/node_modules/acorn/bin/acorn @@ -1,4 +1,4 @@ #!/usr/bin/env node 'use strict'; -require('./_acorn.js'); +require('../dist/bin.js'); diff --git a/node_modules/acorn/bin/run_test262.js b/node_modules/acorn/bin/run_test262.js deleted file mode 100644 index f52a478..0000000 --- a/node_modules/acorn/bin/run_test262.js +++ /dev/null @@ -1,22 +0,0 @@ -const fs = require("fs") -const path = require("path") -const run = require("test262-parser-runner") -const parse = require("..").parse - -const unsupportedFeatures = [ - "BigInt", - "class-fields", - "class-fields-private", - "class-fields-public", - "numeric-separator-literal", - "optional-catch-binding" -]; - -run( - (content, {sourceType}) => parse(content, {sourceType, ecmaVersion: 9}), - { - testsDirectory: path.dirname(require.resolve("test262/package.json")), - skip: test => (test.attrs.features && unsupportedFeatures.some(f => test.attrs.features.includes(f))), - whitelist: fs.readFileSync("./bin/test262.whitelist", "utf8").split("\n").filter(v => v) - } -) diff --git a/node_modules/acorn/bin/test262.whitelist b/node_modules/acorn/bin/test262.whitelist deleted file mode 100644 index b00d340..0000000 --- a/node_modules/acorn/bin/test262.whitelist +++ /dev/null @@ -1,409 +0,0 @@ -annexB/language/function-code/block-decl-func-no-skip-try.js (default) -annexB/language/function-code/block-decl-func-skip-early-err-block.js (default) -annexB/language/function-code/block-decl-func-skip-early-err.js (default) -annexB/language/function-code/block-decl-func-skip-early-err-switch.js (default) -annexB/language/function-code/block-decl-func-skip-early-err-try.js (default) -annexB/language/function-code/if-decl-else-decl-a-func-no-skip-try.js (default) -annexB/language/function-code/if-decl-else-decl-a-func-skip-early-err-block.js (default) -annexB/language/function-code/if-decl-else-decl-a-func-skip-early-err.js (default) -annexB/language/function-code/if-decl-else-decl-a-func-skip-early-err-switch.js (default) -annexB/language/function-code/if-decl-else-decl-a-func-skip-early-err-try.js (default) -annexB/language/function-code/if-decl-else-decl-b-func-no-skip-try.js (default) -annexB/language/function-code/if-decl-else-decl-b-func-skip-early-err-block.js (default) -annexB/language/function-code/if-decl-else-decl-b-func-skip-early-err.js (default) -annexB/language/function-code/if-decl-else-decl-b-func-skip-early-err-switch.js (default) -annexB/language/function-code/if-decl-else-decl-b-func-skip-early-err-try.js (default) -annexB/language/function-code/if-decl-else-stmt-func-no-skip-try.js (default) -annexB/language/function-code/if-decl-else-stmt-func-skip-early-err-block.js (default) -annexB/language/function-code/if-decl-else-stmt-func-skip-early-err.js (default) -annexB/language/function-code/if-decl-else-stmt-func-skip-early-err-switch.js (default) -annexB/language/function-code/if-decl-else-stmt-func-skip-early-err-try.js (default) -annexB/language/function-code/if-decl-no-else-func-no-skip-try.js (default) -annexB/language/function-code/if-decl-no-else-func-skip-early-err-block.js (default) -annexB/language/function-code/if-decl-no-else-func-skip-early-err.js (default) -annexB/language/function-code/if-decl-no-else-func-skip-early-err-switch.js (default) -annexB/language/function-code/if-decl-no-else-func-skip-early-err-try.js (default) -annexB/language/function-code/if-stmt-else-decl-func-no-skip-try.js (default) -annexB/language/function-code/if-stmt-else-decl-func-skip-early-err-block.js (default) -annexB/language/function-code/if-stmt-else-decl-func-skip-early-err.js (default) -annexB/language/function-code/if-stmt-else-decl-func-skip-early-err-switch.js (default) -annexB/language/function-code/if-stmt-else-decl-func-skip-early-err-try.js (default) -annexB/language/function-code/switch-case-func-no-skip-try.js (default) -annexB/language/function-code/switch-case-func-skip-early-err-block.js (default) -annexB/language/function-code/switch-case-func-skip-early-err.js (default) -annexB/language/function-code/switch-case-func-skip-early-err-switch.js (default) -annexB/language/function-code/switch-case-func-skip-early-err-try.js (default) -annexB/language/function-code/switch-dflt-func-no-skip-try.js (default) -annexB/language/function-code/switch-dflt-func-skip-early-err-block.js (default) -annexB/language/function-code/switch-dflt-func-skip-early-err.js (default) -annexB/language/function-code/switch-dflt-func-skip-early-err-switch.js (default) -annexB/language/function-code/switch-dflt-func-skip-early-err-try.js (default) -annexB/language/global-code/block-decl-global-no-skip-try.js (default) -annexB/language/global-code/block-decl-global-skip-early-err-block.js (default) -annexB/language/global-code/block-decl-global-skip-early-err.js (default) -annexB/language/global-code/block-decl-global-skip-early-err-switch.js (default) -annexB/language/global-code/block-decl-global-skip-early-err-try.js (default) -annexB/language/global-code/if-decl-else-decl-a-global-no-skip-try.js (default) -annexB/language/global-code/if-decl-else-decl-a-global-skip-early-err-block.js (default) -annexB/language/global-code/if-decl-else-decl-a-global-skip-early-err.js (default) -annexB/language/global-code/if-decl-else-decl-a-global-skip-early-err-switch.js (default) -annexB/language/global-code/if-decl-else-decl-a-global-skip-early-err-try.js (default) -annexB/language/global-code/if-decl-else-decl-b-global-no-skip-try.js (default) -annexB/language/global-code/if-decl-else-decl-b-global-skip-early-err-block.js (default) -annexB/language/global-code/if-decl-else-decl-b-global-skip-early-err.js (default) -annexB/language/global-code/if-decl-else-decl-b-global-skip-early-err-switch.js (default) -annexB/language/global-code/if-decl-else-decl-b-global-skip-early-err-try.js (default) -annexB/language/global-code/if-decl-else-stmt-global-no-skip-try.js (default) -annexB/language/global-code/if-decl-else-stmt-global-skip-early-err-block.js (default) -annexB/language/global-code/if-decl-else-stmt-global-skip-early-err.js (default) -annexB/language/global-code/if-decl-else-stmt-global-skip-early-err-switch.js (default) -annexB/language/global-code/if-decl-else-stmt-global-skip-early-err-try.js (default) -annexB/language/global-code/if-decl-no-else-global-no-skip-try.js (default) -annexB/language/global-code/if-decl-no-else-global-skip-early-err-block.js (default) -annexB/language/global-code/if-decl-no-else-global-skip-early-err.js (default) -annexB/language/global-code/if-decl-no-else-global-skip-early-err-switch.js (default) -annexB/language/global-code/if-decl-no-else-global-skip-early-err-try.js (default) -annexB/language/global-code/if-stmt-else-decl-global-no-skip-try.js (default) -annexB/language/global-code/if-stmt-else-decl-global-skip-early-err-block.js (default) -annexB/language/global-code/if-stmt-else-decl-global-skip-early-err.js (default) -annexB/language/global-code/if-stmt-else-decl-global-skip-early-err-switch.js (default) -annexB/language/global-code/if-stmt-else-decl-global-skip-early-err-try.js (default) -annexB/language/global-code/switch-case-global-no-skip-try.js (default) -annexB/language/global-code/switch-case-global-skip-early-err-block.js (default) -annexB/language/global-code/switch-case-global-skip-early-err.js (default) -annexB/language/global-code/switch-case-global-skip-early-err-switch.js (default) -annexB/language/global-code/switch-case-global-skip-early-err-try.js (default) -annexB/language/global-code/switch-dflt-global-no-skip-try.js (default) -annexB/language/global-code/switch-dflt-global-skip-early-err-block.js (default) -annexB/language/global-code/switch-dflt-global-skip-early-err.js (default) -annexB/language/global-code/switch-dflt-global-skip-early-err-switch.js (default) -annexB/language/global-code/switch-dflt-global-skip-early-err-try.js (default) -annexB/language/statements/try/catch-redeclared-for-in-var.js (default) -annexB/language/statements/try/catch-redeclared-for-in-var.js (strict mode) -annexB/language/statements/try/catch-redeclared-for-var.js (default) -annexB/language/statements/try/catch-redeclared-for-var.js (strict mode) -annexB/language/statements/try/catch-redeclared-var-statement-captured.js (default) -annexB/language/statements/try/catch-redeclared-var-statement-captured.js (strict mode) -annexB/language/statements/try/catch-redeclared-var-statement.js (default) -annexB/language/statements/try/catch-redeclared-var-statement.js (strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js (default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js (default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-default.js (default) -language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-default.js (strict mode) -language/expressions/async-arrow-function/early-errors-arrow-body-contains-super-call.js (default) -language/expressions/async-arrow-function/early-errors-arrow-body-contains-super-call.js (strict mode) -language/expressions/async-arrow-function/early-errors-arrow-body-contains-super-property.js (default) -language/expressions/async-arrow-function/early-errors-arrow-body-contains-super-property.js (strict mode) -language/expressions/async-function/early-errors-expression-body-contains-super-call.js (default) -language/expressions/async-function/early-errors-expression-body-contains-super-call.js (strict mode) -language/expressions/async-function/early-errors-expression-body-contains-super-property.js (default) -language/expressions/async-function/early-errors-expression-body-contains-super-property.js (strict mode) -language/expressions/async-function/early-errors-expression-formals-contains-super-call.js (default) -language/expressions/async-function/early-errors-expression-formals-contains-super-call.js (strict mode) -language/expressions/async-function/early-errors-expression-formals-contains-super-property.js (default) -language/expressions/async-function/early-errors-expression-formals-contains-super-property.js (strict mode) -language/expressions/class/method-param-dflt-yield.js (default) -language/expressions/class/static-method-param-dflt-yield.js (default) -language/expressions/function/early-body-super-call.js (default) -language/expressions/function/early-body-super-call.js (strict mode) -language/expressions/function/early-body-super-prop.js (default) -language/expressions/function/early-body-super-prop.js (strict mode) -language/expressions/function/early-params-super-call.js (default) -language/expressions/function/early-params-super-call.js (strict mode) -language/expressions/function/early-params-super-prop.js (default) -language/expressions/function/early-params-super-prop.js (strict mode) -language/expressions/object/method-definition/early-errors-object-method-body-contains-super-call.js (default) -language/expressions/object/method-definition/early-errors-object-method-body-contains-super-call.js (strict mode) -language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js (default) -language/expressions/object/method-definition/early-errors-object-method-formals-contains-super-call.js (default) -language/expressions/object/method-definition/early-errors-object-method-formals-contains-super-call.js (strict mode) -language/expressions/object/method-definition/generator-super-call-body.js (default) -language/expressions/object/method-definition/generator-super-call-body.js (strict mode) -language/expressions/object/method-definition/generator-super-call-param.js (default) -language/expressions/object/method-definition/generator-super-call-param.js (strict mode) -language/expressions/object/prop-def-invalid-async-prefix.js (default) -language/expressions/object/prop-def-invalid-async-prefix.js (strict mode) -language/expressions/yield/in-iteration-stmt.js (default) -language/expressions/yield/in-iteration-stmt.js (strict mode) -language/expressions/yield/star-in-iteration-stmt.js (default) -language/expressions/yield/star-in-iteration-stmt.js (strict mode) -language/global-code/new.target-arrow.js (default) -language/global-code/new.target-arrow.js (strict mode) -language/global-code/super-call-arrow.js (default) -language/global-code/super-call-arrow.js (strict mode) -language/global-code/super-prop-arrow.js (default) -language/global-code/super-prop-arrow.js (strict mode) -language/module-code/early-export-global.js (default) -language/module-code/early-export-global.js (strict mode) -language/module-code/early-export-unresolvable.js (default) -language/module-code/early-export-unresolvable.js (strict mode) -language/module-code/parse-err-hoist-lex-fun.js (default) -language/module-code/parse-err-hoist-lex-fun.js (strict mode) -language/module-code/parse-err-hoist-lex-gen.js (default) -language/module-code/parse-err-hoist-lex-gen.js (strict mode) -language/statements/async-function/early-errors-declaration-body-contains-super-call.js (default) -language/statements/async-function/early-errors-declaration-body-contains-super-call.js (strict mode) -language/statements/async-function/early-errors-declaration-body-contains-super-property.js (default) -language/statements/async-function/early-errors-declaration-body-contains-super-property.js (strict mode) -language/statements/async-function/early-errors-declaration-formals-contains-super-call.js (default) -language/statements/async-function/early-errors-declaration-formals-contains-super-call.js (strict mode) -language/statements/async-function/early-errors-declaration-formals-contains-super-property.js (default) -language/statements/async-function/early-errors-declaration-formals-contains-super-property.js (strict mode) -language/expressions/async-generator/early-errors-expression-body-contains-super-call.js (default) -language/expressions/async-generator/early-errors-expression-body-contains-super-call.js (strict mode) -language/expressions/async-generator/early-errors-expression-body-contains-super-property.js (default) -language/expressions/async-generator/early-errors-expression-body-contains-super-property.js (strict mode) -language/expressions/async-generator/early-errors-expression-formals-contains-super-call.js (default) -language/expressions/async-generator/early-errors-expression-formals-contains-super-call.js (strict mode) -language/expressions/async-generator/early-errors-expression-formals-contains-super-property.js (default) -language/expressions/async-generator/early-errors-expression-formals-contains-super-property.js (strict mode) -language/statements/class/definition/early-errors-class-method-arguments-in-formal-parameters.js (default) -language/statements/class/definition/early-errors-class-method-body-contains-super-call.js (default) -language/statements/class/definition/early-errors-class-method-body-contains-super-call.js (strict mode) -language/statements/class/definition/early-errors-class-method-duplicate-parameters.js (default) -language/statements/class/definition/early-errors-class-method-eval-in-formal-parameters.js (default) -language/statements/class/definition/early-errors-class-method-formals-contains-super-call.js (default) -language/statements/class/definition/early-errors-class-method-formals-contains-super-call.js (strict mode) -language/statements/class/definition/methods-gen-yield-as-function-expression-binding-identifier.js (default) -language/statements/class/definition/methods-gen-yield-as-identifier-in-nested-function.js (default) -language/statements/class/method-param-yield.js (default) -language/statements/class/static-method-param-yield.js (default) -language/statements/class/strict-mode/with.js (default) -language/statements/class/syntax/early-errors/class-body-has-direct-super-missing-class-heritage.js (default) -language/statements/class/syntax/early-errors/class-body-has-direct-super-missing-class-heritage.js (strict mode) -language/statements/class/syntax/early-errors/class-body-method-contains-direct-super.js (default) -language/statements/class/syntax/early-errors/class-body-method-contains-direct-super.js (strict mode) -language/statements/class/syntax/early-errors/class-body-special-method-generator-contains-direct-super.js (default) -language/statements/class/syntax/early-errors/class-body-special-method-generator-contains-direct-super.js (strict mode) -language/statements/class/syntax/early-errors/class-body-special-method-get-contains-direct-super.js (default) -language/statements/class/syntax/early-errors/class-body-special-method-get-contains-direct-super.js (strict mode) -language/statements/class/syntax/early-errors/class-body-special-method-set-contains-direct-super.js (default) -language/statements/class/syntax/early-errors/class-body-special-method-set-contains-direct-super.js (strict mode) -language/statements/class/syntax/early-errors/class-body-static-method-contains-direct-super.js (default) -language/statements/class/syntax/early-errors/class-body-static-method-contains-direct-super.js (strict mode) -language/statements/class/syntax/early-errors/class-body-static-method-get-contains-direct-super.js (default) -language/statements/class/syntax/early-errors/class-body-static-method-get-contains-direct-super.js (strict mode) -language/statements/class/syntax/early-errors/class-body-static-method-set-contains-direct-super.js (default) -language/statements/class/syntax/early-errors/class-body-static-method-set-contains-direct-super.js (strict mode) -language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js (default) -language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js (strict mode) -language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js (default) -language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js (strict mode) -language/statements/const/syntax/const-declaring-let-split-across-two-lines.js (default) -language/statements/do-while/labelled-fn-stmt.js (default) -language/statements/for/head-let-bound-names-in-stmt.js (default) -language/statements/for/head-let-bound-names-in-stmt.js (strict mode) -language/statements/for-in/head-const-bound-names-in-stmt.js (default) -language/statements/for-in/head-const-bound-names-in-stmt.js (strict mode) -language/statements/for-in/head-const-bound-names-let.js (default) -language/statements/for-in/head-let-bound-names-in-stmt.js (default) -language/statements/for-in/head-let-bound-names-in-stmt.js (strict mode) -language/statements/for-in/head-let-bound-names-let.js (default) -language/statements/for-in/labelled-fn-stmt-const.js (default) -language/statements/for-in/labelled-fn-stmt-let.js (default) -language/statements/for-in/labelled-fn-stmt-lhs.js (default) -language/statements/for-in/labelled-fn-stmt-var.js (default) -language/statements/for-in/let-block-with-newline.js (default) -language/statements/for-in/let-identifier-with-newline.js (default) -language/statements/for/labelled-fn-stmt-expr.js (default) -language/statements/for/labelled-fn-stmt-let.js (default) -language/statements/for/labelled-fn-stmt-var.js (default) -language/statements/for/let-block-with-newline.js (default) -language/statements/for/let-identifier-with-newline.js (default) -language/statements/for-of/head-const-bound-names-in-stmt.js (default) -language/statements/for-of/head-const-bound-names-in-stmt.js (strict mode) -language/statements/for-of/head-const-bound-names-let.js (default) -language/statements/for-of/head-let-bound-names-in-stmt.js (default) -language/statements/for-of/head-let-bound-names-in-stmt.js (strict mode) -language/statements/for-of/head-let-bound-names-let.js (default) -language/statements/for-of/labelled-fn-stmt-const.js (default) -language/statements/for-of/labelled-fn-stmt-let.js (default) -language/statements/for-of/labelled-fn-stmt-lhs.js (default) -language/statements/for-of/labelled-fn-stmt-var.js (default) -language/statements/for-of/let-block-with-newline.js (default) -language/statements/for-of/let-identifier-with-newline.js (default) -language/statements/for-await-of/let-block-with-newline.js (default) -language/statements/for-await-of/let-identifier-with-newline.js (default) -language/statements/function/early-body-super-call.js (default) -language/statements/function/early-body-super-call.js (strict mode) -language/statements/function/early-body-super-prop.js (default) -language/statements/function/early-body-super-prop.js (strict mode) -language/statements/function/early-params-super-call.js (default) -language/statements/function/early-params-super-call.js (strict mode) -language/statements/function/early-params-super-prop.js (default) -language/statements/function/early-params-super-prop.js (strict mode) -language/statements/if/if-gen-else-gen.js (default) -language/statements/if/if-gen-else-stmt.js (default) -language/statements/if/if-gen-no-else.js (default) -language/statements/if/if-stmt-else-gen.js (default) -language/statements/if/labelled-fn-stmt-first.js (default) -language/statements/if/labelled-fn-stmt-lone.js (default) -language/statements/if/labelled-fn-stmt-second.js (default) -language/statements/if/let-block-with-newline.js (default) -language/statements/if/let-identifier-with-newline.js (default) -language/statements/labeled/decl-async-function.js (default) -language/statements/labeled/let-block-with-newline.js (default) -language/statements/labeled/let-identifier-with-newline.js (default) -language/statements/let/syntax/identifier-let-disallowed-as-boundname.js (default) -language/statements/let/syntax/let-let-declaration-split-across-two-lines.js (default) -language/statements/let/syntax/let-let-declaration-with-initializer-split-across-two-lines.js (default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js (default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js (default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js (default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js (default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js (default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js (strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js (default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js (strict mode) -language/statements/while/labelled-fn-stmt.js (default) -language/statements/while/let-block-with-newline.js (default) -language/statements/while/let-identifier-with-newline.js (default) -language/statements/with/labelled-fn-stmt.js (default) -language/statements/with/let-block-with-newline.js (default) -language/statements/with/let-identifier-with-newline.js (default) -language/white-space/mongolian-vowel-separator.js (default) -language/white-space/mongolian-vowel-separator.js (strict mode) diff --git a/node_modules/acorn/dist/acorn.d.ts b/node_modules/acorn/dist/acorn.d.ts new file mode 100644 index 0000000..c6f9841 --- /dev/null +++ b/node_modules/acorn/dist/acorn.d.ts @@ -0,0 +1,209 @@ +export as namespace acorn +export = acorn + +declare namespace acorn { + function parse(input: string, options?: Options): Node + + function parseExpressionAt(input: string, pos?: number, options?: Options): Node + + function tokenizer(input: string, options?: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + + interface Options { + ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 9 | 10 | 2015 | 2016 | 2017 | 2018 | 2019 + sourceType?: 'script' | 'module' + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + allowReserved?: boolean + allowReturnOutsideFunction?: boolean + allowImportExportEverywhere?: boolean + allowAwaitOutsideFunction?: boolean + allowHashBang?: boolean + locations?: boolean + onToken?: ((token: Token) => any) | Token[] + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + ranges?: boolean + program?: Node + sourceFile?: string + directSourceFile?: string + preserveParens?: boolean + } + + class Parser { + constructor(options: Options, input: string, startPos?: number) + parse(): Node + static parse(input: string, options?: Options): Node + static parseExpressionAt(input: string, pos: number, options?: Options): Node + static tokenizer(input: string, options?: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser + } + + interface Position { line: number; column: number; offset: number } + + const defaultOptions: Options + + function getLineInfo(input: string, offset: number): Position + + class SourceLocation { + start: Position + end: Position + source?: string | null + constructor(p: Parser, start: Position, end: Position) + } + + class Node { + type: string + start: number + end: number + loc?: SourceLocation + sourceFile?: string + range?: [number, number] + constructor(parser: Parser, pos: number, loc?: SourceLocation) + } + + class TokenType { + label: string + keyword: string + beforeExpr: boolean + startsExpr: boolean + isLoop: boolean + isAssign: boolean + prefix: boolean + postfix: boolean + binop: number + updateContext?: (prevType: TokenType) => void + constructor(label: string, conf?: any) + } + + const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + eof: TokenType + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + arrow: TokenType + template: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType + } + + class TokContext { + constructor(token: string, isExpr: boolean, preserveSpace: boolean, override?: (p: Parser) => void) + } + + const tokContexts: { + b_stat: TokContext + b_expr: TokContext + b_tmpl: TokContext + p_stat: TokContext + p_expr: TokContext + q_tmpl: TokContext + f_expr: TokContext + } + + function isIdentifierStart(code: number, astral?: boolean): boolean + + function isIdentifierChar(code: number, astral?: boolean): boolean + + interface AbstractToken { + } + + interface Comment extends AbstractToken { + type: string + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] + } + + class Token { + type: TokenType + value: any + start: number + end: number + loc?: SourceLocation + range?: [number, number] + constructor(p: Parser) + } + + function isNewLine(code: number): boolean + + const lineBreak: RegExp + + const lineBreakG: RegExp + + const version: string +} diff --git a/node_modules/acorn/dist/acorn.es.js b/node_modules/acorn/dist/acorn.es.js deleted file mode 100644 index c272a9d..0000000 --- a/node_modules/acorn/dist/acorn.es.js +++ /dev/null @@ -1,5305 +0,0 @@ -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -}; - -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: ecma5AndLessKeywords, - 6: ecma5AndLessKeywords + " const class extends export import super" -}; - -var keywordRelationalOperator = /^in(stanceof)?$/; - -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312e\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fea\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by bin/generate-identifier-regex.js - -// eslint-disable-next-line comma-spacing -var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,55,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,698,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,1,31,6124,20,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; - -// eslint-disable-next-line comma-spacing -var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,19719,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { return false } - pos += set[i + 1]; - if (pos >= code) { return true } - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code, astral) { - if (code < 65) { return code === 36 } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code, astral) { - if (code < 48) { return code === 36 } - if (code < 58) { return true } - if (code < 65) { return false } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) -} - -// ## Token types - -// The assignment of fine-grained, information-carrying type objects -// allows the tokenizer to store the information it has about a -// token in a way that is very cheap for the parser to look up. - -// All token type variables start with an underscore, to make them -// easy to recognize. - -// The `beforeExpr` property is used to disambiguate between regular -// expressions and divisions. It is set on all token types that can -// be followed by an expression (thus, a slash after them would be a -// regular expression). -// -// The `startsExpr` property is used to check if the token ends a -// `yield` expression. It is set on all token types that either can -// directly start an expression (like a quotation mark) or can -// continue an expression (like the body of a string). -// -// `isLoop` marks a keyword as starting a loop, which is important -// to know when parsing a label, in order to allow or disallow -// continue jumps to that label. - -var TokenType = function TokenType(label, conf) { - if ( conf === void 0 ) conf = {}; - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; -}; - -function binop(name, prec) { - return new TokenType(name, {beforeExpr: true, binop: prec}) -} -var beforeExpr = {beforeExpr: true}; -var startsExpr = {startsExpr: true}; - -// Map keyword names to token types. - -var keywords$1 = {}; - -// Succinct definitions of keyword token types -function kw(name, options) { - if ( options === void 0 ) options = {}; - - options.keyword = name; - return keywords$1[name] = new TokenType(name, options) -} - -var types = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), - bracketR: new TokenType("]"), - braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), - braceR: new TokenType("}"), - parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", {beforeExpr: true, isAssign: true}), - assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), - incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), - prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}), - - // Keyword token types. - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", {isLoop: true, beforeExpr: true}), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", {isLoop: true}), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", {isLoop: true}), - _with: kw("with"), - _new: kw("new", {beforeExpr: true, startsExpr: true}), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import"), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", {beforeExpr: true, binop: 7}), - _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), - _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), - _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), - _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) -}; - -// Matches a whole line break (where CRLF is considered a single -// line break). Used to count lines. - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); - -function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code === 0x2029 -} - -var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - -var ref = Object.prototype; -var hasOwnProperty = ref.hasOwnProperty; -var toString = ref.toString; - -// Checks if an object has a property. - -function has(obj, propName) { - return hasOwnProperty.call(obj, propName) -} - -var isArray = Array.isArray || (function (obj) { return ( - toString.call(obj) === "[object Array]" -); }); - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; - -Position.prototype.offset = function offset (n) { - return new Position(this.line, this.column + n) -}; - -var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { this.source = p.sourceFile; } -}; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur) - } - } -} - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must - // be either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support - // for strict mode, the set of reserved words, and support for - // new syntax features. The default is 7. - ecmaVersion: 7, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // th position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false, - plugins: {} -}; - -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - - for (var opt in defaultOptions) - { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - - if (options.ecmaVersion >= 2015) - { options.ecmaVersion -= 2009; } - - if (options.allowReserved == null) - { options.allowReserved = options.ecmaVersion < 5; } - - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) - { options.onComment = pushComment(options, options.onComment); } - - return options -} - -function pushComment(options, array) { - return function(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) - { comment.loc = new SourceLocation(this, startLoc, endLoc); } - if (options.ranges) - { comment.range = [start, end]; } - array.push(comment); - } -} - -// Registered plugins -var plugins = {}; - -function keywordRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") -} - -var Parser = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); - var reserved = ""; - if (!options.allowReserved) { - for (var v = options.ecmaVersion;; v--) - { if (reserved = reservedWords[v]) { break } } - if (options.sourceType == "module") { reserved += " await"; } - } - this.reservedWords = keywordRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = keywordRegexp(reservedStrict); - this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Load plugins - this.loadPlugins(options.plugins); - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Flags to track whether we are in a function, a generator, an async function. - this.inFunction = this.inGenerator = this.inAsync = false; - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = 0; - // Labels in scope. - this.labels = []; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") - { this.skipLineComment(2); } - - // Scope tracking for duplicate variable names (see scope.js) - this.scopeStack = []; - this.enterFunctionScope(); - - // For RegExp validation - this.regexpState = null; -}; - -// DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them -Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) }; -Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) }; - -Parser.prototype.extend = function extend (name, f) { - this[name] = f(this[name]); -}; - -Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) { - var this$1 = this; - - for (var name in pluginConfigs) { - var plugin = plugins[name]; - if (!plugin) { throw new Error("Plugin '" + name + "' not found") } - plugin(this$1, pluginConfigs[name]); - } -}; - -Parser.prototype.parse = function parse () { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node) -}; - -var pp = Parser.prototype; - -// ## Parser utilities - -var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/; -pp.strictDirective = function(start) { - var this$1 = this; - - for (;;) { - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - var match = literal.exec(this$1.input.slice(start)); - if (!match) { return false } - if ((match[1] || match[2]) == "use strict") { return true } - start += match[0].length; - } -}; - -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. - -pp.eat = function(type) { - if (this.type === type) { - this.next(); - return true - } else { - return false - } -}; - -// Tests whether parsed token is a contextual keyword. - -pp.isContextual = function(name) { - return this.type === types.name && this.value === name && !this.containsEsc -}; - -// Consumes contextual keyword if possible. - -pp.eatContextual = function(name) { - if (!this.isContextual(name)) { return false } - this.next(); - return true -}; - -// Asserts that following token is given contextual keyword. - -pp.expectContextual = function(name) { - if (!this.eatContextual(name)) { this.unexpected(); } -}; - -// Test whether a semicolon can be inserted at the current position. - -pp.canInsertSemicolon = function() { - return this.type === types.eof || - this.type === types.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; - -pp.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } - return true - } -}; - -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. - -pp.semicolon = function() { - if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } -}; - -pp.afterTrailingComma = function(tokType, notNext) { - if (this.type == tokType) { - if (this.options.onTrailingComma) - { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } - if (!notNext) - { this.next(); } - return true - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function(type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; -} - -pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { return } - if (refDestructuringErrors.trailingComma > -1) - { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } -}; - -pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { return false } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } - if (shorthandAssign >= 0) - { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } - if (doubleProto >= 0) - { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } -}; - -pp.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } - if (this.awaitPos) - { this.raise(this.awaitPos, "Await expression cannot be a default value"); } -}; - -pp.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - { return this.isSimpleAssignTarget(expr.expression) } - return expr.type === "Identifier" || expr.type === "MemberExpression" -}; - -var pp$1 = Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp$1.parseTopLevel = function(node) { - var this$1 = this; - - var exports = {}; - if (!node.body) { node.body = []; } - while (this.type !== types.eof) { - var stmt = this$1.parseStatement(true, true, exports); - node.body.push(stmt); - } - this.adaptDirectivePrologue(node.body); - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program") -}; - -var loopLabel = {kind: "loop"}; -var switchLabel = {kind: "switch"}; - -pp$1.isLet = function() { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - if (nextCh === 91 || nextCh == 123) { return true } // '{' and '[' - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { return true } - } - return false -}; - -// check 'async [no LineTerminator here] function' -// - 'async /*foo*/ function' is OK. -// - 'async /*\n*/ function' is invalid. -pp$1.isAsyncFunction = function() { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) - { return false } - - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) -}; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp$1.parseStatement = function(declaration, topLevel, exports) { - var starttype = this.type, node = this.startNode(), kind; - - if (this.isLet()) { - starttype = types._var; - kind = "let"; - } - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case types._debugger: return this.parseDebuggerStatement(node) - case types._do: return this.parseDoStatement(node) - case types._for: return this.parseForStatement(node) - case types._function: - if (!declaration && this.options.ecmaVersion >= 6) { this.unexpected(); } - return this.parseFunctionStatement(node, false) - case types._class: - if (!declaration) { this.unexpected(); } - return this.parseClass(node, true) - case types._if: return this.parseIfStatement(node) - case types._return: return this.parseReturnStatement(node) - case types._switch: return this.parseSwitchStatement(node) - case types._throw: return this.parseThrowStatement(node) - case types._try: return this.parseTryStatement(node) - case types._const: case types._var: - kind = kind || this.value; - if (!declaration && kind != "var") { this.unexpected(); } - return this.parseVarStatement(node, kind) - case types._while: return this.parseWhileStatement(node) - case types._with: return this.parseWithStatement(node) - case types.braceL: return this.parseBlock() - case types.semi: return this.parseEmptyStatement(node) - case types._export: - case types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } - if (!this.inModule) - { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - } - return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction()) { - if (!declaration) { this.unexpected(); } - this.next(); - return this.parseFunctionStatement(node, true) - } - - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) - { return this.parseLabeledStatement(node, maybeName, expr) } - else { return this.parseExpressionStatement(node, expr) } - } -}; - -pp$1.parseBreakContinueStatement = function(node, keyword) { - var this$1 = this; - - var isBreak = keyword == "break"; - this.next(); - if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } - else if (this.type !== types.name) { this.unexpected(); } - else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this$1.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } - if (node.label && isBreak) { break } - } - } - if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") -}; - -pp$1.parseDebuggerStatement = function(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement") -}; - -pp$1.parseDoStatement = function(node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) - { this.eat(types.semi); } - else - { this.semicolon(); } - return this.finishNode(node, "DoWhileStatement") -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp$1.parseForStatement = function(node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && this.inAsync && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterLexicalScope(); - this.expect(types.parenL); - if (this.type === types.semi) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, null) - } - var isLet = this.isLet(); - if (this.type === types._var || this.type === types._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && - !(kind !== "var" && init$1.declarations[0].init)) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - return this.parseForIn(node, init$1) - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init$1) - } - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLVal(init); - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init) -}; - -pp$1.parseFunctionStatement = function(node, isAsync) { - this.next(); - return this.parseFunction(node, true, false, isAsync) -}; - -pp$1.parseIfStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement(!this.strict && this.type == types._function); - node.alternate = this.eat(types._else) ? this.parseStatement(!this.strict && this.type == types._function) : null; - return this.finishNode(node, "IfStatement") -}; - -pp$1.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - { this.raise(this.start, "'return' outside of function"); } - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } - else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement") -}; - -pp$1.parseSwitchStatement = function(node) { - var this$1 = this; - - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types.braceL); - this.labels.push(switchLabel); - this.enterLexicalScope(); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - var cur; - for (var sawDefault = false; this.type != types.braceR;) { - if (this$1.type === types._case || this$1.type === types._default) { - var isCase = this$1.type === types._case; - if (cur) { this$1.finishNode(cur, "SwitchCase"); } - node.cases.push(cur = this$1.startNode()); - cur.consequent = []; - this$1.next(); - if (isCase) { - cur.test = this$1.parseExpression(); - } else { - if (sawDefault) { this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses"); } - sawDefault = true; - cur.test = null; - } - this$1.expect(types.colon); - } else { - if (!cur) { this$1.unexpected(); } - cur.consequent.push(this$1.parseStatement(true)); - } - } - this.exitLexicalScope(); - if (cur) { this.finishNode(cur, "SwitchCase"); } - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement") -}; - -pp$1.parseThrowStatement = function(node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - { this.raise(this.lastTokEnd, "Illegal newline after throw"); } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement") -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp$1.parseTryStatement = function(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types._catch) { - var clause = this.startNode(); - this.next(); - this.expect(types.parenL); - clause.param = this.parseBindingAtom(); - this.enterLexicalScope(); - this.checkLVal(clause.param, "let"); - this.expect(types.parenR); - clause.body = this.parseBlock(false); - this.exitLexicalScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) - { this.raise(node.start, "Missing catch or finally clause"); } - return this.finishNode(node, "TryStatement") -}; - -pp$1.parseVarStatement = function(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration") -}; - -pp$1.parseWhileStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "WhileStatement") -}; - -pp$1.parseWithStatement = function(node) { - if (this.strict) { this.raise(this.start, "'with' in strict mode"); } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); - return this.finishNode(node, "WithStatement") -}; - -pp$1.parseEmptyStatement = function(node) { - this.next(); - return this.finishNode(node, "EmptyStatement") -}; - -pp$1.parseLabeledStatement = function(node, maybeName, expr) { - var this$1 = this; - - for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1) - { - var label = list[i$1]; - - if (label.name === maybeName) - { this$1.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } } - var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this$1.labels[i]; - if (label$1.statementStart == node.start) { - // Update information about previous labels on this node - label$1.statementStart = this$1.start; - label$1.kind = kind; - } else { break } - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); - node.body = this.parseStatement(true); - if (node.body.type == "ClassDeclaration" || - node.body.type == "VariableDeclaration" && node.body.kind != "var" || - node.body.type == "FunctionDeclaration" && (this.strict || node.body.generator)) - { this.raiseRecoverable(node.body.start, "Invalid labeled declaration"); } - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement") -}; - -pp$1.parseExpressionStatement = function(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement") -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp$1.parseBlock = function(createNewLexicalScope) { - var this$1 = this; - if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; - - var node = this.startNode(); - node.body = []; - this.expect(types.braceL); - if (createNewLexicalScope) { - this.enterLexicalScope(); - } - while (!this.eat(types.braceR)) { - var stmt = this$1.parseStatement(true); - node.body.push(stmt); - } - if (createNewLexicalScope) { - this.exitLexicalScope(); - } - return this.finishNode(node, "BlockStatement") -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp$1.parseFor = function(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.type === types.semi ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.type === types.parenR ? null : this.parseExpression(); - this.expect(types.parenR); - this.exitLexicalScope(); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, "ForStatement") -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp$1.parseForIn = function(node, init) { - var type = this.type === types._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - if (type == "ForInStatement") { - if (init.type === "AssignmentPattern" || - (init.type === "VariableDeclaration" && init.declarations[0].init != null && - (this.strict || init.declarations[0].id.type !== "Identifier"))) - { this.raise(init.start, "Invalid assignment in for-in loop head"); } - } - node.left = init; - node.right = type == "ForInStatement" ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - this.exitLexicalScope(); - node.body = this.parseStatement(false); - this.labels.pop(); - return this.finishNode(node, type) -}; - -// Parse a list of variable declarations. - -pp$1.parseVar = function(node, isFor, kind) { - var this$1 = this; - - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this$1.startNode(); - this$1.parseVarId(decl, kind); - if (this$1.eat(types.eq)) { - decl.init = this$1.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this$1.type === types._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { - this$1.unexpected(); - } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === types._in || this$1.isContextual("of")))) { - this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")); - if (!this$1.eat(types.comma)) { break } - } - return node -}; - -pp$1.parseVarId = function(decl, kind) { - decl.id = this.parseBindingAtom(kind); - this.checkLVal(decl.id, kind, false); -}; - -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). - -pp$1.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) - { node.generator = this.eat(types.star); } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - if (isStatement) { - node.id = isStatement === "nullableID" && this.type != types.name ? null : this.parseIdent(); - if (node.id) { - this.checkLVal(node.id, "var"); - } - } - - var oldInGen = this.inGenerator, oldInAsync = this.inAsync, - oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction; - this.inGenerator = node.generator; - this.inAsync = node.async; - this.yieldPos = 0; - this.awaitPos = 0; - this.inFunction = true; - this.enterFunctionScope(); - - if (!isStatement) - { node.id = this.type == types.name ? this.parseIdent() : null; } - - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody); - - this.inGenerator = oldInGen; - this.inAsync = oldInAsync; - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.inFunction = oldInFunc; - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") -}; - -pp$1.parseFunctionParams = function(node) { - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp$1.parseClass = function(node, isStatement) { - var this$1 = this; - - this.next(); - - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - var member = this$1.parseClassMember(classBody); - if (member && member.type === "MethodDefinition" && member.kind === "constructor") { - if (hadConstructor) { this$1.raise(member.start, "Duplicate constructor in the same class"); } - hadConstructor = true; - } - } - node.body = this.finishNode(classBody, "ClassBody"); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") -}; - -pp$1.parseClassMember = function(classBody) { - var this$1 = this; - - if (this.eat(types.semi)) { return null } - - var method = this.startNode(); - var tryContextual = function (k, noLineBreak) { - if ( noLineBreak === void 0 ) noLineBreak = false; - - var start = this$1.start, startLoc = this$1.startLoc; - if (!this$1.eatContextual(k)) { return false } - if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } - if (method.key) { this$1.unexpected(); } - method.computed = false; - method.key = this$1.startNodeAt(start, startLoc); - method.key.name = k; - this$1.finishNode(method.key, "Identifier"); - return false - }; - - method.kind = "method"; - method.static = tryContextual("static"); - var isGenerator = this.eat(types.star); - var isAsync = false; - if (!isGenerator) { - if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - } else if (tryContextual("get")) { - method.kind = "get"; - } else if (tryContextual("set")) { - method.kind = "set"; - } - } - if (!method.key) { this.parsePropertyName(method); } - var key = method.key; - if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { - if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } - if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } - if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } - method.kind = "constructor"; - } else if (method.static && key.type === "Identifier" && key.name === "prototype") { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - this.parseClassMethod(classBody, method, isGenerator, isAsync); - if (method.kind === "get" && method.value.params.length !== 0) - { this.raiseRecoverable(method.value.start, "getter should have no params"); } - if (method.kind === "set" && method.value.params.length !== 1) - { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } - if (method.kind === "set" && method.value.params[0].type === "RestElement") - { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } - return method -}; - -pp$1.parseClassMethod = function(classBody, method, isGenerator, isAsync) { - method.value = this.parseMethod(isGenerator, isAsync); - classBody.body.push(this.finishNode(method, "MethodDefinition")); -}; - -pp$1.parseClassId = function(node, isStatement) { - node.id = this.type === types.name ? this.parseIdent() : isStatement === true ? this.unexpected() : null; -}; - -pp$1.parseClassSuper = function(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; -}; - -// Parses module export declaration. - -pp$1.parseExport = function(node, exports) { - var this$1 = this; - - this.next(); - // export * from '...' - if (this.eat(types.star)) { - this.expectContextual("from"); - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(types._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - if (this.type === types._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { this.next(); } - node.declaration = this.parseFunction(fNode, "nullableID", false, isAsync); - } else if (this.type === types._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(true); - if (node.declaration.type === "VariableDeclaration") - { this.checkVariableExport(exports, node.declaration.declarations); } - else - { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } - node.specifiers = []; - node.source = null; - } else { // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - if (this.eatContextual("from")) { - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - } else { - // check for keywords used as local names - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - var spec = list[i]; - - this$1.checkUnreserved(spec.local); - } - - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration") -}; - -pp$1.checkExport = function(exports, name, pos) { - if (!exports) { return } - if (has(exports, name)) - { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } - exports[name] = true; -}; - -pp$1.checkPatternExport = function(exports, pat) { - var this$1 = this; - - var type = pat.type; - if (type == "Identifier") - { this.checkExport(exports, pat.name, pat.start); } - else if (type == "ObjectPattern") - { for (var i = 0, list = pat.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this$1.checkPatternExport(exports, prop); - } } - else if (type == "ArrayPattern") - { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; - - if (elt) { this$1.checkPatternExport(exports, elt); } - } } - else if (type == "Property") - { this.checkPatternExport(exports, pat.value); } - else if (type == "AssignmentPattern") - { this.checkPatternExport(exports, pat.left); } - else if (type == "RestElement") - { this.checkPatternExport(exports, pat.argument); } - else if (type == "ParenthesizedExpression") - { this.checkPatternExport(exports, pat.expression); } -}; - -pp$1.checkVariableExport = function(exports, decls) { - var this$1 = this; - - if (!exports) { return } - for (var i = 0, list = decls; i < list.length; i += 1) - { - var decl = list[i]; - - this$1.checkPatternExport(exports, decl.id); - } -}; - -pp$1.shouldParseExportStatement = function() { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction() -}; - -// Parses a comma-separated list of module exports. - -pp$1.parseExportSpecifiers = function(exports) { - var this$1 = this; - - var nodes = [], first = true; - // export { x, y as z } [from '...'] - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node = this$1.startNode(); - node.local = this$1.parseIdent(true); - node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local; - this$1.checkExport(exports, node.exported.name, node.exported.start); - nodes.push(this$1.finishNode(node, "ExportSpecifier")); - } - return nodes -}; - -// Parses import declaration. - -pp$1.parseImport = function(node) { - this.next(); - // import '...' - if (this.type === types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration") -}; - -// Parses a comma-separated list of module imports. - -pp$1.parseImportSpecifiers = function() { - var this$1 = this; - - var nodes = [], first = true; - if (this.type === types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, "let"); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(types.comma)) { return nodes } - } - if (this.type === types.star) { - var node$1 = this.startNode(); - this.next(); - this.expectContextual("as"); - node$1.local = this.parseIdent(); - this.checkLVal(node$1.local, "let"); - nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); - return nodes - } - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node$2 = this$1.startNode(); - node$2.imported = this$1.parseIdent(true); - if (this$1.eatContextual("as")) { - node$2.local = this$1.parseIdent(); - } else { - this$1.checkUnreserved(node$2.imported); - node$2.local = node$2.imported; - } - this$1.checkLVal(node$2.local, "let"); - nodes.push(this$1.finishNode(node$2, "ImportSpecifier")); - } - return nodes -}; - -// Set `ExpressionStatement#directive` property for directive prologues. -pp$1.adaptDirectivePrologue = function(statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } -}; -pp$1.isDirectiveCandidate = function(statement) { - return ( - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - // Reject parenthesized strings. - (this.input[statement.start] === "\"" || this.input[statement.start] === "'") - ) -}; - -var pp$2 = Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { - var this$1 = this; - - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - { this.raise(node.start, "Can not use 'await' as identifier inside an async function"); } - break - - case "ObjectPattern": - case "ArrayPattern": - case "RestElement": - break - - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - this$1.toAssignable(prop, isBinding); - // Early error: - // AssignmentRestProperty[Yield, Await] : - // `...` DestructuringAssignmentTarget[Yield, Await] - // - // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. - if ( - prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") - ) { - this$1.raise(prop.argument.start, "Unexpected token"); - } - } - break - - case "Property": - // AssignmentProperty has type == "Property" - if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } - this.toAssignable(node.value, isBinding); - break - - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - this.toAssignableList(node.elements, isBinding); - break - - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") - { this.raise(node.argument.start, "Rest elements cannot have a default value"); } - break - - case "AssignmentExpression": - if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - // falls through to AssignmentPattern - - case "AssignmentPattern": - break - - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding); - break - - case "MemberExpression": - if (!isBinding) { break } - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - return node -}; - -// Convert list of expression atoms to binding list. - -pp$2.toAssignableList = function(exprList, isBinding) { - var this$1 = this; - - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { this$1.toAssignable(elt, isBinding); } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - { this.unexpected(last.argument.start); } - } - return exprList -}; - -// Parses spread element. - -pp$2.parseSpread = function(refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement") -}; - -pp$2.parseRestBinding = function() { - var node = this.startNode(); - this.next(); - - // RestElement inside of a function parameter must be an identifier - if (this.options.ecmaVersion === 6 && this.type !== types.name) - { this.unexpected(); } - - node.argument = this.parseBindingAtom(); - - return this.finishNode(node, "RestElement") -}; - -// Parses lvalue (assignable) atom. - -pp$2.parseBindingAtom = function() { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern") - - case types.braceL: - return this.parseObj(true) - } - } - return this.parseIdent() -}; - -pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { first = false; } - else { this$1.expect(types.comma); } - if (allowEmpty && this$1.type === types.comma) { - elts.push(null); - } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { - break - } else if (this$1.type === types.ellipsis) { - var rest = this$1.parseRestBinding(); - this$1.parseBindingListItem(rest); - elts.push(rest); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - this$1.expect(close); - break - } else { - var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc); - this$1.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts -}; - -pp$2.parseBindingListItem = function(param) { - return param -}; - -// Parses assignment pattern around given atom if possible. - -pp$2.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern") -}; - -// Verify that a node is an lval — something that can be assigned -// to. -// bindingType can be either: -// 'var' indicating that the lval creates a 'var' binding -// 'let' indicating that the lval creates a lexical ('let' or 'const') binding -// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references - -pp$2.checkLVal = function(expr, bindingType, checkClashes) { - var this$1 = this; - - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (checkClashes) { - if (has(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; - } - if (bindingType && bindingType !== "none") { - if ( - bindingType === "var" && !this.canDeclareVarName(expr.name) || - bindingType !== "var" && !this.canDeclareLexicalName(expr.name) - ) { - this.raiseRecoverable(expr.start, ("Identifier '" + (expr.name) + "' has already been declared")); - } - if (bindingType === "var") { - this.declareVarName(expr.name); - } else { - this.declareLexicalName(expr.name); - } - } - break - - case "MemberExpression": - if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } - break - - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this$1.checkLVal(prop, bindingType, checkClashes); - } - break - - case "Property": - // AssignmentProperty has type == "Property" - this.checkLVal(expr.value, bindingType, checkClashes); - break - - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; - - if (elem) { this$1.checkLVal(elem, bindingType, checkClashes); } - } - break - - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes); - break - - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes); - break - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes); - break - - default: - this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -var pp$3 = Parser.prototype; - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") - { return } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - { return } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } - // Backwards-compat kludge. Can be removed in version 6.0 - else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } - } - propHash.proto = true; - } - return - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } else { - redefinition = other.init || other[kind]; - } - if (redefinition) - { this.raiseRecoverable(key.start, "Redefinition of property"); } - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp$3.parseExpression = function(noIn, refDestructuringErrors) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)); } - return this.finishNode(node, "SequenceExpression") - } - return expr -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { - if (this.inGenerator && this.isContextual("yield")) { return this.parseYield() } - - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; - } else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } - - var startPos = this.start, startLoc = this.startLoc; - if (this.type == types.parenL || this.type == types.name) - { this.potentialArrowAt = this.start; } - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; - if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } - refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } - } - if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } - if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } - return left -}; - -// Parse a ternary conditional (`?:`) operator. - -pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - if (this.eat(types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression") - } - return expr -}; - -// Start the precedence parser. - -pp$3.parseExprOps = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - return expr.start == startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== types._in)) { - if (prec > minPrec) { - var logical = this.type === types.logicalOR || this.type === types.logicalAND; - var op = this.value; - this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) - } - } - return left -}; - -pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") -}; - -// Parse unary operators, both prefix and postfix. - -pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.inAsync && this.isContextual("await")) { - expr = this.parseAwait(); - sawUnary = true; - } else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLVal(node.argument); } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } - else { sawUnary = true; } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else { - expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this$1.startNodeAt(startPos, startLoc); - node$1.operator = this$1.value; - node$1.prefix = false; - node$1.argument = expr; - this$1.checkLVal(expr); - this$1.next(); - expr = this$1.finishNode(node$1, "UpdateExpression"); - } - } - - if (!sawUnary && this.eat(types.starstar)) - { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } - else - { return expr } -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp$3.parseExprSubscripts = function(refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } - var result = this.parseSubscripts(expr, startPos, startLoc); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } - if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } - } - return result -}; - -pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { - var this$1 = this; - - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd == base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - for (var computed = (void 0);;) { - if ((computed = this$1.eat(types.bracketL)) || this$1.eat(types.dot)) { - var node = this$1.startNodeAt(startPos, startLoc); - node.object = base; - node.property = computed ? this$1.parseExpression() : this$1.parseIdent(true); - node.computed = !!computed; - if (computed) { this$1.expect(types.bracketR); } - base = this$1.finishNode(node, "MemberExpression"); - } else if (!noCalls && this$1.eat(types.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos; - this$1.yieldPos = 0; - this$1.awaitPos = 0; - var exprList = this$1.parseExprList(types.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(types.arrow)) { - this$1.checkPatternErrors(refDestructuringErrors, false); - this$1.checkYieldAwaitInDefaultParams(); - this$1.yieldPos = oldYieldPos; - this$1.awaitPos = oldAwaitPos; - return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true) - } - this$1.checkExpressionErrors(refDestructuringErrors, true); - this$1.yieldPos = oldYieldPos || this$1.yieldPos; - this$1.awaitPos = oldAwaitPos || this$1.awaitPos; - var node$1 = this$1.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - base = this$1.finishNode(node$1, "CallExpression"); - } else if (this$1.type === types.backQuote) { - var node$2 = this$1.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this$1.parseTemplate({isTagged: true}); - base = this$1.finishNode(node$2, "TaggedTemplateExpression"); - } else { - return base - } - } -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp$3.parseExprAtom = function(refDestructuringErrors) { - var node, canBeArrow = this.potentialArrowAt == this.start; - switch (this.type) { - case types._super: - if (!this.inFunction) - { this.raise(this.start, "'super' outside of function or class"); } - node = this.startNode(); - this.next(); - // The `super` keyword can appear at below: - // SuperProperty: - // super [ Expression ] - // super . IdentifierName - // SuperCall: - // super Arguments - if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) - { this.unexpected(); } - return this.finishNode(node, "Super") - - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression") - - case types.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(this.type !== types.name); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) - { return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true) } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types.arrow)) - { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { - id = this.parseIdent(); - if (this.canInsertSemicolon() || !this.eat(types.arrow)) - { this.unexpected(); } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) - } - } - return id - - case types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; - return node - - case types.num: case types.string: - return this.parseLiteral(this.value) - - case types._null: case types._true: case types._false: - node = this.startNode(); - node.value = this.type === types._null ? null : this.type === types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal") - - case types.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - { refDestructuringErrors.parenthesizedAssign = start; } - if (refDestructuringErrors.parenthesizedBind < 0) - { refDestructuringErrors.parenthesizedBind = start; } - } - return expr - - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression") - - case types.braceL: - return this.parseObj(false, refDestructuringErrors) - - case types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, false) - - case types._class: - return this.parseClass(this.startNode(), false) - - case types._new: - return this.parseNew() - - case types.backQuote: - return this.parseTemplate() - - default: - this.unexpected(); - } -}; - -pp$3.parseLiteral = function(value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal") -}; - -pp$3.parseParenExpression = function() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val -}; - -pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); - - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - while (this.type !== types.parenR) { - first ? first = false : this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) { - lastIsComma = true; - break - } else if (this$1.type === types.ellipsis) { - spreadStart = this$1.start; - exprList.push(this$1.parseParenItem(this$1.parseRestBinding())); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - break - } else { - exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)); - } - } - var innerEndPos = this.start, innerEndLoc = this.startLoc; - this.expect(types.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList) - } - - if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } - if (spreadStart) { this.unexpected(spreadStart); } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } -}; - -pp$3.parseParenItem = function(item) { - return item -}; - -pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) -}; - -// New's precedence is slightly tricky. It must allow its argument to -// be a `[]` or dot subscript expression, but not a call — at least, -// not without wrapping it in parentheses. Thus, it uses the noCalls -// argument to parseSubscripts to prevent it from consuming the -// argument list. - -var empty$1 = []; - -pp$3.parseNew = function() { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target" || containsEsc) - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } - if (!this.inFunction) - { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } - return this.finishNode(node, "MetaProperty") - } - var startPos = this.start, startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); } - else { node.arguments = empty$1; } - return this.finishNode(node, "NewExpression") -}; - -// Parse template expression. - -pp$3.parseTemplateElement = function(ref) { - var isTagged = ref.isTagged; - - var elem = this.startNode(); - if (this.type === types.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value - }; - } - this.next(); - elem.tail = this.type === types.backQuote; - return this.finishNode(elem, "TemplateElement") -}; - -pp$3.parseTemplate = function(ref) { - var this$1 = this; - if ( ref === void 0 ) ref = {}; - var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; - - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({isTagged: isTagged}); - node.quasis = [curElt]; - while (!curElt.tail) { - this$1.expect(types.dollarBraceL); - node.expressions.push(this$1.parseExpression()); - this$1.expect(types.braceR); - node.quasis.push(curElt = this$1.parseTemplateElement({isTagged: isTagged})); - } - this.next(); - return this.finishNode(node, "TemplateLiteral") -}; - -pp$3.isAsyncProp = function(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; - -// Parse an object literal or binding pattern. - -pp$3.parseObj = function(isPattern, refDestructuringErrors) { - var this$1 = this; - - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var prop = this$1.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { this$1.checkPropClash(prop, propHash, refDestructuringErrors); } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") -}; - -pp$3.parseProperty = function(isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types.comma) { - this.raise(this.start, "Comma is not permitted after the rest element"); - } - return this.finishNode(prop, "RestElement") - } - // To disallow parenthesized identifier via `this.toAssignable()`. - if (this.type === types.parenL && refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0) { - refDestructuringErrors.parenthesizedAssign = this.start; - } - if (refDestructuringErrors.parenthesizedBind < 0) { - refDestructuringErrors.parenthesizedBind = this.start; - } - } - // Parse argument. - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - // To disallow trailing comma via `this.toAssignable()`. - if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; - } - // Finish - return this.finishNode(prop, "SpreadElement") - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) - { isGenerator = this.eat(types.star); } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - this.parsePropertyName(prop, refDestructuringErrors); - } else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property") -}; - -pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types.colon) - { this.unexpected(); } - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { - if (isPattern) { this.unexpected(); } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type != types.comma && this.type != types.braceR)) { - if (isGenerator || isAsync) { this.unexpected(); } - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") - { this.raiseRecoverable(start, "getter should have no params"); } - else - { this.raiseRecoverable(start, "setter should have exactly one param"); } - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - this.checkUnreserved(prop.key); - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === types.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else { this.unexpected(); } -}; - -pp$3.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - return prop.key - } else { - prop.computed = false; - } - } - return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) -}; - -// Initialize empty function node. - -pp$3.initFunction = function(node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = false; - node.expression = false; - } - if (this.options.ecmaVersion >= 8) - { node.async = false; } -}; - -// Parse object or class method. - -pp$3.parseMethod = function(isGenerator, isAsync) { - var node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync, - oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction; - - this.initFunction(node); - if (this.options.ecmaVersion >= 6) - { node.generator = isGenerator; } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.inGenerator = node.generator; - this.inAsync = node.async; - this.yieldPos = 0; - this.awaitPos = 0; - this.inFunction = true; - this.enterFunctionScope(); - - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false); - - this.inGenerator = oldInGen; - this.inAsync = oldInAsync; - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.inFunction = oldInFunc; - return this.finishNode(node, "FunctionExpression") -}; - -// Parse arrow function expression with given parameters. - -pp$3.parseArrowExpression = function(node, params, isAsync) { - var oldInGen = this.inGenerator, oldInAsync = this.inAsync, - oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction; - - this.enterFunctionScope(); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.inGenerator = false; - this.inAsync = node.async; - this.yieldPos = 0; - this.awaitPos = 0; - this.inFunction = true; - - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true); - - this.inGenerator = oldInGen; - this.inAsync = oldInAsync; - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.inFunction = oldInFunc; - return this.finishNode(node, "ArrowFunctionExpression") -}; - -// Parse function body and check parameters. - -pp$3.parseFunctionBody = function(node, isArrowFunction) { - var isExpression = isArrowFunction && this.type !== types.braceL; - var oldStrict = this.strict, useStrict = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - this.checkParams(node, false); - } else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { this.strict = true; } - - // Add the params to varDeclaredNames to ensure that an error is thrown - // if a let/const declaration in the function clashes with one of the params. - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && this.isSimpleParamList(node.params)); - node.body = this.parseBlock(false); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitFunctionScope(); - - if (this.strict && node.id) { - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - this.checkLVal(node.id, "none"); - } - this.strict = oldStrict; -}; - -pp$3.isSimpleParamList = function(params) { - for (var i = 0, list = params; i < list.length; i += 1) - { - var param = list[i]; - - if (param.type !== "Identifier") { return false - } } - return true -}; - -// Checks function params for various disallowed patterns such as using "eval" -// or "arguments" and duplicate parameters. - -pp$3.checkParams = function(node, allowDuplicates) { - var this$1 = this; - - var nameHash = {}; - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - this$1.checkLVal(param, "var", allowDuplicates ? null : nameHash); - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(close)) { break } - } else { first = false; } - - var elt = (void 0); - if (allowEmpty && this$1.type === types.comma) - { elt = null; } - else if (this$1.type === types.ellipsis) { - elt = this$1.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0) - { refDestructuringErrors.trailingComma = this$1.start; } - } else { - elt = this$1.parseMaybeAssign(false, refDestructuringErrors); - } - elts.push(elt); - } - return elts -}; - -pp$3.checkUnreserved = function(ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - - if (this.inGenerator && name === "yield") - { this.raiseRecoverable(start, "Can not use 'yield' as identifier inside a generator"); } - if (this.inAsync && name === "await") - { this.raiseRecoverable(start, "Can not use 'await' as identifier inside an async function"); } - if (this.isKeyword(name)) - { this.raise(start, ("Unexpected keyword '" + name + "'")); } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") != -1) { return } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") - { this.raiseRecoverable(start, "Can not use keyword 'await' outside an async function"); } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp$3.parseIdent = function(liberal, isBinding) { - var node = this.startNode(); - if (liberal && this.options.allowReserved == "never") { liberal = false; } - if (this.type === types.name) { - node.name = this.value; - } else if (this.type.keyword) { - node.name = this.type.keyword; - - // To fix https://github.com/acornjs/acorn/issues/575 - // `class` and `function` keywords push new context into this.context. - // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. - // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "Identifier"); - if (!liberal) { this.checkUnreserved(node); } - return node -}; - -// Parses yield expression inside generator. - -pp$3.parseYield = function() { - if (!this.yieldPos) { this.yieldPos = this.start; } - - var node = this.startNode(); - this.next(); - if (this.type == types.semi || this.canInsertSemicolon() || (this.type != types.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(); - } - return this.finishNode(node, "YieldExpression") -}; - -pp$3.parseAwait = function() { - if (!this.awaitPos) { this.awaitPos = this.start; } - - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - return this.finishNode(node, "AwaitExpression") -}; - -var pp$4 = Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp$4.raise = function(pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; err.loc = loc; err.raisedAt = this.pos; - throw err -}; - -pp$4.raiseRecoverable = pp$4.raise; - -pp$4.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } -}; - -var pp$5 = Parser.prototype; - -// Object.assign polyfill -var assign = Object.assign || function(target) { - var sources = [], len = arguments.length - 1; - while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; - - for (var i = 0, list = sources; i < list.length; i += 1) { - var source = list[i]; - - for (var key in source) { - if (has(source, key)) { - target[key] = source[key]; - } - } - } - return target -}; - -// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. - -pp$5.enterFunctionScope = function() { - // var: a hash of var-declared names in the current lexical scope - // lexical: a hash of lexically-declared names in the current lexical scope - // childVar: a hash of var-declared names in all child lexical scopes of the current lexical scope (within the current function scope) - // parentLexical: a hash of lexically-declared names in all parent lexical scopes of the current lexical scope (within the current function scope) - this.scopeStack.push({var: {}, lexical: {}, childVar: {}, parentLexical: {}}); -}; - -pp$5.exitFunctionScope = function() { - this.scopeStack.pop(); -}; - -pp$5.enterLexicalScope = function() { - var parentScope = this.scopeStack[this.scopeStack.length - 1]; - var childScope = {var: {}, lexical: {}, childVar: {}, parentLexical: {}}; - - this.scopeStack.push(childScope); - assign(childScope.parentLexical, parentScope.lexical, parentScope.parentLexical); -}; - -pp$5.exitLexicalScope = function() { - var childScope = this.scopeStack.pop(); - var parentScope = this.scopeStack[this.scopeStack.length - 1]; - - assign(parentScope.childVar, childScope.var, childScope.childVar); -}; - -/** - * A name can be declared with `var` if there are no variables with the same name declared with `let`/`const` - * in the current lexical scope or any of the parent lexical scopes in this function. - */ -pp$5.canDeclareVarName = function(name) { - var currentScope = this.scopeStack[this.scopeStack.length - 1]; - - return !has(currentScope.lexical, name) && !has(currentScope.parentLexical, name) -}; - -/** - * A name can be declared with `let`/`const` if there are no variables with the same name declared with `let`/`const` - * in the current scope, and there are no variables with the same name declared with `var` in the current scope or in - * any child lexical scopes in this function. - */ -pp$5.canDeclareLexicalName = function(name) { - var currentScope = this.scopeStack[this.scopeStack.length - 1]; - - return !has(currentScope.lexical, name) && !has(currentScope.var, name) && !has(currentScope.childVar, name) -}; - -pp$5.declareVarName = function(name) { - this.scopeStack[this.scopeStack.length - 1].var[name] = true; -}; - -pp$5.declareLexicalName = function(name) { - this.scopeStack[this.scopeStack.length - 1].lexical[name] = true; -}; - -var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) - { this.loc = new SourceLocation(parser, loc); } - if (parser.options.directSourceFile) - { this.sourceFile = parser.options.directSourceFile; } - if (parser.options.ranges) - { this.range = [pos, 0]; } -}; - -// Start an AST node, attaching a start offset. - -var pp$6 = Parser.prototype; - -pp$6.startNode = function() { - return new Node(this, this.start, this.startLoc) -}; - -pp$6.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) -}; - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) - { node.loc.end = loc; } - if (this.options.ranges) - { node.range[1] = pos; } - return node -} - -pp$6.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) -}; - -// Finish node at given position - -pp$6.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) -}; - -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; -}; - -var types$1 = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) -}; - -var pp$7 = Parser.prototype; - -pp$7.initialContext = function() { - return [types$1.b_stat] -}; - -pp$7.braceIsBlock = function(prevType) { - var parent = this.curContext(); - if (parent === types$1.f_expr || parent === types$1.f_stat) - { return true } - if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) - { return !parent.isExpr } - - // The check for `tt.name && exprAllowed` detects whether we are - // after a `yield` or `of` construct. See the `updateContext` for - // `tt.name`. - if (prevType === types._return || prevType == types.name && this.exprAllowed) - { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType == types.arrow) - { return true } - if (prevType == types.braceL) - { return parent === types$1.b_stat } - if (prevType == types._var || prevType == types.name) - { return false } - return !this.exprAllowed -}; - -pp$7.inGeneratorContext = function() { - var this$1 = this; - - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this$1.context[i]; - if (context.token === "function") - { return context.generator } - } - return false -}; - -pp$7.updateContext = function(prevType) { - var update, type = this.type; - if (type.keyword && prevType == types.dot) - { this.exprAllowed = false; } - else if (update = type.updateContext) - { update.call(this, prevType); } - else - { this.exprAllowed = type.beforeExpr; } -}; - -// Token-specific context update code - -types.parenR.updateContext = types.braceR.updateContext = function() { - if (this.context.length == 1) { - this.exprAllowed = true; - return - } - var out = this.context.pop(); - if (out === types$1.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; -}; - -types.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); - this.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function() { - this.context.push(types$1.b_tmpl); - this.exprAllowed = true; -}; - -types.parenL.updateContext = function(prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); - this.exprAllowed = true; -}; - -types.incDec.updateContext = function() { - // tokExprAllowed stays unchanged -}; - -types._function.updateContext = types._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && - !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) - { this.context.push(types$1.f_expr); } - else - { this.context.push(types$1.f_stat); } - this.exprAllowed = false; -}; - -types.backQuote.updateContext = function() { - if (this.curContext() === types$1.q_tmpl) - { this.context.pop(); } - else - { this.context.push(types$1.q_tmpl); } - this.exprAllowed = false; -}; - -types.star.updateContext = function(prevType) { - if (prevType == types._function) { - var index = this.context.length - 1; - if (this.context[index] === types$1.f_expr) - { this.context[index] = types$1.f_expr_gen; } - else - { this.context[index] = types$1.f_gen; } - } - this.exprAllowed = true; -}; - -types.name.updateContext = function(prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6) { - if (this.value == "of" && !this.exprAllowed || - this.value == "yield" && this.inGeneratorContext()) - { allowed = true; } - } - this.exprAllowed = allowed; -}; - -var data = { - "$LONE": [ - "ASCII", - "ASCII_Hex_Digit", - "AHex", - "Alphabetic", - "Alpha", - "Any", - "Assigned", - "Bidi_Control", - "Bidi_C", - "Bidi_Mirrored", - "Bidi_M", - "Case_Ignorable", - "CI", - "Cased", - "Changes_When_Casefolded", - "CWCF", - "Changes_When_Casemapped", - "CWCM", - "Changes_When_Lowercased", - "CWL", - "Changes_When_NFKC_Casefolded", - "CWKCF", - "Changes_When_Titlecased", - "CWT", - "Changes_When_Uppercased", - "CWU", - "Dash", - "Default_Ignorable_Code_Point", - "DI", - "Deprecated", - "Dep", - "Diacritic", - "Dia", - "Emoji", - "Emoji_Component", - "Emoji_Modifier", - "Emoji_Modifier_Base", - "Emoji_Presentation", - "Extender", - "Ext", - "Grapheme_Base", - "Gr_Base", - "Grapheme_Extend", - "Gr_Ext", - "Hex_Digit", - "Hex", - "IDS_Binary_Operator", - "IDSB", - "IDS_Trinary_Operator", - "IDST", - "ID_Continue", - "IDC", - "ID_Start", - "IDS", - "Ideographic", - "Ideo", - "Join_Control", - "Join_C", - "Logical_Order_Exception", - "LOE", - "Lowercase", - "Lower", - "Math", - "Noncharacter_Code_Point", - "NChar", - "Pattern_Syntax", - "Pat_Syn", - "Pattern_White_Space", - "Pat_WS", - "Quotation_Mark", - "QMark", - "Radical", - "Regional_Indicator", - "RI", - "Sentence_Terminal", - "STerm", - "Soft_Dotted", - "SD", - "Terminal_Punctuation", - "Term", - "Unified_Ideograph", - "UIdeo", - "Uppercase", - "Upper", - "Variation_Selector", - "VS", - "White_Space", - "space", - "XID_Continue", - "XIDC", - "XID_Start", - "XIDS" - ], - "General_Category": [ - "Cased_Letter", - "LC", - "Close_Punctuation", - "Pe", - "Connector_Punctuation", - "Pc", - "Control", - "Cc", - "cntrl", - "Currency_Symbol", - "Sc", - "Dash_Punctuation", - "Pd", - "Decimal_Number", - "Nd", - "digit", - "Enclosing_Mark", - "Me", - "Final_Punctuation", - "Pf", - "Format", - "Cf", - "Initial_Punctuation", - "Pi", - "Letter", - "L", - "Letter_Number", - "Nl", - "Line_Separator", - "Zl", - "Lowercase_Letter", - "Ll", - "Mark", - "M", - "Combining_Mark", - "Math_Symbol", - "Sm", - "Modifier_Letter", - "Lm", - "Modifier_Symbol", - "Sk", - "Nonspacing_Mark", - "Mn", - "Number", - "N", - "Open_Punctuation", - "Ps", - "Other", - "C", - "Other_Letter", - "Lo", - "Other_Number", - "No", - "Other_Punctuation", - "Po", - "Other_Symbol", - "So", - "Paragraph_Separator", - "Zp", - "Private_Use", - "Co", - "Punctuation", - "P", - "punct", - "Separator", - "Z", - "Space_Separator", - "Zs", - "Spacing_Mark", - "Mc", - "Surrogate", - "Cs", - "Symbol", - "S", - "Titlecase_Letter", - "Lt", - "Unassigned", - "Cn", - "Uppercase_Letter", - "Lu" - ], - "Script": [ - "Adlam", - "Adlm", - "Ahom", - "Anatolian_Hieroglyphs", - "Hluw", - "Arabic", - "Arab", - "Armenian", - "Armn", - "Avestan", - "Avst", - "Balinese", - "Bali", - "Bamum", - "Bamu", - "Bassa_Vah", - "Bass", - "Batak", - "Batk", - "Bengali", - "Beng", - "Bhaiksuki", - "Bhks", - "Bopomofo", - "Bopo", - "Brahmi", - "Brah", - "Braille", - "Brai", - "Buginese", - "Bugi", - "Buhid", - "Buhd", - "Canadian_Aboriginal", - "Cans", - "Carian", - "Cari", - "Caucasian_Albanian", - "Aghb", - "Chakma", - "Cakm", - "Cham", - "Cherokee", - "Cher", - "Common", - "Zyyy", - "Coptic", - "Copt", - "Qaac", - "Cuneiform", - "Xsux", - "Cypriot", - "Cprt", - "Cyrillic", - "Cyrl", - "Deseret", - "Dsrt", - "Devanagari", - "Deva", - "Duployan", - "Dupl", - "Egyptian_Hieroglyphs", - "Egyp", - "Elbasan", - "Elba", - "Ethiopic", - "Ethi", - "Georgian", - "Geor", - "Glagolitic", - "Glag", - "Gothic", - "Goth", - "Grantha", - "Gran", - "Greek", - "Grek", - "Gujarati", - "Gujr", - "Gurmukhi", - "Guru", - "Han", - "Hani", - "Hangul", - "Hang", - "Hanunoo", - "Hano", - "Hatran", - "Hatr", - "Hebrew", - "Hebr", - "Hiragana", - "Hira", - "Imperial_Aramaic", - "Armi", - "Inherited", - "Zinh", - "Qaai", - "Inscriptional_Pahlavi", - "Phli", - "Inscriptional_Parthian", - "Prti", - "Javanese", - "Java", - "Kaithi", - "Kthi", - "Kannada", - "Knda", - "Katakana", - "Kana", - "Kayah_Li", - "Kali", - "Kharoshthi", - "Khar", - "Khmer", - "Khmr", - "Khojki", - "Khoj", - "Khudawadi", - "Sind", - "Lao", - "Laoo", - "Latin", - "Latn", - "Lepcha", - "Lepc", - "Limbu", - "Limb", - "Linear_A", - "Lina", - "Linear_B", - "Linb", - "Lisu", - "Lycian", - "Lyci", - "Lydian", - "Lydi", - "Mahajani", - "Mahj", - "Malayalam", - "Mlym", - "Mandaic", - "Mand", - "Manichaean", - "Mani", - "Marchen", - "Marc", - "Masaram_Gondi", - "Gonm", - "Meetei_Mayek", - "Mtei", - "Mende_Kikakui", - "Mend", - "Meroitic_Cursive", - "Merc", - "Meroitic_Hieroglyphs", - "Mero", - "Miao", - "Plrd", - "Modi", - "Mongolian", - "Mong", - "Mro", - "Mroo", - "Multani", - "Mult", - "Myanmar", - "Mymr", - "Nabataean", - "Nbat", - "New_Tai_Lue", - "Talu", - "Newa", - "Nko", - "Nkoo", - "Nushu", - "Nshu", - "Ogham", - "Ogam", - "Ol_Chiki", - "Olck", - "Old_Hungarian", - "Hung", - "Old_Italic", - "Ital", - "Old_North_Arabian", - "Narb", - "Old_Permic", - "Perm", - "Old_Persian", - "Xpeo", - "Old_South_Arabian", - "Sarb", - "Old_Turkic", - "Orkh", - "Oriya", - "Orya", - "Osage", - "Osge", - "Osmanya", - "Osma", - "Pahawh_Hmong", - "Hmng", - "Palmyrene", - "Palm", - "Pau_Cin_Hau", - "Pauc", - "Phags_Pa", - "Phag", - "Phoenician", - "Phnx", - "Psalter_Pahlavi", - "Phlp", - "Rejang", - "Rjng", - "Runic", - "Runr", - "Samaritan", - "Samr", - "Saurashtra", - "Saur", - "Sharada", - "Shrd", - "Shavian", - "Shaw", - "Siddham", - "Sidd", - "SignWriting", - "Sgnw", - "Sinhala", - "Sinh", - "Sora_Sompeng", - "Sora", - "Soyombo", - "Soyo", - "Sundanese", - "Sund", - "Syloti_Nagri", - "Sylo", - "Syriac", - "Syrc", - "Tagalog", - "Tglg", - "Tagbanwa", - "Tagb", - "Tai_Le", - "Tale", - "Tai_Tham", - "Lana", - "Tai_Viet", - "Tavt", - "Takri", - "Takr", - "Tamil", - "Taml", - "Tangut", - "Tang", - "Telugu", - "Telu", - "Thaana", - "Thaa", - "Thai", - "Tibetan", - "Tibt", - "Tifinagh", - "Tfng", - "Tirhuta", - "Tirh", - "Ugaritic", - "Ugar", - "Vai", - "Vaii", - "Warang_Citi", - "Wara", - "Yi", - "Yiii", - "Zanabazar_Square", - "Zanb" - ] -}; -Array.prototype.push.apply(data.$LONE, data.General_Category); -data.gc = data.General_Category; -data.sc = data.Script_Extensions = data.scx = data.Script; - -var pp$9 = Parser.prototype; - -var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; -}; - -RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; -}; - -RegExpValidationState.prototype.raise = function raise (message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); -}; - -// If u flag is given, this returns the code point at the index (it combines a surrogate pair). -// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). -RegExpValidationState.prototype.at = function at (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return -1 - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c - } - return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 -}; - -RegExpValidationState.prototype.nextIndex = function nextIndex (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return l - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return i + 1 - } - return i + 2 -}; - -RegExpValidationState.prototype.current = function current () { - return this.at(this.pos) -}; - -RegExpValidationState.prototype.lookahead = function lookahead () { - return this.at(this.nextIndex(this.pos)) -}; - -RegExpValidationState.prototype.advance = function advance () { - this.pos = this.nextIndex(this.pos); -}; - -RegExpValidationState.prototype.eat = function eat (ch) { - if (this.current() === ch) { - this.advance(); - return true - } - return false -}; - -function codePointToString$1(ch) { - if (ch <= 0xFFFF) { return String.fromCharCode(ch) } - ch -= 0x10000; - return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) -} - -/** - * Validate the flags part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpFlags = function(state) { - var this$1 = this; - - var validFlags = state.validFlags; - var flags = state.flags; - - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) == -1) { - this$1.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this$1.raise(state.start, "Duplicate regular expression flag"); - } - } -}; - -/** - * Validate the pattern part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpPattern = function(state) { - this.regexp_pattern(state); - - // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of - // parsing contains a |GroupName|, reparse with the goal symbol - // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* - // exception if _P_ did not conform to the grammar, if any elements of _P_ - // were not matched by the parse, or if any Early Error conditions exist. - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern -pp$9.regexp_pattern = function(state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - - this.regexp_disjunction(state); - - if (state.pos !== state.source.length) { - // Make the same messages as V8. - if (state.eat(0x29 /* ) */)) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { - state.raise("Lone quantifier brackets"); - } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; - - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); - } - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction -pp$9.regexp_disjunction = function(state) { - var this$1 = this; - - this.regexp_alternative(state); - while (state.eat(0x7C /* | */)) { - this$1.regexp_alternative(state); - } - - // Make the same message as V8. - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B /* { */)) { - state.raise("Lone quantifier brackets"); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative -pp$9.regexp_alternative = function(state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) - { } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term -pp$9.regexp_eatTerm = function(state) { - if (this.regexp_eatAssertion(state)) { - // Handle `QuantifiableAssertion Quantifier` alternative. - // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion - // is a QuantifiableAssertion. - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - // Make the same message as V8. - if (state.switchU) { - state.raise("Invalid quantifier"); - } - } - return true - } - - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true - } - - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion -pp$9.regexp_eatAssertion = function(state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; - - // ^, $ - if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { - return true - } - - // \b \B - if (state.eat(0x5C /* \ */)) { - if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { - return true - } - state.pos = start; - } - - // Lookahead / Lookbehind - if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C /* < */); - } - if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { - this.regexp_disjunction(state); - if (!state.eat(0x29 /* ) */)) { - state.raise("Unterminated group"); - } - state.lastAssertionIsQuantifiable = !lookbehind; - return true - } - } - - state.pos = start; - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier -pp$9.regexp_eatQuantifier = function(state, noError) { - if ( noError === void 0 ) noError = false; - - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F /* ? */); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix -pp$9.regexp_eatQuantifierPrefix = function(state, noError) { - return ( - state.eat(0x2A /* * */) || - state.eat(0x2B /* + */) || - state.eat(0x3F /* ? */) || - this.regexp_eatBracedQuantifier(state, noError) - ) -}; -pp$9.regexp_eatBracedQuantifier = function(state, noError) { - var start = state.pos; - if (state.eat(0x7B /* { */)) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; - } - if (state.eat(0x7D /* } */)) { - // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } - return true - } - } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); - } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom -pp$9.regexp_eatAtom = function(state) { - return ( - this.regexp_eatPatternCharacters(state) || - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) - ) -}; -pp$9.regexp_eatReverseSolidusAtomEscape = function(state) { - var start = state.pos; - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatAtomEscape(state)) { - return true - } - state.pos = start; - } - return false -}; -pp$9.regexp_eatUncapturingGroup = function(state) { - var start = state.pos; - if (state.eat(0x28 /* ( */)) { - if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - return true - } - state.raise("Unterminated group"); - } - state.pos = start; - } - return false -}; -pp$9.regexp_eatCapturingGroup = function(state) { - if (state.eat(0x28 /* ( */)) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } else if (state.current() === 0x3F /* ? */) { - state.raise("Invalid group"); - } - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - state.numCapturingParens += 1; - return true - } - state.raise("Unterminated group"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom -pp$9.regexp_eatExtendedAtom = function(state) { - return ( - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier -pp$9.regexp_eatInvalidBracedQuantifier = function(state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter -pp$9.regexp_eatSyntaxCharacter = function(state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true - } - return false -}; -function isSyntaxCharacter(ch) { - return ( - ch === 0x24 /* $ */ || - ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || - ch === 0x2E /* . */ || - ch === 0x3F /* ? */ || - ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || - ch >= 0x7B /* { */ && ch <= 0x7D /* } */ - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter -// But eat eager. -pp$9.regexp_eatPatternCharacters = function(state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter -pp$9.regexp_eatExtendedPatternCharacter = function(state) { - var ch = state.current(); - if ( - ch !== -1 && - ch !== 0x24 /* $ */ && - !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && - ch !== 0x2E /* . */ && - ch !== 0x3F /* ? */ && - ch !== 0x5B /* [ */ && - ch !== 0x5E /* ^ */ && - ch !== 0x7C /* | */ - ) { - state.advance(); - return true - } - return false -}; - -// GroupSpecifier[U] :: -// [empty] -// `?` GroupName[?U] -pp$9.regexp_groupSpecifier = function(state) { - if (state.eat(0x3F /* ? */)) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return - } - state.raise("Invalid group"); - } -}; - -// GroupName[U] :: -// `<` RegExpIdentifierName[?U] `>` -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatGroupName = function(state) { - state.lastStringValue = ""; - if (state.eat(0x3C /* < */)) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { - return true - } - state.raise("Invalid capture group name"); - } - return false -}; - -// RegExpIdentifierName[U] :: -// RegExpIdentifierStart[?U] -// RegExpIdentifierName[?U] RegExpIdentifierPart[?U] -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatRegExpIdentifierName = function(state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); - } - return true - } - return false -}; - -// RegExpIdentifierStart[U] :: -// UnicodeIDStart -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -pp$9.regexp_eatRegExpIdentifierStart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true - } - - state.pos = start; - return false -}; -function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ -} - -// RegExpIdentifierPart[U] :: -// UnicodeIDContinue -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -// -// -pp$9.regexp_eatRegExpIdentifierPart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true - } - - state.pos = start; - return false -}; -function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape -pp$9.regexp_eatAtomEscape = function(state) { - if ( - this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state)) - ) { - return true - } - if (state.switchU) { - // Make the same message as V8. - if (state.current() === 0x63 /* c */) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false -}; -pp$9.regexp_eatBackReference = function(state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; - if (state.switchU) { - // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape - if (n > state.maxBackReference) { - state.maxBackReference = n; - } - return true - } - if (n <= state.numCapturingParens) { - return true - } - state.pos = start; - } - return false -}; -pp$9.regexp_eatKGroupName = function(state) { - if (state.eat(0x6B /* k */)) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); - return true - } - state.raise("Invalid named reference"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape -pp$9.regexp_eatCharacterEscape = function(state) { - return ( - this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state) - ) -}; -pp$9.regexp_eatCControlLetter = function(state) { - var start = state.pos; - if (state.eat(0x63 /* c */)) { - if (this.regexp_eatControlLetter(state)) { - return true - } - state.pos = start; - } - return false -}; -pp$9.regexp_eatZero = function(state) { - if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape -pp$9.regexp_eatControlEscape = function(state) { - var ch = state.current(); - if (ch === 0x74 /* t */) { - state.lastIntValue = 0x09; /* \t */ - state.advance(); - return true - } - if (ch === 0x6E /* n */) { - state.lastIntValue = 0x0A; /* \n */ - state.advance(); - return true - } - if (ch === 0x76 /* v */) { - state.lastIntValue = 0x0B; /* \v */ - state.advance(); - return true - } - if (ch === 0x66 /* f */) { - state.lastIntValue = 0x0C; /* \f */ - state.advance(); - return true - } - if (ch === 0x72 /* r */) { - state.lastIntValue = 0x0D; /* \r */ - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter -pp$9.regexp_eatControlLetter = function(state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; -function isControlLetter(ch) { - return ( - (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || - (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence -pp$9.regexp_eatRegExpUnicodeEscapeSequence = function(state) { - var start = state.pos; - - if (state.eat(0x75 /* u */)) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } - return true - } - if ( - state.switchU && - state.eat(0x7B /* { */) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D /* } */) && - isValidUnicode(state.lastIntValue) - ) { - return true - } - if (state.switchU) { - state.raise("Invalid unicode escape"); - } - state.pos = start; - } - - return false -}; -function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape -pp$9.regexp_eatIdentityEscape = function(state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true - } - if (state.eat(0x2F /* / */)) { - state.lastIntValue = 0x2F; /* / */ - return true - } - return false - } - - var ch = state.current(); - if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { - state.lastIntValue = ch; - state.advance(); - return true - } - - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape -pp$9.regexp_eatDecimalEscape = function(state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape -pp$9.regexp_eatCharacterClassEscape = function(state) { - var ch = state.current(); - - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return true - } - - if ( - state.switchU && - this.options.ecmaVersion >= 9 && - (ch === 0x50 /* P */ || ch === 0x70 /* p */) - ) { - state.lastIntValue = -1; - state.advance(); - if ( - state.eat(0x7B /* { */) && - this.regexp_eatUnicodePropertyValueExpression(state) && - state.eat(0x7D /* } */) - ) { - return true - } - state.raise("Invalid property name"); - } - - return false -}; -function isCharacterClassEscape(ch) { - return ( - ch === 0x64 /* d */ || - ch === 0x44 /* D */ || - ch === 0x73 /* s */ || - ch === 0x53 /* S */ || - ch === 0x77 /* w */ || - ch === 0x57 /* W */ - ) -} - -// UnicodePropertyValueExpression :: -// UnicodePropertyName `=` UnicodePropertyValue -// LoneUnicodePropertyNameOrValue -pp$9.regexp_eatUnicodePropertyValueExpression = function(state) { - var start = state.pos; - - // UnicodePropertyName `=` UnicodePropertyValue - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return true - } - } - state.pos = start; - - // LoneUnicodePropertyNameOrValue - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - return true - } - return false -}; -pp$9.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { - if (!data.hasOwnProperty(name) || data[name].indexOf(value) === -1) { - state.raise("Invalid property name"); - } -}; -pp$9.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { - if (data.$LONE.indexOf(nameOrValue) === -1) { - state.raise("Invalid property name"); - } -}; - -// UnicodePropertyName :: -// UnicodePropertyNameCharacters -pp$9.regexp_eatUnicodePropertyName = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F /* _ */ -} - -// UnicodePropertyValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatUnicodePropertyValue = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) -} - -// LoneUnicodePropertyNameOrValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { - return this.regexp_eatUnicodePropertyValue(state) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass -pp$9.regexp_eatCharacterClass = function(state) { - if (state.eat(0x5B /* [ */)) { - state.eat(0x5E /* ^ */); - this.regexp_classRanges(state); - if (state.eat(0x5D /* [ */)) { - return true - } - // Unreachable since it threw "unterminated regular expression" error before. - state.raise("Unterminated character class"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash -pp$9.regexp_classRanges = function(state) { - var this$1 = this; - - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D /* - */) && this$1.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); - } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); - } - } - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash -pp$9.regexp_eatClassAtom = function(state) { - var start = state.pos; - - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatClassEscape(state)) { - return true - } - if (state.switchU) { - // Make the same message as V8. - var ch$1 = state.current(); - if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); - } - state.pos = start; - } - - var ch = state.current(); - if (ch !== 0x5D /* [ */) { - state.lastIntValue = ch; - state.advance(); - return true - } - - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape -pp$9.regexp_eatClassEscape = function(state) { - var start = state.pos; - - if (state.eat(0x62 /* b */)) { - state.lastIntValue = 0x08; /* */ - return true - } - - if (state.switchU && state.eat(0x2D /* - */)) { - state.lastIntValue = 0x2D; /* - */ - return true - } - - if (!state.switchU && state.eat(0x63 /* c */)) { - if (this.regexp_eatClassControlLetter(state)) { - return true - } - state.pos = start; - } - - return ( - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter -pp$9.regexp_eatClassControlLetter = function(state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatHexEscapeSequence = function(state) { - var start = state.pos; - if (state.eat(0x78 /* x */)) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true - } - if (state.switchU) { - state.raise("Invalid escape"); - } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits -pp$9.regexp_eatDecimalDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } - return state.pos !== start -}; -function isDecimalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits -pp$9.regexp_eatHexDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start -}; -function isHexDigit(ch) { - return ( - (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || - (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || - (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) - ) -} -function hexToInt(ch) { - if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { - return 10 + (ch - 0x41 /* A */) - } - if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { - return 10 + (ch - 0x61 /* a */) - } - return ch - 0x30 /* 0 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence -// Allows only 0-377(octal) i.e. 0-255(decimal). -pp$9.regexp_eatLegacyOctalEscapeSequence = function(state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; - if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; - } else { - state.lastIntValue = n1 * 8 + n2; - } - } else { - state.lastIntValue = n1; - } - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit -pp$9.regexp_eatOctalDigit = function(state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; /* 0 */ - state.advance(); - return true - } - state.lastIntValue = 0; - return false -}; -function isOctalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit -// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatFixedHexDigits = function(state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { - var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false - } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return true -}; - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) - { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } - if (p.options.ranges) - { this.range = [p.start, p.end]; } -}; - -// ## Tokenizer - -var pp$8 = Parser.prototype; - -// Move to the next token - -pp$8.next = function() { - if (this.options.onToken) - { this.options.onToken(new Token(this)); } - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp$8.getToken = function() { - this.next(); - return new Token(this) -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") - { pp$8[Symbol.iterator] = function() { - var this$1 = this; - - return { - next: function () { - var token = this$1.getToken(); - return { - done: token.type === types.eof, - value: token - } - } - } - }; } - -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). - -pp$8.curContext = function() { - return this.context[this.context.length - 1] -}; - -// Read a single token, updating the parser object's token-related -// properties. - -pp$8.nextToken = function() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } - - this.start = this.pos; - if (this.options.locations) { this.startLoc = this.curPosition(); } - if (this.pos >= this.input.length) { return this.finishToken(types.eof) } - - if (curContext.override) { return curContext.override(this) } - else { this.readToken(this.fullCharCodeAtPos()); } -}; - -pp$8.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - { return this.readWord() } - - return this.getTokenFromCode(code) -}; - -pp$8.fullCharCodeAtPos = function() { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) { return code } - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00 -}; - -pp$8.skipBlockComment = function() { - var this$1 = this; - - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this$1.curLine; - this$1.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) - { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()); } -}; - -pp$8.skipLineComment = function(startSkip) { - var this$1 = this; - - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this$1.input.charCodeAt(++this$1.pos); - } - if (this.options.onComment) - { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()); } -}; - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - -pp$8.skipSpace = function() { - var this$1 = this; - - loop: while (this.pos < this.input.length) { - var ch = this$1.input.charCodeAt(this$1.pos); - switch (ch) { - case 32: case 160: // ' ' - ++this$1.pos; - break - case 13: - if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { - ++this$1.pos; - } - case 10: case 8232: case 8233: - ++this$1.pos; - if (this$1.options.locations) { - ++this$1.curLine; - this$1.lineStart = this$1.pos; - } - break - case 47: // '/' - switch (this$1.input.charCodeAt(this$1.pos + 1)) { - case 42: // '*' - this$1.skipBlockComment(); - break - case 47: - this$1.skipLineComment(2); - break - default: - break loop - } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this$1.pos; - } else { - break loop - } - } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp$8.finishToken = function(type, val) { - this.end = this.pos; - if (this.options.locations) { this.endLoc = this.curPosition(); } - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp$8.readToken_dot = function() { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { return this.readNumber(true) } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3; - return this.finishToken(types.ellipsis) - } else { - ++this.pos; - return this.finishToken(types.dot) - } -}; - -pp$8.readToken_slash = function() { // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { ++this.pos; return this.readRegexp() } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.slash, 1) -}; - -pp$8.readToken_mult_modulo_exp = function(code) { // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types.star : types.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && code == 42 && next === 42) { - ++size; - tokentype = types.starstar; - next = this.input.charCodeAt(this.pos + 2); - } - - if (next === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(tokentype, size) -}; - -pp$8.readToken_pipe_amp = function(code) { // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) -}; - -pp$8.readToken_caret = function() { // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.bitwiseXOR, 1) -}; - -pp$8.readToken_plus_min = function(code) { // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next == 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) == 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types.incDec, 2) - } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.plusMin, 1) -}; - -pp$8.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(types.bitShift, size) - } - if (next == 33 && code == 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - // `` line comment this.skipLineComment(3); @@ -4802,8 +4497,8 @@ pp$8.readToken_lt_gt = function(code) { // '<>' if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } return this.finishOp(types.bitShift, size) } - if (next == 33 && code == 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types.incDec, 2) + } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) +}; + +pp$8.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // ` - -- [Boom](#boom) - - [Helper Methods](#helper-methods) - - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message) - - [`create(statusCode, [message], [data])`](#createstatuscode-message-data) - - [HTTP 4xx Errors](#http-4xx-errors) - - [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data) - - [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes) - - [`Boom.paymentRequired([message], [data])`](#boompaymentrequiredmessage-data) - - [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data) - - [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data) - - [`Boom.methodNotAllowed([message], [data], [allow])`](#boommethodnotallowedmessage-data-allow) - - [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data) - - [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data) - - [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data) - - [`Boom.conflict([message], [data])`](#boomconflictmessage-data) - - [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data) - - [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data) - - [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data) - - [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data) - - [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data) - - [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data) - - [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data) - - [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data) - - [`Boom.teapot([message], [data])`](#boomteapotmessage-data) - - [`Boom.badData([message], [data])`](#boombaddatamessage-data) - - [`Boom.locked([message], [data])`](#boomlockedmessage-data) - - [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data) - - [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data) - - [`Boom.illegal([message], [data])`](#boomillegalmessage-data) - - [HTTP 5xx Errors](#http-5xx-errors) - - [`Boom.badImplementation([message], [data])` - (*alias: `internal`*)](#boombadimplementationmessage-data---alias-internal) - - [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data) - - [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data) - - [`Boom.serverUnavailable([message], [data])`](#boomserverunavailablemessage-data) - - [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data) - - [F.A.Q.](#faq) - - - -# Boom - -**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response -object (instance of `Error`) which includes the following properties: -- `isBoom` - if `true`, indicates this is a `Boom` object instance. -- `isServer` - convenience bool indicating status code >= 500. -- `message` - the error message. -- `output` - the formatted response. Can be directly manipulated after object construction to return a custom - error response. Allowed root keys: - - `statusCode` - the HTTP status code (typically 4xx or 5xx). - - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content. - - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any - changes will be lost - if `reformat()` is called. Any content allowed and by default includes the following content: - - `statusCode` - the HTTP status code, derived from `error.output.statusCode`. - - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`. - - `message` - the error message derived from `error.message`. -- inherited `Error` properties. - -The `Boom` object also supports the following method: -- `reformat()` - rebuilds `error.output` using the other object properties. - -## Helper Methods - -### `wrap(error, [statusCode], [message])` - -Decorates an error with the **boom** properties where: -- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object. -- `statusCode` - optional HTTP status code. Defaults to `500`. -- `message` - optional message string. If the error already has a message, it adds the message as a prefix. - Defaults to no message. - -```js -var error = new Error('Unexpected input'); -Boom.wrap(error, 400); -``` - -### `create(statusCode, [message], [data])` - -Generates an `Error` object with the **boom** decorations where: -- `statusCode` - an HTTP error code number. Must be greater or equal 400. -- `message` - optional message string. -- `data` - additional error data set to `error.data` property. - -```js -var error = Boom.create(400, 'Bad request', { timestamp: Date.now() }); -``` - -## HTTP 4xx Errors - -### `Boom.badRequest([message], [data])` - -Returns a 400 Bad Request error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badRequest('invalid query'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 400, - "error": "Bad Request", - "message": "invalid query" -} -``` - -### `Boom.unauthorized([message], [scheme], [attributes])` - -Returns a 401 Unauthorized error where: -- `message` - optional message. -- `scheme` can be one of the following: - - an authentication scheme name - - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header. -- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used - when `scheme` is a string, otherwise it is ignored. Every key/value pair will be included in the - 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key. Alternatively value can be a string which is use to set the value of the scheme, for example setting the token value for negotiate header. If string is used message parameter must be null. - `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as - the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header - will not be present and `isMissing` will be true on the error object. - -If either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response. - -```js -Boom.unauthorized('invalid password'); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password" -}, -"headers" {} -``` - -```js -Boom.unauthorized('invalid password', 'sample'); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password", - "attributes": { - "error": "invalid password" - } -}, -"headers" { - "WWW-Authenticate": "sample error=\"invalid password\"" -} -``` - -```js -Boom.unauthorized(null, 'Negotiate', 'VGhpcyBpcyBhIHRlc3QgdG9rZW4='); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "attributes": "VGhpcyBpcyBhIHRlc3QgdG9rZW4=" -}, -"headers" { - "WWW-Authenticate": "Negotiate VGhpcyBpcyBhIHRlc3QgdG9rZW4=" -} -``` - -```js -Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' }); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password", - "attributes": { - "error": "invalid password", - "ttl": 0, - "cache": "", - "foo": "bar" - } -}, -"headers" { - "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", error=\"invalid password\"" -} -``` - -### `Boom.paymentRequired([message], [data])` - -Returns a 402 Payment Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.paymentRequired('bandwidth used'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 402, - "error": "Payment Required", - "message": "bandwidth used" -} -``` - -### `Boom.forbidden([message], [data])` - -Returns a 403 Forbidden error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.forbidden('try again some time'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 403, - "error": "Forbidden", - "message": "try again some time" -} -``` - -### `Boom.notFound([message], [data])` - -Returns a 404 Not Found error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notFound('missing'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 404, - "error": "Not Found", - "message": "missing" -} -``` - -### `Boom.methodNotAllowed([message], [data], [allow])` - -Returns a 405 Method Not Allowed error where: -- `message` - optional message. -- `data` - optional additional error data. -- `allow` - optional string or array of strings (to be combined and separated by ', ') which is set to the 'Allow' header. - -```js -Boom.methodNotAllowed('that method is not allowed'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 405, - "error": "Method Not Allowed", - "message": "that method is not allowed" -} -``` - -### `Boom.notAcceptable([message], [data])` - -Returns a 406 Not Acceptable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notAcceptable('unacceptable'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 406, - "error": "Not Acceptable", - "message": "unacceptable" -} -``` - -### `Boom.proxyAuthRequired([message], [data])` - -Returns a 407 Proxy Authentication Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.proxyAuthRequired('auth missing'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 407, - "error": "Proxy Authentication Required", - "message": "auth missing" -} -``` - -### `Boom.clientTimeout([message], [data])` - -Returns a 408 Request Time-out error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.clientTimeout('timed out'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 408, - "error": "Request Time-out", - "message": "timed out" -} -``` - -### `Boom.conflict([message], [data])` - -Returns a 409 Conflict error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.conflict('there was a conflict'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 409, - "error": "Conflict", - "message": "there was a conflict" -} -``` - -### `Boom.resourceGone([message], [data])` - -Returns a 410 Gone error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.resourceGone('it is gone'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 410, - "error": "Gone", - "message": "it is gone" -} -``` - -### `Boom.lengthRequired([message], [data])` - -Returns a 411 Length Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.lengthRequired('length needed'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 411, - "error": "Length Required", - "message": "length needed" -} -``` - -### `Boom.preconditionFailed([message], [data])` - -Returns a 412 Precondition Failed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.preconditionFailed(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 412, - "error": "Precondition Failed" -} -``` - -### `Boom.entityTooLarge([message], [data])` - -Returns a 413 Request Entity Too Large error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.entityTooLarge('too big'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 413, - "error": "Request Entity Too Large", - "message": "too big" -} -``` - -### `Boom.uriTooLong([message], [data])` - -Returns a 414 Request-URI Too Large error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.uriTooLong('uri is too long'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 414, - "error": "Request-URI Too Large", - "message": "uri is too long" -} -``` - -### `Boom.unsupportedMediaType([message], [data])` - -Returns a 415 Unsupported Media Type error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.unsupportedMediaType('that media is not supported'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 415, - "error": "Unsupported Media Type", - "message": "that media is not supported" -} -``` - -### `Boom.rangeNotSatisfiable([message], [data])` - -Returns a 416 Requested Range Not Satisfiable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.rangeNotSatisfiable(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 416, - "error": "Requested Range Not Satisfiable" -} -``` - -### `Boom.expectationFailed([message], [data])` - -Returns a 417 Expectation Failed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.expectationFailed('expected this to work'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 417, - "error": "Expectation Failed", - "message": "expected this to work" -} -``` - -### `Boom.teapot([message], [data])` - -Returns a 418 I'm a Teapot error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.teapot('sorry, no coffee...'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 418, - "error": "I'm a Teapot", - "message": "Sorry, no coffee..." -} -``` - -### `Boom.badData([message], [data])` - -Returns a 422 Unprocessable Entity error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badData('your data is bad and you should feel bad'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 422, - "error": "Unprocessable Entity", - "message": "your data is bad and you should feel bad" -} -``` - -### `Boom.locked([message], [data])` - -Returns a 423 Locked error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.locked('this resource has been locked'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 423, - "error": "Locked", - "message": "this resource has been locked" -} -``` - -### `Boom.preconditionRequired([message], [data])` - -Returns a 428 Precondition Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.preconditionRequired('you must supply an If-Match header'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 428, - "error": "Precondition Required", - "message": "you must supply an If-Match header" -} -``` - -### `Boom.tooManyRequests([message], [data])` - -Returns a 429 Too Many Requests error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.tooManyRequests('you have exceeded your request limit'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 429, - "error": "Too Many Requests", - "message": "you have exceeded your request limit" -} -``` - -### `Boom.illegal([message], [data])` - -Returns a 451 Unavailable For Legal Reasons error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.illegal('you are not permitted to view this resource for legal reasons'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 451, - "error": "Unavailable For Legal Reasons", - "message": "you are not permitted to view this resource for legal reasons" -} -``` - -## HTTP 5xx Errors - -All 500 errors hide your message from the end user. Your message is recorded in the server log. - -### `Boom.badImplementation([message], [data])` - (*alias: `internal`*) - -Returns a 500 Internal Server Error error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badImplementation('terrible implementation'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 500, - "error": "Internal Server Error", - "message": "An internal server error occurred" -} -``` - -### `Boom.notImplemented([message], [data])` - -Returns a 501 Not Implemented error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notImplemented('method not implemented'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 501, - "error": "Not Implemented", - "message": "method not implemented" -} -``` - -### `Boom.badGateway([message], [data])` - -Returns a 502 Bad Gateway error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badGateway('that is a bad gateway'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 502, - "error": "Bad Gateway", - "message": "that is a bad gateway" -} -``` - -### `Boom.serverUnavailable([message], [data])` - -Returns a 503 Service Unavailable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.serverUnavailable('unavailable'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 503, - "error": "Service Unavailable", - "message": "unavailable" -} -``` - -### `Boom.gatewayTimeout([message], [data])` - -Returns a 504 Gateway Time-out error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.gatewayTimeout(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 504, - "error": "Gateway Time-out" -} -``` - -## F.A.Q. - -**Q** How do I include extra information in my responses? `output.payload` is missing `data`, what gives? - -**A** There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation. - ---- diff --git a/node_modules/boom/lib/index.js b/node_modules/boom/lib/index.js deleted file mode 100755 index 17ed027..0000000 --- a/node_modules/boom/lib/index.js +++ /dev/null @@ -1,433 +0,0 @@ -'use strict'; - -// Load modules - -const Hoek = require('hoek'); - - -// Declare internals - -const internals = { - STATUS_CODES: Object.setPrototypeOf({ - '100': 'Continue', - '101': 'Switching Protocols', - '102': 'Processing', - '200': 'OK', - '201': 'Created', - '202': 'Accepted', - '203': 'Non-Authoritative Information', - '204': 'No Content', - '205': 'Reset Content', - '206': 'Partial Content', - '207': 'Multi-Status', - '300': 'Multiple Choices', - '301': 'Moved Permanently', - '302': 'Moved Temporarily', - '303': 'See Other', - '304': 'Not Modified', - '305': 'Use Proxy', - '307': 'Temporary Redirect', - '400': 'Bad Request', - '401': 'Unauthorized', - '402': 'Payment Required', - '403': 'Forbidden', - '404': 'Not Found', - '405': 'Method Not Allowed', - '406': 'Not Acceptable', - '407': 'Proxy Authentication Required', - '408': 'Request Time-out', - '409': 'Conflict', - '410': 'Gone', - '411': 'Length Required', - '412': 'Precondition Failed', - '413': 'Request Entity Too Large', - '414': 'Request-URI Too Large', - '415': 'Unsupported Media Type', - '416': 'Requested Range Not Satisfiable', - '417': 'Expectation Failed', - '418': 'I\'m a teapot', - '422': 'Unprocessable Entity', - '423': 'Locked', - '424': 'Failed Dependency', - '425': 'Unordered Collection', - '426': 'Upgrade Required', - '428': 'Precondition Required', - '429': 'Too Many Requests', - '431': 'Request Header Fields Too Large', - '451': 'Unavailable For Legal Reasons', - '500': 'Internal Server Error', - '501': 'Not Implemented', - '502': 'Bad Gateway', - '503': 'Service Unavailable', - '504': 'Gateway Time-out', - '505': 'HTTP Version Not Supported', - '506': 'Variant Also Negotiates', - '507': 'Insufficient Storage', - '509': 'Bandwidth Limit Exceeded', - '510': 'Not Extended', - '511': 'Network Authentication Required' - }, null) -}; - - -exports.wrap = function (error, statusCode, message) { - - Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object'); - Hoek.assert(!error.isBoom || (!statusCode && !message), 'Cannot provide statusCode or message with boom error'); - - return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message)); -}; - - -exports.create = function (statusCode, message, data) { - - return internals.create(statusCode, message, data, exports.create); -}; - - -internals.create = function (statusCode, message, data, ctor) { - - if (message instanceof Error) { - if (data) { - message.data = data; - } - return exports.wrap(message, statusCode); - } - - const error = new Error(message ? message : undefined); // Avoids settings null message - Error.captureStackTrace(error, ctor); // Filter the stack to our external API - error.data = data || null; - internals.initialize(error, statusCode); - return error; -}; - - -internals.initialize = function (error, statusCode, message) { - - const numberCode = parseInt(statusCode, 10); - Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode); - - error.isBoom = true; - error.isServer = numberCode >= 500; - - if (!error.hasOwnProperty('data')) { - error.data = null; - } - - error.output = { - statusCode: numberCode, - payload: {}, - headers: {} - }; - - error.reformat = internals.reformat; - error.reformat(); - - if (!message && - !error.message) { - - message = error.output.payload.error; - } - - if (message) { - error.message = (message + (error.message ? ': ' + error.message : '')); - } - - return error; -}; - - -internals.reformat = function () { - - this.output.payload.statusCode = this.output.statusCode; - this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown'; - - if (this.output.statusCode === 500) { - this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user - } - else if (this.message) { - this.output.payload.message = this.message; - } -}; - - -// 4xx Client Errors - -exports.badRequest = function (message, data) { - - return internals.create(400, message, data, exports.badRequest); -}; - - -exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[]) - - const err = internals.create(401, message, undefined, exports.unauthorized); - - if (!scheme) { - return err; - } - - let wwwAuthenticate = ''; - - if (typeof scheme === 'string') { - - // function (message, scheme, attributes) - - wwwAuthenticate = scheme; - - if (attributes || message) { - err.output.payload.attributes = {}; - } - - if (attributes) { - if (typeof attributes === 'string') { - wwwAuthenticate = wwwAuthenticate + ' ' + Hoek.escapeHeaderAttribute(attributes); - err.output.payload.attributes = attributes; - } - else { - const names = Object.keys(attributes); - for (let i = 0; i < names.length; ++i) { - const name = names[i]; - if (i) { - wwwAuthenticate = wwwAuthenticate + ','; - } - - let value = attributes[name]; - if (value === null || - value === undefined) { // Value can be zero - - value = ''; - } - wwwAuthenticate = wwwAuthenticate + ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"'; - err.output.payload.attributes[name] = value; - } - } - } - - - if (message) { - if (attributes) { - wwwAuthenticate = wwwAuthenticate + ','; - } - wwwAuthenticate = wwwAuthenticate + ' error="' + Hoek.escapeHeaderAttribute(message) + '"'; - err.output.payload.attributes.error = message; - } - else { - err.isMissing = true; - } - } - else { - - // function (message, wwwAuthenticate[]) - - const wwwArray = scheme; - for (let i = 0; i < wwwArray.length; ++i) { - if (i) { - wwwAuthenticate = wwwAuthenticate + ', '; - } - - wwwAuthenticate = wwwAuthenticate + wwwArray[i]; - } - } - - err.output.headers['WWW-Authenticate'] = wwwAuthenticate; - - return err; -}; - - -exports.paymentRequired = function (message, data) { - - return internals.create(402, message, data, exports.paymentRequired); -}; - - -exports.forbidden = function (message, data) { - - return internals.create(403, message, data, exports.forbidden); -}; - - -exports.notFound = function (message, data) { - - return internals.create(404, message, data, exports.notFound); -}; - - -exports.methodNotAllowed = function (message, data, allow) { - - const err = internals.create(405, message, data, exports.methodNotAllowed); - - if (typeof allow === 'string') { - allow = [allow]; - } - - if (Array.isArray(allow)) { - err.output.headers.Allow = allow.join(', '); - } - - return err; -}; - - -exports.notAcceptable = function (message, data) { - - return internals.create(406, message, data, exports.notAcceptable); -}; - - -exports.proxyAuthRequired = function (message, data) { - - return internals.create(407, message, data, exports.proxyAuthRequired); -}; - - -exports.clientTimeout = function (message, data) { - - return internals.create(408, message, data, exports.clientTimeout); -}; - - -exports.conflict = function (message, data) { - - return internals.create(409, message, data, exports.conflict); -}; - - -exports.resourceGone = function (message, data) { - - return internals.create(410, message, data, exports.resourceGone); -}; - - -exports.lengthRequired = function (message, data) { - - return internals.create(411, message, data, exports.lengthRequired); -}; - - -exports.preconditionFailed = function (message, data) { - - return internals.create(412, message, data, exports.preconditionFailed); -}; - - -exports.entityTooLarge = function (message, data) { - - return internals.create(413, message, data, exports.entityTooLarge); -}; - - -exports.uriTooLong = function (message, data) { - - return internals.create(414, message, data, exports.uriTooLong); -}; - - -exports.unsupportedMediaType = function (message, data) { - - return internals.create(415, message, data, exports.unsupportedMediaType); -}; - - -exports.rangeNotSatisfiable = function (message, data) { - - return internals.create(416, message, data, exports.rangeNotSatisfiable); -}; - - -exports.expectationFailed = function (message, data) { - - return internals.create(417, message, data, exports.expectationFailed); -}; - - -exports.teapot = function (message, data) { - - return internals.create(418, message, data, exports.teapot); -}; - - -exports.badData = function (message, data) { - - return internals.create(422, message, data, exports.badData); -}; - - -exports.locked = function (message, data) { - - return internals.create(423, message, data, exports.locked); -}; - - -exports.preconditionRequired = function (message, data) { - - return internals.create(428, message, data, exports.preconditionRequired); -}; - - -exports.tooManyRequests = function (message, data) { - - return internals.create(429, message, data, exports.tooManyRequests); -}; - - -exports.illegal = function (message, data) { - - return internals.create(451, message, data, exports.illegal); -}; - - -// 5xx Server Errors - -exports.internal = function (message, data, statusCode) { - - return internals.serverError(message, data, statusCode, exports.internal); -}; - - -internals.serverError = function (message, data, statusCode, ctor) { - - let error; - if (data instanceof Error) { - error = exports.wrap(data, statusCode, message); - } - else { - error = internals.create(statusCode || 500, message, undefined, ctor); - error.data = data; - } - - return error; -}; - - -exports.notImplemented = function (message, data) { - - return internals.serverError(message, data, 501, exports.notImplemented); -}; - - -exports.badGateway = function (message, data) { - - return internals.serverError(message, data, 502, exports.badGateway); -}; - - -exports.serverUnavailable = function (message, data) { - - return internals.serverError(message, data, 503, exports.serverUnavailable); -}; - - -exports.gatewayTimeout = function (message, data) { - - return internals.serverError(message, data, 504, exports.gatewayTimeout); -}; - - -exports.badImplementation = function (message, data) { - - const err = internals.serverError(message, data, 500, exports.badImplementation); - err.isDeveloperError = true; - return err; -}; diff --git a/node_modules/boom/package.json b/node_modules/boom/package.json deleted file mode 100644 index 1636b57..0000000 --- a/node_modules/boom/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "boom@4.x.x", - "_id": "boom@4.3.1", - "_inBundle": false, - "_integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "_location": "/boom", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "boom@4.x.x", - "name": "boom", - "escapedName": "boom", - "rawSpec": "4.x.x", - "saveSpec": null, - "fetchSpec": "4.x.x" - }, - "_requiredBy": [ - "/hawk" - ], - "_resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "_shasum": "4f8a3005cb4a7e3889f749030fd25b96e01d2e31", - "_spec": "boom@4.x.x", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/hawk", - "bugs": { - "url": "https://github.com/hapijs/boom/issues" - }, - "bundleDependencies": false, - "dependencies": { - "hoek": "4.x.x" - }, - "deprecated": false, - "description": "HTTP-friendly error objects", - "devDependencies": { - "code": "4.x.x", - "lab": "13.x.x", - "markdown-toc": "0.12.x" - }, - "engines": { - "node": ">=4.0.0" - }, - "homepage": "https://github.com/hapijs/boom#readme", - "keywords": [ - "error", - "http" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "name": "boom", - "repository": { - "type": "git", - "url": "git://github.com/hapijs/boom.git" - }, - "scripts": { - "test": "lab -a code -t 100 -L -v", - "test-cov-html": "lab -a code -r html -o coverage.html -L", - "toc": "node generate-toc.js", - "version": "npm run toc && git add README.md" - }, - "version": "4.3.1" -} diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json index d2fda81..445cc62 100644 --- a/node_modules/brace-expansion/package.json +++ b/node_modules/brace-expansion/package.json @@ -1,27 +1,32 @@ { - "_from": "brace-expansion@^1.1.7", + "_args": [ + [ + "brace-expansion@1.1.11", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "brace-expansion@1.1.11", "_id": "brace-expansion@1.1.11", "_inBundle": false, "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "_location": "/brace-expansion", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "brace-expansion@^1.1.7", + "raw": "brace-expansion@1.1.11", "name": "brace-expansion", "escapedName": "brace-expansion", - "rawSpec": "^1.1.7", + "rawSpec": "1.1.11", "saveSpec": null, - "fetchSpec": "^1.1.7" + "fetchSpec": "1.1.11" }, "_requiredBy": [ "/minimatch" ], "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd", - "_spec": "brace-expansion@^1.1.7", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/minimatch", + "_spec": "1.1.11", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", @@ -30,12 +35,10 @@ "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, - "bundleDependencies": false, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" }, - "deprecated": false, "description": "Brace expansion as known from sh/bash", "devDependencies": { "matcha": "^0.7.0", diff --git a/node_modules/braces/LICENSE b/node_modules/braces/LICENSE deleted file mode 100644 index 39245ac..0000000 --- a/node_modules/braces/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/braces/README.md b/node_modules/braces/README.md deleted file mode 100644 index 52fa756..0000000 --- a/node_modules/braces/README.md +++ /dev/null @@ -1,248 +0,0 @@ -# braces [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Build Status](https://img.shields.io/travis/jonschlinkert/braces.svg?style=flat)](https://travis-ci.org/jonschlinkert/braces) - -Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install braces --save -``` - -## Features - -* Complete support for the braces part of the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/). Braces passes [all of the relevant unit tests](#bash-4-3-support) from the spec. -* Expands comma-separated values: `a/{b,c}/d` => `['a/b/d', 'a/c/d']` -* Expands alphabetical or numerical ranges: `{1..3}` => `['1', '2', '3']` -* [Very fast](#benchmarks) -* [Special characters](./patterns.md) can be used to generate interesting patterns. - -## Example usage - -```js -var braces = require('braces'); - -braces('a/{x,y}/c{d}e') -//=> ['a/x/cde', 'a/y/cde'] - -braces('a/b/c/{x,y}') -//=> ['a/b/c/x', 'a/b/c/y'] - -braces('a/{x,{1..5},y}/c{d}e') -//=> ['a/x/cde', 'a/1/cde', 'a/y/cde', 'a/2/cde', 'a/3/cde', 'a/4/cde', 'a/5/cde'] -``` - -### Use case: fixtures - -> Use braces to generate test fixtures! - -**Example** - -```js -var braces = require('./'); -var path = require('path'); -var fs = require('fs'); - -braces('blah/{a..z}.js').forEach(function(fp) { - if (!fs.existsSync(path.dirname(fp))) { - fs.mkdirSync(path.dirname(fp)); - } - fs.writeFileSync(fp, ''); -}); -``` - -See the [tests](./test/test.js) for more examples and use cases (also see the [bash spec tests](./test/bash-mm-adjusted.js)); - -### Range expansion - -Uses [expand-range](https://github.com/jonschlinkert/expand-range) for range expansion. - -```js -braces('a{1..3}b') -//=> ['a1b', 'a2b', 'a3b'] - -braces('a{5..8}b') -//=> ['a5b', 'a6b', 'a7b', 'a8b'] - -braces('a{00..05}b') -//=> ['a00b', 'a01b', 'a02b', 'a03b', 'a04b', 'a05b'] - -braces('a{01..03}b') -//=> ['a01b', 'a02b', 'a03b'] - -braces('a{000..005}b') -//=> ['a000b', 'a001b', 'a002b', 'a003b', 'a004b', 'a005b'] - -braces('a{a..e}b') -//=> ['aab', 'abb', 'acb', 'adb', 'aeb'] - -braces('a{A..E}b') -//=> ['aAb', 'aBb', 'aCb', 'aDb', 'aEb'] -``` - -Pass a function as the last argument to customize range expansions: - -```js -var range = braces('x{a..e}y', function (str, i) { - return String.fromCharCode(str) + i; -}); - -console.log(range); -//=> ['xa0y', 'xb1y', 'xc2y', 'xd3y', 'xe4y'] -``` - -See [expand-range](https://github.com/jonschlinkert/expand-range) for benchmarks, tests and the full list of range expansion features. - -## Options - -### options.makeRe - -Type: `Boolean` - -Deafault: `false` - -Return a regex-optimal string. If you're using braces to generate regex, this will result in dramatically faster performance. - -**Examples** - -With the default settings (`{makeRe: false}`): - -```js -braces('{1..5}'); -//=> ['1', '2', '3', '4', '5'] -``` - -With `{makeRe: true}`: - -```js -braces('{1..5}', {makeRe: true}); -//=> ['[1-5]'] - -braces('{3..9..3}', {makeRe: true}); -//=> ['(3|6|9)'] -``` - -### options.bash - -Type: `Boolean` - -Default: `false` - -Enables complete support for the Bash specification. The downside is a 20-25% speed decrease. - -**Example** - -Using the default setting (`{bash: false}`): - -```js -braces('a{b}c'); -//=> ['abc'] -``` - -In bash (and minimatch), braces with one item are not expanded. To get the same result with braces, set `{bash: true}`: - -```js -braces('a{b}c', {bash: true}); -//=> ['a{b}c'] -``` - -### options.nodupes - -Type: `Boolean` - -Deafault: `true` - -Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options - -## Bash 4.3 Support - -> Better support for Bash 4.3 than minimatch - -This project has comprehensive unit tests, including tests coverted from [Bash 4.3](www.gnu.org/software/bash/). Currently only 8 of 102 unit tests fail, and - -## Run benchmarks - -Install dev dependencies: - -```bash -npm i -d && npm benchmark -``` - -### Latest results - -```bash -#1: escape.js - brace-expansion.js x 114,934 ops/sec ±1.24% (93 runs sampled) - braces.js x 342,254 ops/sec ±0.84% (90 runs sampled) - -#2: exponent.js - brace-expansion.js x 12,359 ops/sec ±0.86% (96 runs sampled) - braces.js x 20,389 ops/sec ±0.71% (97 runs sampled) - -#3: multiple.js - brace-expansion.js x 114,469 ops/sec ±1.44% (94 runs sampled) - braces.js x 401,621 ops/sec ±0.87% (91 runs sampled) - -#4: nested.js - brace-expansion.js x 102,769 ops/sec ±1.55% (92 runs sampled) - braces.js x 314,088 ops/sec ±0.71% (98 runs sampled) - -#5: normal.js - brace-expansion.js x 157,577 ops/sec ±1.65% (91 runs sampled) - braces.js x 1,115,950 ops/sec ±0.74% (94 runs sampled) - -#6: range.js - brace-expansion.js x 138,822 ops/sec ±1.71% (91 runs sampled) - braces.js x 1,108,353 ops/sec ±0.85% (94 runs sampled) -``` - -## Related projects - -You might also be interested in these projects: - -* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://www.npmjs.com/package/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range) -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range) -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/braces/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/braces/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 21, 2016._ \ No newline at end of file diff --git a/node_modules/braces/index.js b/node_modules/braces/index.js deleted file mode 100644 index 3b4c58d..0000000 --- a/node_modules/braces/index.js +++ /dev/null @@ -1,399 +0,0 @@ -/*! - * braces - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -/** - * Module dependencies - */ - -var expand = require('expand-range'); -var repeat = require('repeat-element'); -var tokens = require('preserve'); - -/** - * Expose `braces` - */ - -module.exports = function(str, options) { - if (typeof str !== 'string') { - throw new Error('braces expects a string'); - } - return braces(str, options); -}; - -/** - * Expand `{foo,bar}` or `{1..5}` braces in the - * given `string`. - * - * @param {String} `str` - * @param {Array} `arr` - * @param {Object} `options` - * @return {Array} - */ - -function braces(str, arr, options) { - if (str === '') { - return []; - } - - if (!Array.isArray(arr)) { - options = arr; - arr = []; - } - - var opts = options || {}; - arr = arr || []; - - if (typeof opts.nodupes === 'undefined') { - opts.nodupes = true; - } - - var fn = opts.fn; - var es6; - - if (typeof opts === 'function') { - fn = opts; - opts = {}; - } - - if (!(patternRe instanceof RegExp)) { - patternRe = patternRegex(); - } - - var matches = str.match(patternRe) || []; - var m = matches[0]; - - switch(m) { - case '\\,': - return escapeCommas(str, arr, opts); - case '\\.': - return escapeDots(str, arr, opts); - case '\/.': - return escapePaths(str, arr, opts); - case ' ': - return splitWhitespace(str); - case '{,}': - return exponential(str, opts, braces); - case '{}': - return emptyBraces(str, arr, opts); - case '\\{': - case '\\}': - return escapeBraces(str, arr, opts); - case '${': - if (!/\{[^{]+\{/.test(str)) { - return arr.concat(str); - } else { - es6 = true; - str = tokens.before(str, es6Regex()); - } - } - - if (!(braceRe instanceof RegExp)) { - braceRe = braceRegex(); - } - - var match = braceRe.exec(str); - if (match == null) { - return [str]; - } - - var outter = match[1]; - var inner = match[2]; - if (inner === '') { return [str]; } - - var segs, segsLength; - - if (inner.indexOf('..') !== -1) { - segs = expand(inner, opts, fn) || inner.split(','); - segsLength = segs.length; - - } else if (inner[0] === '"' || inner[0] === '\'') { - return arr.concat(str.split(/['"]/).join('')); - - } else { - segs = inner.split(','); - if (opts.makeRe) { - return braces(str.replace(outter, wrap(segs, '|')), opts); - } - - segsLength = segs.length; - if (segsLength === 1 && opts.bash) { - segs[0] = wrap(segs[0], '\\'); - } - } - - var len = segs.length; - var i = 0, val; - - while (len--) { - var path = segs[i++]; - - if (/(\.[^.\/])/.test(path)) { - if (segsLength > 1) { - return segs; - } else { - return [str]; - } - } - - val = splice(str, outter, path); - - if (/\{[^{}]+?\}/.test(val)) { - arr = braces(val, arr, opts); - } else if (val !== '') { - if (opts.nodupes && arr.indexOf(val) !== -1) { continue; } - arr.push(es6 ? tokens.after(val) : val); - } - } - - if (opts.strict) { return filter(arr, filterEmpty); } - return arr; -} - -/** - * Expand exponential ranges - * - * `a{,}{,}` => ['a', 'a', 'a', 'a'] - */ - -function exponential(str, options, fn) { - if (typeof options === 'function') { - fn = options; - options = null; - } - - var opts = options || {}; - var esc = '__ESC_EXP__'; - var exp = 0; - var res; - - var parts = str.split('{,}'); - if (opts.nodupes) { - return fn(parts.join(''), opts); - } - - exp = parts.length - 1; - res = fn(parts.join(esc), opts); - var len = res.length; - var arr = []; - var i = 0; - - while (len--) { - var ele = res[i++]; - var idx = ele.indexOf(esc); - - if (idx === -1) { - arr.push(ele); - - } else { - ele = ele.split('__ESC_EXP__').join(''); - if (!!ele && opts.nodupes !== false) { - arr.push(ele); - - } else { - var num = Math.pow(2, exp); - arr.push.apply(arr, repeat(ele, num)); - } - } - } - return arr; -} - -/** - * Wrap a value with parens, brackets or braces, - * based on the given character/separator. - * - * @param {String|Array} `val` - * @param {String} `ch` - * @return {String} - */ - -function wrap(val, ch) { - if (ch === '|') { - return '(' + val.join(ch) + ')'; - } - if (ch === ',') { - return '{' + val.join(ch) + '}'; - } - if (ch === '-') { - return '[' + val.join(ch) + ']'; - } - if (ch === '\\') { - return '\\{' + val + '\\}'; - } -} - -/** - * Handle empty braces: `{}` - */ - -function emptyBraces(str, arr, opts) { - return braces(str.split('{}').join('\\{\\}'), arr, opts); -} - -/** - * Filter out empty-ish values - */ - -function filterEmpty(ele) { - return !!ele && ele !== '\\'; -} - -/** - * Handle patterns with whitespace - */ - -function splitWhitespace(str) { - var segs = str.split(' '); - var len = segs.length; - var res = []; - var i = 0; - - while (len--) { - res.push.apply(res, braces(segs[i++])); - } - return res; -} - -/** - * Handle escaped braces: `\\{foo,bar}` - */ - -function escapeBraces(str, arr, opts) { - if (!/\{[^{]+\{/.test(str)) { - return arr.concat(str.split('\\').join('')); - } else { - str = str.split('\\{').join('__LT_BRACE__'); - str = str.split('\\}').join('__RT_BRACE__'); - return map(braces(str, arr, opts), function(ele) { - ele = ele.split('__LT_BRACE__').join('{'); - return ele.split('__RT_BRACE__').join('}'); - }); - } -} - -/** - * Handle escaped dots: `{1\\.2}` - */ - -function escapeDots(str, arr, opts) { - if (!/[^\\]\..+\\\./.test(str)) { - return arr.concat(str.split('\\').join('')); - } else { - str = str.split('\\.').join('__ESC_DOT__'); - return map(braces(str, arr, opts), function(ele) { - return ele.split('__ESC_DOT__').join('.'); - }); - } -} - -/** - * Handle escaped dots: `{1\\.2}` - */ - -function escapePaths(str, arr, opts) { - str = str.split('\/.').join('__ESC_PATH__'); - return map(braces(str, arr, opts), function(ele) { - return ele.split('__ESC_PATH__').join('\/.'); - }); -} - -/** - * Handle escaped commas: `{a\\,b}` - */ - -function escapeCommas(str, arr, opts) { - if (!/\w,/.test(str)) { - return arr.concat(str.split('\\').join('')); - } else { - str = str.split('\\,').join('__ESC_COMMA__'); - return map(braces(str, arr, opts), function(ele) { - return ele.split('__ESC_COMMA__').join(','); - }); - } -} - -/** - * Regex for common patterns - */ - -function patternRegex() { - return /\${|( (?=[{,}])|(?=[{,}]) )|{}|{,}|\\,(?=.*[{}])|\/\.(?=.*[{}])|\\\.(?={)|\\{|\\}/; -} - -/** - * Braces regex. - */ - -function braceRegex() { - return /.*(\\?\{([^}]+)\})/; -} - -/** - * es6 delimiter regex. - */ - -function es6Regex() { - return /\$\{([^}]+)\}/; -} - -var braceRe; -var patternRe; - -/** - * Faster alternative to `String.replace()` when the - * index of the token to be replaces can't be supplied - */ - -function splice(str, token, replacement) { - var i = str.indexOf(token); - return str.substr(0, i) + replacement - + str.substr(i + token.length); -} - -/** - * Fast array map - */ - -function map(arr, fn) { - if (arr == null) { - return []; - } - - var len = arr.length; - var res = new Array(len); - var i = -1; - - while (++i < len) { - res[i] = fn(arr[i], i, arr); - } - - return res; -} - -/** - * Fast array filter - */ - -function filter(arr, cb) { - if (arr == null) return []; - if (typeof cb !== 'function') { - throw new TypeError('braces: filter expects a callback function.'); - } - - var len = arr.length; - var res = arr.slice(); - var i = 0; - - while (len--) { - if (!cb(arr[len], i++)) { - res.splice(len, 1); - } - } - return res; -} diff --git a/node_modules/braces/package.json b/node_modules/braces/package.json deleted file mode 100644 index a1f0d8f..0000000 --- a/node_modules/braces/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_from": "braces@^1.8.2", - "_id": "braces@1.8.5", - "_inBundle": false, - "_integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "_location": "/braces", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "braces@^1.8.2", - "name": "braces", - "escapedName": "braces", - "rawSpec": "^1.8.2", - "saveSpec": null, - "fetchSpec": "^1.8.2" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "_shasum": "ba77962e12dff969d6b76711e914b737857bf6a7", - "_spec": "braces@^1.8.2", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/braces/issues" - }, - "bundleDependencies": false, - "dependencies": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - }, - "deprecated": false, - "description": "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.", - "devDependencies": { - "benchmarked": "^0.1.5", - "brace-expansion": "^1.1.3", - "chalk": "^1.1.3", - "gulp-format-md": "^0.1.8", - "minimatch": "^3.0.0", - "minimist": "^1.2.0", - "mocha": "^2.4.5", - "should": "^8.3.1" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/braces", - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "expand", - "expansion", - "filepath", - "fill", - "fs", - "glob", - "globbing", - "letter", - "match", - "matches", - "matching", - "number", - "numerical", - "path", - "range", - "ranges", - "sh" - ], - "license": "MIT", - "main": "index.js", - "name": "braces", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/braces.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "toc": false, - "layout": "default", - "lint": { - "reflinks": true - }, - "tasks": [ - "readme" - ], - "related": { - "list": [ - "micromatch", - "expand-range", - "fill-range" - ] - } - }, - "version": "1.8.5" -} diff --git a/node_modules/browser-process-hrtime/.npmignore b/node_modules/browser-process-hrtime/.npmignore deleted file mode 100644 index 93a9cd0..0000000 --- a/node_modules/browser-process-hrtime/.npmignore +++ /dev/null @@ -1,35 +0,0 @@ -# Created by http://www.gitignore.io - -### OSX ### -.DS_Store -.AppleDouble -.LSOverride - -# Icon must ends with two \r. -Icon - -# Thumbnails -._* - -# Files that might appear on external disk -.Spotlight-V100 -.Trashes - - -### Node ### -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results -build - -node_modules - diff --git a/node_modules/browser-process-hrtime/LICENSE b/node_modules/browser-process-hrtime/LICENSE new file mode 100644 index 0000000..d78d076 --- /dev/null +++ b/node_modules/browser-process-hrtime/LICENSE @@ -0,0 +1,9 @@ +Copyright 2014 kumavis + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/browser-process-hrtime/package.json b/node_modules/browser-process-hrtime/package.json index 746f079..c43ca9c 100644 --- a/node_modules/browser-process-hrtime/package.json +++ b/node_modules/browser-process-hrtime/package.json @@ -1,8 +1,8 @@ { "_from": "browser-process-hrtime@^0.1.2", - "_id": "browser-process-hrtime@0.1.2", + "_id": "browser-process-hrtime@0.1.3", "_inBundle": false, - "_integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", + "_integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", "_location": "/browser-process-hrtime", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/w3c-hr-time" ], - "_resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", - "_shasum": "425d68a58d3447f02a04aa894187fce8af8b7b8e", + "_resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", + "_shasum": "616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4", "_spec": "browser-process-hrtime@^0.1.2", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/w3c-hr-time", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\w3c-hr-time", "author": { "name": "kumavis" }, @@ -42,5 +42,5 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "0.1.2" + "version": "0.1.3" } diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json index 6ad3ab8..45bdfe8 100644 --- a/node_modules/camelcase/package.json +++ b/node_modules/camelcase/package.json @@ -1,27 +1,32 @@ { - "_from": "camelcase@^4.1.0", + "_args": [ + [ + "camelcase@4.1.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "camelcase@4.1.0", "_id": "camelcase@4.1.0", "_inBundle": false, "_integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "_location": "/camelcase", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "camelcase@^4.1.0", + "raw": "camelcase@4.1.0", "name": "camelcase", "escapedName": "camelcase", - "rawSpec": "^4.1.0", + "rawSpec": "4.1.0", "saveSpec": null, - "fetchSpec": "^4.1.0" + "fetchSpec": "4.1.0" }, "_requiredBy": [ "/yargs-parser" ], "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "_shasum": "d545635be1e33c542649c69173e5de6acfae34dd", - "_spec": "camelcase@^4.1.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/yargs-parser", + "_spec": "4.1.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/sindresorhus/camelcase/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", "devDependencies": { "ava": "*", diff --git a/node_modules/caseless/package.json b/node_modules/caseless/package.json index 79d1be0..a062354 100644 --- a/node_modules/caseless/package.json +++ b/node_modules/caseless/package.json @@ -1,27 +1,32 @@ { - "_from": "caseless@~0.12.0", + "_args": [ + [ + "caseless@0.12.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "caseless@0.12.0", "_id": "caseless@0.12.0", "_inBundle": false, "_integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "_location": "/caseless", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "caseless@~0.12.0", + "raw": "caseless@0.12.0", "name": "caseless", "escapedName": "caseless", - "rawSpec": "~0.12.0", + "rawSpec": "0.12.0", "saveSpec": null, - "fetchSpec": "~0.12.0" + "fetchSpec": "0.12.0" }, "_requiredBy": [ "/request" ], "_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "_shasum": "1b681c21ff84033c826543090689420d187151dc", - "_spec": "caseless@~0.12.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/request", + "_spec": "0.12.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Mikeal Rogers", "email": "mikeal.rogers@gmail.com" @@ -29,8 +34,6 @@ "bugs": { "url": "https://github.com/mikeal/caseless/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Caseless object set/get/has, very useful when working with HTTP headers.", "devDependencies": { "tape": "^2.10.2" diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json index caa6b47..72ac1d9 100644 --- a/node_modules/chalk/package.json +++ b/node_modules/chalk/package.json @@ -1,31 +1,35 @@ { - "_from": "chalk@^1.1.3", + "_args": [ + [ + "chalk@1.1.3", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "chalk@1.1.3", "_id": "chalk@1.1.3", "_inBundle": false, "_integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "_location": "/chalk", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "chalk@^1.1.3", + "raw": "chalk@1.1.3", "name": "chalk", "escapedName": "chalk", - "rawSpec": "^1.1.3", + "rawSpec": "1.1.3", "saveSpec": null, - "fetchSpec": "^1.1.3" + "fetchSpec": "1.1.3" }, "_requiredBy": [ "/babel-code-frame" ], "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "_shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98", - "_spec": "chalk@^1.1.3", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-code-frame", + "_spec": "1.1.3", + "_where": "E:\\projects\\p\\minifyfromhtml", "bugs": { "url": "https://github.com/chalk/chalk/issues" }, - "bundleDependencies": false, "dependencies": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", @@ -33,7 +37,6 @@ "strip-ansi": "^3.0.0", "supports-color": "^2.0.0" }, - "deprecated": false, "description": "Terminal string styling done right. Much color.", "devDependencies": { "coveralls": "^2.11.2", diff --git a/node_modules/clean-css/package.json b/node_modules/clean-css/package.json index 8d9a4f9..6d18d79 100644 --- a/node_modules/clean-css/package.json +++ b/node_modules/clean-css/package.json @@ -1,28 +1,32 @@ { - "_from": "clean-css", + "_args": [ + [ + "clean-css@4.1.11", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "clean-css@4.1.11", "_id": "clean-css@4.1.11", "_inBundle": false, "_integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", "_location": "/clean-css", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "clean-css", + "raw": "clean-css@4.1.11", "name": "clean-css", "escapedName": "clean-css", - "rawSpec": "", + "rawSpec": "4.1.11", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "4.1.11" }, "_requiredBy": [ - "#USER", "/" ], "_resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", - "_shasum": "2ecdf145aba38f54740f26cefd0ff3e03e125d6a", - "_spec": "clean-css", - "_where": "/home/s2/Documents/Code/minifyfromhtml/example", + "_spec": "4.1.11", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Jakub Pawlowicz", "email": "contact@jakubpawlowicz.com", @@ -31,11 +35,9 @@ "bugs": { "url": "https://github.com/jakubpawlowicz/clean-css/issues" }, - "bundleDependencies": false, "dependencies": { "source-map": "0.5.x" }, - "deprecated": false, "description": "A well-tested CSS minifier", "devDependencies": { "browserify": "^14.0.0", diff --git a/node_modules/co/History.md b/node_modules/co/History.md deleted file mode 100644 index 68fbb15..0000000 --- a/node_modules/co/History.md +++ /dev/null @@ -1,172 +0,0 @@ -4.6.0 / 2015-07-09 -================== - - * support passing the rest of the arguments to co into the generator - - ```js - function *gen(...args) { } - co(gen, ...args); - ``` - -4.5.0 / 2015-03-17 -================== - - * support regular functions (that return promises) - -4.4.0 / 2015-02-14 -================== - - * refactor `isGeneratorFunction` - * expose generator function from `co.wrap()` - * drop support for node < 0.12 - -4.3.0 / 2015-02-05 -================== - - * check for generator functions in a ES5-transpiler-friendly way - -4.2.0 / 2015-01-20 -================== - - * support comparing generator functions with ES6 transpilers - -4.1.0 / 2014-12-26 -================== - - * fix memory leak #180 - -4.0.2 / 2014-12-18 -================== - - * always return a global promise implementation - -4.0.1 / 2014-11-30 -================== - - * friendlier ES6 module exports - -4.0.0 / 2014-11-15 -================== - - * co now returns a promise and uses promises underneath - * `co.wrap()` for wrapping generator functions - -3.1.0 / 2014-06-30 -================== - - * remove `setImmediate()` shim for node 0.8. semi-backwards breaking. - Users are expected to shim themselves. Also returns CommonJS browser support. - * added key order preservation for objects. thanks @greim - * replace `q` with `bluebird` in benchmarks and tests - -3.0.6 / 2014-05-03 -================== - - * add `setImmediate()` fallback to `process.nextTick` - * remove duplicate code in toThunk - * update thunkify - -3.0.5 / 2014-03-17 -================== - - * fix object/array test failure which tries to enumerate dates. Closes #98 - * fix final callback error propagation. Closes #92 - -3.0.4 / 2014-02-17 -================== - - * fix toThunk object check regression. Closes #89 - -3.0.3 / 2014-02-08 -================== - - * refactor: arrayToThunk @AutoSponge #88 - -3.0.2 / 2014-01-01 -================== - - * fixed: nil arguments replaced with error fn - -3.0.1 / 2013-12-19 -================== - - * fixed: callback passed as an argument to generators - -3.0.0 / 2013-12-19 -================== - - * fixed: callback passed as an argument to generators - * change: `co(function *(){})` now returns a reusable thunk - * change: `this` must now be passed through the returned thunk, ex. `co(function *(){}).call(this)` - * fix "generator already finished" errors - -2.3.0 / 2013-11-12 -================== - - * add `yield object` support - -2.2.0 / 2013-11-05 -================== - - * change: make the `isGenerator()` function more generic - -2.1.0 / 2013-10-21 -================== - - * add passing of arguments into the generator. closes #33. - -2.0.0 / 2013-10-14 -================== - - * remove callback in favour of thunk-only co(). Closes #30 [breaking change] - * remove `co.wrap()` [breaking change] - -1.5.2 / 2013-09-02 -================== - - * fix: preserve receiver with co.wrap() - -1.5.1 / 2013-08-11 -================== - - * remove setImmediate() usage - ~110% perf increase. Closes #14 - -0.5.0 / 2013-08-10 -================== - - * add receiver propagation support - * examples: update streams.js example to use `http.get()` and streams2 API - -1.4.1 / 2013-07-01 -================== - - * fix gen.next(val) for latest v8. Closes #8 - -1.4.0 / 2013-06-21 -================== - - * add promise support to joins - * add `yield generatorFunction` support - * add `yield generator` support - * add nested join support - -1.3.0 / 2013-06-10 -================== - - * add passing of arguments - -1.2.1 / 2013-06-08 -================== - - * fix join() of zero thunks - -1.2.0 / 2013-06-08 -================== - - * add array yielding support. great suggestion by @domenic - -1.1.0 / 2013-06-06 -================== - - * add promise support - * change nextTick to setImmediate diff --git a/node_modules/co/LICENSE b/node_modules/co/LICENSE deleted file mode 100644 index 92faba5..0000000 --- a/node_modules/co/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/co/Readme.md b/node_modules/co/Readme.md deleted file mode 100644 index c1d4882..0000000 --- a/node_modules/co/Readme.md +++ /dev/null @@ -1,212 +0,0 @@ -# co - -[![Gitter][gitter-image]][gitter-url] -[![NPM version][npm-image]][npm-url] -[![Build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] -[![Downloads][downloads-image]][downloads-url] - - Generator based control flow goodness for nodejs and the browser, - using promises, letting you write non-blocking code in a nice-ish way. - -## Co v4 - - `co@4.0.0` has been released, which now relies on promises. - It is a stepping stone towards [ES7 async/await](https://github.com/lukehoban/ecmascript-asyncawait). - The primary API change is how `co()` is invoked. - Before, `co` returned a "thunk", which you then called with a callback and optional arguments. - Now, `co()` returns a promise. - -```js -co(function* () { - var result = yield Promise.resolve(true); - return result; -}).then(function (value) { - console.log(value); -}, function (err) { - console.error(err.stack); -}); -``` - - If you want to convert a `co`-generator-function into a regular function that returns a promise, - you now use `co.wrap(fn*)`. - -```js -var fn = co.wrap(function* (val) { - return yield Promise.resolve(val); -}); - -fn(true).then(function (val) { - -}); -``` - -## Platform Compatibility - - `co@4+` requires a `Promise` implementation. - For versions of node `< 0.11` and for many older browsers, - you should/must include your own `Promise` polyfill. - - When using node 0.11.x or greater, you must use the `--harmony-generators` - flag or just `--harmony` to get access to generators. - - When using node 0.10.x and lower or browsers without generator support, - you must use [gnode](https://github.com/TooTallNate/gnode) and/or [regenerator](http://facebook.github.io/regenerator/). - - io.js is supported out of the box, you can use `co` without flags or polyfills. - -## Installation - -``` -$ npm install co -``` - -## Associated libraries - -Any library that returns promises work well with `co`. - -- [mz](https://github.com/normalize/mz) - wrap all of node's code libraries as promises. - -View the [wiki](https://github.com/visionmedia/co/wiki) for more libraries. - -## Examples - -```js -var co = require('co'); - -co(function *(){ - // yield any promise - var result = yield Promise.resolve(true); -}).catch(onerror); - -co(function *(){ - // resolve multiple promises in parallel - var a = Promise.resolve(1); - var b = Promise.resolve(2); - var c = Promise.resolve(3); - var res = yield [a, b, c]; - console.log(res); - // => [1, 2, 3] -}).catch(onerror); - -// errors can be try/catched -co(function *(){ - try { - yield Promise.reject(new Error('boom')); - } catch (err) { - console.error(err.message); // "boom" - } -}).catch(onerror); - -function onerror(err) { - // log any uncaught errors - // co will not throw any errors you do not handle!!! - // HANDLE ALL YOUR ERRORS!!! - console.error(err.stack); -} -``` - -## Yieldables - - The `yieldable` objects currently supported are: - - - promises - - thunks (functions) - - array (parallel execution) - - objects (parallel execution) - - generators (delegation) - - generator functions (delegation) - -Nested `yieldable` objects are supported, meaning you can nest -promises within objects within arrays, and so on! - -### Promises - -[Read more on promises!](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) - -### Thunks - -Thunks are functions that only have a single argument, a callback. -Thunk support only remains for backwards compatibility and may -be removed in future versions of `co`. - -### Arrays - -`yield`ing an array will resolve all the `yieldables` in parallel. - -```js -co(function* () { - var res = yield [ - Promise.resolve(1), - Promise.resolve(2), - Promise.resolve(3), - ]; - console.log(res); // => [1, 2, 3] -}).catch(onerror); -``` - -### Objects - -Just like arrays, objects resolve all `yieldable`s in parallel. - -```js -co(function* () { - var res = yield { - 1: Promise.resolve(1), - 2: Promise.resolve(2), - }; - console.log(res); // => { 1: 1, 2: 2 } -}).catch(onerror); -``` - -### Generators and Generator Functions - -Any generator or generator function you can pass into `co` -can be yielded as well. This should generally be avoided -as we should be moving towards spec-compliant `Promise`s instead. - -## API - -### co(fn*).then( val => ) - -Returns a promise that resolves a generator, generator function, -or any function that returns a generator. - -```js -co(function* () { - return yield Promise.resolve(true); -}).then(function (val) { - console.log(val); -}, function (err) { - console.error(err.stack); -}); -``` - -### var fn = co.wrap(fn*) - -Convert a generator into a regular function that returns a `Promise`. - -```js -var fn = co.wrap(function* (val) { - return yield Promise.resolve(val); -}); - -fn(true).then(function (val) { - -}); -``` - -## License - - MIT - -[npm-image]: https://img.shields.io/npm/v/co.svg?style=flat-square -[npm-url]: https://npmjs.org/package/co -[travis-image]: https://img.shields.io/travis/tj/co.svg?style=flat-square -[travis-url]: https://travis-ci.org/tj/co -[coveralls-image]: https://img.shields.io/coveralls/tj/co.svg?style=flat-square -[coveralls-url]: https://coveralls.io/r/tj/co -[downloads-image]: http://img.shields.io/npm/dm/co.svg?style=flat-square -[downloads-url]: https://npmjs.org/package/co -[gitter-image]: https://badges.gitter.im/Join%20Chat.svg -[gitter-url]: https://gitter.im/tj/co?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge diff --git a/node_modules/co/index.js b/node_modules/co/index.js deleted file mode 100644 index 87ba8ba..0000000 --- a/node_modules/co/index.js +++ /dev/null @@ -1,237 +0,0 @@ - -/** - * slice() reference. - */ - -var slice = Array.prototype.slice; - -/** - * Expose `co`. - */ - -module.exports = co['default'] = co.co = co; - -/** - * Wrap the given generator `fn` into a - * function that returns a promise. - * This is a separate function so that - * every `co()` call doesn't create a new, - * unnecessary closure. - * - * @param {GeneratorFunction} fn - * @return {Function} - * @api public - */ - -co.wrap = function (fn) { - createPromise.__generatorFunction__ = fn; - return createPromise; - function createPromise() { - return co.call(this, fn.apply(this, arguments)); - } -}; - -/** - * Execute the generator function or a generator - * and return a promise. - * - * @param {Function} fn - * @return {Promise} - * @api public - */ - -function co(gen) { - var ctx = this; - var args = slice.call(arguments, 1) - - // we wrap everything in a promise to avoid promise chaining, - // which leads to memory leak errors. - // see https://github.com/tj/co/issues/180 - return new Promise(function(resolve, reject) { - if (typeof gen === 'function') gen = gen.apply(ctx, args); - if (!gen || typeof gen.next !== 'function') return resolve(gen); - - onFulfilled(); - - /** - * @param {Mixed} res - * @return {Promise} - * @api private - */ - - function onFulfilled(res) { - var ret; - try { - ret = gen.next(res); - } catch (e) { - return reject(e); - } - next(ret); - } - - /** - * @param {Error} err - * @return {Promise} - * @api private - */ - - function onRejected(err) { - var ret; - try { - ret = gen.throw(err); - } catch (e) { - return reject(e); - } - next(ret); - } - - /** - * Get the next value in the generator, - * return a promise. - * - * @param {Object} ret - * @return {Promise} - * @api private - */ - - function next(ret) { - if (ret.done) return resolve(ret.value); - var value = toPromise.call(ctx, ret.value); - if (value && isPromise(value)) return value.then(onFulfilled, onRejected); - return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, ' - + 'but the following object was passed: "' + String(ret.value) + '"')); - } - }); -} - -/** - * Convert a `yield`ed value into a promise. - * - * @param {Mixed} obj - * @return {Promise} - * @api private - */ - -function toPromise(obj) { - if (!obj) return obj; - if (isPromise(obj)) return obj; - if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj); - if ('function' == typeof obj) return thunkToPromise.call(this, obj); - if (Array.isArray(obj)) return arrayToPromise.call(this, obj); - if (isObject(obj)) return objectToPromise.call(this, obj); - return obj; -} - -/** - * Convert a thunk to a promise. - * - * @param {Function} - * @return {Promise} - * @api private - */ - -function thunkToPromise(fn) { - var ctx = this; - return new Promise(function (resolve, reject) { - fn.call(ctx, function (err, res) { - if (err) return reject(err); - if (arguments.length > 2) res = slice.call(arguments, 1); - resolve(res); - }); - }); -} - -/** - * Convert an array of "yieldables" to a promise. - * Uses `Promise.all()` internally. - * - * @param {Array} obj - * @return {Promise} - * @api private - */ - -function arrayToPromise(obj) { - return Promise.all(obj.map(toPromise, this)); -} - -/** - * Convert an object of "yieldables" to a promise. - * Uses `Promise.all()` internally. - * - * @param {Object} obj - * @return {Promise} - * @api private - */ - -function objectToPromise(obj){ - var results = new obj.constructor(); - var keys = Object.keys(obj); - var promises = []; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var promise = toPromise.call(this, obj[key]); - if (promise && isPromise(promise)) defer(promise, key); - else results[key] = obj[key]; - } - return Promise.all(promises).then(function () { - return results; - }); - - function defer(promise, key) { - // predefine the key in the result - results[key] = undefined; - promises.push(promise.then(function (res) { - results[key] = res; - })); - } -} - -/** - * Check if `obj` is a promise. - * - * @param {Object} obj - * @return {Boolean} - * @api private - */ - -function isPromise(obj) { - return 'function' == typeof obj.then; -} - -/** - * Check if `obj` is a generator. - * - * @param {Mixed} obj - * @return {Boolean} - * @api private - */ - -function isGenerator(obj) { - return 'function' == typeof obj.next && 'function' == typeof obj.throw; -} - -/** - * Check if `obj` is a generator function. - * - * @param {Mixed} obj - * @return {Boolean} - * @api private - */ -function isGeneratorFunction(obj) { - var constructor = obj.constructor; - if (!constructor) return false; - if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true; - return isGenerator(constructor.prototype); -} - -/** - * Check for plain object. - * - * @param {Mixed} val - * @return {Boolean} - * @api private - */ - -function isObject(val) { - return Object == val.constructor; -} diff --git a/node_modules/co/package.json b/node_modules/co/package.json deleted file mode 100644 index a90dc47..0000000 --- a/node_modules/co/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "co@^4.6.0", - "_id": "co@4.6.0", - "_inBundle": false, - "_integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "_location": "/co", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "co@^4.6.0", - "name": "co", - "escapedName": "co", - "rawSpec": "^4.6.0", - "saveSpec": null, - "fetchSpec": "^4.6.0" - }, - "_requiredBy": [ - "/ajv" - ], - "_resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "_shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184", - "_spec": "co@^4.6.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/ajv", - "bugs": { - "url": "https://github.com/tj/co/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "generator async control flow goodness", - "devDependencies": { - "browserify": "^10.0.0", - "istanbul-harmony": "0", - "mocha": "^2.0.0", - "mz": "^1.0.2" - }, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/tj/co#readme", - "keywords": [ - "async", - "flow", - "generator", - "coro", - "coroutine" - ], - "license": "MIT", - "name": "co", - "repository": { - "type": "git", - "url": "git+https://github.com/tj/co.git" - }, - "scripts": { - "browserify": "browserify index.js -o ./co-browser.js -s co", - "prepublish": "npm run browserify", - "test": "mocha --harmony", - "test-cov": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter dot", - "test-travis": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --reporter dot" - }, - "version": "4.6.0" -} diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json index 0f684e3..4895a67 100644 --- a/node_modules/color-convert/package.json +++ b/node_modules/color-convert/package.json @@ -1,27 +1,32 @@ { - "_from": "color-convert@^1.9.0", + "_args": [ + [ + "color-convert@1.9.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "color-convert@1.9.1", "_id": "color-convert@1.9.1", "_inBundle": false, "_integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "_location": "/color-convert", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "color-convert@^1.9.0", + "raw": "color-convert@1.9.1", "name": "color-convert", "escapedName": "color-convert", - "rawSpec": "^1.9.0", + "rawSpec": "1.9.1", "saveSpec": null, - "fetchSpec": "^1.9.0" + "fetchSpec": "1.9.1" }, "_requiredBy": [ "/@babel/highlight/ansi-styles" ], "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "_shasum": "c1261107aeb2f294ebffec9ed9ecad529a6097ed", - "_spec": "color-convert@^1.9.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/highlight/node_modules/ansi-styles", + "_spec": "1.9.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Heather Arthur", "email": "fayearthur@gmail.com" @@ -29,11 +34,9 @@ "bugs": { "url": "https://github.com/Qix-/color-convert/issues" }, - "bundleDependencies": false, "dependencies": { "color-name": "^1.1.1" }, - "deprecated": false, "description": "Plain color conversion functions", "devDependencies": { "chalk": "^1.1.1", diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json index 89e6a74..408ff10 100644 --- a/node_modules/color-name/package.json +++ b/node_modules/color-name/package.json @@ -1,27 +1,32 @@ { - "_from": "color-name@^1.1.1", + "_args": [ + [ + "color-name@1.1.3", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "color-name@1.1.3", "_id": "color-name@1.1.3", "_inBundle": false, "_integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "_location": "/color-name", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "color-name@^1.1.1", + "raw": "color-name@1.1.3", "name": "color-name", "escapedName": "color-name", - "rawSpec": "^1.1.1", + "rawSpec": "1.1.3", "saveSpec": null, - "fetchSpec": "^1.1.1" + "fetchSpec": "1.1.3" }, "_requiredBy": [ "/color-convert" ], "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25", - "_spec": "color-name@^1.1.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/color-convert", + "_spec": "1.1.3", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "DY", "email": "dfcreative@gmail.com" @@ -29,8 +34,6 @@ "bugs": { "url": "https://github.com/dfcreative/color-name/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "A list of color names and its values", "homepage": "https://github.com/dfcreative/color-name", "keywords": [ diff --git a/node_modules/combined-stream/package.json b/node_modules/combined-stream/package.json index e70bab9..b955e85 100644 --- a/node_modules/combined-stream/package.json +++ b/node_modules/combined-stream/package.json @@ -1,28 +1,28 @@ { - "_from": "combined-stream@~1.0.5", - "_id": "combined-stream@1.0.6", + "_from": "combined-stream@~1.0.6", + "_id": "combined-stream@1.0.7", "_inBundle": false, - "_integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "_integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "_location": "/combined-stream", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "combined-stream@~1.0.5", + "raw": "combined-stream@~1.0.6", "name": "combined-stream", "escapedName": "combined-stream", - "rawSpec": "~1.0.5", + "rawSpec": "~1.0.6", "saveSpec": null, - "fetchSpec": "~1.0.5" + "fetchSpec": "~1.0.6" }, "_requiredBy": [ "/form-data", "/request" ], - "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "_shasum": "723e7df6e801ac5613113a7e445a9b69cb632818", - "_spec": "combined-stream@~1.0.5", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/request", + "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "_shasum": "2d1d24317afb8abe95d6d2c0b07b57813539d828", + "_spec": "combined-stream@~1.0.6", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\request", "author": { "name": "Felix Geisendörfer", "email": "felix@debuggable.com", @@ -54,5 +54,5 @@ "scripts": { "test": "node test/run.js" }, - "version": "1.0.6" + "version": "1.0.7" } diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json index 40cfa4c..9f7597b 100644 --- a/node_modules/concat-map/package.json +++ b/node_modules/concat-map/package.json @@ -1,4 +1,10 @@ { + "_args": [ + [ + "concat-map@0.0.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], "_from": "concat-map@0.0.1", "_id": "concat-map@0.0.1", "_inBundle": false, @@ -19,9 +25,8 @@ "/brace-expansion" ], "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "_spec": "concat-map@0.0.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/brace-expansion", + "_spec": "0.0.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/substack/node-concat-map/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "concatenative mapdashery", "devDependencies": { "tape": "~2.4.0" diff --git a/node_modules/convert-source-map/package.json b/node_modules/convert-source-map/package.json index fe2f8df..8b2e12b 100644 --- a/node_modules/convert-source-map/package.json +++ b/node_modules/convert-source-map/package.json @@ -1,28 +1,33 @@ { - "_from": "convert-source-map@^1.5.0", + "_args": [ + [ + "convert-source-map@1.5.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "convert-source-map@1.5.1", "_id": "convert-source-map@1.5.1", "_inBundle": false, "_integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "_location": "/convert-source-map", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "convert-source-map@^1.5.0", + "raw": "convert-source-map@1.5.1", "name": "convert-source-map", "escapedName": "convert-source-map", - "rawSpec": "^1.5.0", + "rawSpec": "1.5.1", "saveSpec": null, - "fetchSpec": "^1.5.0" + "fetchSpec": "1.5.1" }, "_requiredBy": [ - "/babel-cli", - "/babel-core" + "/babel-core", + "/babel-minify/@babel/core" ], "_resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "_shasum": "b8278097b9bc229365de5c62cf5fcaed8b5599e5", - "_spec": "convert-source-map@^1.5.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-cli", + "_spec": "1.5.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Thorsten Lorenz", "email": "thlorenz@gmx.de", @@ -31,9 +36,7 @@ "bugs": { "url": "https://github.com/thlorenz/convert-source-map/issues" }, - "bundleDependencies": false, "dependencies": {}, - "deprecated": false, "description": "Converts a source-map from/to different formats and allows adding/changing properties.", "devDependencies": { "inline-source-map": "~0.6.2", diff --git a/node_modules/core-js/package.json b/node_modules/core-js/package.json index b748de4..35cb937 100644 --- a/node_modules/core-js/package.json +++ b/node_modules/core-js/package.json @@ -1,34 +1,36 @@ { - "_from": "core-js@^2.4.0", + "_args": [ + [ + "core-js@2.5.5", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "core-js@2.5.5", "_id": "core-js@2.5.5", "_inBundle": false, "_integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=", "_location": "/core-js", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "core-js@^2.4.0", + "raw": "core-js@2.5.5", "name": "core-js", "escapedName": "core-js", - "rawSpec": "^2.4.0", + "rawSpec": "2.5.5", "saveSpec": null, - "fetchSpec": "^2.4.0" + "fetchSpec": "2.5.5" }, "_requiredBy": [ - "/babel-polyfill", "/babel-register", "/babel-runtime" ], "_resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", - "_shasum": "b14dde936c640c0579a6b50cabcc132dd6127e3b", - "_spec": "core-js@^2.4.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-runtime", + "_spec": "2.5.5", + "_where": "E:\\projects\\p\\minifyfromhtml", "bugs": { "url": "https://github.com/zloirock/core-js/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Standard library", "devDependencies": { "LiveScript": "1.3.x", diff --git a/node_modules/core-util-is/package.json b/node_modules/core-util-is/package.json index 390f6f4..bcc950f 100644 --- a/node_modules/core-util-is/package.json +++ b/node_modules/core-util-is/package.json @@ -1,27 +1,32 @@ { - "_from": "core-util-is@~1.0.0", + "_args": [ + [ + "core-util-is@1.0.2", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "core-util-is@1.0.2", "_id": "core-util-is@1.0.2", "_inBundle": false, "_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "_location": "/core-util-is", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "core-util-is@~1.0.0", + "raw": "core-util-is@1.0.2", "name": "core-util-is", "escapedName": "core-util-is", - "rawSpec": "~1.0.0", + "rawSpec": "1.0.2", "saveSpec": null, - "fetchSpec": "~1.0.0" + "fetchSpec": "1.0.2" }, "_requiredBy": [ - "/readable-stream" + "/verror" ], "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", - "_spec": "core-util-is@~1.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/readable-stream", + "_spec": "1.0.2", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/isaacs/core-util-is/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "The `util.is*` functions introduced in Node v0.12.", "devDependencies": { "tap": "^2.3.0" diff --git a/node_modules/cryptiles/.npmignore b/node_modules/cryptiles/.npmignore deleted file mode 100644 index 10c1307..0000000 --- a/node_modules/cryptiles/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!lib/** -!.npmignore diff --git a/node_modules/cryptiles/LICENSE b/node_modules/cryptiles/LICENSE deleted file mode 100755 index 4028ccd..0000000 --- a/node_modules/cryptiles/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2014-2017, Eran Hammer and Project contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hueniverse/cryptiles/graphs/contributors diff --git a/node_modules/cryptiles/README.md b/node_modules/cryptiles/README.md deleted file mode 100755 index b3df9e6..0000000 --- a/node_modules/cryptiles/README.md +++ /dev/null @@ -1,19 +0,0 @@ -cryptiles -========= - -General purpose crypto utilities - -[![Build Status](https://secure.travis-ci.org/hapijs/cryptiles.png)](http://travis-ci.org/hapijs/cryptiles) - -Lead Maintainer - [C J Silverio](https://github.com/ceejbot) - -## Methods - -### `randomString( size)` -Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string. - -### `randomDigits( size)` -Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9). Takes a size argument for the length of the string. - -### `fixedTimeComparison( a, b)` -Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ. diff --git a/node_modules/cryptiles/lib/index.js b/node_modules/cryptiles/lib/index.js deleted file mode 100755 index 511eab6..0000000 --- a/node_modules/cryptiles/lib/index.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -// Load modules - -const Crypto = require('crypto'); -const Boom = require('boom'); - - -// Declare internals - -const internals = {}; - - -// Generate a cryptographically strong pseudo-random data - -exports.randomString = function (size) { - - const buffer = exports.randomBits((size + 1) * 6); - if (buffer instanceof Error) { - return buffer; - } - - const string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); - return string.slice(0, size); -}; - - -// Return a random string of digits - -exports.randomDigits = function (size) { - - const buffer = exports.randomBits(size * 8); - if (buffer instanceof Error) { - return buffer; - } - - const digits = []; - for (let i = 0; i < buffer.length; ++i) { - digits.push(Math.floor(buffer[i] / 25.6)); - } - - return digits.join(''); -}; - - -// Generate a buffer of random bits - -exports.randomBits = function (bits) { - - if (!bits || - bits < 0) { - - return Boom.internal('Invalid random bits count'); - } - - const bytes = Math.ceil(bits / 8); - try { - return Crypto.randomBytes(bytes); - } - catch (err) { - return Boom.internal('Failed generating random bits: ' + err.message); - } -}; - - -// Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match) - -exports.fixedTimeComparison = function (a, b) { - - if (typeof a !== 'string' || - typeof b !== 'string') { - - return false; - } - - let mismatch = (a.length === b.length ? 0 : 1); - if (mismatch) { - b = a; - } - - for (let i = 0; i < a.length; ++i) { - const ac = a.charCodeAt(i); - const bc = b.charCodeAt(i); - mismatch |= (ac ^ bc); - } - - return (mismatch === 0); -}; diff --git a/node_modules/cryptiles/node_modules/boom/LICENSE b/node_modules/cryptiles/node_modules/boom/LICENSE deleted file mode 100755 index 94b91cb..0000000 --- a/node_modules/cryptiles/node_modules/boom/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2012-2017, Project contributors. -Copyright (c) 2012-2014, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors diff --git a/node_modules/cryptiles/node_modules/boom/README.md b/node_modules/cryptiles/node_modules/boom/README.md deleted file mode 100755 index 50d5b0d..0000000 --- a/node_modules/cryptiles/node_modules/boom/README.md +++ /dev/null @@ -1,784 +0,0 @@ -![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png) - -HTTP-friendly error objects - -[![Build Status](https://secure.travis-ci.org/hapijs/boom.svg)](http://travis-ci.org/hapijs/boom) -[![Current Version](https://img.shields.io/npm/v/boom.svg)](https://www.npmjs.com/package/boom) - -Lead Maintainer: [Adam Bretz](https://github.com/arb) - - - -- [Boom](#boom) - - [Helper Methods](#helper-methods) - - [`boomify(error, [options])`](#boomifyerror-options) - - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message) - - [`create(statusCode, [message], [data])`](#createstatuscode-message-data) - - [HTTP 4xx Errors](#http-4xx-errors) - - [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data) - - [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes) - - [`Boom.paymentRequired([message], [data])`](#boompaymentrequiredmessage-data) - - [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data) - - [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data) - - [`Boom.methodNotAllowed([message], [data], [allow])`](#boommethodnotallowedmessage-data-allow) - - [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data) - - [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data) - - [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data) - - [`Boom.conflict([message], [data])`](#boomconflictmessage-data) - - [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data) - - [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data) - - [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data) - - [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data) - - [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data) - - [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data) - - [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data) - - [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data) - - [`Boom.teapot([message], [data])`](#boomteapotmessage-data) - - [`Boom.badData([message], [data])`](#boombaddatamessage-data) - - [`Boom.locked([message], [data])`](#boomlockedmessage-data) - - [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data) - - [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data) - - [`Boom.illegal([message], [data])`](#boomillegalmessage-data) - - [HTTP 5xx Errors](#http-5xx-errors) - - [`Boom.badImplementation([message], [data])` - (*alias: `internal`*)](#boombadimplementationmessage-data---alias-internal) - - [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data) - - [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data) - - [`Boom.serverUnavailable([message], [data])`](#boomserverunavailablemessage-data) - - [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data) - - [F.A.Q.](#faq) - - - -# Boom - -**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response -object (instance of `Error`) which includes the following properties: -- `isBoom` - if `true`, indicates this is a `Boom` object instance. -- `isServer` - convenience bool indicating status code >= 500. -- `message` - the error message. -- `typeof` - the contructor used to create the error (e.g. `Boom.badRequest`). -- `output` - the formatted response. Can be directly manipulated after object construction to return a custom - error response. Allowed root keys: - - `statusCode` - the HTTP status code (typically 4xx or 5xx). - - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content. - - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any - changes will be lost - if `reformat()` is called. Any content allowed and by default includes the following content: - - `statusCode` - the HTTP status code, derived from `error.output.statusCode`. - - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`. - - `message` - the error message derived from `error.message`. -- inherited `Error` properties. - -The `Boom` object also supports the following method: -- `reformat()` - rebuilds `error.output` using the other object properties. - -## Helper Methods - -### `boomify(error, [options])` - -Decorates an error with the **boom** properties where: -- `error` - the `Error` object to decorate. -- `options` - optional object with the following optional settings: - - `statusCode` - the HTTP status code. Defaults to `500` if no status code is already set. - - `message` - error message string. If the error already has a message, the provided `message` is added as a prefix. - Defaults to no message. - - `override` - if `false`, the `error` provided is a **boom** object, and a `statusCode` or `message` are provided, - the values are ignored. Defaults to `true` (apply the provided `statusCode` and `message` options to the error - regardless of its type, `Error` or **boom** object). - -Note: This method replaces the [`wrap()`](#wraperror-statuscode-message) and changes the default behavior to override -existing **boom** objects with the provided status code and message. - -```js -var error = new Error('Unexpected input'); -Boom.boomify(error, { statusCode: 400 }); -``` - -### `wrap(error, [statusCode], [message])` - -Note: This method is deprecated. - -Decorates an error with the **boom** properties where: -- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object. -- `statusCode` - optional HTTP status code. Defaults to `500`. -- `message` - optional message string. If the error already has a message, it adds the message as a prefix. - Defaults to no message. - -```js -var error = new Error('Unexpected input'); -Boom.wrap(error, 400); -``` - -### `create(statusCode, [message], [data])` - -Generates an `Error` object with the **boom** decorations where: -- `statusCode` - an HTTP error code number. Must be greater or equal 400. -- `message` - optional message string. -- `data` - additional error data set to `error.data` property. - -```js -var error = Boom.create(400, 'Bad request', { timestamp: Date.now() }); -``` - -## HTTP 4xx Errors - -### `Boom.badRequest([message], [data])` - -Returns a 400 Bad Request error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badRequest('invalid query'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 400, - "error": "Bad Request", - "message": "invalid query" -} -``` - -### `Boom.unauthorized([message], [scheme], [attributes])` - -Returns a 401 Unauthorized error where: -- `message` - optional message. -- `scheme` can be one of the following: - - an authentication scheme name - - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header. -- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used - when `scheme` is a string, otherwise it is ignored. Every key/value pair will be included in the - 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key. Alternatively value can be a string which is use to set the value of the scheme, for example setting the token value for negotiate header. If string is used message parameter must be null. - `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as - the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header - will not be present and `isMissing` will be true on the error object. - -If either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response. - -```js -Boom.unauthorized('invalid password'); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password" -}, -"headers" {} -``` - -```js -Boom.unauthorized('invalid password', 'sample'); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password", - "attributes": { - "error": "invalid password" - } -}, -"headers" { - "WWW-Authenticate": "sample error=\"invalid password\"" -} -``` - -```js -Boom.unauthorized(null, 'Negotiate', 'VGhpcyBpcyBhIHRlc3QgdG9rZW4='); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "attributes": "VGhpcyBpcyBhIHRlc3QgdG9rZW4=" -}, -"headers" { - "WWW-Authenticate": "Negotiate VGhpcyBpcyBhIHRlc3QgdG9rZW4=" -} -``` - -```js -Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' }); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password", - "attributes": { - "error": "invalid password", - "ttl": 0, - "cache": "", - "foo": "bar" - } -}, -"headers" { - "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", error=\"invalid password\"" -} -``` - -### `Boom.paymentRequired([message], [data])` - -Returns a 402 Payment Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.paymentRequired('bandwidth used'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 402, - "error": "Payment Required", - "message": "bandwidth used" -} -``` - -### `Boom.forbidden([message], [data])` - -Returns a 403 Forbidden error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.forbidden('try again some time'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 403, - "error": "Forbidden", - "message": "try again some time" -} -``` - -### `Boom.notFound([message], [data])` - -Returns a 404 Not Found error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notFound('missing'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 404, - "error": "Not Found", - "message": "missing" -} -``` - -### `Boom.methodNotAllowed([message], [data], [allow])` - -Returns a 405 Method Not Allowed error where: -- `message` - optional message. -- `data` - optional additional error data. -- `allow` - optional string or array of strings (to be combined and separated by ', ') which is set to the 'Allow' header. - -```js -Boom.methodNotAllowed('that method is not allowed'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 405, - "error": "Method Not Allowed", - "message": "that method is not allowed" -} -``` - -### `Boom.notAcceptable([message], [data])` - -Returns a 406 Not Acceptable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notAcceptable('unacceptable'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 406, - "error": "Not Acceptable", - "message": "unacceptable" -} -``` - -### `Boom.proxyAuthRequired([message], [data])` - -Returns a 407 Proxy Authentication Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.proxyAuthRequired('auth missing'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 407, - "error": "Proxy Authentication Required", - "message": "auth missing" -} -``` - -### `Boom.clientTimeout([message], [data])` - -Returns a 408 Request Time-out error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.clientTimeout('timed out'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 408, - "error": "Request Time-out", - "message": "timed out" -} -``` - -### `Boom.conflict([message], [data])` - -Returns a 409 Conflict error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.conflict('there was a conflict'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 409, - "error": "Conflict", - "message": "there was a conflict" -} -``` - -### `Boom.resourceGone([message], [data])` - -Returns a 410 Gone error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.resourceGone('it is gone'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 410, - "error": "Gone", - "message": "it is gone" -} -``` - -### `Boom.lengthRequired([message], [data])` - -Returns a 411 Length Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.lengthRequired('length needed'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 411, - "error": "Length Required", - "message": "length needed" -} -``` - -### `Boom.preconditionFailed([message], [data])` - -Returns a 412 Precondition Failed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.preconditionFailed(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 412, - "error": "Precondition Failed" -} -``` - -### `Boom.entityTooLarge([message], [data])` - -Returns a 413 Request Entity Too Large error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.entityTooLarge('too big'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 413, - "error": "Request Entity Too Large", - "message": "too big" -} -``` - -### `Boom.uriTooLong([message], [data])` - -Returns a 414 Request-URI Too Large error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.uriTooLong('uri is too long'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 414, - "error": "Request-URI Too Large", - "message": "uri is too long" -} -``` - -### `Boom.unsupportedMediaType([message], [data])` - -Returns a 415 Unsupported Media Type error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.unsupportedMediaType('that media is not supported'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 415, - "error": "Unsupported Media Type", - "message": "that media is not supported" -} -``` - -### `Boom.rangeNotSatisfiable([message], [data])` - -Returns a 416 Requested Range Not Satisfiable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.rangeNotSatisfiable(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 416, - "error": "Requested Range Not Satisfiable" -} -``` - -### `Boom.expectationFailed([message], [data])` - -Returns a 417 Expectation Failed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.expectationFailed('expected this to work'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 417, - "error": "Expectation Failed", - "message": "expected this to work" -} -``` - -### `Boom.teapot([message], [data])` - -Returns a 418 I'm a Teapot error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.teapot('sorry, no coffee...'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 418, - "error": "I'm a Teapot", - "message": "Sorry, no coffee..." -} -``` - -### `Boom.badData([message], [data])` - -Returns a 422 Unprocessable Entity error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badData('your data is bad and you should feel bad'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 422, - "error": "Unprocessable Entity", - "message": "your data is bad and you should feel bad" -} -``` - -### `Boom.locked([message], [data])` - -Returns a 423 Locked error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.locked('this resource has been locked'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 423, - "error": "Locked", - "message": "this resource has been locked" -} -``` - -### `Boom.preconditionRequired([message], [data])` - -Returns a 428 Precondition Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.preconditionRequired('you must supply an If-Match header'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 428, - "error": "Precondition Required", - "message": "you must supply an If-Match header" -} -``` - -### `Boom.tooManyRequests([message], [data])` - -Returns a 429 Too Many Requests error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.tooManyRequests('you have exceeded your request limit'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 429, - "error": "Too Many Requests", - "message": "you have exceeded your request limit" -} -``` - -### `Boom.illegal([message], [data])` - -Returns a 451 Unavailable For Legal Reasons error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.illegal('you are not permitted to view this resource for legal reasons'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 451, - "error": "Unavailable For Legal Reasons", - "message": "you are not permitted to view this resource for legal reasons" -} -``` - -## HTTP 5xx Errors - -All 500 errors hide your message from the end user. Your message is recorded in the server log. - -### `Boom.badImplementation([message], [data])` - (*alias: `internal`*) - -Returns a 500 Internal Server Error error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badImplementation('terrible implementation'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 500, - "error": "Internal Server Error", - "message": "An internal server error occurred" -} -``` - -### `Boom.notImplemented([message], [data])` - -Returns a 501 Not Implemented error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notImplemented('method not implemented'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 501, - "error": "Not Implemented", - "message": "method not implemented" -} -``` - -### `Boom.badGateway([message], [data])` - -Returns a 502 Bad Gateway error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badGateway('that is a bad gateway'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 502, - "error": "Bad Gateway", - "message": "that is a bad gateway" -} -``` - -### `Boom.serverUnavailable([message], [data])` - -Returns a 503 Service Unavailable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.serverUnavailable('unavailable'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 503, - "error": "Service Unavailable", - "message": "unavailable" -} -``` - -### `Boom.gatewayTimeout([message], [data])` - -Returns a 504 Gateway Time-out error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.gatewayTimeout(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 504, - "error": "Gateway Time-out" -} -``` - -## F.A.Q. - -**Q** How do I include extra information in my responses? `output.payload` is missing `data`, what gives? - -**A** There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation. - ---- diff --git a/node_modules/cryptiles/node_modules/boom/lib/index.js b/node_modules/cryptiles/node_modules/boom/lib/index.js deleted file mode 100755 index c57c79d..0000000 --- a/node_modules/cryptiles/node_modules/boom/lib/index.js +++ /dev/null @@ -1,457 +0,0 @@ -'use strict'; - -// Load modules - -const Hoek = require('hoek'); - - -// Declare internals - -const internals = { - STATUS_CODES: Object.setPrototypeOf({ - '100': 'Continue', - '101': 'Switching Protocols', - '102': 'Processing', - '200': 'OK', - '201': 'Created', - '202': 'Accepted', - '203': 'Non-Authoritative Information', - '204': 'No Content', - '205': 'Reset Content', - '206': 'Partial Content', - '207': 'Multi-Status', - '300': 'Multiple Choices', - '301': 'Moved Permanently', - '302': 'Moved Temporarily', - '303': 'See Other', - '304': 'Not Modified', - '305': 'Use Proxy', - '307': 'Temporary Redirect', - '400': 'Bad Request', - '401': 'Unauthorized', - '402': 'Payment Required', - '403': 'Forbidden', - '404': 'Not Found', - '405': 'Method Not Allowed', - '406': 'Not Acceptable', - '407': 'Proxy Authentication Required', - '408': 'Request Time-out', - '409': 'Conflict', - '410': 'Gone', - '411': 'Length Required', - '412': 'Precondition Failed', - '413': 'Request Entity Too Large', - '414': 'Request-URI Too Large', - '415': 'Unsupported Media Type', - '416': 'Requested Range Not Satisfiable', - '417': 'Expectation Failed', - '418': 'I\'m a teapot', - '422': 'Unprocessable Entity', - '423': 'Locked', - '424': 'Failed Dependency', - '425': 'Unordered Collection', - '426': 'Upgrade Required', - '428': 'Precondition Required', - '429': 'Too Many Requests', - '431': 'Request Header Fields Too Large', - '451': 'Unavailable For Legal Reasons', - '500': 'Internal Server Error', - '501': 'Not Implemented', - '502': 'Bad Gateway', - '503': 'Service Unavailable', - '504': 'Gateway Time-out', - '505': 'HTTP Version Not Supported', - '506': 'Variant Also Negotiates', - '507': 'Insufficient Storage', - '509': 'Bandwidth Limit Exceeded', - '510': 'Not Extended', - '511': 'Network Authentication Required' - }, null) -}; - - -exports.boomify = function (error, options) { - - Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object'); - - options = options || {}; - - if (!error.isBoom) { - return internals.initialize(error, options.statusCode || 500, options.message); - } - - if (options.override === false || // Defaults to true - (!options.statusCode && !options.message)) { - - return error; - } - - return internals.initialize(error, options.statusCode || error.output.statusCode, options.message); -}; - - -exports.wrap = function (error, statusCode, message) { - - Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object'); - Hoek.assert(!error.isBoom || (!statusCode && !message), 'Cannot provide statusCode or message with boom error'); - - return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message)); -}; - - -exports.create = function (statusCode, message, data) { - - return internals.create(statusCode, message, data, exports.create); -}; - - -internals.create = function (statusCode, message, data, ctor) { - - if (message instanceof Error) { - if (data) { - message.data = data; - } - - return exports.wrap(message, statusCode); - } - - const error = new Error(message ? message : undefined); // Avoids settings null message - Error.captureStackTrace(error, ctor); // Filter the stack to our external API - error.data = data || null; - internals.initialize(error, statusCode); - error.typeof = ctor; - - return error; -}; - - -internals.initialize = function (error, statusCode, message) { - - const numberCode = parseInt(statusCode, 10); - Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode); - - error.isBoom = true; - error.isServer = numberCode >= 500; - - if (!error.hasOwnProperty('data')) { - error.data = null; - } - - error.output = { - statusCode: numberCode, - payload: {}, - headers: {} - }; - - error.reformat = internals.reformat; - - if (!message && - !error.message) { - - error.reformat(); - message = error.output.payload.error; - } - - if (message) { - error.message = (message + (error.message ? ': ' + error.message : '')); - error.output.payload.message = error.message; - } - - error.reformat(); - return error; -}; - - -internals.reformat = function () { - - this.output.payload.statusCode = this.output.statusCode; - this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown'; - - if (this.output.statusCode === 500) { - this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user - } - else if (this.message) { - this.output.payload.message = this.message; - } -}; - - -// 4xx Client Errors - -exports.badRequest = function (message, data) { - - return internals.create(400, message, data, exports.badRequest); -}; - - -exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[]) - - const err = internals.create(401, message, undefined, exports.unauthorized); - - if (!scheme) { - return err; - } - - let wwwAuthenticate = ''; - - if (typeof scheme === 'string') { - - // function (message, scheme, attributes) - - wwwAuthenticate = scheme; - - if (attributes || message) { - err.output.payload.attributes = {}; - } - - if (attributes) { - if (typeof attributes === 'string') { - wwwAuthenticate = wwwAuthenticate + ' ' + Hoek.escapeHeaderAttribute(attributes); - err.output.payload.attributes = attributes; - } - else { - const names = Object.keys(attributes); - for (let i = 0; i < names.length; ++i) { - const name = names[i]; - if (i) { - wwwAuthenticate = wwwAuthenticate + ','; - } - - let value = attributes[name]; - if (value === null || - value === undefined) { // Value can be zero - - value = ''; - } - wwwAuthenticate = wwwAuthenticate + ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"'; - err.output.payload.attributes[name] = value; - } - } - } - - - if (message) { - if (attributes) { - wwwAuthenticate = wwwAuthenticate + ','; - } - wwwAuthenticate = wwwAuthenticate + ' error="' + Hoek.escapeHeaderAttribute(message) + '"'; - err.output.payload.attributes.error = message; - } - else { - err.isMissing = true; - } - } - else { - - // function (message, wwwAuthenticate[]) - - const wwwArray = scheme; - for (let i = 0; i < wwwArray.length; ++i) { - if (i) { - wwwAuthenticate = wwwAuthenticate + ', '; - } - - wwwAuthenticate = wwwAuthenticate + wwwArray[i]; - } - } - - err.output.headers['WWW-Authenticate'] = wwwAuthenticate; - - return err; -}; - - -exports.paymentRequired = function (message, data) { - - return internals.create(402, message, data, exports.paymentRequired); -}; - - -exports.forbidden = function (message, data) { - - return internals.create(403, message, data, exports.forbidden); -}; - - -exports.notFound = function (message, data) { - - return internals.create(404, message, data, exports.notFound); -}; - - -exports.methodNotAllowed = function (message, data, allow) { - - const err = internals.create(405, message, data, exports.methodNotAllowed); - - if (typeof allow === 'string') { - allow = [allow]; - } - - if (Array.isArray(allow)) { - err.output.headers.Allow = allow.join(', '); - } - - return err; -}; - - -exports.notAcceptable = function (message, data) { - - return internals.create(406, message, data, exports.notAcceptable); -}; - - -exports.proxyAuthRequired = function (message, data) { - - return internals.create(407, message, data, exports.proxyAuthRequired); -}; - - -exports.clientTimeout = function (message, data) { - - return internals.create(408, message, data, exports.clientTimeout); -}; - - -exports.conflict = function (message, data) { - - return internals.create(409, message, data, exports.conflict); -}; - - -exports.resourceGone = function (message, data) { - - return internals.create(410, message, data, exports.resourceGone); -}; - - -exports.lengthRequired = function (message, data) { - - return internals.create(411, message, data, exports.lengthRequired); -}; - - -exports.preconditionFailed = function (message, data) { - - return internals.create(412, message, data, exports.preconditionFailed); -}; - - -exports.entityTooLarge = function (message, data) { - - return internals.create(413, message, data, exports.entityTooLarge); -}; - - -exports.uriTooLong = function (message, data) { - - return internals.create(414, message, data, exports.uriTooLong); -}; - - -exports.unsupportedMediaType = function (message, data) { - - return internals.create(415, message, data, exports.unsupportedMediaType); -}; - - -exports.rangeNotSatisfiable = function (message, data) { - - return internals.create(416, message, data, exports.rangeNotSatisfiable); -}; - - -exports.expectationFailed = function (message, data) { - - return internals.create(417, message, data, exports.expectationFailed); -}; - - -exports.teapot = function (message, data) { - - return internals.create(418, message, data, exports.teapot); -}; - - -exports.badData = function (message, data) { - - return internals.create(422, message, data, exports.badData); -}; - - -exports.locked = function (message, data) { - - return internals.create(423, message, data, exports.locked); -}; - - -exports.preconditionRequired = function (message, data) { - - return internals.create(428, message, data, exports.preconditionRequired); -}; - - -exports.tooManyRequests = function (message, data) { - - return internals.create(429, message, data, exports.tooManyRequests); -}; - - -exports.illegal = function (message, data) { - - return internals.create(451, message, data, exports.illegal); -}; - - -// 5xx Server Errors - -exports.internal = function (message, data, statusCode) { - - return internals.serverError(message, data, statusCode, exports.internal); -}; - - -internals.serverError = function (message, data, statusCode, ctor) { - - if (data instanceof Error && - !data.isBoom) { - - return exports.wrap(data, statusCode, message); - } - - const error = internals.create(statusCode || 500, message, undefined, ctor); - error.data = data; - return error; -}; - - -exports.notImplemented = function (message, data) { - - return internals.serverError(message, data, 501, exports.notImplemented); -}; - - -exports.badGateway = function (message, data) { - - return internals.serverError(message, data, 502, exports.badGateway); -}; - - -exports.serverUnavailable = function (message, data) { - - return internals.serverError(message, data, 503, exports.serverUnavailable); -}; - - -exports.gatewayTimeout = function (message, data) { - - return internals.serverError(message, data, 504, exports.gatewayTimeout); -}; - - -exports.badImplementation = function (message, data) { - - const err = internals.serverError(message, data, 500, exports.badImplementation); - err.isDeveloperError = true; - return err; -}; diff --git a/node_modules/cryptiles/node_modules/boom/package.json b/node_modules/cryptiles/node_modules/boom/package.json deleted file mode 100644 index 6dbe18b..0000000 --- a/node_modules/cryptiles/node_modules/boom/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "boom@5.x.x", - "_id": "boom@5.2.0", - "_inBundle": false, - "_integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "_location": "/cryptiles/boom", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "boom@5.x.x", - "name": "boom", - "escapedName": "boom", - "rawSpec": "5.x.x", - "saveSpec": null, - "fetchSpec": "5.x.x" - }, - "_requiredBy": [ - "/cryptiles" - ], - "_resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "_shasum": "5dd9da6ee3a5f302077436290cb717d3f4a54e02", - "_spec": "boom@5.x.x", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/cryptiles", - "bugs": { - "url": "https://github.com/hapijs/boom/issues" - }, - "bundleDependencies": false, - "dependencies": { - "hoek": "4.x.x" - }, - "deprecated": false, - "description": "HTTP-friendly error objects", - "devDependencies": { - "code": "4.x.x", - "lab": "14.x.x", - "markdown-toc": "0.12.x" - }, - "engines": { - "node": ">=4.0.0" - }, - "homepage": "https://github.com/hapijs/boom#readme", - "keywords": [ - "error", - "http" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "name": "boom", - "repository": { - "type": "git", - "url": "git://github.com/hapijs/boom.git" - }, - "scripts": { - "test": "lab -a code -t 100 -L -v", - "test-cov-html": "lab -a code -r html -o coverage.html -L", - "toc": "node generate-toc.js", - "version": "npm run toc && git add README.md" - }, - "version": "5.2.0" -} diff --git a/node_modules/cryptiles/package.json b/node_modules/cryptiles/package.json deleted file mode 100755 index 3687d63..0000000 --- a/node_modules/cryptiles/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "cryptiles@3.x.x", - "_id": "cryptiles@3.1.2", - "_inBundle": false, - "_integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "_location": "/cryptiles", - "_phantomChildren": { - "hoek": "4.2.1" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "cryptiles@3.x.x", - "name": "cryptiles", - "escapedName": "cryptiles", - "rawSpec": "3.x.x", - "saveSpec": null, - "fetchSpec": "3.x.x" - }, - "_requiredBy": [ - "/hawk" - ], - "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "_shasum": "a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe", - "_spec": "cryptiles@3.x.x", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/hawk", - "bugs": { - "url": "https://github.com/hapijs/cryptiles/issues" - }, - "bundleDependencies": false, - "dependencies": { - "boom": "5.x.x" - }, - "deprecated": false, - "description": "General purpose crypto utilities", - "devDependencies": { - "code": "4.x.x", - "lab": "13.x.x" - }, - "engines": { - "node": ">=4.0.0" - }, - "homepage": "https://github.com/hapijs/cryptiles#readme", - "keywords": [ - "cryptography", - "security", - "utilites" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "name": "cryptiles", - "repository": { - "type": "git", - "url": "git://github.com/hapijs/cryptiles.git" - }, - "scripts": { - "test": "lab -a code -t 100 -L", - "test-cov-html": "lab -a code -r html -o coverage.html" - }, - "version": "3.1.2" -} diff --git a/node_modules/cssom/lib/CSSSupportsRule.js b/node_modules/cssom/lib/CSSSupportsRule.js new file mode 100644 index 0000000..19f85d4 --- /dev/null +++ b/node_modules/cssom/lib/CSSSupportsRule.js @@ -0,0 +1,36 @@ +//.CommonJS +var CSSOM = { + CSSRule: require("./CSSRule").CSSRule, +}; +///CommonJS + + +/** + * @constructor + * @see https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface + */ +CSSOM.CSSSupportsRule = function CSSSupportsRule() { + CSSOM.CSSRule.call(this); + this.conditionText = ''; + this.cssRules = []; +}; + +CSSOM.CSSSupportsRule.prototype = new CSSOM.CSSRule(); +CSSOM.CSSSupportsRule.prototype.constructor = CSSOM.CSSSupportsRule; +CSSOM.CSSSupportsRule.prototype.type = 12; + +Object.defineProperty(CSSOM.CSSSupportsRule.prototype, "cssText", { + get: function() { + var cssTexts = []; + + for (var i = 0, length = this.cssRules.length; i < length; i++) { + cssTexts.push(this.cssRules[i].cssText); + } + + return "@supports " + this.conditionText + " {" + cssTexts.join("") + "}"; + } +}); + +//.CommonJS +exports.CSSSupportsRule = CSSOM.CSSSupportsRule; +///CommonJS diff --git a/node_modules/cssom/lib/clone.js b/node_modules/cssom/lib/clone.js index 294c43e..f15e245 100644 --- a/node_modules/cssom/lib/clone.js +++ b/node_modules/cssom/lib/clone.js @@ -3,6 +3,7 @@ var CSSOM = { CSSStyleSheet: require("./CSSStyleSheet").CSSStyleSheet, CSSStyleRule: require("./CSSStyleRule").CSSStyleRule, CSSMediaRule: require("./CSSMediaRule").CSSMediaRule, + CSSSupportsRule: require("./CSSSupportsRule").CSSSupportsRule, CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration, CSSKeyframeRule: require('./CSSKeyframeRule').CSSKeyframeRule, CSSKeyframesRule: require('./CSSKeyframesRule').CSSKeyframesRule @@ -32,7 +33,8 @@ CSSOM.clone = function clone(stylesheet) { //5: CSSOM.CSSFontFaceRule, //6: CSSOM.CSSPageRule, 8: CSSOM.CSSKeyframesRule, - 9: CSSOM.CSSKeyframeRule + 9: CSSOM.CSSKeyframeRule, + 12: CSSOM.CSSSupportsRule }; for (var i=0, rulesLength=rules.length; i < rulesLength; i++) { @@ -62,6 +64,10 @@ CSSOM.clone = function clone(stylesheet) { ruleClone.mediaText = rule.mediaText; } + if (rule.hasOwnProperty('conditionText')) { + ruleClone.conditionText = rule.conditionText; + } + if (rule.hasOwnProperty('cssRules')) { ruleClone.cssRules = clone(rule).cssRules; } diff --git a/node_modules/cssom/lib/index.js b/node_modules/cssom/lib/index.js index a6bbc47..e14826c 100644 --- a/node_modules/cssom/lib/index.js +++ b/node_modules/cssom/lib/index.js @@ -1,10 +1,21 @@ -exports.CSSStyleDeclaration = require("./CSSStyleDeclaration").CSSStyleDeclaration; -exports.CSSRule = require("./CSSRule").CSSRule; -exports.CSSStyleRule = require("./CSSStyleRule").CSSStyleRule; -exports.CSSImportRule = require("./CSSImportRule").CSSImportRule; -exports.MediaList = require("./MediaList").MediaList; -exports.CSSMediaRule = require("./CSSMediaRule").CSSMediaRule; -exports.StyleSheet = require("./StyleSheet").StyleSheet; -exports.CSSStyleSheet = require("./CSSStyleSheet").CSSStyleSheet; -exports.parse = require("./parse").parse; -exports.clone = require("./clone").clone; +'use strict'; + +exports.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration; +exports.CSSRule = require('./CSSRule').CSSRule; +exports.CSSStyleRule = require('./CSSStyleRule').CSSStyleRule; +exports.MediaList = require('./MediaList').MediaList; +exports.CSSMediaRule = require('./CSSMediaRule').CSSMediaRule; +exports.CSSSupportsRule = require('./CSSSupportsRule').CSSSupportsRule; +exports.CSSImportRule = require('./CSSImportRule').CSSImportRule; +exports.CSSFontFaceRule = require('./CSSFontFaceRule').CSSFontFaceRule; +exports.CSSHostRule = require('./CSSHostRule').CSSHostRule; +exports.StyleSheet = require('./StyleSheet').StyleSheet; +exports.CSSStyleSheet = require('./CSSStyleSheet').CSSStyleSheet; +exports.CSSKeyframesRule = require('./CSSKeyframesRule').CSSKeyframesRule; +exports.CSSKeyframeRule = require('./CSSKeyframeRule').CSSKeyframeRule; +exports.MatcherList = require('./MatcherList').MatcherList; +exports.CSSDocumentRule = require('./CSSDocumentRule').CSSDocumentRule; +exports.CSSValue = require('./CSSValue').CSSValue; +exports.CSSValueExpression = require('./CSSValueExpression').CSSValueExpression; +exports.parse = require('./parse').parse; +exports.clone = require('./clone').clone; diff --git a/node_modules/cssom/lib/parse.js b/node_modules/cssom/lib/parse.js index 7a4bec9..563fa72 100644 --- a/node_modules/cssom/lib/parse.js +++ b/node_modules/cssom/lib/parse.js @@ -15,6 +15,7 @@ CSSOM.parse = function parse(token) { "selector" or "atRule" or "atBlock" or + "conditionBlock" or "before-name" or "name" or "before-value" or @@ -34,18 +35,23 @@ CSSOM.parse = function parse(token) { "importRule-begin": true, "importRule": true, "atBlock": true, + "conditionBlock": true, 'documentRule-begin': true }; var styleSheet = new CSSOM.CSSStyleSheet(); - // @type CSSStyleSheet|CSSMediaRule|CSSFontFaceRule|CSSKeyframesRule|CSSDocumentRule + // @type CSSStyleSheet|CSSMediaRule|CSSSupportsRule|CSSFontFaceRule|CSSKeyframesRule|CSSDocumentRule var currentScope = styleSheet; - // @type CSSMediaRule|CSSKeyframesRule|CSSDocumentRule + // @type CSSMediaRule|CSSSupportsRule|CSSKeyframesRule|CSSDocumentRule var parentRule; - var name, priority="", styleRule, mediaRule, importRule, fontFaceRule, keyframesRule, documentRule, hostRule; + var ancestorRules = []; + var hasAncestors = false; + var prevScope; + + var name, priority="", styleRule, mediaRule, supportsRule, importRule, fontFaceRule, keyframesRule, documentRule, hostRule; var atKeyframesRegExp = /@(-(?:\w+-)+)?keyframes/g; @@ -151,6 +157,13 @@ CSSOM.parse = function parse(token) { i += "media".length; buffer = ""; break; + } else if (token.indexOf("@supports", i) === i) { + state = "conditionBlock"; + supportsRule = new CSSOM.CSSSupportsRule(); + supportsRule.__starts = i; + i += "supports".length; + buffer = ""; + break; } else if (token.indexOf("@host", i) === i) { state = "hostRule-begin"; i += "host".length; @@ -196,17 +209,38 @@ CSSOM.parse = function parse(token) { state = "before-name"; } else if (state === "atBlock") { mediaRule.media.mediaText = buffer.trim(); + + if (parentRule) { + ancestorRules.push(parentRule); + } + currentScope = parentRule = mediaRule; mediaRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; + } else if (state === "conditionBlock") { + supportsRule.conditionText = buffer.trim(); + + if (parentRule) { + ancestorRules.push(parentRule); + } + + currentScope = parentRule = supportsRule; + supportsRule.parentStyleSheet = styleSheet; + buffer = ""; + state = "before-selector"; } else if (state === "hostRule-begin") { + if (parentRule) { + ancestorRules.push(parentRule); + } + currentScope = parentRule = hostRule; hostRule.parentStyleSheet = styleSheet; buffer = ""; state = "before-selector"; } else if (state === "fontFaceRule-begin") { if (parentRule) { + ancestorRules.push(parentRule); fontFaceRule.parentRule = parentRule; } fontFaceRule.parentStyleSheet = styleSheet; @@ -216,6 +250,7 @@ CSSOM.parse = function parse(token) { } else if (state === "keyframesRule-begin") { keyframesRule.name = buffer.trim(); if (parentRule) { + ancestorRules.push(parentRule); keyframesRule.parentRule = parentRule; } keyframesRule.parentStyleSheet = styleSheet; @@ -232,6 +267,7 @@ CSSOM.parse = function parse(token) { // FIXME: what if this '{' is in the url text of the match function? documentRule.matcher.matcherText = buffer.trim(); if (parentRule) { + ancestorRules.push(parentRule); documentRule.parentRule = parentRule; } currentScope = parentRule = documentRule; @@ -345,15 +381,39 @@ CSSOM.parse = function parse(token) { case "keyframeRule-begin": case "before-selector": case "selector": - // End of media/document rule. + // End of media/supports/document rule. if (!parentRule) { parseError("Unexpected }"); } - currentScope.__ends = i + 1; - // Nesting rules aren't supported yet - styleSheet.cssRules.push(currentScope); - currentScope = styleSheet; - parentRule = null; + + // Handle rules nested in @media or @supports + hasAncestors = ancestorRules.length > 0; + + while (ancestorRules.length > 0) { + parentRule = ancestorRules.pop(); + + if ( + parentRule.constructor.name === "CSSMediaRule" + || parentRule.constructor.name === "CSSSupportsRule" + ) { + prevScope = currentScope; + currentScope = parentRule; + currentScope.cssRules.push(prevScope); + break; + } + + if (ancestorRules.length === 0) { + hasAncestors = false; + } + } + + if (!hasAncestors) { + currentScope.__ends = i + 1; + styleSheet.cssRules.push(currentScope); + currentScope = styleSheet; + parentRule = null; + } + buffer = ""; state = "before-selector"; break; @@ -393,6 +453,7 @@ CSSOM.CSSStyleSheet = require("./CSSStyleSheet").CSSStyleSheet; CSSOM.CSSStyleRule = require("./CSSStyleRule").CSSStyleRule; CSSOM.CSSImportRule = require("./CSSImportRule").CSSImportRule; CSSOM.CSSMediaRule = require("./CSSMediaRule").CSSMediaRule; +CSSOM.CSSSupportsRule = require("./CSSSupportsRule").CSSSupportsRule; CSSOM.CSSFontFaceRule = require("./CSSFontFaceRule").CSSFontFaceRule; CSSOM.CSSHostRule = require("./CSSHostRule").CSSHostRule; CSSOM.CSSStyleDeclaration = require('./CSSStyleDeclaration').CSSStyleDeclaration; diff --git a/node_modules/cssom/package.json b/node_modules/cssom/package.json index e5246c5..f05d6d5 100644 --- a/node_modules/cssom/package.json +++ b/node_modules/cssom/package.json @@ -1,28 +1,28 @@ { - "_from": "cssom@>= 0.3.2 < 0.4.0", - "_id": "cssom@0.3.2", + "_from": "cssom@^0.3.4", + "_id": "cssom@0.3.6", "_inBundle": false, - "_integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", + "_integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==", "_location": "/cssom", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "cssom@>= 0.3.2 < 0.4.0", + "raw": "cssom@^0.3.4", "name": "cssom", "escapedName": "cssom", - "rawSpec": ">= 0.3.2 < 0.4.0", + "rawSpec": "^0.3.4", "saveSpec": null, - "fetchSpec": ">= 0.3.2 < 0.4.0" + "fetchSpec": "^0.3.4" }, "_requiredBy": [ "/cssstyle", "/jsdom" ], - "_resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", - "_shasum": "b8036170c79f07a90ff2f16e22284027a243848b", - "_spec": "cssom@>= 0.3.2 < 0.4.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom", + "_resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz", + "_shasum": "f85206cee04efa841f3c5982a74ba96ab20d65ad", + "_spec": "cssom@^0.3.4", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom", "author": { "name": "Nikita Vasilyev", "email": "me@elv1s.ru" @@ -56,5 +56,5 @@ "scripts": { "prepublish": "jake lib/index.js" }, - "version": "0.3.2" + "version": "0.3.6" } diff --git a/node_modules/cssstyle/.eslintignore b/node_modules/cssstyle/.eslintignore new file mode 100644 index 0000000..f9e0b73 --- /dev/null +++ b/node_modules/cssstyle/.eslintignore @@ -0,0 +1,3 @@ +node_modules +lib/implementedProperties.js +lib/properties.js diff --git a/node_modules/cssstyle/.eslintrc.js b/node_modules/cssstyle/.eslintrc.js new file mode 100644 index 0000000..770d799 --- /dev/null +++ b/node_modules/cssstyle/.eslintrc.js @@ -0,0 +1,50 @@ +'use strict'; + +module.exports = { + root: true, + extends: ['eslint:recommended', 'prettier'], + parserOptions: { + ecmaVersion: 2018, + }, + env: { + es6: true, + }, + globals: { + exports: true, + module: true, + require: true, + window: true, + }, + plugins: ['prettier'], + rules: { + 'prettier/prettier': [ + 'warn', + { + printWidth: 100, + singleQuote: true, + trailingComma: 'es5', + }, + ], + strict: ['warn', 'global'], + }, + overrides: [ + { + files: ['lib/implementedProperties.js', 'lib/properties.js'], + rules: { + 'prettier/prettier': 'off', + }, + }, + { + files: 'scripts/**/*', + rules: { + 'no-console': 'off', + }, + }, + { + files: ['scripts/**/*', 'tests/**/*'], + env: { + node: true, + }, + }, + ], +}; diff --git a/node_modules/cssstyle/.npmignore b/node_modules/cssstyle/.npmignore deleted file mode 100644 index 2d51347..0000000 --- a/node_modules/cssstyle/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_module diff --git a/node_modules/cssstyle/.travis.yml b/node_modules/cssstyle/.travis.yml new file mode 100644 index 0000000..cf9a223 --- /dev/null +++ b/node_modules/cssstyle/.travis.yml @@ -0,0 +1,15 @@ +sudo: false +language: node_js +cache: + directories: + - node_modules +notifications: + email: true +node_js: + - 6 + - 8 + - 10 + - 11 + +script: + - npm run test-ci diff --git a/node_modules/cssstyle/README.md b/node_modules/cssstyle/README.md index 80f3365..66b14ae 100644 --- a/node_modules/cssstyle/README.md +++ b/node_modules/cssstyle/README.md @@ -1,27 +1,27 @@ -CSSStyleDeclaration -=================== +# CSSStyleDeclaration + +[![NpmVersion](https://img.shields.io/npm/v/cssstyle.svg)](https://www.npmjs.com/package/cssstyle) [![Build Status](https://travis-ci.org/jsakas/CSSStyleDeclaration.svg?branch=master)](https://travis-ci.org/jsakas/CSSStyleDeclaration) CSSStyleDeclaration is a work-a-like to the CSSStyleDeclaration class in Nikita Vasilyev's [CSSOM](https://github.com/NV/CSSOM). I made it so that when using [jQuery in node](https://github.com/tmtk75/node-jquery) setting css attributes via $.fn.css() would work. node-jquery uses [jsdom](https://github.com/tmpvar/jsdom) to create a DOM to use in node. jsdom uses CSSOM for styling, and CSSOM's implementation of the [CSSStyleDeclaration](http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration) doesn't support [CSS2Properties](http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties), which is how jQuery's [$.fn.css()](http://api.jquery.com/css/) operates. +### Why not just issue a pull request? -Why not just issue a pull request? ----- -Well, NV wants to keep CSSOM fast (which I can appreciate) and CSS2Properties aren't required by the standard (though every browser has the interface). So I figured the path of least resistence would be to just modify this one class, publish it as a node module (that requires CSSOM) and then make a pull request of jsdom to use it. +Well, NV wants to keep CSSOM fast (which I can appreciate) and CSS2Properties aren't required by the standard (though every browser has the interface). So I figured the path of least resistance would be to just modify this one class, publish it as a node module (that requires CSSOM) and then make a pull request of jsdom to use it. + +### How do I test this code? -How do I test this code? ---- `npm test` should do the trick, assuming you have the dev dependencies installed: -> ``` -> $ npm test -> -> tests -> ✔ Verify Has Properties -> ✔ Verify Has Functions -> ✔ Verify Has Special Properties -> ✔ Test From Style String -> ✔ Test From Properties -> ✔ Test Shorthand Properties -> ✔ Test width and height Properties and null and empty strings -> ✔ Test Implicit Properties -> ``` +``` +$ npm test + +tests +✔ Verify Has Properties +✔ Verify Has Functions +✔ Verify Has Special Properties +✔ Test From Style String +✔ Test From Properties +✔ Test Shorthand Properties +✔ Test width and height Properties and null and empty strings +✔ Test Implicit Properties +``` diff --git a/node_modules/cssstyle/lib/CSSStyleDeclaration.js b/node_modules/cssstyle/lib/CSSStyleDeclaration.js index 4f2049e..0bb9ece 100644 --- a/node_modules/cssstyle/lib/CSSStyleDeclaration.js +++ b/node_modules/cssstyle/lib/CSSStyleDeclaration.js @@ -2,232 +2,254 @@ * This is a fork from the CSS Style Declaration part of * https://github.com/NV/CSSOM ********************************************************************/ -"use strict"; +'use strict'; var CSSOM = require('cssom'); -var fs = require('fs'); -var path = require('path'); - -var camelToDashed = require('./parsers').camelToDashed; -var dashedToCamelCase = require('./parsers').dashedToCamelCase; +var allProperties = require('./allProperties'); +var allExtraProperties = require('./allExtraProperties'); +var implementedProperties = require('./implementedProperties'); +var { dashedToCamelCase } = require('./parsers'); +var getBasicPropertyDescriptor = require('./utils/getBasicPropertyDescriptor'); /** * @constructor * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration */ var CSSStyleDeclaration = function CSSStyleDeclaration(onChangeCallback) { - this._values = {}; - this._importants = {}; - this._length = 0; - this._onChange = onChangeCallback || function () { return; }; + this._values = {}; + this._importants = {}; + this._length = 0; + this._onChange = + onChangeCallback || + function() { + return; + }; }; CSSStyleDeclaration.prototype = { - constructor: CSSStyleDeclaration, + constructor: CSSStyleDeclaration, - /** - * - * @param {string} name - * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue - * @return {string} the value of the property if it has been explicitly set for this declaration block. - * Returns the empty string if the property has not been set. - */ - getPropertyValue: function (name) { - if (!this._values.hasOwnProperty(name)) { - return ""; - } - return this._values[name].toString(); - }, - - /** - * - * @param {string} name - * @param {string} value - * @param {string} [priority=null] "important" or null - * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty - */ - setProperty: function (name, value, priority) { - if (value === undefined) { - return; - } - if (value === null || value === '') { - this.removeProperty(name); - return; - } - var camel_case = dashedToCamelCase(name); - this[camel_case] = value; - this._importants[name] = priority; - }, - _setProperty: function (name, value, priority) { - if (value === undefined) { - return; - } - if (value === null || value === '') { - this.removeProperty(name); - return; - } - if (this._values[name]) { - // Property already exist. Overwrite it. - var index = Array.prototype.indexOf.call(this, name); - if (index < 0) { - this[this._length] = name; - this._length++; - } - } else { - // New property. - this[this._length] = name; - this._length++; - } - this._values[name] = value; - this._importants[name] = priority; - this._onChange(this.cssText); - }, - - /** - * - * @param {string} name - * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty - * @return {string} the value of the property if it has been explicitly set for this declaration block. - * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property. - */ - removeProperty: function (name) { - if (!this._values.hasOwnProperty(name)) { - return ""; - } - - var prevValue = this._values[name]; - delete this._values[name]; - delete this._importants[name]; - - var index = Array.prototype.indexOf.call(this, name); - if (index < 0) { - return prevValue; - } - - // That's what WebKit and Opera do - Array.prototype.splice.call(this, index, 1); - - // That's what Firefox does - //this[index] = "" - - this._onChange(this.cssText); - return prevValue; - }, - - - /** - * - * @param {String} name - */ - getPropertyPriority: function (name) { - return this._importants[name] || ""; - }, - - - getPropertyCSSValue: function () { - //FIXME - return; - }, - - /** - * element.style.overflow = "auto" - * element.style.getPropertyShorthand("overflow-x") - * -> "overflow" - */ - getPropertyShorthand: function () { - //FIXME - return; - }, - - isPropertyImplicit: function () { - //FIXME - return; - }, - - /** - * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-item - */ - item: function (index) { - index = parseInt(index, 10); - if (index < 0 || index >= this._length) { - return ''; - } - return this[index]; + /** + * + * @param {string} name + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue + * @return {string} the value of the property if it has been explicitly set for this declaration block. + * Returns the empty string if the property has not been set. + */ + getPropertyValue: function(name) { + if (!this._values.hasOwnProperty(name)) { + return ''; } + return this._values[name].toString(); + }, + + /** + * + * @param {string} name + * @param {string} value + * @param {string} [priority=null] "important" or null + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty + */ + setProperty: function(name, value, priority) { + if (value === undefined) { + return; + } + if (value === null || value === '') { + this.removeProperty(name); + return; + } + var lowercaseName = name.toLowerCase(); + if (!allProperties.has(lowercaseName) && !allExtraProperties.has(lowercaseName)) { + return; + } + + this[lowercaseName] = value; + this._importants[lowercaseName] = priority; + }, + _setProperty: function(name, value, priority) { + if (value === undefined) { + return; + } + if (value === null || value === '') { + this.removeProperty(name); + return; + } + if (this._values[name]) { + // Property already exist. Overwrite it. + var index = Array.prototype.indexOf.call(this, name); + if (index < 0) { + this[this._length] = name; + this._length++; + } + } else { + // New property. + this[this._length] = name; + this._length++; + } + this._values[name] = value; + this._importants[name] = priority; + this._onChange(this.cssText); + }, + + /** + * + * @param {string} name + * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty + * @return {string} the value of the property if it has been explicitly set for this declaration block. + * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property. + */ + removeProperty: function(name) { + if (!this._values.hasOwnProperty(name)) { + return ''; + } + + var prevValue = this._values[name]; + delete this._values[name]; + delete this._importants[name]; + + var index = Array.prototype.indexOf.call(this, name); + if (index < 0) { + return prevValue; + } + + // That's what WebKit and Opera do + Array.prototype.splice.call(this, index, 1); + + // That's what Firefox does + //this[index] = "" + + this._onChange(this.cssText); + return prevValue; + }, + + /** + * + * @param {String} name + */ + getPropertyPriority: function(name) { + return this._importants[name] || ''; + }, + + getPropertyCSSValue: function() { + //FIXME + return; + }, + + /** + * element.style.overflow = "auto" + * element.style.getPropertyShorthand("overflow-x") + * -> "overflow" + */ + getPropertyShorthand: function() { + //FIXME + return; + }, + + isPropertyImplicit: function() { + //FIXME + return; + }, + + /** + * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-item + */ + item: function(index) { + index = parseInt(index, 10); + if (index < 0 || index >= this._length) { + return ''; + } + return this[index]; + }, }; Object.defineProperties(CSSStyleDeclaration.prototype, { - cssText: { - get: function () { - var properties = []; - var i; - var name; - var value; - var priority; - for (i = 0; i < this._length; i++) { - name = this[i]; - value = this.getPropertyValue(name); - priority = this.getPropertyPriority(name); - if (priority !== '') { - priority = " !" + priority; - } - properties.push([name, ': ', value, priority, ';'].join('')); - } - return properties.join(' '); - }, - set: function (value) { - var i; - this._values = {}; - Array.prototype.splice.call(this, 0, this._length); - this._importants = {}; - var dummyRule; - try { - dummyRule = CSSOM.parse('#bogus{' + value + '}').cssRules[0].style; - } catch (err) { - // malformed css, just return - return; - } - var rule_length = dummyRule.length; - var name; - for (i = 0; i < rule_length; ++i) { - name = dummyRule[i]; - this.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name)); - } - this._onChange(this.cssText); - }, - enumerable: true, - configurable: true + cssText: { + get: function() { + var properties = []; + var i; + var name; + var value; + var priority; + for (i = 0; i < this._length; i++) { + name = this[i]; + value = this.getPropertyValue(name); + priority = this.getPropertyPriority(name); + if (priority !== '') { + priority = ' !' + priority; + } + properties.push([name, ': ', value, priority, ';'].join('')); + } + return properties.join(' '); }, - parentRule: { - get: function () { return null; }, - enumerable: true, - configurable: true + set: function(value) { + var i; + this._values = {}; + Array.prototype.splice.call(this, 0, this._length); + this._importants = {}; + var dummyRule; + try { + dummyRule = CSSOM.parse('#bogus{' + value + '}').cssRules[0].style; + } catch (err) { + // malformed css, just return + return; + } + var rule_length = dummyRule.length; + var name; + for (i = 0; i < rule_length; ++i) { + name = dummyRule[i]; + this.setProperty( + dummyRule[i], + dummyRule.getPropertyValue(name), + dummyRule.getPropertyPriority(name) + ); + } + this._onChange(this.cssText); }, - length: { - get: function () { return this._length; }, - /** - * This deletes indices if the new length is less then the current - * length. If the new length is more, it does nothing, the new indices - * will be undefined until set. - **/ - set: function (value) { - var i; - for (i = value; i < this._length; i++) { - delete this[i]; - } - this._length = value; - }, - enumerable: true, - configurable: true + enumerable: true, + configurable: true, + }, + parentRule: { + get: function() { + return null; }, - 'float': { - get: function () { return this.cssFloat; }, - set: function (value) { - this.cssFloat = value; - }, - enumerable: true, - configurable: true - } + enumerable: true, + configurable: true, + }, + length: { + get: function() { + return this._length; + }, + /** + * This deletes indices if the new length is less then the current + * length. If the new length is more, it does nothing, the new indices + * will be undefined until set. + **/ + set: function(value) { + var i; + for (i = value; i < this._length; i++) { + delete this[i]; + } + this._length = value; + }, + enumerable: true, + configurable: true, + }, }); require('./properties')(CSSStyleDeclaration.prototype); +allProperties.forEach(function(property) { + if (!implementedProperties.has(property)) { + var declaration = getBasicPropertyDescriptor(property); + Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration); + Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration); + } +}); + +allExtraProperties.forEach(function(property) { + if (!implementedProperties.has(property)) { + var declaration = getBasicPropertyDescriptor(property); + Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration); + Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration); + } +}); + exports.CSSStyleDeclaration = CSSStyleDeclaration; diff --git a/node_modules/cssstyle/lib/allExtraProperties.js b/node_modules/cssstyle/lib/allExtraProperties.js new file mode 100644 index 0000000..0d66ca8 --- /dev/null +++ b/node_modules/cssstyle/lib/allExtraProperties.js @@ -0,0 +1,248 @@ +'use strict'; + +/** + * This file contains all implemented properties that are not a part of any + * current specifications or drafts, but are handled by browsers nevertheless. + */ + +var allExtraProperties = new Set(); +module.exports = allExtraProperties; +allExtraProperties.add('background-position-x'); +allExtraProperties.add('background-position-y'); +allExtraProperties.add('background-repeat-x'); +allExtraProperties.add('background-repeat-y'); +allExtraProperties.add('color-interpolation'); +allExtraProperties.add('color-profile'); +allExtraProperties.add('color-rendering'); +allExtraProperties.add('css-float'); +allExtraProperties.add('enable-background'); +allExtraProperties.add('fill'); +allExtraProperties.add('fill-opacity'); +allExtraProperties.add('fill-rule'); +allExtraProperties.add('glyph-orientation-horizontal'); +allExtraProperties.add('image-rendering'); +allExtraProperties.add('kerning'); +allExtraProperties.add('marker'); +allExtraProperties.add('marker-end'); +allExtraProperties.add('marker-mid'); +allExtraProperties.add('marker-offset'); +allExtraProperties.add('marker-start'); +allExtraProperties.add('marks'); +allExtraProperties.add('pointer-events'); +allExtraProperties.add('shape-rendering'); +allExtraProperties.add('size'); +allExtraProperties.add('src'); +allExtraProperties.add('stop-color'); +allExtraProperties.add('stop-opacity'); +allExtraProperties.add('stroke'); +allExtraProperties.add('stroke-dasharray'); +allExtraProperties.add('stroke-dashoffset'); +allExtraProperties.add('stroke-linecap'); +allExtraProperties.add('stroke-linejoin'); +allExtraProperties.add('stroke-miterlimit'); +allExtraProperties.add('stroke-opacity'); +allExtraProperties.add('stroke-width'); +allExtraProperties.add('text-anchor'); +allExtraProperties.add('text-line-through'); +allExtraProperties.add('text-line-through-color'); +allExtraProperties.add('text-line-through-mode'); +allExtraProperties.add('text-line-through-style'); +allExtraProperties.add('text-line-through-width'); +allExtraProperties.add('text-overline'); +allExtraProperties.add('text-overline-color'); +allExtraProperties.add('text-overline-mode'); +allExtraProperties.add('text-overline-style'); +allExtraProperties.add('text-overline-width'); +allExtraProperties.add('text-rendering'); +allExtraProperties.add('text-underline'); +allExtraProperties.add('text-underline-color'); +allExtraProperties.add('text-underline-mode'); +allExtraProperties.add('text-underline-style'); +allExtraProperties.add('text-underline-width'); +allExtraProperties.add('unicode-range'); +allExtraProperties.add('vector-effect'); +allExtraProperties.add('webkit-animation'); +allExtraProperties.add('webkit-animation-delay'); +allExtraProperties.add('webkit-animation-direction'); +allExtraProperties.add('webkit-animation-duration'); +allExtraProperties.add('webkit-animation-fill-mode'); +allExtraProperties.add('webkit-animation-iteration-count'); +allExtraProperties.add('webkit-animation-name'); +allExtraProperties.add('webkit-animation-play-state'); +allExtraProperties.add('webkit-animation-timing-function'); +allExtraProperties.add('webkit-appearance'); +allExtraProperties.add('webkit-aspect-ratio'); +allExtraProperties.add('webkit-backface-visibility'); +allExtraProperties.add('webkit-background-clip'); +allExtraProperties.add('webkit-background-composite'); +allExtraProperties.add('webkit-background-origin'); +allExtraProperties.add('webkit-background-size'); +allExtraProperties.add('webkit-border-after'); +allExtraProperties.add('webkit-border-after-color'); +allExtraProperties.add('webkit-border-after-style'); +allExtraProperties.add('webkit-border-after-width'); +allExtraProperties.add('webkit-border-before'); +allExtraProperties.add('webkit-border-before-color'); +allExtraProperties.add('webkit-border-before-style'); +allExtraProperties.add('webkit-border-before-width'); +allExtraProperties.add('webkit-border-end'); +allExtraProperties.add('webkit-border-end-color'); +allExtraProperties.add('webkit-border-end-style'); +allExtraProperties.add('webkit-border-end-width'); +allExtraProperties.add('webkit-border-fit'); +allExtraProperties.add('webkit-border-horizontal-spacing'); +allExtraProperties.add('webkit-border-image'); +allExtraProperties.add('webkit-border-radius'); +allExtraProperties.add('webkit-border-start'); +allExtraProperties.add('webkit-border-start-color'); +allExtraProperties.add('webkit-border-start-style'); +allExtraProperties.add('webkit-border-start-width'); +allExtraProperties.add('webkit-border-vertical-spacing'); +allExtraProperties.add('webkit-box-align'); +allExtraProperties.add('webkit-box-direction'); +allExtraProperties.add('webkit-box-flex'); +allExtraProperties.add('webkit-box-flex-group'); +allExtraProperties.add('webkit-box-lines'); +allExtraProperties.add('webkit-box-ordinal-group'); +allExtraProperties.add('webkit-box-orient'); +allExtraProperties.add('webkit-box-pack'); +allExtraProperties.add('webkit-box-reflect'); +allExtraProperties.add('webkit-box-shadow'); +allExtraProperties.add('webkit-color-correction'); +allExtraProperties.add('webkit-column-axis'); +allExtraProperties.add('webkit-column-break-after'); +allExtraProperties.add('webkit-column-break-before'); +allExtraProperties.add('webkit-column-break-inside'); +allExtraProperties.add('webkit-column-count'); +allExtraProperties.add('webkit-column-gap'); +allExtraProperties.add('webkit-column-rule'); +allExtraProperties.add('webkit-column-rule-color'); +allExtraProperties.add('webkit-column-rule-style'); +allExtraProperties.add('webkit-column-rule-width'); +allExtraProperties.add('webkit-columns'); +allExtraProperties.add('webkit-column-span'); +allExtraProperties.add('webkit-column-width'); +allExtraProperties.add('webkit-filter'); +allExtraProperties.add('webkit-flex-align'); +allExtraProperties.add('webkit-flex-direction'); +allExtraProperties.add('webkit-flex-flow'); +allExtraProperties.add('webkit-flex-item-align'); +allExtraProperties.add('webkit-flex-line-pack'); +allExtraProperties.add('webkit-flex-order'); +allExtraProperties.add('webkit-flex-pack'); +allExtraProperties.add('webkit-flex-wrap'); +allExtraProperties.add('webkit-flow-from'); +allExtraProperties.add('webkit-flow-into'); +allExtraProperties.add('webkit-font-feature-settings'); +allExtraProperties.add('webkit-font-kerning'); +allExtraProperties.add('webkit-font-size-delta'); +allExtraProperties.add('webkit-font-smoothing'); +allExtraProperties.add('webkit-font-variant-ligatures'); +allExtraProperties.add('webkit-highlight'); +allExtraProperties.add('webkit-hyphenate-character'); +allExtraProperties.add('webkit-hyphenate-limit-after'); +allExtraProperties.add('webkit-hyphenate-limit-before'); +allExtraProperties.add('webkit-hyphenate-limit-lines'); +allExtraProperties.add('webkit-hyphens'); +allExtraProperties.add('webkit-line-align'); +allExtraProperties.add('webkit-line-box-contain'); +allExtraProperties.add('webkit-line-break'); +allExtraProperties.add('webkit-line-clamp'); +allExtraProperties.add('webkit-line-grid'); +allExtraProperties.add('webkit-line-snap'); +allExtraProperties.add('webkit-locale'); +allExtraProperties.add('webkit-logical-height'); +allExtraProperties.add('webkit-logical-width'); +allExtraProperties.add('webkit-margin-after'); +allExtraProperties.add('webkit-margin-after-collapse'); +allExtraProperties.add('webkit-margin-before'); +allExtraProperties.add('webkit-margin-before-collapse'); +allExtraProperties.add('webkit-margin-bottom-collapse'); +allExtraProperties.add('webkit-margin-collapse'); +allExtraProperties.add('webkit-margin-end'); +allExtraProperties.add('webkit-margin-start'); +allExtraProperties.add('webkit-margin-top-collapse'); +allExtraProperties.add('webkit-marquee'); +allExtraProperties.add('webkit-marquee-direction'); +allExtraProperties.add('webkit-marquee-increment'); +allExtraProperties.add('webkit-marquee-repetition'); +allExtraProperties.add('webkit-marquee-speed'); +allExtraProperties.add('webkit-marquee-style'); +allExtraProperties.add('webkit-mask'); +allExtraProperties.add('webkit-mask-attachment'); +allExtraProperties.add('webkit-mask-box-image'); +allExtraProperties.add('webkit-mask-box-image-outset'); +allExtraProperties.add('webkit-mask-box-image-repeat'); +allExtraProperties.add('webkit-mask-box-image-slice'); +allExtraProperties.add('webkit-mask-box-image-source'); +allExtraProperties.add('webkit-mask-box-image-width'); +allExtraProperties.add('webkit-mask-clip'); +allExtraProperties.add('webkit-mask-composite'); +allExtraProperties.add('webkit-mask-image'); +allExtraProperties.add('webkit-mask-origin'); +allExtraProperties.add('webkit-mask-position'); +allExtraProperties.add('webkit-mask-position-x'); +allExtraProperties.add('webkit-mask-position-y'); +allExtraProperties.add('webkit-mask-repeat'); +allExtraProperties.add('webkit-mask-repeat-x'); +allExtraProperties.add('webkit-mask-repeat-y'); +allExtraProperties.add('webkit-mask-size'); +allExtraProperties.add('webkit-match-nearest-mail-blockquote-color'); +allExtraProperties.add('webkit-max-logical-height'); +allExtraProperties.add('webkit-max-logical-width'); +allExtraProperties.add('webkit-min-logical-height'); +allExtraProperties.add('webkit-min-logical-width'); +allExtraProperties.add('webkit-nbsp-mode'); +allExtraProperties.add('webkit-overflow-scrolling'); +allExtraProperties.add('webkit-padding-after'); +allExtraProperties.add('webkit-padding-before'); +allExtraProperties.add('webkit-padding-end'); +allExtraProperties.add('webkit-padding-start'); +allExtraProperties.add('webkit-perspective'); +allExtraProperties.add('webkit-perspective-origin'); +allExtraProperties.add('webkit-perspective-origin-x'); +allExtraProperties.add('webkit-perspective-origin-y'); +allExtraProperties.add('webkit-print-color-adjust'); +allExtraProperties.add('webkit-region-break-after'); +allExtraProperties.add('webkit-region-break-before'); +allExtraProperties.add('webkit-region-break-inside'); +allExtraProperties.add('webkit-region-overflow'); +allExtraProperties.add('webkit-rtl-ordering'); +allExtraProperties.add('webkit-svg-shadow'); +allExtraProperties.add('webkit-tap-highlight-color'); +allExtraProperties.add('webkit-text-combine'); +allExtraProperties.add('webkit-text-decorations-in-effect'); +allExtraProperties.add('webkit-text-emphasis'); +allExtraProperties.add('webkit-text-emphasis-color'); +allExtraProperties.add('webkit-text-emphasis-position'); +allExtraProperties.add('webkit-text-emphasis-style'); +allExtraProperties.add('webkit-text-fill-color'); +allExtraProperties.add('webkit-text-orientation'); +allExtraProperties.add('webkit-text-security'); +allExtraProperties.add('webkit-text-size-adjust'); +allExtraProperties.add('webkit-text-stroke'); +allExtraProperties.add('webkit-text-stroke-color'); +allExtraProperties.add('webkit-text-stroke-width'); +allExtraProperties.add('webkit-transform'); +allExtraProperties.add('webkit-transform-origin'); +allExtraProperties.add('webkit-transform-origin-x'); +allExtraProperties.add('webkit-transform-origin-y'); +allExtraProperties.add('webkit-transform-origin-z'); +allExtraProperties.add('webkit-transform-style'); +allExtraProperties.add('webkit-transition'); +allExtraProperties.add('webkit-transition-delay'); +allExtraProperties.add('webkit-transition-duration'); +allExtraProperties.add('webkit-transition-property'); +allExtraProperties.add('webkit-transition-timing-function'); +allExtraProperties.add('webkit-user-drag'); +allExtraProperties.add('webkit-user-modify'); +allExtraProperties.add('webkit-user-select'); +allExtraProperties.add('webkit-wrap'); +allExtraProperties.add('webkit-wrap-flow'); +allExtraProperties.add('webkit-wrap-margin'); +allExtraProperties.add('webkit-wrap-padding'); +allExtraProperties.add('webkit-wrap-shape-inside'); +allExtraProperties.add('webkit-wrap-shape-outside'); +allExtraProperties.add('webkit-wrap-through'); +allExtraProperties.add('webkit-writing-mode'); +allExtraProperties.add('zoom'); diff --git a/node_modules/cssstyle/lib/allProperties.js b/node_modules/cssstyle/lib/allProperties.js new file mode 100644 index 0000000..fc801df --- /dev/null +++ b/node_modules/cssstyle/lib/allProperties.js @@ -0,0 +1,457 @@ +'use strict'; + +// autogenerated - 2/3/2019 + +/* + * + * https://www.w3.org/Style/CSS/all-properties.en.html + */ + +var allProperties = new Set(); +module.exports = allProperties; +allProperties.add('align-content'); +allProperties.add('align-items'); +allProperties.add('align-self'); +allProperties.add('alignment-baseline'); +allProperties.add('all'); +allProperties.add('animation'); +allProperties.add('animation-delay'); +allProperties.add('animation-direction'); +allProperties.add('animation-duration'); +allProperties.add('animation-fill-mode'); +allProperties.add('animation-iteration-count'); +allProperties.add('animation-name'); +allProperties.add('animation-play-state'); +allProperties.add('animation-timing-function'); +allProperties.add('appearance'); +allProperties.add('azimuth'); +allProperties.add('background'); +allProperties.add('background-attachment'); +allProperties.add('background-blend-mode'); +allProperties.add('background-clip'); +allProperties.add('background-color'); +allProperties.add('background-image'); +allProperties.add('background-origin'); +allProperties.add('background-position'); +allProperties.add('background-repeat'); +allProperties.add('background-size'); +allProperties.add('baseline-shift'); +allProperties.add('block-overflow'); +allProperties.add('block-size'); +allProperties.add('bookmark-label'); +allProperties.add('bookmark-level'); +allProperties.add('bookmark-state'); +allProperties.add('border'); +allProperties.add('border-block'); +allProperties.add('border-block-color'); +allProperties.add('border-block-end'); +allProperties.add('border-block-end-color'); +allProperties.add('border-block-end-style'); +allProperties.add('border-block-end-width'); +allProperties.add('border-block-start'); +allProperties.add('border-block-start-color'); +allProperties.add('border-block-start-style'); +allProperties.add('border-block-start-width'); +allProperties.add('border-block-style'); +allProperties.add('border-block-width'); +allProperties.add('border-bottom'); +allProperties.add('border-bottom-color'); +allProperties.add('border-bottom-left-radius'); +allProperties.add('border-bottom-right-radius'); +allProperties.add('border-bottom-style'); +allProperties.add('border-bottom-width'); +allProperties.add('border-boundary'); +allProperties.add('border-collapse'); +allProperties.add('border-color'); +allProperties.add('border-end-end-radius'); +allProperties.add('border-end-start-radius'); +allProperties.add('border-image'); +allProperties.add('border-image-outset'); +allProperties.add('border-image-repeat'); +allProperties.add('border-image-slice'); +allProperties.add('border-image-source'); +allProperties.add('border-image-width'); +allProperties.add('border-inline'); +allProperties.add('border-inline-color'); +allProperties.add('border-inline-end'); +allProperties.add('border-inline-end-color'); +allProperties.add('border-inline-end-style'); +allProperties.add('border-inline-end-width'); +allProperties.add('border-inline-start'); +allProperties.add('border-inline-start-color'); +allProperties.add('border-inline-start-style'); +allProperties.add('border-inline-start-width'); +allProperties.add('border-inline-style'); +allProperties.add('border-inline-width'); +allProperties.add('border-left'); +allProperties.add('border-left-color'); +allProperties.add('border-left-style'); +allProperties.add('border-left-width'); +allProperties.add('border-radius'); +allProperties.add('border-right'); +allProperties.add('border-right-color'); +allProperties.add('border-right-style'); +allProperties.add('border-right-width'); +allProperties.add('border-spacing'); +allProperties.add('border-start-end-radius'); +allProperties.add('border-start-start-radius'); +allProperties.add('border-style'); +allProperties.add('border-top'); +allProperties.add('border-top-color'); +allProperties.add('border-top-left-radius'); +allProperties.add('border-top-right-radius'); +allProperties.add('border-top-style'); +allProperties.add('border-top-width'); +allProperties.add('border-width'); +allProperties.add('bottom'); +allProperties.add('box-decoration-break'); +allProperties.add('box-shadow'); +allProperties.add('box-sizing'); +allProperties.add('box-snap'); +allProperties.add('break-after'); +allProperties.add('break-before'); +allProperties.add('break-inside'); +allProperties.add('caption-side'); +allProperties.add('caret'); +allProperties.add('caret-color'); +allProperties.add('caret-shape'); +allProperties.add('chains'); +allProperties.add('clear'); +allProperties.add('clip'); +allProperties.add('clip-path'); +allProperties.add('clip-rule'); +allProperties.add('color'); +allProperties.add('color-interpolation-filters'); +allProperties.add('column-count'); +allProperties.add('column-fill'); +allProperties.add('column-gap'); +allProperties.add('column-rule'); +allProperties.add('column-rule-color'); +allProperties.add('column-rule-style'); +allProperties.add('column-rule-width'); +allProperties.add('column-span'); +allProperties.add('column-width'); +allProperties.add('columns'); +allProperties.add('contain'); +allProperties.add('content'); +allProperties.add('continue'); +allProperties.add('counter-increment'); +allProperties.add('counter-reset'); +allProperties.add('counter-set'); +allProperties.add('cue'); +allProperties.add('cue-after'); +allProperties.add('cue-before'); +allProperties.add('cursor'); +allProperties.add('direction'); +allProperties.add('display'); +allProperties.add('dominant-baseline'); +allProperties.add('elevation'); +allProperties.add('empty-cells'); +allProperties.add('filter'); +allProperties.add('flex'); +allProperties.add('flex-basis'); +allProperties.add('flex-direction'); +allProperties.add('flex-flow'); +allProperties.add('flex-grow'); +allProperties.add('flex-shrink'); +allProperties.add('flex-wrap'); +allProperties.add('float'); +allProperties.add('flood-color'); +allProperties.add('flood-opacity'); +allProperties.add('flow'); +allProperties.add('flow-from'); +allProperties.add('flow-into'); +allProperties.add('font'); +allProperties.add('font-family'); +allProperties.add('font-feature-settings'); +allProperties.add('font-kerning'); +allProperties.add('font-language-override'); +allProperties.add('font-max-size'); +allProperties.add('font-min-size'); +allProperties.add('font-optical-sizing'); +allProperties.add('font-palette'); +allProperties.add('font-size'); +allProperties.add('font-size-adjust'); +allProperties.add('font-stretch'); +allProperties.add('font-style'); +allProperties.add('font-synthesis'); +allProperties.add('font-synthesis-small-caps'); +allProperties.add('font-synthesis-style'); +allProperties.add('font-synthesis-weight'); +allProperties.add('font-variant'); +allProperties.add('font-variant-alternates'); +allProperties.add('font-variant-caps'); +allProperties.add('font-variant-east-asian'); +allProperties.add('font-variant-emoji'); +allProperties.add('font-variant-ligatures'); +allProperties.add('font-variant-numeric'); +allProperties.add('font-variant-position'); +allProperties.add('font-variation-settings'); +allProperties.add('font-weight'); +allProperties.add('footnote-display'); +allProperties.add('footnote-policy'); +allProperties.add('gap'); +allProperties.add('glyph-orientation-vertical'); +allProperties.add('grid'); +allProperties.add('grid-area'); +allProperties.add('grid-auto-columns'); +allProperties.add('grid-auto-flow'); +allProperties.add('grid-auto-rows'); +allProperties.add('grid-column'); +allProperties.add('grid-column-end'); +allProperties.add('grid-column-start'); +allProperties.add('grid-row'); +allProperties.add('grid-row-end'); +allProperties.add('grid-row-start'); +allProperties.add('grid-template'); +allProperties.add('grid-template-areas'); +allProperties.add('grid-template-columns'); +allProperties.add('grid-template-rows'); +allProperties.add('hanging-punctuation'); +allProperties.add('height'); +allProperties.add('hyphenate-character'); +allProperties.add('hyphenate-limit-chars'); +allProperties.add('hyphenate-limit-last'); +allProperties.add('hyphenate-limit-lines'); +allProperties.add('hyphenate-limit-zone'); +allProperties.add('hyphens'); +allProperties.add('image-orientation'); +allProperties.add('image-resolution'); +allProperties.add('initial-letters'); +allProperties.add('initial-letters-align'); +allProperties.add('initial-letters-wrap'); +allProperties.add('inline-size'); +allProperties.add('inline-sizing'); +allProperties.add('inset'); +allProperties.add('inset-block'); +allProperties.add('inset-block-end'); +allProperties.add('inset-block-start'); +allProperties.add('inset-inline'); +allProperties.add('inset-inline-end'); +allProperties.add('inset-inline-start'); +allProperties.add('isolation'); +allProperties.add('justify-content'); +allProperties.add('justify-items'); +allProperties.add('justify-self'); +allProperties.add('left'); +allProperties.add('letter-spacing'); +allProperties.add('lighting-color'); +allProperties.add('line-break'); +allProperties.add('line-clamp'); +allProperties.add('line-grid'); +allProperties.add('line-height'); +allProperties.add('line-padding'); +allProperties.add('line-snap'); +allProperties.add('list-style'); +allProperties.add('list-style-image'); +allProperties.add('list-style-position'); +allProperties.add('list-style-type'); +allProperties.add('margin'); +allProperties.add('margin-block'); +allProperties.add('margin-block-end'); +allProperties.add('margin-block-start'); +allProperties.add('margin-bottom'); +allProperties.add('margin-inline'); +allProperties.add('margin-inline-end'); +allProperties.add('margin-inline-start'); +allProperties.add('margin-left'); +allProperties.add('margin-right'); +allProperties.add('margin-top'); +allProperties.add('margin-trim'); +allProperties.add('marker-side'); +allProperties.add('mask'); +allProperties.add('mask-border'); +allProperties.add('mask-border-mode'); +allProperties.add('mask-border-outset'); +allProperties.add('mask-border-repeat'); +allProperties.add('mask-border-slice'); +allProperties.add('mask-border-source'); +allProperties.add('mask-border-width'); +allProperties.add('mask-clip'); +allProperties.add('mask-composite'); +allProperties.add('mask-image'); +allProperties.add('mask-mode'); +allProperties.add('mask-origin'); +allProperties.add('mask-position'); +allProperties.add('mask-repeat'); +allProperties.add('mask-size'); +allProperties.add('mask-type'); +allProperties.add('max-block-size'); +allProperties.add('max-height'); +allProperties.add('max-inline-size'); +allProperties.add('max-lines'); +allProperties.add('max-width'); +allProperties.add('min-block-size'); +allProperties.add('min-height'); +allProperties.add('min-inline-size'); +allProperties.add('min-width'); +allProperties.add('mix-blend-mode'); +allProperties.add('nav-down'); +allProperties.add('nav-left'); +allProperties.add('nav-right'); +allProperties.add('nav-up'); +allProperties.add('object-fit'); +allProperties.add('object-position'); +allProperties.add('offset'); +allProperties.add('offset-after'); +allProperties.add('offset-anchor'); +allProperties.add('offset-before'); +allProperties.add('offset-distance'); +allProperties.add('offset-end'); +allProperties.add('offset-path'); +allProperties.add('offset-position'); +allProperties.add('offset-rotate'); +allProperties.add('offset-start'); +allProperties.add('opacity'); +allProperties.add('order'); +allProperties.add('orphans'); +allProperties.add('outline'); +allProperties.add('outline-color'); +allProperties.add('outline-offset'); +allProperties.add('outline-style'); +allProperties.add('outline-width'); +allProperties.add('overflow'); +allProperties.add('overflow-block'); +allProperties.add('overflow-inline'); +allProperties.add('overflow-wrap'); +allProperties.add('overflow-x'); +allProperties.add('overflow-y'); +allProperties.add('padding'); +allProperties.add('padding-block'); +allProperties.add('padding-block-end'); +allProperties.add('padding-block-start'); +allProperties.add('padding-bottom'); +allProperties.add('padding-inline'); +allProperties.add('padding-inline-end'); +allProperties.add('padding-inline-start'); +allProperties.add('padding-left'); +allProperties.add('padding-right'); +allProperties.add('padding-top'); +allProperties.add('page'); +allProperties.add('page-break-after'); +allProperties.add('page-break-before'); +allProperties.add('page-break-inside'); +allProperties.add('pause'); +allProperties.add('pause-after'); +allProperties.add('pause-before'); +allProperties.add('pitch'); +allProperties.add('pitch-range'); +allProperties.add('place-content'); +allProperties.add('place-items'); +allProperties.add('place-self'); +allProperties.add('play-during'); +allProperties.add('position'); +allProperties.add('presentation-level'); +allProperties.add('quotes'); +allProperties.add('region-fragment'); +allProperties.add('resize'); +allProperties.add('rest'); +allProperties.add('rest-after'); +allProperties.add('rest-before'); +allProperties.add('richness'); +allProperties.add('right'); +allProperties.add('row-gap'); +allProperties.add('ruby-align'); +allProperties.add('ruby-merge'); +allProperties.add('ruby-position'); +allProperties.add('running'); +allProperties.add('scroll-behavior'); +allProperties.add('scroll-margin'); +allProperties.add('scroll-margin-block'); +allProperties.add('scroll-margin-block-end'); +allProperties.add('scroll-margin-block-start'); +allProperties.add('scroll-margin-bottom'); +allProperties.add('scroll-margin-inline'); +allProperties.add('scroll-margin-inline-end'); +allProperties.add('scroll-margin-inline-start'); +allProperties.add('scroll-margin-left'); +allProperties.add('scroll-margin-right'); +allProperties.add('scroll-margin-top'); +allProperties.add('scroll-padding'); +allProperties.add('scroll-padding-block'); +allProperties.add('scroll-padding-block-end'); +allProperties.add('scroll-padding-block-start'); +allProperties.add('scroll-padding-bottom'); +allProperties.add('scroll-padding-inline'); +allProperties.add('scroll-padding-inline-end'); +allProperties.add('scroll-padding-inline-start'); +allProperties.add('scroll-padding-left'); +allProperties.add('scroll-padding-right'); +allProperties.add('scroll-padding-top'); +allProperties.add('scroll-snap-align'); +allProperties.add('scroll-snap-stop'); +allProperties.add('scroll-snap-type'); +allProperties.add('shape-image-threshold'); +allProperties.add('shape-inside'); +allProperties.add('shape-margin'); +allProperties.add('shape-outside'); +allProperties.add('speak'); +allProperties.add('speak-as'); +allProperties.add('speak-header'); +allProperties.add('speak-numeral'); +allProperties.add('speak-punctuation'); +allProperties.add('speech-rate'); +allProperties.add('stress'); +allProperties.add('string-set'); +allProperties.add('tab-size'); +allProperties.add('table-layout'); +allProperties.add('text-align'); +allProperties.add('text-align-all'); +allProperties.add('text-align-last'); +allProperties.add('text-combine-upright'); +allProperties.add('text-decoration'); +allProperties.add('text-decoration-color'); +allProperties.add('text-decoration-line'); +allProperties.add('text-decoration-style'); +allProperties.add('text-emphasis'); +allProperties.add('text-emphasis-color'); +allProperties.add('text-emphasis-position'); +allProperties.add('text-emphasis-style'); +allProperties.add('text-group-align'); +allProperties.add('text-indent'); +allProperties.add('text-justify'); +allProperties.add('text-orientation'); +allProperties.add('text-overflow'); +allProperties.add('text-shadow'); +allProperties.add('text-space-collapse'); +allProperties.add('text-space-trim'); +allProperties.add('text-spacing'); +allProperties.add('text-transform'); +allProperties.add('text-underline-position'); +allProperties.add('text-wrap'); +allProperties.add('top'); +allProperties.add('transform'); +allProperties.add('transform-box'); +allProperties.add('transform-origin'); +allProperties.add('transition'); +allProperties.add('transition-delay'); +allProperties.add('transition-duration'); +allProperties.add('transition-property'); +allProperties.add('transition-timing-function'); +allProperties.add('unicode-bidi'); +allProperties.add('user-select'); +allProperties.add('vertical-align'); +allProperties.add('visibility'); +allProperties.add('voice-balance'); +allProperties.add('voice-duration'); +allProperties.add('voice-family'); +allProperties.add('voice-pitch'); +allProperties.add('voice-range'); +allProperties.add('voice-rate'); +allProperties.add('voice-stress'); +allProperties.add('voice-volume'); +allProperties.add('volume'); +allProperties.add('white-space'); +allProperties.add('widows'); +allProperties.add('width'); +allProperties.add('will-change'); +allProperties.add('word-break'); +allProperties.add('word-spacing'); +allProperties.add('word-wrap'); +allProperties.add('wrap-after'); +allProperties.add('wrap-before'); +allProperties.add('wrap-flow'); +allProperties.add('wrap-inside'); +allProperties.add('wrap-through'); +allProperties.add('writing-mode'); +allProperties.add('z-index'); diff --git a/node_modules/cssstyle/lib/constants.js b/node_modules/cssstyle/lib/constants.js new file mode 100644 index 0000000..1b58869 --- /dev/null +++ b/node_modules/cssstyle/lib/constants.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports.POSITION_AT_SHORTHAND = { + first: 0, + second: 1, +}; diff --git a/node_modules/cssstyle/lib/implementedProperties.js b/node_modules/cssstyle/lib/implementedProperties.js new file mode 100644 index 0000000..edc6f5b --- /dev/null +++ b/node_modules/cssstyle/lib/implementedProperties.js @@ -0,0 +1,90 @@ +'use strict'; + +// autogenerated - 3/27/2019 + +/* + * + * https://www.w3.org/Style/CSS/all-properties.en.html + */ + +var implementedProperties = new Set(); +implementedProperties.add("azimuth"); +implementedProperties.add("background"); +implementedProperties.add("background-attachment"); +implementedProperties.add("background-color"); +implementedProperties.add("background-image"); +implementedProperties.add("background-position"); +implementedProperties.add("background-repeat"); +implementedProperties.add("border"); +implementedProperties.add("border-bottom"); +implementedProperties.add("border-bottom-color"); +implementedProperties.add("border-bottom-style"); +implementedProperties.add("border-bottom-width"); +implementedProperties.add("border-collapse"); +implementedProperties.add("border-color"); +implementedProperties.add("border-left"); +implementedProperties.add("border-left-color"); +implementedProperties.add("border-left-style"); +implementedProperties.add("border-left-width"); +implementedProperties.add("border-right"); +implementedProperties.add("border-right-color"); +implementedProperties.add("border-right-style"); +implementedProperties.add("border-right-width"); +implementedProperties.add("border-spacing"); +implementedProperties.add("border-style"); +implementedProperties.add("border-top"); +implementedProperties.add("border-top-color"); +implementedProperties.add("border-top-style"); +implementedProperties.add("border-top-width"); +implementedProperties.add("border-width"); +implementedProperties.add("bottom"); +implementedProperties.add("clear"); +implementedProperties.add("clip"); +implementedProperties.add("color"); +implementedProperties.add("css-float"); +implementedProperties.add("flex"); +implementedProperties.add("flex-basis"); +implementedProperties.add("flex-grow"); +implementedProperties.add("flex-shrink"); +implementedProperties.add("float"); +implementedProperties.add("flood-color"); +implementedProperties.add("font"); +implementedProperties.add("font-family"); +implementedProperties.add("font-size"); +implementedProperties.add("font-style"); +implementedProperties.add("font-variant"); +implementedProperties.add("font-weight"); +implementedProperties.add("height"); +implementedProperties.add("left"); +implementedProperties.add("lighting-color"); +implementedProperties.add("line-height"); +implementedProperties.add("margin"); +implementedProperties.add("margin-bottom"); +implementedProperties.add("margin-left"); +implementedProperties.add("margin-right"); +implementedProperties.add("margin-top"); +implementedProperties.add("opacity"); +implementedProperties.add("outline-color"); +implementedProperties.add("padding"); +implementedProperties.add("padding-bottom"); +implementedProperties.add("padding-left"); +implementedProperties.add("padding-right"); +implementedProperties.add("padding-top"); +implementedProperties.add("right"); +implementedProperties.add("stop-color"); +implementedProperties.add("text-line-through-color"); +implementedProperties.add("text-overline-color"); +implementedProperties.add("text-underline-color"); +implementedProperties.add("top"); +implementedProperties.add("webkit-border-after-color"); +implementedProperties.add("webkit-border-before-color"); +implementedProperties.add("webkit-border-end-color"); +implementedProperties.add("webkit-border-start-color"); +implementedProperties.add("webkit-column-rule-color"); +implementedProperties.add("webkit-match-nearest-mail-blockquote-color"); +implementedProperties.add("webkit-tap-highlight-color"); +implementedProperties.add("webkit-text-emphasis-color"); +implementedProperties.add("webkit-text-fill-color"); +implementedProperties.add("webkit-text-stroke-color"); +implementedProperties.add("width"); +module.exports = implementedProperties; diff --git a/node_modules/cssstyle/lib/named_colors.json b/node_modules/cssstyle/lib/named_colors.json new file mode 100644 index 0000000..63667a5 --- /dev/null +++ b/node_modules/cssstyle/lib/named_colors.json @@ -0,0 +1,152 @@ +[ + "aliceblue", + "antiquewhite", + "aqua", + "aquamarine", + "azure", + "beige", + "bisque", + "black", + "blanchedalmond", + "blue", + "blueviolet", + "brown", + "burlywood", + "cadetblue", + "chartreuse", + "chocolate", + "coral", + "cornflowerblue", + "cornsilk", + "crimson", + "cyan", + "darkblue", + "darkcyan", + "darkgoldenrod", + "darkgray", + "darkgreen", + "darkgrey", + "darkkhaki", + "darkmagenta", + "darkolivegreen", + "darkorange", + "darkorchid", + "darkred", + "darksalmon", + "darkseagreen", + "darkslateblue", + "darkslategray", + "darkslategrey", + "darkturquoise", + "darkviolet", + "deeppink", + "deepskyblue", + "dimgray", + "dimgrey", + "dodgerblue", + "firebrick", + "floralwhite", + "forestgreen", + "fuchsia", + "gainsboro", + "ghostwhite", + "gold", + "goldenrod", + "gray", + "green", + "greenyellow", + "grey", + "honeydew", + "hotpink", + "indianred", + "indigo", + "ivory", + "khaki", + "lavender", + "lavenderblush", + "lawngreen", + "lemonchiffon", + "lightblue", + "lightcoral", + "lightcyan", + "lightgoldenrodyellow", + "lightgray", + "lightgreen", + "lightgrey", + "lightpink", + "lightsalmon", + "lightseagreen", + "lightskyblue", + "lightslategray", + "lightslategrey", + "lightsteelblue", + "lightyellow", + "lime", + "limegreen", + "linen", + "magenta", + "maroon", + "mediumaquamarine", + "mediumblue", + "mediumorchid", + "mediumpurple", + "mediumseagreen", + "mediumslateblue", + "mediumspringgreen", + "mediumturquoise", + "mediumvioletred", + "midnightblue", + "mintcream", + "mistyrose", + "moccasin", + "navajowhite", + "navy", + "oldlace", + "olive", + "olivedrab", + "orange", + "orangered", + "orchid", + "palegoldenrod", + "palegreen", + "paleturquoise", + "palevioletred", + "papayawhip", + "peachpuff", + "peru", + "pink", + "plum", + "powderblue", + "purple", + "rebeccapurple", + "red", + "rosybrown", + "royalblue", + "saddlebrown", + "salmon", + "sandybrown", + "seagreen", + "seashell", + "sienna", + "silver", + "skyblue", + "slateblue", + "slategray", + "slategrey", + "snow", + "springgreen", + "steelblue", + "tan", + "teal", + "thistle", + "tomato", + "turquoise", + "violet", + "wheat", + "white", + "whitesmoke", + "yellow", + "yellowgreen", + "transparent", + "currentcolor" +] diff --git a/node_modules/cssstyle/lib/parsers.js b/node_modules/cssstyle/lib/parsers.js index c5d6bdd..24021ba 100644 --- a/node_modules/cssstyle/lib/parsers.js +++ b/node_modules/cssstyle/lib/parsers.js @@ -4,117 +4,116 @@ ********************************************************************/ 'use strict'; +const namedColors = require('./named_colors.json'); + exports.TYPES = { - INTEGER: 1, - NUMBER: 2, - LENGTH: 3, - PERCENT: 4, - URL: 5, - COLOR: 6, - STRING: 7, - ANGLE: 8, - KEYWORD: 9, - NULL_OR_EMPTY_STR: 10 + INTEGER: 1, + NUMBER: 2, + LENGTH: 3, + PERCENT: 4, + URL: 5, + COLOR: 6, + STRING: 7, + ANGLE: 8, + KEYWORD: 9, + NULL_OR_EMPTY_STR: 10, }; -/*jslint regexp: true*/ // rough regular expressions -var integerRegEx = /^[\-+]?[0-9]+$/; -var numberRegEx = /^[\-+]?[0-9]*\.[0-9]+$/; -var lengthRegEx = /^(0|[\-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px))$/; -var percentRegEx = /^[\-+]?[0-9]*\.?[0-9]+%$/; -var urlRegEx = /^url\(\s*([^\)]*)\s*\)$/; -var stringRegEx = /^(\"[^\"]*\"|\'[^\']*\')$/; +var integerRegEx = /^[-+]?[0-9]+$/; +var numberRegEx = /^[-+]?[0-9]*\.[0-9]+$/; +var lengthRegEx = /^(0|[-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem|vh|vw))$/; +var percentRegEx = /^[-+]?[0-9]*\.?[0-9]+%$/; +var urlRegEx = /^url\(\s*([^)]*)\s*\)$/; +var stringRegEx = /^("[^"]*"|'[^']*')$/; var colorRegEx1 = /^#[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]([0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])?$/; -var colorRegEx2 = /^rgb\(([^\)]*)\)$/; -var colorRegEx3 = /^rgba\(([^\)]*)\)$/; -var angleRegEx = /^([\-+]?[0-9]*\.?[0-9]+)(deg|grad|rad)$/; -/*jslint regexp: false*/ +var colorRegEx2 = /^rgb\(([^)]*)\)$/; +var colorRegEx3 = /^rgba\(([^)]*)\)$/; +var colorRegEx4 = /^hsla?\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*(,\s*(-?\d+|-?\d*.\d+)\s*)?\)/; +var angleRegEx = /^([-+]?[0-9]*\.?[0-9]+)(deg|grad|rad)$/; // This will return one of the above types based on the passed in string exports.valueType = function valueType(val) { - if (val === '' || val === null) { - return exports.TYPES.NULL_OR_EMPTY_STR; - } - if (typeof val === 'number') { - val = val.toString(); - } + if (val === '' || val === null) { + return exports.TYPES.NULL_OR_EMPTY_STR; + } + if (typeof val === 'number') { + val = val.toString(); + } - if (typeof val !== 'string') { - return undefined; - } + if (typeof val !== 'string') { + return undefined; + } - if (integerRegEx.test(val)) { - return exports.TYPES.INTEGER; + if (integerRegEx.test(val)) { + return exports.TYPES.INTEGER; + } + if (numberRegEx.test(val)) { + return exports.TYPES.NUMBER; + } + if (lengthRegEx.test(val)) { + return exports.TYPES.LENGTH; + } + if (percentRegEx.test(val)) { + return exports.TYPES.PERCENT; + } + if (urlRegEx.test(val)) { + return exports.TYPES.URL; + } + if (stringRegEx.test(val)) { + return exports.TYPES.STRING; + } + if (angleRegEx.test(val)) { + return exports.TYPES.ANGLE; + } + if (colorRegEx1.test(val)) { + return exports.TYPES.COLOR; + } + var res = colorRegEx2.exec(val); + var parts; + if (res !== null) { + parts = res[1].split(/\s*,\s*/); + if (parts.length !== 3) { + return undefined; } - if (numberRegEx.test(val)) { - return exports.TYPES.NUMBER; + if ( + parts.every(percentRegEx.test.bind(percentRegEx)) || + parts.every(integerRegEx.test.bind(integerRegEx)) + ) { + return exports.TYPES.COLOR; } - if (lengthRegEx.test(val)) { - return exports.TYPES.LENGTH; + return undefined; + } + res = colorRegEx3.exec(val); + if (res !== null) { + parts = res[1].split(/\s*,\s*/); + if (parts.length !== 4) { + return undefined; } - if (percentRegEx.test(val)) { - return exports.TYPES.PERCENT; - } - if (urlRegEx.test(val)) { - return exports.TYPES.URL; - } - if (stringRegEx.test(val)) { - return exports.TYPES.STRING; - } - if (angleRegEx.test(val)) { - return exports.TYPES.ANGLE; - } - if (colorRegEx1.test(val)) { + if ( + parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx)) || + parts.every(integerRegEx.test.bind(integerRegEx)) + ) { + if (numberRegEx.test(parts[3])) { return exports.TYPES.COLOR; + } } - var res = colorRegEx2.exec(val); - var parts; - if (res !== null) { - parts = res[1].split(/\s*,\s*/); - if (parts.length !== 3) { - return undefined; - } - if (parts.every(percentRegEx.test.bind(percentRegEx)) || parts.every(integerRegEx.test.bind(integerRegEx))) { - return exports.TYPES.COLOR; - } - return undefined; - } - res = colorRegEx3.exec(val); - if (res !== null) { - parts = res[1].split(/\s*,\s*/); - if (parts.length !== 4) { - return undefined; - } - if (parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx)) || parts.every(integerRegEx.test.bind(integerRegEx))) { - if (numberRegEx.test(parts[3])) { - return exports.TYPES.COLOR; - } - } - return undefined; - } + return undefined; + } - // could still be a color, one of the standard keyword colors - val = val.toLowerCase(); - switch (val) { - case 'maroon': - case 'red': - case 'orange': - case 'yellow': - case 'olive': - case 'purple': - case 'fuchsia': - case 'white': - case 'lime': - case 'green': - case 'navy': - case 'blue': - case 'aqua': - case 'teal': - case 'black': - case 'silver': - case 'gray': - // the following are deprecated in CSS3 + if (colorRegEx4.test(val)) { + return exports.TYPES.COLOR; + } + + // could still be a color, one of the standard keyword colors + val = val.toLowerCase(); + + if (namedColors.includes(val)) { + return exports.TYPES.COLOR; + } + + switch (val) { + // the following are deprecated in CSS3 case 'activeborder': case 'activecaption': case 'appworkspace': @@ -143,320 +142,348 @@ exports.valueType = function valueType(val) { case 'window': case 'windowframe': case 'windowtext': - return exports.TYPES.COLOR; + return exports.TYPES.COLOR; default: - return exports.TYPES.KEYWORD; - } + return exports.TYPES.KEYWORD; + } }; exports.parseInteger = function parseInteger(val) { - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - if (type !== exports.TYPES.INTEGER) { - return undefined; - } - return String(parseInt(val, 10)); + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.INTEGER) { + return undefined; + } + return String(parseInt(val, 10)); }; exports.parseNumber = function parseNumber(val) { - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - if (type !== exports.TYPES.NUMBER && type !== exports.TYPES.INTEGER) { - return undefined; - } - return String(parseFloat(val)); + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.NUMBER && type !== exports.TYPES.INTEGER) { + return undefined; + } + return String(parseFloat(val)); }; exports.parseLength = function parseLength(val) { - if (val === 0 || val === '0') { - return '0px'; - } - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - if (type !== exports.TYPES.LENGTH) { - return undefined; - } + if (val === 0 || val === '0') { + return '0px'; + } + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; + } + if (type !== exports.TYPES.LENGTH) { + return undefined; + } + return val; }; exports.parsePercent = function parsePercent(val) { - if (val === 0 || val === '0') { - return '0%'; - } - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - if (type !== exports.TYPES.PERCENT) { - return undefined; - } + if (val === 0 || val === '0') { + return '0%'; + } + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; + } + if (type !== exports.TYPES.PERCENT) { + return undefined; + } + return val; }; // either a length or a percent exports.parseMeasurement = function parseMeasurement(val) { - var length = exports.parseLength(val); - if (length !== undefined) { - return length; - } - return exports.parsePercent(val); + var length = exports.parseLength(val); + if (length !== undefined) { + return length; + } + return exports.parsePercent(val); }; exports.parseUrl = function parseUrl(val) { - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - var res = urlRegEx.exec(val); - // does it match the regex? - if (!res) { - return undefined; - } - var str = res[1]; - // if it starts with single or double quotes, does it end with the same? - if ((str[0] === '"' || str[0] === "'") && str[0] !== str[str.length - 1]) { - return undefined; - } - if (str[0] === '"' || str[0] === "'") { - str = str.substr(1, str.length - 2); - } + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + var res = urlRegEx.exec(val); + // does it match the regex? + if (!res) { + return undefined; + } + var str = res[1]; + // if it starts with single or double quotes, does it end with the same? + if ((str[0] === '"' || str[0] === "'") && str[0] !== str[str.length - 1]) { + return undefined; + } + if (str[0] === '"' || str[0] === "'") { + str = str.substr(1, str.length - 2); + } - var i; - for (i = 0; i < str.length; i++) { - switch (str[i]) { - case '(': - case ')': - case ' ': - case '\t': - case '\n': - case "'": - case '"': - return undefined; - case '\\': - i++; - break; - } + var i; + for (i = 0; i < str.length; i++) { + switch (str[i]) { + case '(': + case ')': + case ' ': + case '\t': + case '\n': + case "'": + case '"': + return undefined; + case '\\': + i++; + break; } + } - return 'url(' + str + ')'; + return 'url(' + str + ')'; }; exports.parseString = function parseString(val) { - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - if (type !== exports.TYPES.STRING) { - return undefined; - } - var i; - for (i = 1; i < val.length - 1; i++) { - switch (val[i]) { - case val[0]: - return undefined; - case '\\': - i++; - while (i < val.length - 1 && /[0-9A-Fa-f]/.test(val[i])) { - i++; - } - break; - } - } - if (i >= val.length) { - return undefined; - } + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { return val; + } + if (type !== exports.TYPES.STRING) { + return undefined; + } + var i; + for (i = 1; i < val.length - 1; i++) { + switch (val[i]) { + case val[0]: + return undefined; + case '\\': + i++; + while (i < val.length - 1 && /[0-9A-Fa-f]/.test(val[i])) { + i++; + } + break; + } + } + if (i >= val.length) { + return undefined; + } + return val; }; exports.parseColor = function parseColor(val) { - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - var red, green, blue, alpha = 1; - var parts; - var res = colorRegEx1.exec(val); - // is it #aaa or #ababab - if (res) { - var hex = val.substr(1); - if (hex.length === 3) { - hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; - } - red = parseInt(hex.substr(0, 2), 16); - green = parseInt(hex.substr(2, 2), 16); - blue = parseInt(hex.substr(4, 2), 16); - return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + var red, + green, + blue, + hue, + saturation, + lightness, + alpha = 1; + var parts; + var res = colorRegEx1.exec(val); + // is it #aaa or #ababab + if (res) { + var hex = val.substr(1); + if (hex.length === 3) { + hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; } + red = parseInt(hex.substr(0, 2), 16); + green = parseInt(hex.substr(2, 2), 16); + blue = parseInt(hex.substr(4, 2), 16); + return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; + } - res = colorRegEx2.exec(val); - if (res) { - parts = res[1].split(/\s*,\s*/); - if (parts.length !== 3) { - return undefined; - } - if (parts.every(percentRegEx.test.bind(percentRegEx))) { - red = Math.floor(parseFloat(parts[0].slice(0, -1)) * 255 / 100); - green = Math.floor(parseFloat(parts[1].slice(0, -1)) * 255 / 100); - blue = Math.floor(parseFloat(parts[2].slice(0, -1)) * 255 / 100); - } else if (parts.every(integerRegEx.test.bind(integerRegEx))) { - red = parseInt(parts[0], 10); - green = parseInt(parts[1], 10); - blue = parseInt(parts[2], 10); - } else { - return undefined; - } - red = Math.min(255, Math.max(0, red)); - green = Math.min(255, Math.max(0, green)); - blue = Math.min(255, Math.max(0, blue)); - return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; + res = colorRegEx2.exec(val); + if (res) { + parts = res[1].split(/\s*,\s*/); + if (parts.length !== 3) { + return undefined; } + if (parts.every(percentRegEx.test.bind(percentRegEx))) { + red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100); + green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100); + blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100); + } else if (parts.every(integerRegEx.test.bind(integerRegEx))) { + red = parseInt(parts[0], 10); + green = parseInt(parts[1], 10); + blue = parseInt(parts[2], 10); + } else { + return undefined; + } + red = Math.min(255, Math.max(0, red)); + green = Math.min(255, Math.max(0, green)); + blue = Math.min(255, Math.max(0, blue)); + return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; + } - res = colorRegEx3.exec(val); - if (res) { - parts = res[1].split(/\s*,\s*/); - if (parts.length !== 4) { - return undefined; - } - if (parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx))) { - red = Math.floor(parseFloat(parts[0].slice(0, -1)) * 255 / 100); - green = Math.floor(parseFloat(parts[1].slice(0, -1)) * 255 / 100); - blue = Math.floor(parseFloat(parts[2].slice(0, -1)) * 255 / 100); - alpha = parseFloat(parts[3]); - } else if (parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx))) { - red = parseInt(parts[0], 10); - green = parseInt(parts[1], 10); - blue = parseInt(parts[2], 10); - alpha = parseFloat(parts[3]); - } else { - return undefined; - } - if (isNaN(alpha)) { - alpha = 1; - } - red = Math.min(255, Math.max(0, red)); - green = Math.min(255, Math.max(0, green)); - blue = Math.min(255, Math.max(0, blue)); - alpha = Math.min(1, Math.max(0, alpha)); - if (alpha === 1) { - return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; - } - return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + alpha + ')'; + res = colorRegEx3.exec(val); + if (res) { + parts = res[1].split(/\s*,\s*/); + if (parts.length !== 4) { + return undefined; } + if (parts.slice(0, 3).every(percentRegEx.test.bind(percentRegEx))) { + red = Math.floor((parseFloat(parts[0].slice(0, -1)) * 255) / 100); + green = Math.floor((parseFloat(parts[1].slice(0, -1)) * 255) / 100); + blue = Math.floor((parseFloat(parts[2].slice(0, -1)) * 255) / 100); + alpha = parseFloat(parts[3]); + } else if (parts.slice(0, 3).every(integerRegEx.test.bind(integerRegEx))) { + red = parseInt(parts[0], 10); + green = parseInt(parts[1], 10); + blue = parseInt(parts[2], 10); + alpha = parseFloat(parts[3]); + } else { + return undefined; + } + if (isNaN(alpha)) { + alpha = 1; + } + red = Math.min(255, Math.max(0, red)); + green = Math.min(255, Math.max(0, green)); + blue = Math.min(255, Math.max(0, blue)); + alpha = Math.min(1, Math.max(0, alpha)); + if (alpha === 1) { + return 'rgb(' + red + ', ' + green + ', ' + blue + ')'; + } + return 'rgba(' + red + ', ' + green + ', ' + blue + ', ' + alpha + ')'; + } - if (type === exports.TYPES.COLOR) { - return val; + res = colorRegEx4.exec(val); + if (res) { + const [, _hue, _saturation, _lightness, _alphaString = ''] = res; + const _alpha = parseFloat(_alphaString.replace(',', '').trim()); + if (!_hue || !_saturation || !_lightness) { + return undefined; } - return undefined; + hue = parseFloat(_hue); + saturation = parseInt(_saturation, 10); + lightness = parseInt(_lightness, 10); + if (_alpha && numberRegEx.test(_alpha)) { + alpha = parseFloat(_alpha); + } + if (!_alphaString || alpha === 1) { + return 'hsl(' + hue + ', ' + saturation + '%, ' + lightness + '%)'; + } + return 'hsla(' + hue + ', ' + saturation + '%, ' + lightness + '%, ' + alpha + ')'; + } + + if (type === exports.TYPES.COLOR) { + return val; + } + return undefined; }; exports.parseAngle = function parseAngle(val) { - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - if (type !== exports.TYPES.ANGLE) { - return undefined; - } - var res = angleRegEx.exec(val); - var flt = parseFloat(res[1]); - if (res[2] === 'rad') { - flt *= 180 / Math.PI; - } else if (res[2] === 'grad') { - flt *= 360 / 400; - } + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.ANGLE) { + return undefined; + } + var res = angleRegEx.exec(val); + var flt = parseFloat(res[1]); + if (res[2] === 'rad') { + flt *= 180 / Math.PI; + } else if (res[2] === 'grad') { + flt *= 360 / 400; + } - while (flt < 0) { - flt += 360; - } - while (flt > 360) { - flt -= 360; - } - return flt + 'deg'; + while (flt < 0) { + flt += 360; + } + while (flt > 360) { + flt -= 360; + } + return flt + 'deg'; }; exports.parseKeyword = function parseKeyword(val, valid_keywords) { - var type = exports.valueType(val); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - return val; - } - if (type !== exports.TYPES.KEYWORD) { - return undefined; - } - val = val.toString().toLowerCase(); - var i; - for (i = 0; i < valid_keywords.length; i++) { - if (valid_keywords[i].toLowerCase() === val) { - return valid_keywords[i]; - } - } + var type = exports.valueType(val); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + return val; + } + if (type !== exports.TYPES.KEYWORD) { return undefined; + } + val = val.toString().toLowerCase(); + var i; + for (i = 0; i < valid_keywords.length; i++) { + if (valid_keywords[i].toLowerCase() === val) { + return valid_keywords[i]; + } + } + return undefined; }; // utility to translate from border-width to borderWidth -var dashedToCamelCase = function (dashed) { - var i; - var camel = ''; - var nextCap = false; - for (i = 0; i < dashed.length; i++) { - if (dashed[i] !== '-') { - camel += nextCap ? dashed[i].toUpperCase() : dashed[i]; - nextCap = false; - } else { - nextCap = true; - } +var dashedToCamelCase = function(dashed) { + var i; + var camel = ''; + var nextCap = false; + for (i = 0; i < dashed.length; i++) { + if (dashed[i] !== '-') { + camel += nextCap ? dashed[i].toUpperCase() : dashed[i]; + nextCap = false; + } else { + nextCap = true; } - return camel; + } + return camel; }; exports.dashedToCamelCase = dashedToCamelCase; var is_space = /\s/; -var opening_deliminators = ['"', '\'', '(']; -var closing_deliminators = ['"', '\'', ')']; +var opening_deliminators = ['"', "'", '(']; +var closing_deliminators = ['"', "'", ')']; // this splits on whitespace, but keeps quoted and parened parts together -var getParts = function (str) { - var deliminator_stack = []; - var length = str.length; - var i; - var parts = []; - var current_part = ''; - var opening_index; - var closing_index; - for (i = 0; i < length; i++) { - opening_index = opening_deliminators.indexOf(str[i]); - closing_index = closing_deliminators.indexOf(str[i]); - if (is_space.test(str[i])) { - if (deliminator_stack.length === 0) { - if (current_part !== '') { - parts.push(current_part); - } - current_part = ''; - } else { - current_part += str[i]; - } - } else { - if (str[i] === '\\') { - i++; - current_part += str[i]; - } else { - current_part += str[i]; - if (closing_index !== -1 && closing_index === deliminator_stack[deliminator_stack.length - 1]) { - deliminator_stack.pop(); - } else if (opening_index !== -1) { - deliminator_stack.push(opening_index); - } - } +var getParts = function(str) { + var deliminator_stack = []; + var length = str.length; + var i; + var parts = []; + var current_part = ''; + var opening_index; + var closing_index; + for (i = 0; i < length; i++) { + opening_index = opening_deliminators.indexOf(str[i]); + closing_index = closing_deliminators.indexOf(str[i]); + if (is_space.test(str[i])) { + if (deliminator_stack.length === 0) { + if (current_part !== '') { + parts.push(current_part); } + current_part = ''; + } else { + current_part += str[i]; + } + } else { + if (str[i] === '\\') { + i++; + current_part += str[i]; + } else { + current_part += str[i]; + if ( + closing_index !== -1 && + closing_index === deliminator_stack[deliminator_stack.length - 1] + ) { + deliminator_stack.pop(); + } else if (opening_index !== -1) { + deliminator_stack.push(opening_index); + } + } } - if (current_part !== '') { - parts.push(current_part); - } - return parts; + } + if (current_part !== '') { + parts.push(current_part); + } + return parts; }; /* @@ -466,93 +493,96 @@ var getParts = function (str) { * on them */ exports.shorthandParser = function parse(v, shorthand_for) { - var obj = {}; - var type = exports.valueType(v); - if (type === exports.TYPES.NULL_OR_EMPTY_STR) { - Object.keys(shorthand_for).forEach(function (property) { - obj[property] = ''; - }); - return obj; - } - - if (typeof v === 'number') { - v = v.toString(); - } - - if (typeof v !== 'string') { - return undefined; - } - - if (v.toLowerCase() === 'inherit') { - return {}; - } - var parts = getParts(v); - var valid = true; - parts.forEach(function (part) { - var part_valid = false; - Object.keys(shorthand_for).forEach(function (property) { - if (shorthand_for[property].isValid(part)) { - part_valid = true; - obj[property] = part; - } - }); - valid = valid && part_valid; + var obj = {}; + var type = exports.valueType(v); + if (type === exports.TYPES.NULL_OR_EMPTY_STR) { + Object.keys(shorthand_for).forEach(function(property) { + obj[property] = ''; }); - if (!valid) { - return undefined; - } return obj; + } + + if (typeof v === 'number') { + v = v.toString(); + } + + if (typeof v !== 'string') { + return undefined; + } + + if (v.toLowerCase() === 'inherit') { + return {}; + } + var parts = getParts(v); + var valid = true; + parts.forEach(function(part, i) { + var part_valid = false; + Object.keys(shorthand_for).forEach(function(property) { + if (shorthand_for[property].isValid(part, i)) { + part_valid = true; + obj[property] = part; + } + }); + valid = valid && part_valid; + }); + if (!valid) { + return undefined; + } + return obj; }; -exports.shorthandSetter = function (property, shorthand_for) { - return function (v) { - var obj = exports.shorthandParser(v, shorthand_for); - if (obj === undefined) { - return; - } - //console.log('shorthandSetter for:', property, 'obj:', obj); - Object.keys(obj).forEach(function (subprop) { - // in case subprop is an implicit property, this will clear - // *its* subpropertiesX - var camel = dashedToCamelCase(subprop); - this[camel] = obj[subprop]; - // in case it gets translated into something else (0 -> 0px) - obj[subprop] = this[camel]; - this.removeProperty(subprop); - // don't add in empty properties - if (obj[subprop] !== '') { - this._values[subprop] = obj[subprop]; - } - }, this); - Object.keys(shorthand_for).forEach(function (subprop) { - if (!obj.hasOwnProperty(subprop)) { - this.removeProperty(subprop); - delete this._values[subprop]; - } - }, this); - // in case the value is something like 'none' that removes all values, - // check that the generated one is not empty, first remove the property - // if it already exists, then call the shorthandGetter, if it's an empty - // string, don't set the property - this.removeProperty(property); - var calculated = exports.shorthandGetter(property, shorthand_for).call(this); - if (calculated !== '') { - this._setProperty(property, calculated); - } - }; +exports.shorthandSetter = function(property, shorthand_for) { + return function(v) { + var obj = exports.shorthandParser(v, shorthand_for); + if (obj === undefined) { + return; + } + //console.log('shorthandSetter for:', property, 'obj:', obj); + Object.keys(obj).forEach(function(subprop) { + // in case subprop is an implicit property, this will clear + // *its* subpropertiesX + var camel = dashedToCamelCase(subprop); + this[camel] = obj[subprop]; + // in case it gets translated into something else (0 -> 0px) + obj[subprop] = this[camel]; + this.removeProperty(subprop); + // don't add in empty properties + if (obj[subprop] !== '') { + this._values[subprop] = obj[subprop]; + } + }, this); + Object.keys(shorthand_for).forEach(function(subprop) { + if (!obj.hasOwnProperty(subprop)) { + this.removeProperty(subprop); + delete this._values[subprop]; + } + }, this); + // in case the value is something like 'none' that removes all values, + // check that the generated one is not empty, first remove the property + // if it already exists, then call the shorthandGetter, if it's an empty + // string, don't set the property + this.removeProperty(property); + var calculated = exports.shorthandGetter(property, shorthand_for).call(this); + if (calculated !== '') { + this._setProperty(property, calculated); + } + }; }; -exports.shorthandGetter = function (property, shorthand_for) { - return function () { - if (this._values[property] !== undefined) { - return this.getPropertyValue(property); - } - return Object.keys(shorthand_for).map(function (subprop) { - return this.getPropertyValue(subprop); - }, this).filter(function (value) { - return value !== ''; - }).join(' '); - }; +exports.shorthandGetter = function(property, shorthand_for) { + return function() { + if (this._values[property] !== undefined) { + return this.getPropertyValue(property); + } + return Object.keys(shorthand_for) + .map(function(subprop) { + return this.getPropertyValue(subprop); + }, this) + .filter(function(value) { + return value !== ''; + }) + .join(' '); + }; }; // isValid(){1,4} | inherit @@ -560,57 +590,57 @@ exports.shorthandGetter = function (property, shorthand_for) { // if two, the first applies to the top and bottom, and the second to left and right // if three, the first applies to the top, the second to left and right, the third bottom // if four, top, right, bottom, left -exports.implicitSetter = function (property_before, property_after, isValid, parser) { - property_after = property_after || ''; - if (property_after !== '') { - property_after = '-' + property_after; +exports.implicitSetter = function(property_before, property_after, isValid, parser) { + property_after = property_after || ''; + if (property_after !== '') { + property_after = '-' + property_after; + } + var part_names = ['top', 'right', 'bottom', 'left']; + + return function(v) { + if (typeof v === 'number') { + v = v.toString(); + } + if (typeof v !== 'string') { + return undefined; + } + var parts; + if (v.toLowerCase() === 'inherit' || v === '') { + parts = [v]; + } else { + parts = getParts(v); + } + if (parts.length < 1 || parts.length > 4) { + return undefined; } - var part_names = ["top","right","bottom","left"]; - return function (v) { - if (typeof v === 'number') { - v = v.toString(); - } - if (typeof v !== 'string') { - return undefined; - } - var parts; - if (v.toLowerCase() === 'inherit' || v === '') { - parts = [v]; - } else { - parts = getParts(v); - } - if (parts.length < 1 || parts.length > 4) { - return undefined; - } + if (!parts.every(isValid)) { + return undefined; + } - if (!parts.every(isValid)) { - return undefined; - } + parts = parts.map(function(part) { + return parser(part); + }); + this._setProperty(property_before + property_after, parts.join(' ')); + if (parts.length === 1) { + parts[1] = parts[0]; + } + if (parts.length === 2) { + parts[2] = parts[0]; + } + if (parts.length === 3) { + parts[3] = parts[1]; + } - parts = parts.map(function (part) { - return parser(part); - }); - this._setProperty(property_before + property_after, parts.join(' ')); - if (parts.length === 1) { - parts[1] = parts[0]; - } - if (parts.length === 2) { - parts[2] = parts[0]; - } - if (parts.length === 3) { - parts[3] = parts[1]; - } - - for (var i = 0; i < 4; i++) { - var property = property_before + "-" + part_names[i] + property_after; - this.removeProperty(property); - if (parts[i] !== '') { - this._values[property] = parts[i]; - } - } - return v; - }; + for (var i = 0; i < 4; i++) { + var property = property_before + '-' + part_names[i] + property_after; + this.removeProperty(property); + if (parts[i] !== '') { + this._values[property] = parts[i]; + } + } + return v; + }; }; // @@ -619,52 +649,49 @@ exports.implicitSetter = function (property_before, property_after, isValid, par // sub-parts are set. If so, it sets the shorthand version and removes // the individual parts from the cssText. // -exports.subImplicitSetter = function (prefix, part, isValid, parser) { - var property = prefix + '-' + part; - var subparts = [prefix+"-top", prefix+"-right", prefix+"-bottom", prefix+"-left"]; +exports.subImplicitSetter = function(prefix, part, isValid, parser) { + var property = prefix + '-' + part; + var subparts = [prefix + '-top', prefix + '-right', prefix + '-bottom', prefix + '-left']; - return function (v) { - if (typeof v === 'number') { - v = v.toString(); - } - if (typeof v !== 'string') { - return undefined; - } - if (!isValid(v)) { - return undefined; - } - v = parser(v); - this._setProperty(property,v); - var parts = []; - for (var i = 0; i < 4; i++) { - if (this._values[subparts[i]] == null || this._values[subparts[i]] === '') { - break; - } - parts.push(this._values[subparts[i]]); - } - if (parts.length === 4) { - for (i = 0; i < 4; i++) { - this.removeProperty(subparts[i]); - this._values[subparts[i]] = parts[i]; - } - this._setProperty(prefix,parts.join(" ")); - } - return v; - }; + return function(v) { + if (typeof v === 'number') { + v = v.toString(); + } + if (typeof v !== 'string') { + return undefined; + } + if (!isValid(v)) { + return undefined; + } + v = parser(v); + this._setProperty(property, v); + var parts = []; + for (var i = 0; i < 4; i++) { + if (this._values[subparts[i]] == null || this._values[subparts[i]] === '') { + break; + } + parts.push(this._values[subparts[i]]); + } + if (parts.length === 4) { + for (i = 0; i < 4; i++) { + this.removeProperty(subparts[i]); + this._values[subparts[i]] = parts[i]; + } + this._setProperty(prefix, parts.join(' ')); + } + return v; + }; }; - var camel_to_dashed = /[A-Z]/g; -/*jslint regexp: true*/ -var first_segment = /^\([^\-]\)-/; -/*jslint regexp: false*/ +var first_segment = /^\([^-]\)-/; var vendor_prefixes = ['o', 'moz', 'ms', 'webkit']; -exports.camelToDashed = function (camel_case) { - var match; - var dashed = camel_case.replace(camel_to_dashed, '-$&').toLowerCase(); - match = dashed.match(first_segment); - if (match && vendor_prefixes.indexOf(match[1]) !== -1) { - dashed = '-' + dashed; - } - return dashed; +exports.camelToDashed = function(camel_case) { + var match; + var dashed = camel_case.replace(camel_to_dashed, '-$&').toLowerCase(); + match = dashed.match(first_segment); + if (match && vendor_prefixes.indexOf(match[1]) !== -1) { + dashed = '-' + dashed; + } + return dashed; }; diff --git a/node_modules/cssstyle/lib/properties.js b/node_modules/cssstyle/lib/properties.js index be126cc..2c3c9e9 100644 --- a/node_modules/cssstyle/lib/properties.js +++ b/node_modules/cssstyle/lib/properties.js @@ -1,25 +1,16 @@ 'use strict'; -// autogenerated +// autogenerated - 3/27/2019 /* * - * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties + * https://www.w3.org/Style/CSS/all-properties.en.html */ var external_dependency_parsers_0 = require("./parsers.js"); -var alignmentBaseline_export_definition; -alignmentBaseline_export_definition = { - set: function (v) { - this._setProperty('alignment-baseline', v); - }, - get: function () { - return this.getPropertyValue('alignment-baseline'); - }, - enumerable: true, - configurable: true -}; +var external_dependency_constants_1 = require("./constants.js"); + var azimuth_export_definition; azimuth_export_definition = { set: function (v) { @@ -60,8 +51,6 @@ azimuth_export_definition = { return this._setProperty('azimuth', '180deg'); } - var deg; - switch (keywords[0]) { case 'left-side': return this._setProperty('azimuth', '270deg'); @@ -273,7 +262,7 @@ backgroundPosition_export_definition = { enumerable: true, configurable: true }; -var background_export_isValid, background_export_definition; +var background_export_definition; var background_local_var_shorthand_for = { 'background-color': { isValid: backgroundColor_export_isValid, @@ -296,105 +285,12 @@ var background_local_var_shorthand_for = { definition: backgroundPosition_export_definition } }; - -background_export_isValid = function isValid(v) { - return external_dependency_parsers_0.shorthandParser(v, background_local_var_shorthand_for) !== undefined; -}; - background_export_definition = { set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for), enumerable: true, configurable: true }; -var backgroundClip_export_definition; -backgroundClip_export_definition = { - set: function (v) { - this._setProperty('background-clip', v); - }, - get: function () { - return this.getPropertyValue('background-clip'); - }, - enumerable: true, - configurable: true -}; -var backgroundOrigin_export_definition; -backgroundOrigin_export_definition = { - set: function (v) { - this._setProperty('background-origin', v); - }, - get: function () { - return this.getPropertyValue('background-origin'); - }, - enumerable: true, - configurable: true -}; -var backgroundPositionX_export_definition; -backgroundPositionX_export_definition = { - set: function (v) { - this._setProperty('background-position-x', v); - }, - get: function () { - return this.getPropertyValue('background-position-x'); - }, - enumerable: true, - configurable: true -}; -var backgroundPositionY_export_definition; -backgroundPositionY_export_definition = { - set: function (v) { - this._setProperty('background-position-y', v); - }, - get: function () { - return this.getPropertyValue('background-position-y'); - }, - enumerable: true, - configurable: true -}; -var backgroundRepeatX_export_definition; -backgroundRepeatX_export_definition = { - set: function (v) { - this._setProperty('background-repeat-x', v); - }, - get: function () { - return this.getPropertyValue('background-repeat-x'); - }, - enumerable: true, - configurable: true -}; -var backgroundRepeatY_export_definition; -backgroundRepeatY_export_definition = { - set: function (v) { - this._setProperty('background-repeat-y', v); - }, - get: function () { - return this.getPropertyValue('background-repeat-y'); - }, - enumerable: true, - configurable: true -}; -var backgroundSize_export_definition; -backgroundSize_export_definition = { - set: function (v) { - this._setProperty('background-size', v); - }, - get: function () { - return this.getPropertyValue('background-size'); - }, - enumerable: true, - configurable: true -}; -var baselineShift_export_definition; -baselineShift_export_definition = { - set: function (v) { - this._setProperty('baseline-shift', v); - }, - get: function () { - return this.getPropertyValue('baseline-shift'); - }, - enumerable: true, - configurable: true -}; var borderWidth_export_isValid, borderWidth_export_definition; // the valid border-widths: var borderWidth_local_var_widths = ['thin', 'medium', 'thick']; @@ -501,7 +397,7 @@ borderColor_export_definition = { enumerable: true, configurable: true }; -var border_export_isValid, border_export_definition; +var border_export_definition; var border_local_var_shorthand_for = { 'border-width': { isValid: borderWidth_export_isValid, @@ -516,25 +412,6 @@ var border_local_var_shorthand_for = { definition: borderColor_export_definition } }; - -var border_local_var_isValid = function isValid(v) { - return external_dependency_parsers_0.shorthandParser(v, border_local_var_shorthand_for) !== undefined; -}; - -border_export_isValid = border_local_var_isValid; - -var border_local_var_parser = function (v) { - if (v.toString().toLowerCase() === 'none') { - v = ''; - } - - if (border_local_var_isValid(v)) { - return v; - } - - return undefined; -}; - var border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for); var border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for); border_export_definition = { @@ -604,7 +481,7 @@ borderBottomColor_export_definition = { enumerable: true, configurable: true }; -var borderBottom_export_isValid, borderBottom_export_definition; +var borderBottom_export_definition; var borderBottom_local_var_shorthand_for = { 'border-bottom-width': { isValid: borderBottomWidth_export_isValid, @@ -619,41 +496,13 @@ var borderBottom_local_var_shorthand_for = { definition: borderBottomColor_export_definition } }; - -var borderBottom_local_var_isValid = function isValid(v) { - return external_dependency_parsers_0.shorthandParser(v, borderBottom_local_var_shorthand_for) !== undefined; -}; - -borderBottom_export_isValid = borderBottom_local_var_isValid; borderBottom_export_definition = { set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for), enumerable: true, configurable: true }; -var borderBottomLeftRadius_export_definition; -borderBottomLeftRadius_export_definition = { - set: function (v) { - this._setProperty('border-bottom-left-radius', v); - }, - get: function () { - return this.getPropertyValue('border-bottom-left-radius'); - }, - enumerable: true, - configurable: true -}; -var borderBottomRightRadius_export_definition; -borderBottomRightRadius_export_definition = { - set: function (v) { - this._setProperty('border-bottom-right-radius', v); - }, - get: function () { - return this.getPropertyValue('border-bottom-right-radius'); - }, - enumerable: true, - configurable: true -}; -var borderCollapse_export_isValid, borderCollapse_export_definition; +var borderCollapse_export_definition; var borderCollapse_local_var_parse = function parse(v) { if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) { @@ -663,10 +512,6 @@ var borderCollapse_local_var_parse = function parse(v) { return undefined; }; -borderCollapse_export_isValid = function isValid(v) { - return borderCollapse_local_var_parse(v) !== undefined; -}; - borderCollapse_export_definition = { set: function (v) { this._setProperty('border-collapse', borderCollapse_local_var_parse(v)); @@ -677,72 +522,6 @@ borderCollapse_export_definition = { enumerable: true, configurable: true }; -var borderImage_export_definition; -borderImage_export_definition = { - set: function (v) { - this._setProperty('border-image', v); - }, - get: function () { - return this.getPropertyValue('border-image'); - }, - enumerable: true, - configurable: true -}; -var borderImageOutset_export_definition; -borderImageOutset_export_definition = { - set: function (v) { - this._setProperty('border-image-outset', v); - }, - get: function () { - return this.getPropertyValue('border-image-outset'); - }, - enumerable: true, - configurable: true -}; -var borderImageRepeat_export_definition; -borderImageRepeat_export_definition = { - set: function (v) { - this._setProperty('border-image-repeat', v); - }, - get: function () { - return this.getPropertyValue('border-image-repeat'); - }, - enumerable: true, - configurable: true -}; -var borderImageSlice_export_definition; -borderImageSlice_export_definition = { - set: function (v) { - this._setProperty('border-image-slice', v); - }, - get: function () { - return this.getPropertyValue('border-image-slice'); - }, - enumerable: true, - configurable: true -}; -var borderImageSource_export_definition; -borderImageSource_export_definition = { - set: function (v) { - this._setProperty('border-image-source', v); - }, - get: function () { - return this.getPropertyValue('border-image-source'); - }, - enumerable: true, - configurable: true -}; -var borderImageWidth_export_definition; -borderImageWidth_export_definition = { - set: function (v) { - this._setProperty('border-image-width', v); - }, - get: function () { - return this.getPropertyValue('border-image-width'); - }, - enumerable: true, - configurable: true -}; var borderLeftWidth_export_isValid, borderLeftWidth_export_definition; var borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid; borderLeftWidth_export_definition = { @@ -790,7 +569,7 @@ borderLeftColor_export_definition = { enumerable: true, configurable: true }; -var borderLeft_export_isValid, borderLeft_export_definition; +var borderLeft_export_definition; var borderLeft_local_var_shorthand_for = { 'border-left-width': { isValid: borderLeftWidth_export_isValid, @@ -805,29 +584,12 @@ var borderLeft_local_var_shorthand_for = { definition: borderLeftColor_export_definition } }; - -var borderLeft_local_var_isValid = function isValid(v) { - return external_dependency_parsers_0.shorthandParser(v, borderLeft_local_var_shorthand_for) !== undefined; -}; - -borderLeft_export_isValid = borderLeft_local_var_isValid; borderLeft_export_definition = { set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for), enumerable: true, configurable: true }; -var borderRadius_export_definition; -borderRadius_export_definition = { - set: function (v) { - this._setProperty('border-radius', v); - }, - get: function () { - return this.getPropertyValue('border-radius'); - }, - enumerable: true, - configurable: true -}; var borderRightWidth_export_isValid, borderRightWidth_export_definition; var borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid; borderRightWidth_export_definition = { @@ -875,7 +637,7 @@ borderRightColor_export_definition = { enumerable: true, configurable: true }; -var borderRight_export_isValid, borderRight_export_definition; +var borderRight_export_definition; var borderRight_local_var_shorthand_for = { 'border-right-width': { isValid: borderRightWidth_export_isValid, @@ -890,19 +652,13 @@ var borderRight_local_var_shorthand_for = { definition: borderRightColor_export_definition } }; - -var borderRight_local_var_isValid = function isValid(v) { - return external_dependency_parsers_0.shorthandParser(v, borderRight_local_var_shorthand_for) !== undefined; -}; - -borderRight_export_isValid = borderRight_local_var_isValid; borderRight_export_definition = { set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for), enumerable: true, configurable: true }; -var borderSpacing_export_isValid, borderSpacing_export_definition; +var borderSpacing_export_definition; // ? | inherit // if one, it applies to both horizontal and verical spacing @@ -912,6 +668,10 @@ var borderSpacing_local_var_parse = function parse(v) { return undefined; } + if (v === 0) { + return '0px'; + } + if (v.toLowerCase() === 'inherit') { return v; } @@ -930,10 +690,6 @@ var borderSpacing_local_var_parse = function parse(v) { return v; }; -borderSpacing_export_isValid = function isValid(v) { - return borderSpacing_local_var_parse(v) !== undefined; -}; - borderSpacing_export_definition = { set: function (v) { this._setProperty('border-spacing', borderSpacing_local_var_parse(v)); @@ -991,7 +747,7 @@ borderTopColor_export_definition = { enumerable: true, configurable: true }; -var borderTop_export_isValid, borderTop_export_definition; +var borderTop_export_definition; var borderTop_local_var_shorthand_for = { 'border-top-width': { isValid: borderTopWidth_export_isValid, @@ -1006,39 +762,12 @@ var borderTop_local_var_shorthand_for = { definition: borderTopColor_export_definition } }; - -borderTop_export_isValid = function (v) { - return external_dependency_parsers_0.shorthandParser(v, borderTop_local_var_shorthand_for) !== undefined; -}; - borderTop_export_definition = { set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for), get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for), enumerable: true, configurable: true }; -var borderTopLeftRadius_export_definition; -borderTopLeftRadius_export_definition = { - set: function (v) { - this._setProperty('border-top-left-radius', v); - }, - get: function () { - return this.getPropertyValue('border-top-left-radius'); - }, - enumerable: true, - configurable: true -}; -var borderTopRightRadius_export_definition; -borderTopRightRadius_export_definition = { - set: function (v) { - this._setProperty('border-top-right-radius', v); - }, - get: function () { - return this.getPropertyValue('border-top-right-radius'); - }, - enumerable: true, - configurable: true -}; var bottom_export_definition; bottom_export_definition = { set: function (v) { @@ -1050,39 +779,6 @@ bottom_export_definition = { enumerable: true, configurable: true }; -var boxShadow_export_definition; -boxShadow_export_definition = { - set: function (v) { - this._setProperty('box-shadow', v); - }, - get: function () { - return this.getPropertyValue('box-shadow'); - }, - enumerable: true, - configurable: true -}; -var boxSizing_export_definition; -boxSizing_export_definition = { - set: function (v) { - this._setProperty('box-sizing', v); - }, - get: function () { - return this.getPropertyValue('box-sizing'); - }, - enumerable: true, - configurable: true -}; -var captionSide_export_definition; -captionSide_export_definition = { - set: function (v) { - this._setProperty('caption-side', v); - }, - get: function () { - return this.getPropertyValue('caption-side'); - }, - enumerable: true, - configurable: true -}; var clear_export_definition; var clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit']; clear_export_definition = { @@ -1096,7 +792,7 @@ clear_export_definition = { configurable: true }; var clip_export_definition; -/*jslint regexp: true*/var clip_local_var_shape_regex = /^rect\((.*)\)$/i; /*jslint regexp: false*/ +var clip_local_var_shape_regex = /^rect\((.*)\)$/i; var clip_local_var_parse = function (val) { if (val === '' || val === null) { @@ -1160,83 +856,6 @@ color_export_definition = { enumerable: true, configurable: true }; -var colorInterpolation_export_definition; -colorInterpolation_export_definition = { - set: function (v) { - this._setProperty('color-interpolation', v); - }, - get: function () { - return this.getPropertyValue('color-interpolation'); - }, - enumerable: true, - configurable: true -}; -var colorInterpolationFilters_export_definition; -colorInterpolationFilters_export_definition = { - set: function (v) { - this._setProperty('color-interpolation-filters', v); - }, - get: function () { - return this.getPropertyValue('color-interpolation-filters'); - }, - enumerable: true, - configurable: true -}; -var colorProfile_export_definition; -colorProfile_export_definition = { - set: function (v) { - this._setProperty('color-profile', v); - }, - get: function () { - return this.getPropertyValue('color-profile'); - }, - enumerable: true, - configurable: true -}; -var colorRendering_export_definition; -colorRendering_export_definition = { - set: function (v) { - this._setProperty('color-rendering', v); - }, - get: function () { - return this.getPropertyValue('color-rendering'); - }, - enumerable: true, - configurable: true -}; -var content_export_definition; -content_export_definition = { - set: function (v) { - this._setProperty('content', v); - }, - get: function () { - return this.getPropertyValue('content'); - }, - enumerable: true, - configurable: true -}; -var counterIncrement_export_definition; -counterIncrement_export_definition = { - set: function (v) { - this._setProperty('counter-increment', v); - }, - get: function () { - return this.getPropertyValue('counter-increment'); - }, - enumerable: true, - configurable: true -}; -var counterReset_export_definition; -counterReset_export_definition = { - set: function (v) { - this._setProperty('counter-reset', v); - }, - get: function () { - return this.getPropertyValue('counter-reset'); - }, - enumerable: true, - configurable: true -}; var cssFloat_export_definition; cssFloat_export_definition = { set: function (v) { @@ -1248,156 +867,121 @@ cssFloat_export_definition = { enumerable: true, configurable: true }; -var cue_export_definition; -cue_export_definition = { +var flexGrow_export_isValid, flexGrow_export_definition; + +flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) { + return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first; +}; + +flexGrow_export_definition = { set: function (v) { - this._setProperty('cue', v); + this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v)); }, get: function () { - return this.getPropertyValue('cue'); + return this.getPropertyValue('flex-grow'); }, enumerable: true, configurable: true }; -var cueAfter_export_definition; -cueAfter_export_definition = { +var flexShrink_export_isValid, flexShrink_export_definition; + +flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) { + return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second; +}; + +flexShrink_export_definition = { set: function (v) { - this._setProperty('cue-after', v); + this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v)); }, get: function () { - return this.getPropertyValue('cue-after'); + return this.getPropertyValue('flex-shrink'); }, enumerable: true, configurable: true }; -var cueBefore_export_definition; -cueBefore_export_definition = { +var flexBasis_export_isValid, flexBasis_export_definition; + +function flexBasis_local_fn_parse(v) { + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + + return external_dependency_parsers_0.parseMeasurement(v); +} + +flexBasis_export_isValid = function isValid(v) { + return flexBasis_local_fn_parse(v) !== undefined; +}; + +flexBasis_export_definition = { set: function (v) { - this._setProperty('cue-before', v); + this._setProperty('flex-basis', flexBasis_local_fn_parse(v)); }, get: function () { - return this.getPropertyValue('cue-before'); + return this.getPropertyValue('flex-basis'); }, enumerable: true, configurable: true }; -var cursor_export_definition; -cursor_export_definition = { +var flex_export_isValid, flex_export_definition; +var flex_local_var_shorthand_for = { + 'flex-grow': { + isValid: flexGrow_export_isValid, + definition: flexGrow_export_definition + }, + 'flex-shrink': { + isValid: flexShrink_export_isValid, + definition: flexShrink_export_definition + }, + 'flex-basis': { + isValid: flexBasis_export_isValid, + definition: flexBasis_export_definition + } +}; +var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for); + +flex_export_isValid = function isValid(v) { + return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined; +}; + +flex_export_definition = { set: function (v) { - this._setProperty('cursor', v); - }, - get: function () { - return this.getPropertyValue('cursor'); + var normalizedValue = String(v).trim().toLowerCase(); + + if (normalizedValue === 'none') { + flex_local_var_myShorthandSetter.call(this, '0 0 auto'); + return; + } + + if (normalizedValue === 'initial') { + flex_local_var_myShorthandSetter.call(this, '0 1 auto'); + return; + } + + if (normalizedValue === 'auto') { + this.removeProperty('flex-grow'); + this.removeProperty('flex-shrink'); + this.setProperty('flex-basis', normalizedValue); + return; + } + + flex_local_var_myShorthandSetter.call(this, v); }, + get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for), enumerable: true, configurable: true }; -var direction_export_definition; -direction_export_definition = { +var float_export_definition; +float_export_definition = { set: function (v) { - this._setProperty('direction', v); + this._setProperty('float', v); }, get: function () { - return this.getPropertyValue('direction'); - }, - enumerable: true, - configurable: true -}; -var display_export_definition; -display_export_definition = { - set: function (v) { - this._setProperty('display', v); - }, - get: function () { - return this.getPropertyValue('display'); - }, - enumerable: true, - configurable: true -}; -var dominantBaseline_export_definition; -dominantBaseline_export_definition = { - set: function (v) { - this._setProperty('dominant-baseline', v); - }, - get: function () { - return this.getPropertyValue('dominant-baseline'); - }, - enumerable: true, - configurable: true -}; -var elevation_export_definition; -elevation_export_definition = { - set: function (v) { - this._setProperty('elevation', v); - }, - get: function () { - return this.getPropertyValue('elevation'); - }, - enumerable: true, - configurable: true -}; -var emptyCells_export_definition; -emptyCells_export_definition = { - set: function (v) { - this._setProperty('empty-cells', v); - }, - get: function () { - return this.getPropertyValue('empty-cells'); - }, - enumerable: true, - configurable: true -}; -var enableBackground_export_definition; -enableBackground_export_definition = { - set: function (v) { - this._setProperty('enable-background', v); - }, - get: function () { - return this.getPropertyValue('enable-background'); - }, - enumerable: true, - configurable: true -}; -var fill_export_definition; -fill_export_definition = { - set: function (v) { - this._setProperty('fill', v); - }, - get: function () { - return this.getPropertyValue('fill'); - }, - enumerable: true, - configurable: true -}; -var fillOpacity_export_definition; -fillOpacity_export_definition = { - set: function (v) { - this._setProperty('fill-opacity', v); - }, - get: function () { - return this.getPropertyValue('fill-opacity'); - }, - enumerable: true, - configurable: true -}; -var fillRule_export_definition; -fillRule_export_definition = { - set: function (v) { - this._setProperty('fill-rule', v); - }, - get: function () { - return this.getPropertyValue('fill-rule'); - }, - enumerable: true, - configurable: true -}; -var filter_export_definition; -filter_export_definition = { - set: function (v) { - this._setProperty('filter', v); - }, - get: function () { - return this.getPropertyValue('filter'); + return this.getPropertyValue('float'); }, enumerable: true, configurable: true @@ -1413,17 +997,6 @@ floodColor_export_definition = { enumerable: true, configurable: true }; -var floodOpacity_export_definition; -floodOpacity_export_definition = { - set: function (v) { - this._setProperty('flood-opacity', v); - }, - get: function () { - return this.getPropertyValue('flood-opacity'); - }, - enumerable: true, - configurable: true -}; var fontFamily_export_isValid, fontFamily_export_definition; var fontFamily_local_var_partsRegEx = /\s*,\s*/; @@ -1545,7 +1118,7 @@ lineHeight_export_definition = { enumerable: true, configurable: true }; -var font_export_isValid, font_export_definition; +var font_export_definition; var font_local_var_shorthand_for = { 'font-family': { isValid: fontFamily_export_isValid, @@ -1573,11 +1146,6 @@ var font_local_var_shorthand_for = { } }; var font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit']; - -font_export_isValid = function isValid(v) { - return external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for) !== undefined || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1; -}; - var font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for); font_export_definition = { set: function (v) { @@ -1595,53 +1163,9 @@ font_export_definition = { enumerable: true, configurable: true }; -var fontSizeAdjust_export_definition; -fontSizeAdjust_export_definition = { - set: function (v) { - this._setProperty('font-size-adjust', v); - }, - get: function () { - return this.getPropertyValue('font-size-adjust'); - }, - enumerable: true, - configurable: true -}; -var fontStretch_export_definition; -fontStretch_export_definition = { - set: function (v) { - this._setProperty('font-stretch', v); - }, - get: function () { - return this.getPropertyValue('font-stretch'); - }, - enumerable: true, - configurable: true -}; -var glyphOrientationHorizontal_export_definition; -glyphOrientationHorizontal_export_definition = { - set: function (v) { - this._setProperty('glyph-orientation-horizontal', v); - }, - get: function () { - return this.getPropertyValue('glyph-orientation-horizontal'); - }, - enumerable: true, - configurable: true -}; -var glyphOrientationVertical_export_definition; -glyphOrientationVertical_export_definition = { - set: function (v) { - this._setProperty('glyph-orientation-vertical', v); - }, - get: function () { - return this.getPropertyValue('glyph-orientation-vertical'); - }, - enumerable: true, - configurable: true -}; var height_export_definition; -function parse(v) { +function height_local_fn_parse(v) { if (String(v).toLowerCase() === 'auto') { return 'auto'; } @@ -1655,7 +1179,7 @@ function parse(v) { height_export_definition = { set: function (v) { - this._setProperty('height', parse(v)); + this._setProperty('height', height_local_fn_parse(v)); }, get: function () { return this.getPropertyValue('height'); @@ -1663,28 +1187,6 @@ height_export_definition = { enumerable: true, configurable: true }; -var imageRendering_export_definition; -imageRendering_export_definition = { - set: function (v) { - this._setProperty('image-rendering', v); - }, - get: function () { - return this.getPropertyValue('image-rendering'); - }, - enumerable: true, - configurable: true -}; -var kerning_export_definition; -kerning_export_definition = { - set: function (v) { - this._setProperty('kerning', v); - }, - get: function () { - return this.getPropertyValue('kerning'); - }, - enumerable: true, - configurable: true -}; var left_export_definition; left_export_definition = { set: function (v) { @@ -1696,17 +1198,6 @@ left_export_definition = { enumerable: true, configurable: true }; -var letterSpacing_export_definition; -letterSpacing_export_definition = { - set: function (v) { - this._setProperty('letter-spacing', v); - }, - get: function () { - return this.getPropertyValue('letter-spacing'); - }, - enumerable: true, - configurable: true -}; var lightingColor_export_definition; lightingColor_export_definition = { set: function (v) { @@ -1718,55 +1209,11 @@ lightingColor_export_definition = { enumerable: true, configurable: true }; -var listStyle_export_definition; -listStyle_export_definition = { - set: function (v) { - this._setProperty('list-style', v); - }, - get: function () { - return this.getPropertyValue('list-style'); - }, - enumerable: true, - configurable: true -}; -var listStyleImage_export_definition; -listStyleImage_export_definition = { - set: function (v) { - this._setProperty('list-style-image', v); - }, - get: function () { - return this.getPropertyValue('list-style-image'); - }, - enumerable: true, - configurable: true -}; -var listStylePosition_export_definition; -listStylePosition_export_definition = { - set: function (v) { - this._setProperty('list-style-position', v); - }, - get: function () { - return this.getPropertyValue('list-style-position'); - }, - enumerable: true, - configurable: true -}; -var listStyleType_export_definition; -listStyleType_export_definition = { - set: function (v) { - this._setProperty('list-style-type', v); - }, - get: function () { - return this.getPropertyValue('list-style-type'); - }, - enumerable: true, - configurable: true -}; var margin_export_definition, margin_export_isValid, margin_export_parser; var margin_local_var_TYPES = external_dependency_parsers_0.TYPES; var margin_local_var_isValid = function (v) { - if (v.toLowerCase() === "auto") { + if (v.toLowerCase() === 'auto') { return true; } @@ -1777,7 +1224,7 @@ var margin_local_var_isValid = function (v) { var margin_local_var_parser = function (v) { var V = v.toLowerCase(); - if (V === "auto") { + if (V === 'auto') { return V; } @@ -1792,11 +1239,11 @@ var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('ma }); margin_export_definition = { set: function (v) { - if (typeof v === "number") { + if (typeof v === 'number') { v = String(v); } - if (typeof v !== "string") { + if (typeof v !== 'string') { return; } @@ -1891,127 +1338,6 @@ marginTop_export_definition = { enumerable: true, configurable: true }; -var marker_export_definition; -marker_export_definition = { - set: function (v) { - this._setProperty('marker', v); - }, - get: function () { - return this.getPropertyValue('marker'); - }, - enumerable: true, - configurable: true -}; -var markerEnd_export_definition; -markerEnd_export_definition = { - set: function (v) { - this._setProperty('marker-end', v); - }, - get: function () { - return this.getPropertyValue('marker-end'); - }, - enumerable: true, - configurable: true -}; -var markerMid_export_definition; -markerMid_export_definition = { - set: function (v) { - this._setProperty('marker-mid', v); - }, - get: function () { - return this.getPropertyValue('marker-mid'); - }, - enumerable: true, - configurable: true -}; -var markerOffset_export_definition; -markerOffset_export_definition = { - set: function (v) { - this._setProperty('marker-offset', v); - }, - get: function () { - return this.getPropertyValue('marker-offset'); - }, - enumerable: true, - configurable: true -}; -var markerStart_export_definition; -markerStart_export_definition = { - set: function (v) { - this._setProperty('marker-start', v); - }, - get: function () { - return this.getPropertyValue('marker-start'); - }, - enumerable: true, - configurable: true -}; -var marks_export_definition; -marks_export_definition = { - set: function (v) { - this._setProperty('marks', v); - }, - get: function () { - return this.getPropertyValue('marks'); - }, - enumerable: true, - configurable: true -}; -var mask_export_definition; -mask_export_definition = { - set: function (v) { - this._setProperty('mask', v); - }, - get: function () { - return this.getPropertyValue('mask'); - }, - enumerable: true, - configurable: true -}; -var maxHeight_export_definition; -maxHeight_export_definition = { - set: function (v) { - this._setProperty('max-height', v); - }, - get: function () { - return this.getPropertyValue('max-height'); - }, - enumerable: true, - configurable: true -}; -var maxWidth_export_definition; -maxWidth_export_definition = { - set: function (v) { - this._setProperty('max-width', v); - }, - get: function () { - return this.getPropertyValue('max-width'); - }, - enumerable: true, - configurable: true -}; -var minHeight_export_definition; -minHeight_export_definition = { - set: function (v) { - this._setProperty('min-height', v); - }, - get: function () { - return this.getPropertyValue('min-height'); - }, - enumerable: true, - configurable: true -}; -var minWidth_export_definition; -minWidth_export_definition = { - set: function (v) { - this._setProperty('min-width', v); - }, - get: function () { - return this.getPropertyValue('min-width'); - }, - enumerable: true, - configurable: true -}; var opacity_export_definition; opacity_export_definition = { set: function (v) { @@ -2023,28 +1349,6 @@ opacity_export_definition = { enumerable: true, configurable: true }; -var orphans_export_definition; -orphans_export_definition = { - set: function (v) { - this._setProperty('orphans', v); - }, - get: function () { - return this.getPropertyValue('orphans'); - }, - enumerable: true, - configurable: true -}; -var outline_export_definition; -outline_export_definition = { - set: function (v) { - this._setProperty('outline', v); - }, - get: function () { - return this.getPropertyValue('outline'); - }, - enumerable: true, - configurable: true -}; var outlineColor_export_definition; outlineColor_export_definition = { set: function (v) { @@ -2056,72 +1360,6 @@ outlineColor_export_definition = { enumerable: true, configurable: true }; -var outlineOffset_export_definition; -outlineOffset_export_definition = { - set: function (v) { - this._setProperty('outline-offset', v); - }, - get: function () { - return this.getPropertyValue('outline-offset'); - }, - enumerable: true, - configurable: true -}; -var outlineStyle_export_definition; -outlineStyle_export_definition = { - set: function (v) { - this._setProperty('outline-style', v); - }, - get: function () { - return this.getPropertyValue('outline-style'); - }, - enumerable: true, - configurable: true -}; -var outlineWidth_export_definition; -outlineWidth_export_definition = { - set: function (v) { - this._setProperty('outline-width', v); - }, - get: function () { - return this.getPropertyValue('outline-width'); - }, - enumerable: true, - configurable: true -}; -var overflow_export_definition; -overflow_export_definition = { - set: function (v) { - this._setProperty('overflow', v); - }, - get: function () { - return this.getPropertyValue('overflow'); - }, - enumerable: true, - configurable: true -}; -var overflowX_export_definition; -overflowX_export_definition = { - set: function (v) { - this._setProperty('overflow-x', v); - }, - get: function () { - return this.getPropertyValue('overflow-x'); - }, - enumerable: true, - configurable: true -}; -var overflowY_export_definition; -overflowY_export_definition = { - set: function (v) { - this._setProperty('overflow-y', v); - }, - get: function () { - return this.getPropertyValue('overflow-y'); - }, - enumerable: true, - configurable: true -}; var padding_export_definition, padding_export_isValid, padding_export_parser; var padding_local_var_TYPES = external_dependency_parsers_0.TYPES; @@ -2142,11 +1380,11 @@ var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('p }); padding_export_definition = { set: function (v) { - if (typeof v === "number") { + if (typeof v === 'number') { v = String(v); } - if (typeof v !== "string") { + if (typeof v !== 'string') { return; } @@ -2241,171 +1479,6 @@ paddingTop_export_definition = { enumerable: true, configurable: true }; -var page_export_definition; -page_export_definition = { - set: function (v) { - this._setProperty('page', v); - }, - get: function () { - return this.getPropertyValue('page'); - }, - enumerable: true, - configurable: true -}; -var pageBreakAfter_export_definition; -pageBreakAfter_export_definition = { - set: function (v) { - this._setProperty('page-break-after', v); - }, - get: function () { - return this.getPropertyValue('page-break-after'); - }, - enumerable: true, - configurable: true -}; -var pageBreakBefore_export_definition; -pageBreakBefore_export_definition = { - set: function (v) { - this._setProperty('page-break-before', v); - }, - get: function () { - return this.getPropertyValue('page-break-before'); - }, - enumerable: true, - configurable: true -}; -var pageBreakInside_export_definition; -pageBreakInside_export_definition = { - set: function (v) { - this._setProperty('page-break-inside', v); - }, - get: function () { - return this.getPropertyValue('page-break-inside'); - }, - enumerable: true, - configurable: true -}; -var pause_export_definition; -pause_export_definition = { - set: function (v) { - this._setProperty('pause', v); - }, - get: function () { - return this.getPropertyValue('pause'); - }, - enumerable: true, - configurable: true -}; -var pauseAfter_export_definition; -pauseAfter_export_definition = { - set: function (v) { - this._setProperty('pause-after', v); - }, - get: function () { - return this.getPropertyValue('pause-after'); - }, - enumerable: true, - configurable: true -}; -var pauseBefore_export_definition; -pauseBefore_export_definition = { - set: function (v) { - this._setProperty('pause-before', v); - }, - get: function () { - return this.getPropertyValue('pause-before'); - }, - enumerable: true, - configurable: true -}; -var pitch_export_definition; -pitch_export_definition = { - set: function (v) { - this._setProperty('pitch', v); - }, - get: function () { - return this.getPropertyValue('pitch'); - }, - enumerable: true, - configurable: true -}; -var pitchRange_export_definition; -pitchRange_export_definition = { - set: function (v) { - this._setProperty('pitch-range', v); - }, - get: function () { - return this.getPropertyValue('pitch-range'); - }, - enumerable: true, - configurable: true -}; -var playDuring_export_definition; -playDuring_export_definition = { - set: function (v) { - this._setProperty('play-during', v); - }, - get: function () { - return this.getPropertyValue('play-during'); - }, - enumerable: true, - configurable: true -}; -var pointerEvents_export_definition; -pointerEvents_export_definition = { - set: function (v) { - this._setProperty('pointer-events', v); - }, - get: function () { - return this.getPropertyValue('pointer-events'); - }, - enumerable: true, - configurable: true -}; -var position_export_definition; -position_export_definition = { - set: function (v) { - this._setProperty('position', v); - }, - get: function () { - return this.getPropertyValue('position'); - }, - enumerable: true, - configurable: true -}; -var quotes_export_definition; -quotes_export_definition = { - set: function (v) { - this._setProperty('quotes', v); - }, - get: function () { - return this.getPropertyValue('quotes'); - }, - enumerable: true, - configurable: true -}; -var resize_export_definition; -resize_export_definition = { - set: function (v) { - this._setProperty('resize', v); - }, - get: function () { - return this.getPropertyValue('resize'); - }, - enumerable: true, - configurable: true -}; -var richness_export_definition; -richness_export_definition = { - set: function (v) { - this._setProperty('richness', v); - }, - get: function () { - return this.getPropertyValue('richness'); - }, - enumerable: true, - configurable: true -}; var right_export_definition; right_export_definition = { set: function (v) { @@ -2417,94 +1490,6 @@ right_export_definition = { enumerable: true, configurable: true }; -var shapeRendering_export_definition; -shapeRendering_export_definition = { - set: function (v) { - this._setProperty('shape-rendering', v); - }, - get: function () { - return this.getPropertyValue('shape-rendering'); - }, - enumerable: true, - configurable: true -}; -var size_export_definition; -size_export_definition = { - set: function (v) { - this._setProperty('size', v); - }, - get: function () { - return this.getPropertyValue('size'); - }, - enumerable: true, - configurable: true -}; -var speak_export_definition; -speak_export_definition = { - set: function (v) { - this._setProperty('speak', v); - }, - get: function () { - return this.getPropertyValue('speak'); - }, - enumerable: true, - configurable: true -}; -var speakHeader_export_definition; -speakHeader_export_definition = { - set: function (v) { - this._setProperty('speak-header', v); - }, - get: function () { - return this.getPropertyValue('speak-header'); - }, - enumerable: true, - configurable: true -}; -var speakNumeral_export_definition; -speakNumeral_export_definition = { - set: function (v) { - this._setProperty('speak-numeral', v); - }, - get: function () { - return this.getPropertyValue('speak-numeral'); - }, - enumerable: true, - configurable: true -}; -var speakPunctuation_export_definition; -speakPunctuation_export_definition = { - set: function (v) { - this._setProperty('speak-punctuation', v); - }, - get: function () { - return this.getPropertyValue('speak-punctuation'); - }, - enumerable: true, - configurable: true -}; -var speechRate_export_definition; -speechRate_export_definition = { - set: function (v) { - this._setProperty('speech-rate', v); - }, - get: function () { - return this.getPropertyValue('speech-rate'); - }, - enumerable: true, - configurable: true -}; -var src_export_definition; -src_export_definition = { - set: function (v) { - this._setProperty('src', v); - }, - get: function () { - return this.getPropertyValue('src'); - }, - enumerable: true, - configurable: true -}; var stopColor_export_definition; stopColor_export_definition = { set: function (v) { @@ -2516,182 +1501,6 @@ stopColor_export_definition = { enumerable: true, configurable: true }; -var stopOpacity_export_definition; -stopOpacity_export_definition = { - set: function (v) { - this._setProperty('stop-opacity', v); - }, - get: function () { - return this.getPropertyValue('stop-opacity'); - }, - enumerable: true, - configurable: true -}; -var stress_export_definition; -stress_export_definition = { - set: function (v) { - this._setProperty('stress', v); - }, - get: function () { - return this.getPropertyValue('stress'); - }, - enumerable: true, - configurable: true -}; -var stroke_export_definition; -stroke_export_definition = { - set: function (v) { - this._setProperty('stroke', v); - }, - get: function () { - return this.getPropertyValue('stroke'); - }, - enumerable: true, - configurable: true -}; -var strokeDasharray_export_definition; -strokeDasharray_export_definition = { - set: function (v) { - this._setProperty('stroke-dasharray', v); - }, - get: function () { - return this.getPropertyValue('stroke-dasharray'); - }, - enumerable: true, - configurable: true -}; -var strokeDashoffset_export_definition; -strokeDashoffset_export_definition = { - set: function (v) { - this._setProperty('stroke-dashoffset', v); - }, - get: function () { - return this.getPropertyValue('stroke-dashoffset'); - }, - enumerable: true, - configurable: true -}; -var strokeLinecap_export_definition; -strokeLinecap_export_definition = { - set: function (v) { - this._setProperty('stroke-linecap', v); - }, - get: function () { - return this.getPropertyValue('stroke-linecap'); - }, - enumerable: true, - configurable: true -}; -var strokeLinejoin_export_definition; -strokeLinejoin_export_definition = { - set: function (v) { - this._setProperty('stroke-linejoin', v); - }, - get: function () { - return this.getPropertyValue('stroke-linejoin'); - }, - enumerable: true, - configurable: true -}; -var strokeMiterlimit_export_definition; -strokeMiterlimit_export_definition = { - set: function (v) { - this._setProperty('stroke-miterlimit', v); - }, - get: function () { - return this.getPropertyValue('stroke-miterlimit'); - }, - enumerable: true, - configurable: true -}; -var strokeOpacity_export_definition; -strokeOpacity_export_definition = { - set: function (v) { - this._setProperty('stroke-opacity', v); - }, - get: function () { - return this.getPropertyValue('stroke-opacity'); - }, - enumerable: true, - configurable: true -}; -var strokeWidth_export_definition; -strokeWidth_export_definition = { - set: function (v) { - this._setProperty('stroke-width', v); - }, - get: function () { - return this.getPropertyValue('stroke-width'); - }, - enumerable: true, - configurable: true -}; -var tableLayout_export_definition; -tableLayout_export_definition = { - set: function (v) { - this._setProperty('table-layout', v); - }, - get: function () { - return this.getPropertyValue('table-layout'); - }, - enumerable: true, - configurable: true -}; -var textAlign_export_definition; -textAlign_export_definition = { - set: function (v) { - this._setProperty('text-align', v); - }, - get: function () { - return this.getPropertyValue('text-align'); - }, - enumerable: true, - configurable: true -}; -var textAnchor_export_definition; -textAnchor_export_definition = { - set: function (v) { - this._setProperty('text-anchor', v); - }, - get: function () { - return this.getPropertyValue('text-anchor'); - }, - enumerable: true, - configurable: true -}; -var textDecoration_export_definition; -textDecoration_export_definition = { - set: function (v) { - this._setProperty('text-decoration', v); - }, - get: function () { - return this.getPropertyValue('text-decoration'); - }, - enumerable: true, - configurable: true -}; -var textIndent_export_definition; -textIndent_export_definition = { - set: function (v) { - this._setProperty('text-indent', v); - }, - get: function () { - return this.getPropertyValue('text-indent'); - }, - enumerable: true, - configurable: true -}; -var textLineThrough_export_definition; -textLineThrough_export_definition = { - set: function (v) { - this._setProperty('text-line-through', v); - }, - get: function () { - return this.getPropertyValue('text-line-through'); - }, - enumerable: true, - configurable: true -}; var textLineThroughColor_export_definition; textLineThroughColor_export_definition = { set: function (v) { @@ -2703,61 +1512,6 @@ textLineThroughColor_export_definition = { enumerable: true, configurable: true }; -var textLineThroughMode_export_definition; -textLineThroughMode_export_definition = { - set: function (v) { - this._setProperty('text-line-through-mode', v); - }, - get: function () { - return this.getPropertyValue('text-line-through-mode'); - }, - enumerable: true, - configurable: true -}; -var textLineThroughStyle_export_definition; -textLineThroughStyle_export_definition = { - set: function (v) { - this._setProperty('text-line-through-style', v); - }, - get: function () { - return this.getPropertyValue('text-line-through-style'); - }, - enumerable: true, - configurable: true -}; -var textLineThroughWidth_export_definition; -textLineThroughWidth_export_definition = { - set: function (v) { - this._setProperty('text-line-through-width', v); - }, - get: function () { - return this.getPropertyValue('text-line-through-width'); - }, - enumerable: true, - configurable: true -}; -var textOverflow_export_definition; -textOverflow_export_definition = { - set: function (v) { - this._setProperty('text-overflow', v); - }, - get: function () { - return this.getPropertyValue('text-overflow'); - }, - enumerable: true, - configurable: true -}; -var textOverline_export_definition; -textOverline_export_definition = { - set: function (v) { - this._setProperty('text-overline', v); - }, - get: function () { - return this.getPropertyValue('text-overline'); - }, - enumerable: true, - configurable: true -}; var textOverlineColor_export_definition; textOverlineColor_export_definition = { set: function (v) { @@ -2769,83 +1523,6 @@ textOverlineColor_export_definition = { enumerable: true, configurable: true }; -var textOverlineMode_export_definition; -textOverlineMode_export_definition = { - set: function (v) { - this._setProperty('text-overline-mode', v); - }, - get: function () { - return this.getPropertyValue('text-overline-mode'); - }, - enumerable: true, - configurable: true -}; -var textOverlineStyle_export_definition; -textOverlineStyle_export_definition = { - set: function (v) { - this._setProperty('text-overline-style', v); - }, - get: function () { - return this.getPropertyValue('text-overline-style'); - }, - enumerable: true, - configurable: true -}; -var textOverlineWidth_export_definition; -textOverlineWidth_export_definition = { - set: function (v) { - this._setProperty('text-overline-width', v); - }, - get: function () { - return this.getPropertyValue('text-overline-width'); - }, - enumerable: true, - configurable: true -}; -var textRendering_export_definition; -textRendering_export_definition = { - set: function (v) { - this._setProperty('text-rendering', v); - }, - get: function () { - return this.getPropertyValue('text-rendering'); - }, - enumerable: true, - configurable: true -}; -var textShadow_export_definition; -textShadow_export_definition = { - set: function (v) { - this._setProperty('text-shadow', v); - }, - get: function () { - return this.getPropertyValue('text-shadow'); - }, - enumerable: true, - configurable: true -}; -var textTransform_export_definition; -textTransform_export_definition = { - set: function (v) { - this._setProperty('text-transform', v); - }, - get: function () { - return this.getPropertyValue('text-transform'); - }, - enumerable: true, - configurable: true -}; -var textUnderline_export_definition; -textUnderline_export_definition = { - set: function (v) { - this._setProperty('text-underline', v); - }, - get: function () { - return this.getPropertyValue('text-underline'); - }, - enumerable: true, - configurable: true -}; var textUnderlineColor_export_definition; textUnderlineColor_export_definition = { set: function (v) { @@ -2857,39 +1534,6 @@ textUnderlineColor_export_definition = { enumerable: true, configurable: true }; -var textUnderlineMode_export_definition; -textUnderlineMode_export_definition = { - set: function (v) { - this._setProperty('text-underline-mode', v); - }, - get: function () { - return this.getPropertyValue('text-underline-mode'); - }, - enumerable: true, - configurable: true -}; -var textUnderlineStyle_export_definition; -textUnderlineStyle_export_definition = { - set: function (v) { - this._setProperty('text-underline-style', v); - }, - get: function () { - return this.getPropertyValue('text-underline-style'); - }, - enumerable: true, - configurable: true -}; -var textUnderlineWidth_export_definition; -textUnderlineWidth_export_definition = { - set: function (v) { - this._setProperty('text-underline-width', v); - }, - get: function () { - return this.getPropertyValue('text-underline-width'); - }, - enumerable: true, - configurable: true -}; var top_export_definition; top_export_definition = { set: function (v) { @@ -2901,270 +1545,6 @@ top_export_definition = { enumerable: true, configurable: true }; -var unicodeBidi_export_definition; -unicodeBidi_export_definition = { - set: function (v) { - this._setProperty('unicode-bidi', v); - }, - get: function () { - return this.getPropertyValue('unicode-bidi'); - }, - enumerable: true, - configurable: true -}; -var unicodeRange_export_definition; -unicodeRange_export_definition = { - set: function (v) { - this._setProperty('unicode-range', v); - }, - get: function () { - return this.getPropertyValue('unicode-range'); - }, - enumerable: true, - configurable: true -}; -var vectorEffect_export_definition; -vectorEffect_export_definition = { - set: function (v) { - this._setProperty('vector-effect', v); - }, - get: function () { - return this.getPropertyValue('vector-effect'); - }, - enumerable: true, - configurable: true -}; -var verticalAlign_export_definition; -verticalAlign_export_definition = { - set: function (v) { - this._setProperty('vertical-align', v); - }, - get: function () { - return this.getPropertyValue('vertical-align'); - }, - enumerable: true, - configurable: true -}; -var visibility_export_definition; -visibility_export_definition = { - set: function (v) { - this._setProperty('visibility', v); - }, - get: function () { - return this.getPropertyValue('visibility'); - }, - enumerable: true, - configurable: true -}; -var voiceFamily_export_definition; -voiceFamily_export_definition = { - set: function (v) { - this._setProperty('voic-family', v); - }, - get: function () { - return this.getPropertyValue('voice-family'); - }, - enumerable: true, - configurable: true -}; -var volume_export_definition; -volume_export_definition = { - set: function (v) { - this._setProperty('volume', v); - }, - get: function () { - return this.getPropertyValue('volume'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimation_export_definition; -webkitAnimation_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimationDelay_export_definition; -webkitAnimationDelay_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation-delay', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-delay'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimationDirection_export_definition; -webkitAnimationDirection_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation-direction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-direction'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimationDuration_export_definition; -webkitAnimationDuration_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation-duration', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-duration'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimationFillMode_export_definition; -webkitAnimationFillMode_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation-fill-mode', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-fill-mode'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimationIterationCount_export_definition; -webkitAnimationIterationCount_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation-iteration-count', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-iteration-count'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimationName_export_definition; -webkitAnimationName_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation-name', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-name'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimationPlayState_export_definition; -webkitAnimationPlayState_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation-play-state', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-play-state'); - }, - enumerable: true, - configurable: true -}; -var webkitAnimationTimingFunction_export_definition; -webkitAnimationTimingFunction_export_definition = { - set: function (v) { - this._setProperty('-webkit-animation-timing-function', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-timing-function'); - }, - enumerable: true, - configurable: true -}; -var webkitAppearance_export_definition; -webkitAppearance_export_definition = { - set: function (v) { - this._setProperty('-webkit-appearance', v); - }, - get: function () { - return this.getPropertyValue('-webkit-appearance'); - }, - enumerable: true, - configurable: true -}; -var webkitAspectRatio_export_definition; -webkitAspectRatio_export_definition = { - set: function (v) { - this._setProperty('-webkit-aspect-ratio', v); - }, - get: function () { - return this.getPropertyValue('-webkit-aspect-ratio'); - }, - enumerable: true, - configurable: true -}; -var webkitBackfaceVisibility_export_definition; -webkitBackfaceVisibility_export_definition = { - set: function (v) { - this._setProperty('-webkit-backface-visibility', v); - }, - get: function () { - return this.getPropertyValue('-webkit-backface-visibility'); - }, - enumerable: true, - configurable: true -}; -var webkitBackgroundClip_export_definition; -webkitBackgroundClip_export_definition = { - set: function (v) { - this._setProperty('-webkit-background-clip', v); - }, - get: function () { - return this.getPropertyValue('-webkit-background-clip'); - }, - enumerable: true, - configurable: true -}; -var webkitBackgroundComposite_export_definition; -webkitBackgroundComposite_export_definition = { - set: function (v) { - this._setProperty('-webkit-background-composite', v); - }, - get: function () { - return this.getPropertyValue('-webkit-background-composite'); - }, - enumerable: true, - configurable: true -}; -var webkitBackgroundOrigin_export_definition; -webkitBackgroundOrigin_export_definition = { - set: function (v) { - this._setProperty('-webkit-background-origin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-background-origin'); - }, - enumerable: true, - configurable: true -}; -var webkitBackgroundSize_export_definition; -webkitBackgroundSize_export_definition = { - set: function (v) { - this._setProperty('-webkit-background-size', v); - }, - get: function () { - return this.getPropertyValue('-webkit-background-size'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderAfter_export_definition; -webkitBorderAfter_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-after'); - }, - enumerable: true, - configurable: true -}; var webkitBorderAfterColor_export_definition; webkitBorderAfterColor_export_definition = { set: function (v) { @@ -3176,39 +1556,6 @@ webkitBorderAfterColor_export_definition = { enumerable: true, configurable: true }; -var webkitBorderAfterStyle_export_definition; -webkitBorderAfterStyle_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-after-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-after-style'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderAfterWidth_export_definition; -webkitBorderAfterWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-after-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-after-width'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderBefore_export_definition; -webkitBorderBefore_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-before'); - }, - enumerable: true, - configurable: true -}; var webkitBorderBeforeColor_export_definition; webkitBorderBeforeColor_export_definition = { set: function (v) { @@ -3220,39 +1567,6 @@ webkitBorderBeforeColor_export_definition = { enumerable: true, configurable: true }; -var webkitBorderBeforeStyle_export_definition; -webkitBorderBeforeStyle_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-before-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-before-style'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderBeforeWidth_export_definition; -webkitBorderBeforeWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-before-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-before-width'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderEnd_export_definition; -webkitBorderEnd_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-end', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-end'); - }, - enumerable: true, - configurable: true -}; var webkitBorderEndColor_export_definition; webkitBorderEndColor_export_definition = { set: function (v) { @@ -3264,83 +1578,6 @@ webkitBorderEndColor_export_definition = { enumerable: true, configurable: true }; -var webkitBorderEndStyle_export_definition; -webkitBorderEndStyle_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-end-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-end-style'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderEndWidth_export_definition; -webkitBorderEndWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-end-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-end-width'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderFit_export_definition; -webkitBorderFit_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-fit', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-fit'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderHorizontalSpacing_export_definition; -webkitBorderHorizontalSpacing_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-horizontal-spacing', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-horizontal-spacing'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderImage_export_definition; -webkitBorderImage_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-image', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-image'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderRadius_export_definition; -webkitBorderRadius_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-radius', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-radius'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderStart_export_definition; -webkitBorderStart_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-start', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-start'); - }, - enumerable: true, - configurable: true -}; var webkitBorderStartColor_export_definition; webkitBorderStartColor_export_definition = { set: function (v) { @@ -3352,237 +1589,6 @@ webkitBorderStartColor_export_definition = { enumerable: true, configurable: true }; -var webkitBorderStartStyle_export_definition; -webkitBorderStartStyle_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-start-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-start-style'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderStartWidth_export_definition; -webkitBorderStartWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-start-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-start-width'); - }, - enumerable: true, - configurable: true -}; -var webkitBorderVerticalSpacing_export_definition; -webkitBorderVerticalSpacing_export_definition = { - set: function (v) { - this._setProperty('-webkit-border-vertical-spacing', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-vertical-spacing'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxAlign_export_definition; -webkitBoxAlign_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-align', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-align'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxDirection_export_definition; -webkitBoxDirection_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-direction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-direction'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxFlex_export_definition; -webkitBoxFlex_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-flex', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-flex'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxFlexGroup_export_definition; -webkitBoxFlexGroup_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-flex-group', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-flex-group'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxLines_export_definition; -webkitBoxLines_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-lines', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-lines'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxOrdinalGroup_export_definition; -webkitBoxOrdinalGroup_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-ordinal-group', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-ordinal-group'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxOrient_export_definition; -webkitBoxOrient_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-orient', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-orient'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxPack_export_definition; -webkitBoxPack_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-pack', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-pack'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxReflect_export_definition; -webkitBoxReflect_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-reflect', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-reflect'); - }, - enumerable: true, - configurable: true -}; -var webkitBoxShadow_export_definition; -webkitBoxShadow_export_definition = { - set: function (v) { - this._setProperty('-webkit-box-shadow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-shadow'); - }, - enumerable: true, - configurable: true -}; -var webkitColorCorrection_export_definition; -webkitColorCorrection_export_definition = { - set: function (v) { - this._setProperty('-webkit-color-correction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-color-correction'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnAxis_export_definition; -webkitColumnAxis_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-axis', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-axis'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnBreakAfter_export_definition; -webkitColumnBreakAfter_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-break-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-break-after'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnBreakBefore_export_definition; -webkitColumnBreakBefore_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-break-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-break-before'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnBreakInside_export_definition; -webkitColumnBreakInside_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-break-inside', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-break-inside'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnCount_export_definition; -webkitColumnCount_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-count', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-count'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnGap_export_definition; -webkitColumnGap_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-gap', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-gap'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnRule_export_definition; -webkitColumnRule_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-rule', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-rule'); - }, - enumerable: true, - configurable: true -}; var webkitColumnRuleColor_export_definition; webkitColumnRuleColor_export_definition = { set: function (v) { @@ -3594,776 +1600,6 @@ webkitColumnRuleColor_export_definition = { enumerable: true, configurable: true }; -var webkitColumnRuleStyle_export_definition; -webkitColumnRuleStyle_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-rule-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-rule-style'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnRuleWidth_export_definition; -webkitColumnRuleWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-rule-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-rule-width'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnSpan_export_definition; -webkitColumnSpan_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-span', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-span'); - }, - enumerable: true, - configurable: true -}; -var webkitColumnWidth_export_definition; -webkitColumnWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-column-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-width'); - }, - enumerable: true, - configurable: true -}; -var webkitColumns_export_definition; -webkitColumns_export_definition = { - set: function (v) { - this._setProperty('-webkit-columns', v); - }, - get: function () { - return this.getPropertyValue('-webkit-columns'); - }, - enumerable: true, - configurable: true -}; -var webkitFilter_export_definition; -webkitFilter_export_definition = { - set: function (v) { - this._setProperty('-webkit-filter', v); - }, - get: function () { - return this.getPropertyValue('-webkit-filter'); - }, - enumerable: true, - configurable: true -}; -var webkitFlexAlign_export_definition; -webkitFlexAlign_export_definition = { - set: function (v) { - this._setProperty('-webkit-flex-align', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-align'); - }, - enumerable: true, - configurable: true -}; -var webkitFlexDirection_export_definition; -webkitFlexDirection_export_definition = { - set: function (v) { - this._setProperty('-webkit-flex-direction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-direction'); - }, - enumerable: true, - configurable: true -}; -var webkitFlexFlow_export_definition; -webkitFlexFlow_export_definition = { - set: function (v) { - this._setProperty('-webkit-flex-flow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-flow'); - }, - enumerable: true, - configurable: true -}; -var webkitFlexItemAlign_export_definition; -webkitFlexItemAlign_export_definition = { - set: function (v) { - this._setProperty('-webkit-flex-item-align', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-item-align'); - }, - enumerable: true, - configurable: true -}; -var webkitFlexLinePack_export_definition; -webkitFlexLinePack_export_definition = { - set: function (v) { - this._setProperty('-webkit-flex-line-pack', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-line-pack'); - }, - enumerable: true, - configurable: true -}; -var webkitFlexOrder_export_definition; -webkitFlexOrder_export_definition = { - set: function (v) { - this._setProperty('-webkit-flex-order', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-order'); - }, - enumerable: true, - configurable: true -}; -var webkitFlexPack_export_definition; -webkitFlexPack_export_definition = { - set: function (v) { - this._setProperty('-webkit-flex-pack', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-pack'); - }, - enumerable: true, - configurable: true -}; -var webkitFlexWrap_export_definition; -webkitFlexWrap_export_definition = { - set: function (v) { - this._setProperty('-webkit-flex-wrap', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-wrap'); - }, - enumerable: true, - configurable: true -}; -var webkitFlowFrom_export_definition; -webkitFlowFrom_export_definition = { - set: function (v) { - this._setProperty('-webkit-flow-from', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flow-from'); - }, - enumerable: true, - configurable: true -}; -var webkitFlowInto_export_definition; -webkitFlowInto_export_definition = { - set: function (v) { - this._setProperty('-webkit-flow-into', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flow-into'); - }, - enumerable: true, - configurable: true -}; -var webkitFontFeatureSettings_export_definition; -webkitFontFeatureSettings_export_definition = { - set: function (v) { - this._setProperty('-webkit-font-feature-settings', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-feature-settings'); - }, - enumerable: true, - configurable: true -}; -var webkitFontKerning_export_definition; -webkitFontKerning_export_definition = { - set: function (v) { - this._setProperty('-webkit-font-kerning', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-kerning'); - }, - enumerable: true, - configurable: true -}; -var webkitFontSizeDelta_export_definition; -webkitFontSizeDelta_export_definition = { - set: function (v) { - this._setProperty('-webkit-font-size-delta', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-size-delta'); - }, - enumerable: true, - configurable: true -}; -var webkitFontSmoothing_export_definition; -webkitFontSmoothing_export_definition = { - set: function (v) { - this._setProperty('-webkit-font-smoothing', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-smoothing'); - }, - enumerable: true, - configurable: true -}; -var webkitFontVariantLigatures_export_definition; -webkitFontVariantLigatures_export_definition = { - set: function (v) { - this._setProperty('-webkit-font-variant-ligatures', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-variant-ligatures'); - }, - enumerable: true, - configurable: true -}; -var webkitHighlight_export_definition; -webkitHighlight_export_definition = { - set: function (v) { - this._setProperty('-webkit-highlight', v); - }, - get: function () { - return this.getPropertyValue('-webkit-highlight'); - }, - enumerable: true, - configurable: true -}; -var webkitHyphenateCharacter_export_definition; -webkitHyphenateCharacter_export_definition = { - set: function (v) { - this._setProperty('-webkit-hyphenate-character', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphenate-character'); - }, - enumerable: true, - configurable: true -}; -var webkitHyphenateLimitAfter_export_definition; -webkitHyphenateLimitAfter_export_definition = { - set: function (v) { - this._setProperty('-webkit-hyphenate-limit-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphenate-limit-after'); - }, - enumerable: true, - configurable: true -}; -var webkitHyphenateLimitBefore_export_definition; -webkitHyphenateLimitBefore_export_definition = { - set: function (v) { - this._setProperty('-webkit-hyphenate-limit-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphenate-limit-before'); - }, - enumerable: true, - configurable: true -}; -var webkitHyphenateLimitLines_export_definition; -webkitHyphenateLimitLines_export_definition = { - set: function (v) { - this._setProperty('-webkit-hyphenate-limit-lines', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphenate-limit-lines'); - }, - enumerable: true, - configurable: true -}; -var webkitHyphens_export_definition; -webkitHyphens_export_definition = { - set: function (v) { - this._setProperty('-webkit-hyphens', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphens'); - }, - enumerable: true, - configurable: true -}; -var webkitLineAlign_export_definition; -webkitLineAlign_export_definition = { - set: function (v) { - this._setProperty('-webkit-line-align', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-align'); - }, - enumerable: true, - configurable: true -}; -var webkitLineBoxContain_export_definition; -webkitLineBoxContain_export_definition = { - set: function (v) { - this._setProperty('-webkit-line-box-contain', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-box-contain'); - }, - enumerable: true, - configurable: true -}; -var webkitLineBreak_export_definition; -webkitLineBreak_export_definition = { - set: function (v) { - this._setProperty('-webkit-line-break', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-break'); - }, - enumerable: true, - configurable: true -}; -var webkitLineClamp_export_definition; -webkitLineClamp_export_definition = { - set: function (v) { - this._setProperty('-webkit-line-clamp', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-clamp'); - }, - enumerable: true, - configurable: true -}; -var webkitLineGrid_export_definition; -webkitLineGrid_export_definition = { - set: function (v) { - this._setProperty('-webkit-line-grid', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-grid'); - }, - enumerable: true, - configurable: true -}; -var webkitLineSnap_export_definition; -webkitLineSnap_export_definition = { - set: function (v) { - this._setProperty('-webkit-line-snap', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-snap'); - }, - enumerable: true, - configurable: true -}; -var webkitLocale_export_definition; -webkitLocale_export_definition = { - set: function (v) { - this._setProperty('-webkit-locale', v); - }, - get: function () { - return this.getPropertyValue('-webkit-locale'); - }, - enumerable: true, - configurable: true -}; -var webkitLogicalHeight_export_definition; -webkitLogicalHeight_export_definition = { - set: function (v) { - this._setProperty('-webkit-logical-height', v); - }, - get: function () { - return this.getPropertyValue('-webkit-logical-height'); - }, - enumerable: true, - configurable: true -}; -var webkitLogicalWidth_export_definition; -webkitLogicalWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-logical-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-logical-width'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginAfter_export_definition; -webkitMarginAfter_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-after'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginAfterCollapse_export_definition; -webkitMarginAfterCollapse_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-after-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-after-collapse'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginBefore_export_definition; -webkitMarginBefore_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-before'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginBeforeCollapse_export_definition; -webkitMarginBeforeCollapse_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-before-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-before-collapse'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginBottomCollapse_export_definition; -webkitMarginBottomCollapse_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-bottom-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-bottom-collapse'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginCollapse_export_definition; -webkitMarginCollapse_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-collapse'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginEnd_export_definition; -webkitMarginEnd_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-end', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-end'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginStart_export_definition; -webkitMarginStart_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-start', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-start'); - }, - enumerable: true, - configurable: true -}; -var webkitMarginTopCollapse_export_definition; -webkitMarginTopCollapse_export_definition = { - set: function (v) { - this._setProperty('-webkit-margin-top-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-top-collapse'); - }, - enumerable: true, - configurable: true -}; -var webkitMarquee_export_definition; -webkitMarquee_export_definition = { - set: function (v) { - this._setProperty('-webkit-marquee', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee'); - }, - enumerable: true, - configurable: true -}; -var webkitMarqueeDirection_export_definition; -webkitMarqueeDirection_export_definition = { - set: function (v) { - this._setProperty('-webkit-marquee-direction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-direction'); - }, - enumerable: true, - configurable: true -}; -var webkitMarqueeIncrement_export_definition; -webkitMarqueeIncrement_export_definition = { - set: function (v) { - this._setProperty('-webkit-marquee-increment', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-increment'); - }, - enumerable: true, - configurable: true -}; -var webkitMarqueeRepetition_export_definition; -webkitMarqueeRepetition_export_definition = { - set: function (v) { - this._setProperty('-webkit-marquee-repetition', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-repetition'); - }, - enumerable: true, - configurable: true -}; -var webkitMarqueeSpeed_export_definition; -webkitMarqueeSpeed_export_definition = { - set: function (v) { - this._setProperty('-webkit-marquee-speed', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-speed'); - }, - enumerable: true, - configurable: true -}; -var webkitMarqueeStyle_export_definition; -webkitMarqueeStyle_export_definition = { - set: function (v) { - this._setProperty('-webkit-marquee-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-style'); - }, - enumerable: true, - configurable: true -}; -var webkitMask_export_definition; -webkitMask_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskAttachment_export_definition; -webkitMaskAttachment_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-attachment', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-attachment'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskBoxImage_export_definition; -webkitMaskBoxImage_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskBoxImageOutset_export_definition; -webkitMaskBoxImageOutset_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-outset', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-outset'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskBoxImageRepeat_export_definition; -webkitMaskBoxImageRepeat_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-repeat', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-repeat'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskBoxImageSlice_export_definition; -webkitMaskBoxImageSlice_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-slice', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-slice'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskBoxImageSource_export_definition; -webkitMaskBoxImageSource_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-source', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-source'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskBoxImageWidth_export_definition; -webkitMaskBoxImageWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-width'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskClip_export_definition; -webkitMaskClip_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-clip', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-clip'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskComposite_export_definition; -webkitMaskComposite_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-composite', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-composite'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskImage_export_definition; -webkitMaskImage_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-image', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-image'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskOrigin_export_definition; -webkitMaskOrigin_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-origin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-origin'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskPosition_export_definition; -webkitMaskPosition_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-position', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-position'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskPositionX_export_definition; -webkitMaskPositionX_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-position-x', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-position-x'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskPositionY_export_definition; -webkitMaskPositionY_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-position-y', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-position-y'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskRepeat_export_definition; -webkitMaskRepeat_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-repeat', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-repeat'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskRepeatX_export_definition; -webkitMaskRepeatX_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-repeat-x', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-repeat-x'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskRepeatY_export_definition; -webkitMaskRepeatY_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-repeat-y', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-repeat-y'); - }, - enumerable: true, - configurable: true -}; -var webkitMaskSize_export_definition; -webkitMaskSize_export_definition = { - set: function (v) { - this._setProperty('-webkit-mask-size', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-size'); - }, - enumerable: true, - configurable: true -}; var webkitMatchNearestMailBlockquoteColor_export_definition; webkitMatchNearestMailBlockquoteColor_export_definition = { set: function (v) { @@ -4375,237 +1611,6 @@ webkitMatchNearestMailBlockquoteColor_export_definition = { enumerable: true, configurable: true }; -var webkitMaxLogicalHeight_export_definition; -webkitMaxLogicalHeight_export_definition = { - set: function (v) { - this._setProperty('-webkit-max-logical-height', v); - }, - get: function () { - return this.getPropertyValue('-webkit-max-logical-height'); - }, - enumerable: true, - configurable: true -}; -var webkitMaxLogicalWidth_export_definition; -webkitMaxLogicalWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-max-logical-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-max-logical-width'); - }, - enumerable: true, - configurable: true -}; -var webkitMinLogicalHeight_export_definition; -webkitMinLogicalHeight_export_definition = { - set: function (v) { - this._setProperty('-webkit-min-logical-height', v); - }, - get: function () { - return this.getPropertyValue('-webkit-min-logical-height'); - }, - enumerable: true, - configurable: true -}; -var webkitMinLogicalWidth_export_definition; -webkitMinLogicalWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-min-logical-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-min-logical-width'); - }, - enumerable: true, - configurable: true -}; -var webkitNbspMode_export_definition; -webkitNbspMode_export_definition = { - set: function (v) { - this._setProperty('-webkit-nbsp-mode', v); - }, - get: function () { - return this.getPropertyValue('-webkit-nbsp-mode'); - }, - enumerable: true, - configurable: true -}; -var webkitOverflowScrolling_export_definition; -webkitOverflowScrolling_export_definition = { - set: function (v) { - this._setProperty('-webkit-overflow-scrolling', v); - }, - get: function () { - return this.getPropertyValue('-webkit-overflow-scrolling'); - }, - enumerable: true, - configurable: true -}; -var webkitPaddingAfter_export_definition; -webkitPaddingAfter_export_definition = { - set: function (v) { - this._setProperty('-webkit-padding-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-padding-after'); - }, - enumerable: true, - configurable: true -}; -var webkitPaddingBefore_export_definition; -webkitPaddingBefore_export_definition = { - set: function (v) { - this._setProperty('-webkit-padding-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-padding-before'); - }, - enumerable: true, - configurable: true -}; -var webkitPaddingEnd_export_definition; -webkitPaddingEnd_export_definition = { - set: function (v) { - this._setProperty('-webkit-padding-end', v); - }, - get: function () { - return this.getPropertyValue('-webkit-padding-end'); - }, - enumerable: true, - configurable: true -}; -var webkitPaddingStart_export_definition; -webkitPaddingStart_export_definition = { - set: function (v) { - this._setProperty('-webkit-padding-start', v); - }, - get: function () { - return this.getPropertyValue('-webkit-padding-start'); - }, - enumerable: true, - configurable: true -}; -var webkitPerspective_export_definition; -webkitPerspective_export_definition = { - set: function (v) { - this._setProperty('-webkit-perspective', v); - }, - get: function () { - return this.getPropertyValue('-webkit-perspective'); - }, - enumerable: true, - configurable: true -}; -var webkitPerspectiveOrigin_export_definition; -webkitPerspectiveOrigin_export_definition = { - set: function (v) { - this._setProperty('-webkit-perspective-origin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-perspective-origin'); - }, - enumerable: true, - configurable: true -}; -var webkitPerspectiveOriginX_export_definition; -webkitPerspectiveOriginX_export_definition = { - set: function (v) { - this._setProperty('-webkit-perspective-origin-x', v); - }, - get: function () { - return this.getPropertyValue('-webkit-perspective-origin-x'); - }, - enumerable: true, - configurable: true -}; -var webkitPerspectiveOriginY_export_definition; -webkitPerspectiveOriginY_export_definition = { - set: function (v) { - this._setProperty('-webkit-perspective-origin-y', v); - }, - get: function () { - return this.getPropertyValue('-webkit-perspective-origin-y'); - }, - enumerable: true, - configurable: true -}; -var webkitPrintColorAdjust_export_definition; -webkitPrintColorAdjust_export_definition = { - set: function (v) { - this._setProperty('-webkit-print-color-adjust', v); - }, - get: function () { - return this.getPropertyValue('-webkit-print-color-adjust'); - }, - enumerable: true, - configurable: true -}; -var webkitRegionBreakAfter_export_definition; -webkitRegionBreakAfter_export_definition = { - set: function (v) { - this._setProperty('-webkit-region-break-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-region-break-after'); - }, - enumerable: true, - configurable: true -}; -var webkitRegionBreakBefore_export_definition; -webkitRegionBreakBefore_export_definition = { - set: function (v) { - this._setProperty('-webkit-region-break-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-region-break-before'); - }, - enumerable: true, - configurable: true -}; -var webkitRegionBreakInside_export_definition; -webkitRegionBreakInside_export_definition = { - set: function (v) { - this._setProperty('-webkit-region-break-inside', v); - }, - get: function () { - return this.getPropertyValue('-webkit-region-break-inside'); - }, - enumerable: true, - configurable: true -}; -var webkitRegionOverflow_export_definition; -webkitRegionOverflow_export_definition = { - set: function (v) { - this._setProperty('-webkit-region-overflow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-region-overflow'); - }, - enumerable: true, - configurable: true -}; -var webkitRtlOrdering_export_definition; -webkitRtlOrdering_export_definition = { - set: function (v) { - this._setProperty('-webkit-rtl-ordering', v); - }, - get: function () { - return this.getPropertyValue('-webkit-rtl-ordering'); - }, - enumerable: true, - configurable: true -}; -var webkitSvgShadow_export_definition; -webkitSvgShadow_export_definition = { - set: function (v) { - this._setProperty('-webkit-svg-shadow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-svg-shadow'); - }, - enumerable: true, - configurable: true -}; var webkitTapHighlightColor_export_definition; webkitTapHighlightColor_export_definition = { set: function (v) { @@ -4617,39 +1622,6 @@ webkitTapHighlightColor_export_definition = { enumerable: true, configurable: true }; -var webkitTextCombine_export_definition; -webkitTextCombine_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-combine', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-combine'); - }, - enumerable: true, - configurable: true -}; -var webkitTextDecorationsInEffect_export_definition; -webkitTextDecorationsInEffect_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-decorations-in-effect', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-decorations-in-effect'); - }, - enumerable: true, - configurable: true -}; -var webkitTextEmphasis_export_definition; -webkitTextEmphasis_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-emphasis', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-emphasis'); - }, - enumerable: true, - configurable: true -}; var webkitTextEmphasisColor_export_definition; webkitTextEmphasisColor_export_definition = { set: function (v) { @@ -4661,28 +1633,6 @@ webkitTextEmphasisColor_export_definition = { enumerable: true, configurable: true }; -var webkitTextEmphasisPosition_export_definition; -webkitTextEmphasisPosition_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-emphasis-position', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-emphasis-position'); - }, - enumerable: true, - configurable: true -}; -var webkitTextEmphasisStyle_export_definition; -webkitTextEmphasisStyle_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-emphasis-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-emphasis-style'); - }, - enumerable: true, - configurable: true -}; var webkitTextFillColor_export_definition; webkitTextFillColor_export_definition = { set: function (v) { @@ -4694,50 +1644,6 @@ webkitTextFillColor_export_definition = { enumerable: true, configurable: true }; -var webkitTextOrientation_export_definition; -webkitTextOrientation_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-orientation', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-orientation'); - }, - enumerable: true, - configurable: true -}; -var webkitTextSecurity_export_definition; -webkitTextSecurity_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-security', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-security'); - }, - enumerable: true, - configurable: true -}; -var webkitTextSizeAdjust_export_definition; -webkitTextSizeAdjust_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-size-adjust', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-size-adjust'); - }, - enumerable: true, - configurable: true -}; -var webkitTextStroke_export_definition; -webkitTextStroke_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-stroke', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-stroke'); - }, - enumerable: true, - configurable: true -}; var webkitTextStrokeColor_export_definition; webkitTextStrokeColor_export_definition = { set: function (v) { @@ -4749,284 +1655,9 @@ webkitTextStrokeColor_export_definition = { enumerable: true, configurable: true }; -var webkitTextStrokeWidth_export_definition; -webkitTextStrokeWidth_export_definition = { - set: function (v) { - this._setProperty('-webkit-text-stroke-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-stroke-width'); - }, - enumerable: true, - configurable: true -}; -var webkitTransform_export_definition; -webkitTransform_export_definition = { - set: function (v) { - this._setProperty('-webkit-transform', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform'); - }, - enumerable: true, - configurable: true -}; -var webkitTransformOrigin_export_definition; -webkitTransformOrigin_export_definition = { - set: function (v) { - this._setProperty('-webkit-transform-origin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-origin'); - }, - enumerable: true, - configurable: true -}; -var webkitTransformOriginX_export_definition; -webkitTransformOriginX_export_definition = { - set: function (v) { - this._setProperty('-webkit-transform-origin-x', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-origin-x'); - }, - enumerable: true, - configurable: true -}; -var webkitTransformOriginY_export_definition; -webkitTransformOriginY_export_definition = { - set: function (v) { - this._setProperty('-webkit-transform-origin-y', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-origin-y'); - }, - enumerable: true, - configurable: true -}; -var webkitTransformOriginZ_export_definition; -webkitTransformOriginZ_export_definition = { - set: function (v) { - this._setProperty('-webkit-transform-origin-z', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-origin-z'); - }, - enumerable: true, - configurable: true -}; -var webkitTransformStyle_export_definition; -webkitTransformStyle_export_definition = { - set: function (v) { - this._setProperty('-webkit-transform-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-style'); - }, - enumerable: true, - configurable: true -}; -var webkitTransition_export_definition; -webkitTransition_export_definition = { - set: function (v) { - this._setProperty('-webkit-transition', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition'); - }, - enumerable: true, - configurable: true -}; -var webkitTransitionDelay_export_definition; -webkitTransitionDelay_export_definition = { - set: function (v) { - this._setProperty('-webkit-transition-delay', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition-delay'); - }, - enumerable: true, - configurable: true -}; -var webkitTransitionDuration_export_definition; -webkitTransitionDuration_export_definition = { - set: function (v) { - this._setProperty('-webkit-transition-duration', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition-duration'); - }, - enumerable: true, - configurable: true -}; -var webkitTransitionProperty_export_definition; -webkitTransitionProperty_export_definition = { - set: function (v) { - this._setProperty('-webkit-transition-property', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition-property'); - }, - enumerable: true, - configurable: true -}; -var webkitTransitionTimingFunction_export_definition; -webkitTransitionTimingFunction_export_definition = { - set: function (v) { - this._setProperty('-webkit-transition-timing-function', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition-timing-function'); - }, - enumerable: true, - configurable: true -}; -var webkitUserDrag_export_definition; -webkitUserDrag_export_definition = { - set: function (v) { - this._setProperty('-webkit-user-drag', v); - }, - get: function () { - return this.getPropertyValue('-webkit-user-drag'); - }, - enumerable: true, - configurable: true -}; -var webkitUserModify_export_definition; -webkitUserModify_export_definition = { - set: function (v) { - this._setProperty('-webkit-user-modify', v); - }, - get: function () { - return this.getPropertyValue('-webkit-user-modify'); - }, - enumerable: true, - configurable: true -}; -var webkitUserSelect_export_definition; -webkitUserSelect_export_definition = { - set: function (v) { - this._setProperty('-webkit-user-select', v); - }, - get: function () { - return this.getPropertyValue('-webkit-user-select'); - }, - enumerable: true, - configurable: true -}; -var webkitWrap_export_definition; -webkitWrap_export_definition = { - set: function (v) { - this._setProperty('-webkit-wrap', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap'); - }, - enumerable: true, - configurable: true -}; -var webkitWrapFlow_export_definition; -webkitWrapFlow_export_definition = { - set: function (v) { - this._setProperty('-webkit-wrap-flow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-flow'); - }, - enumerable: true, - configurable: true -}; -var webkitWrapMargin_export_definition; -webkitWrapMargin_export_definition = { - set: function (v) { - this._setProperty('-webkit-wrap-margin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-margin'); - }, - enumerable: true, - configurable: true -}; -var webkitWrapPadding_export_definition; -webkitWrapPadding_export_definition = { - set: function (v) { - this._setProperty('-webkit-wrap-padding', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-padding'); - }, - enumerable: true, - configurable: true -}; -var webkitWrapShapeInside_export_definition; -webkitWrapShapeInside_export_definition = { - set: function (v) { - this._setProperty('-webkit-wrap-shape-inside', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-shape-inside'); - }, - enumerable: true, - configurable: true -}; -var webkitWrapShapeOutside_export_definition; -webkitWrapShapeOutside_export_definition = { - set: function (v) { - this._setProperty('-webkit-wrap-shape-outside', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-shape-outside'); - }, - enumerable: true, - configurable: true -}; -var webkitWrapThrough_export_definition; -webkitWrapThrough_export_definition = { - set: function (v) { - this._setProperty('-webkit-wrap-through', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-through'); - }, - enumerable: true, - configurable: true -}; -var webkitWritingMode_export_definition; -webkitWritingMode_export_definition = { - set: function (v) { - this._setProperty('-webkit-writing-mode', v); - }, - get: function () { - return this.getPropertyValue('-webkit-writing-mode'); - }, - enumerable: true, - configurable: true -}; -var whiteSpace_export_definition; -whiteSpace_export_definition = { - set: function (v) { - this._setProperty('white-space', v); - }, - get: function () { - return this.getPropertyValue('white-space'); - }, - enumerable: true, - configurable: true -}; -var widows_export_definition; -widows_export_definition = { - set: function (v) { - this._setProperty('widows', v); - }, - get: function () { - return this.getPropertyValue('widows'); - }, - enumerable: true, - configurable: true -}; var width_export_definition; -function parse(v) { +function width_local_fn_parse(v) { if (String(v).toLowerCase() === 'auto') { return 'auto'; } @@ -5040,7 +1671,7 @@ function parse(v) { width_export_definition = { set: function (v) { - this._setProperty('width', parse(v)); + this._setProperty('width', width_local_fn_parse(v)); }, get: function () { return this.getPropertyValue('width'); @@ -5048,77 +1679,9 @@ width_export_definition = { enumerable: true, configurable: true }; -var wordBreak_export_definition; -wordBreak_export_definition = { - set: function (v) { - this._setProperty('word-break', v); - }, - get: function () { - return this.getPropertyValue('word-break'); - }, - enumerable: true, - configurable: true -}; -var wordSpacing_export_definition; -wordSpacing_export_definition = { - set: function (v) { - this._setProperty('word-spacing', v); - }, - get: function () { - return this.getPropertyValue('word-spacing'); - }, - enumerable: true, - configurable: true -}; -var wordWrap_export_definition; -wordWrap_export_definition = { - set: function (v) { - this._setProperty('word-wrap', v); - }, - get: function () { - return this.getPropertyValue('word-wrap'); - }, - enumerable: true, - configurable: true -}; -var writingMode_export_definition; -writingMode_export_definition = { - set: function (v) { - this._setProperty('writing-mode', v); - }, - get: function () { - return this.getPropertyValue('writing-mode'); - }, - enumerable: true, - configurable: true -}; -var zIndex_export_definition; -zIndex_export_definition = { - set: function (v) { - this._setProperty('z-index', v); - }, - get: function () { - return this.getPropertyValue('z-index'); - }, - enumerable: true, - configurable: true -}; -var zoom_export_definition; -zoom_export_definition = { - set: function (v) { - this._setProperty('zoom', v); - }, - get: function () { - return this.getPropertyValue('zoom'); - }, - enumerable: true, - configurable: true -}; module.exports = function (prototype) { Object.defineProperties(prototype, { - alignmentBaseline: alignmentBaseline_export_definition, - "alignment-baseline": alignmentBaseline_export_definition, azimuth: azimuth_export_definition, backgroundColor: backgroundColor_export_definition, "background-color": backgroundColor_export_definition, @@ -5131,22 +1694,6 @@ module.exports = function (prototype) { backgroundPosition: backgroundPosition_export_definition, "background-position": backgroundPosition_export_definition, background: background_export_definition, - backgroundClip: backgroundClip_export_definition, - "background-clip": backgroundClip_export_definition, - backgroundOrigin: backgroundOrigin_export_definition, - "background-origin": backgroundOrigin_export_definition, - backgroundPositionX: backgroundPositionX_export_definition, - "background-position-x": backgroundPositionX_export_definition, - backgroundPositionY: backgroundPositionY_export_definition, - "background-position-y": backgroundPositionY_export_definition, - backgroundRepeatX: backgroundRepeatX_export_definition, - "background-repeat-x": backgroundRepeatX_export_definition, - backgroundRepeatY: backgroundRepeatY_export_definition, - "background-repeat-y": backgroundRepeatY_export_definition, - backgroundSize: backgroundSize_export_definition, - "background-size": backgroundSize_export_definition, - baselineShift: baselineShift_export_definition, - "baseline-shift": baselineShift_export_definition, borderWidth: borderWidth_export_definition, "border-width": borderWidth_export_definition, borderStyle: borderStyle_export_definition, @@ -5162,24 +1709,8 @@ module.exports = function (prototype) { "border-bottom-color": borderBottomColor_export_definition, borderBottom: borderBottom_export_definition, "border-bottom": borderBottom_export_definition, - borderBottomLeftRadius: borderBottomLeftRadius_export_definition, - "border-bottom-left-radius": borderBottomLeftRadius_export_definition, - borderBottomRightRadius: borderBottomRightRadius_export_definition, - "border-bottom-right-radius": borderBottomRightRadius_export_definition, borderCollapse: borderCollapse_export_definition, "border-collapse": borderCollapse_export_definition, - borderImage: borderImage_export_definition, - "border-image": borderImage_export_definition, - borderImageOutset: borderImageOutset_export_definition, - "border-image-outset": borderImageOutset_export_definition, - borderImageRepeat: borderImageRepeat_export_definition, - "border-image-repeat": borderImageRepeat_export_definition, - borderImageSlice: borderImageSlice_export_definition, - "border-image-slice": borderImageSlice_export_definition, - borderImageSource: borderImageSource_export_definition, - "border-image-source": borderImageSource_export_definition, - borderImageWidth: borderImageWidth_export_definition, - "border-image-width": borderImageWidth_export_definition, borderLeftWidth: borderLeftWidth_export_definition, "border-left-width": borderLeftWidth_export_definition, borderLeftStyle: borderLeftStyle_export_definition, @@ -5188,8 +1719,6 @@ module.exports = function (prototype) { "border-left-color": borderLeftColor_export_definition, borderLeft: borderLeft_export_definition, "border-left": borderLeft_export_definition, - borderRadius: borderRadius_export_definition, - "border-radius": borderRadius_export_definition, borderRightWidth: borderRightWidth_export_definition, "border-right-width": borderRightWidth_export_definition, borderRightStyle: borderRightStyle_export_definition, @@ -5208,60 +1737,22 @@ module.exports = function (prototype) { "border-top-color": borderTopColor_export_definition, borderTop: borderTop_export_definition, "border-top": borderTop_export_definition, - borderTopLeftRadius: borderTopLeftRadius_export_definition, - "border-top-left-radius": borderTopLeftRadius_export_definition, - borderTopRightRadius: borderTopRightRadius_export_definition, - "border-top-right-radius": borderTopRightRadius_export_definition, bottom: bottom_export_definition, - boxShadow: boxShadow_export_definition, - "box-shadow": boxShadow_export_definition, - boxSizing: boxSizing_export_definition, - "box-sizing": boxSizing_export_definition, - captionSide: captionSide_export_definition, - "caption-side": captionSide_export_definition, clear: clear_export_definition, clip: clip_export_definition, color: color_export_definition, - colorInterpolation: colorInterpolation_export_definition, - "color-interpolation": colorInterpolation_export_definition, - colorInterpolationFilters: colorInterpolationFilters_export_definition, - "color-interpolation-filters": colorInterpolationFilters_export_definition, - colorProfile: colorProfile_export_definition, - "color-profile": colorProfile_export_definition, - colorRendering: colorRendering_export_definition, - "color-rendering": colorRendering_export_definition, - content: content_export_definition, - counterIncrement: counterIncrement_export_definition, - "counter-increment": counterIncrement_export_definition, - counterReset: counterReset_export_definition, - "counter-reset": counterReset_export_definition, cssFloat: cssFloat_export_definition, "css-float": cssFloat_export_definition, - cue: cue_export_definition, - cueAfter: cueAfter_export_definition, - "cue-after": cueAfter_export_definition, - cueBefore: cueBefore_export_definition, - "cue-before": cueBefore_export_definition, - cursor: cursor_export_definition, - direction: direction_export_definition, - display: display_export_definition, - dominantBaseline: dominantBaseline_export_definition, - "dominant-baseline": dominantBaseline_export_definition, - elevation: elevation_export_definition, - emptyCells: emptyCells_export_definition, - "empty-cells": emptyCells_export_definition, - enableBackground: enableBackground_export_definition, - "enable-background": enableBackground_export_definition, - fill: fill_export_definition, - fillOpacity: fillOpacity_export_definition, - "fill-opacity": fillOpacity_export_definition, - fillRule: fillRule_export_definition, - "fill-rule": fillRule_export_definition, - filter: filter_export_definition, + flexGrow: flexGrow_export_definition, + "flex-grow": flexGrow_export_definition, + flexShrink: flexShrink_export_definition, + "flex-shrink": flexShrink_export_definition, + flexBasis: flexBasis_export_definition, + "flex-basis": flexBasis_export_definition, + flex: flex_export_definition, + float: float_export_definition, floodColor: floodColor_export_definition, "flood-color": floodColor_export_definition, - floodOpacity: floodOpacity_export_definition, - "flood-opacity": floodOpacity_export_definition, fontFamily: fontFamily_export_definition, "font-family": fontFamily_export_definition, fontSize: fontSize_export_definition, @@ -5275,31 +1766,10 @@ module.exports = function (prototype) { lineHeight: lineHeight_export_definition, "line-height": lineHeight_export_definition, font: font_export_definition, - fontSizeAdjust: fontSizeAdjust_export_definition, - "font-size-adjust": fontSizeAdjust_export_definition, - fontStretch: fontStretch_export_definition, - "font-stretch": fontStretch_export_definition, - glyphOrientationHorizontal: glyphOrientationHorizontal_export_definition, - "glyph-orientation-horizontal": glyphOrientationHorizontal_export_definition, - glyphOrientationVertical: glyphOrientationVertical_export_definition, - "glyph-orientation-vertical": glyphOrientationVertical_export_definition, height: height_export_definition, - imageRendering: imageRendering_export_definition, - "image-rendering": imageRendering_export_definition, - kerning: kerning_export_definition, left: left_export_definition, - letterSpacing: letterSpacing_export_definition, - "letter-spacing": letterSpacing_export_definition, lightingColor: lightingColor_export_definition, "lighting-color": lightingColor_export_definition, - listStyle: listStyle_export_definition, - "list-style": listStyle_export_definition, - listStyleImage: listStyleImage_export_definition, - "list-style-image": listStyleImage_export_definition, - listStylePosition: listStylePosition_export_definition, - "list-style-position": listStylePosition_export_definition, - listStyleType: listStyleType_export_definition, - "list-style-type": listStyleType_export_definition, margin: margin_export_definition, marginBottom: marginBottom_export_definition, "margin-bottom": marginBottom_export_definition, @@ -5309,41 +1779,9 @@ module.exports = function (prototype) { "margin-right": marginRight_export_definition, marginTop: marginTop_export_definition, "margin-top": marginTop_export_definition, - marker: marker_export_definition, - markerEnd: markerEnd_export_definition, - "marker-end": markerEnd_export_definition, - markerMid: markerMid_export_definition, - "marker-mid": markerMid_export_definition, - markerOffset: markerOffset_export_definition, - "marker-offset": markerOffset_export_definition, - markerStart: markerStart_export_definition, - "marker-start": markerStart_export_definition, - marks: marks_export_definition, - mask: mask_export_definition, - maxHeight: maxHeight_export_definition, - "max-height": maxHeight_export_definition, - maxWidth: maxWidth_export_definition, - "max-width": maxWidth_export_definition, - minHeight: minHeight_export_definition, - "min-height": minHeight_export_definition, - minWidth: minWidth_export_definition, - "min-width": minWidth_export_definition, opacity: opacity_export_definition, - orphans: orphans_export_definition, - outline: outline_export_definition, outlineColor: outlineColor_export_definition, "outline-color": outlineColor_export_definition, - outlineOffset: outlineOffset_export_definition, - "outline-offset": outlineOffset_export_definition, - outlineStyle: outlineStyle_export_definition, - "outline-style": outlineStyle_export_definition, - outlineWidth: outlineWidth_export_definition, - "outline-width": outlineWidth_export_definition, - overflow: overflow_export_definition, - overflowX: overflowX_export_definition, - "overflow-x": overflowX_export_definition, - overflowY: overflowY_export_definition, - "overflow-y": overflowY_export_definition, padding: padding_export_definition, paddingBottom: paddingBottom_export_definition, "padding-bottom": paddingBottom_export_definition, @@ -5353,506 +1791,36 @@ module.exports = function (prototype) { "padding-right": paddingRight_export_definition, paddingTop: paddingTop_export_definition, "padding-top": paddingTop_export_definition, - page: page_export_definition, - pageBreakAfter: pageBreakAfter_export_definition, - "page-break-after": pageBreakAfter_export_definition, - pageBreakBefore: pageBreakBefore_export_definition, - "page-break-before": pageBreakBefore_export_definition, - pageBreakInside: pageBreakInside_export_definition, - "page-break-inside": pageBreakInside_export_definition, - pause: pause_export_definition, - pauseAfter: pauseAfter_export_definition, - "pause-after": pauseAfter_export_definition, - pauseBefore: pauseBefore_export_definition, - "pause-before": pauseBefore_export_definition, - pitch: pitch_export_definition, - pitchRange: pitchRange_export_definition, - "pitch-range": pitchRange_export_definition, - playDuring: playDuring_export_definition, - "play-during": playDuring_export_definition, - pointerEvents: pointerEvents_export_definition, - "pointer-events": pointerEvents_export_definition, - position: position_export_definition, - quotes: quotes_export_definition, - resize: resize_export_definition, - richness: richness_export_definition, right: right_export_definition, - shapeRendering: shapeRendering_export_definition, - "shape-rendering": shapeRendering_export_definition, - size: size_export_definition, - speak: speak_export_definition, - speakHeader: speakHeader_export_definition, - "speak-header": speakHeader_export_definition, - speakNumeral: speakNumeral_export_definition, - "speak-numeral": speakNumeral_export_definition, - speakPunctuation: speakPunctuation_export_definition, - "speak-punctuation": speakPunctuation_export_definition, - speechRate: speechRate_export_definition, - "speech-rate": speechRate_export_definition, - src: src_export_definition, stopColor: stopColor_export_definition, "stop-color": stopColor_export_definition, - stopOpacity: stopOpacity_export_definition, - "stop-opacity": stopOpacity_export_definition, - stress: stress_export_definition, - stroke: stroke_export_definition, - strokeDasharray: strokeDasharray_export_definition, - "stroke-dasharray": strokeDasharray_export_definition, - strokeDashoffset: strokeDashoffset_export_definition, - "stroke-dashoffset": strokeDashoffset_export_definition, - strokeLinecap: strokeLinecap_export_definition, - "stroke-linecap": strokeLinecap_export_definition, - strokeLinejoin: strokeLinejoin_export_definition, - "stroke-linejoin": strokeLinejoin_export_definition, - strokeMiterlimit: strokeMiterlimit_export_definition, - "stroke-miterlimit": strokeMiterlimit_export_definition, - strokeOpacity: strokeOpacity_export_definition, - "stroke-opacity": strokeOpacity_export_definition, - strokeWidth: strokeWidth_export_definition, - "stroke-width": strokeWidth_export_definition, - tableLayout: tableLayout_export_definition, - "table-layout": tableLayout_export_definition, - textAlign: textAlign_export_definition, - "text-align": textAlign_export_definition, - textAnchor: textAnchor_export_definition, - "text-anchor": textAnchor_export_definition, - textDecoration: textDecoration_export_definition, - "text-decoration": textDecoration_export_definition, - textIndent: textIndent_export_definition, - "text-indent": textIndent_export_definition, - textLineThrough: textLineThrough_export_definition, - "text-line-through": textLineThrough_export_definition, textLineThroughColor: textLineThroughColor_export_definition, "text-line-through-color": textLineThroughColor_export_definition, - textLineThroughMode: textLineThroughMode_export_definition, - "text-line-through-mode": textLineThroughMode_export_definition, - textLineThroughStyle: textLineThroughStyle_export_definition, - "text-line-through-style": textLineThroughStyle_export_definition, - textLineThroughWidth: textLineThroughWidth_export_definition, - "text-line-through-width": textLineThroughWidth_export_definition, - textOverflow: textOverflow_export_definition, - "text-overflow": textOverflow_export_definition, - textOverline: textOverline_export_definition, - "text-overline": textOverline_export_definition, textOverlineColor: textOverlineColor_export_definition, "text-overline-color": textOverlineColor_export_definition, - textOverlineMode: textOverlineMode_export_definition, - "text-overline-mode": textOverlineMode_export_definition, - textOverlineStyle: textOverlineStyle_export_definition, - "text-overline-style": textOverlineStyle_export_definition, - textOverlineWidth: textOverlineWidth_export_definition, - "text-overline-width": textOverlineWidth_export_definition, - textRendering: textRendering_export_definition, - "text-rendering": textRendering_export_definition, - textShadow: textShadow_export_definition, - "text-shadow": textShadow_export_definition, - textTransform: textTransform_export_definition, - "text-transform": textTransform_export_definition, - textUnderline: textUnderline_export_definition, - "text-underline": textUnderline_export_definition, textUnderlineColor: textUnderlineColor_export_definition, "text-underline-color": textUnderlineColor_export_definition, - textUnderlineMode: textUnderlineMode_export_definition, - "text-underline-mode": textUnderlineMode_export_definition, - textUnderlineStyle: textUnderlineStyle_export_definition, - "text-underline-style": textUnderlineStyle_export_definition, - textUnderlineWidth: textUnderlineWidth_export_definition, - "text-underline-width": textUnderlineWidth_export_definition, top: top_export_definition, - unicodeBidi: unicodeBidi_export_definition, - "unicode-bidi": unicodeBidi_export_definition, - unicodeRange: unicodeRange_export_definition, - "unicode-range": unicodeRange_export_definition, - vectorEffect: vectorEffect_export_definition, - "vector-effect": vectorEffect_export_definition, - verticalAlign: verticalAlign_export_definition, - "vertical-align": verticalAlign_export_definition, - visibility: visibility_export_definition, - voiceFamily: voiceFamily_export_definition, - "voice-family": voiceFamily_export_definition, - volume: volume_export_definition, - webkitAnimation: webkitAnimation_export_definition, - "webkit-animation": webkitAnimation_export_definition, - webkitAnimationDelay: webkitAnimationDelay_export_definition, - "webkit-animation-delay": webkitAnimationDelay_export_definition, - webkitAnimationDirection: webkitAnimationDirection_export_definition, - "webkit-animation-direction": webkitAnimationDirection_export_definition, - webkitAnimationDuration: webkitAnimationDuration_export_definition, - "webkit-animation-duration": webkitAnimationDuration_export_definition, - webkitAnimationFillMode: webkitAnimationFillMode_export_definition, - "webkit-animation-fill-mode": webkitAnimationFillMode_export_definition, - webkitAnimationIterationCount: webkitAnimationIterationCount_export_definition, - "webkit-animation-iteration-count": webkitAnimationIterationCount_export_definition, - webkitAnimationName: webkitAnimationName_export_definition, - "webkit-animation-name": webkitAnimationName_export_definition, - webkitAnimationPlayState: webkitAnimationPlayState_export_definition, - "webkit-animation-play-state": webkitAnimationPlayState_export_definition, - webkitAnimationTimingFunction: webkitAnimationTimingFunction_export_definition, - "webkit-animation-timing-function": webkitAnimationTimingFunction_export_definition, - webkitAppearance: webkitAppearance_export_definition, - "webkit-appearance": webkitAppearance_export_definition, - webkitAspectRatio: webkitAspectRatio_export_definition, - "webkit-aspect-ratio": webkitAspectRatio_export_definition, - webkitBackfaceVisibility: webkitBackfaceVisibility_export_definition, - "webkit-backface-visibility": webkitBackfaceVisibility_export_definition, - webkitBackgroundClip: webkitBackgroundClip_export_definition, - "webkit-background-clip": webkitBackgroundClip_export_definition, - webkitBackgroundComposite: webkitBackgroundComposite_export_definition, - "webkit-background-composite": webkitBackgroundComposite_export_definition, - webkitBackgroundOrigin: webkitBackgroundOrigin_export_definition, - "webkit-background-origin": webkitBackgroundOrigin_export_definition, - webkitBackgroundSize: webkitBackgroundSize_export_definition, - "webkit-background-size": webkitBackgroundSize_export_definition, - webkitBorderAfter: webkitBorderAfter_export_definition, - "webkit-border-after": webkitBorderAfter_export_definition, webkitBorderAfterColor: webkitBorderAfterColor_export_definition, "webkit-border-after-color": webkitBorderAfterColor_export_definition, - webkitBorderAfterStyle: webkitBorderAfterStyle_export_definition, - "webkit-border-after-style": webkitBorderAfterStyle_export_definition, - webkitBorderAfterWidth: webkitBorderAfterWidth_export_definition, - "webkit-border-after-width": webkitBorderAfterWidth_export_definition, - webkitBorderBefore: webkitBorderBefore_export_definition, - "webkit-border-before": webkitBorderBefore_export_definition, webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition, "webkit-border-before-color": webkitBorderBeforeColor_export_definition, - webkitBorderBeforeStyle: webkitBorderBeforeStyle_export_definition, - "webkit-border-before-style": webkitBorderBeforeStyle_export_definition, - webkitBorderBeforeWidth: webkitBorderBeforeWidth_export_definition, - "webkit-border-before-width": webkitBorderBeforeWidth_export_definition, - webkitBorderEnd: webkitBorderEnd_export_definition, - "webkit-border-end": webkitBorderEnd_export_definition, webkitBorderEndColor: webkitBorderEndColor_export_definition, "webkit-border-end-color": webkitBorderEndColor_export_definition, - webkitBorderEndStyle: webkitBorderEndStyle_export_definition, - "webkit-border-end-style": webkitBorderEndStyle_export_definition, - webkitBorderEndWidth: webkitBorderEndWidth_export_definition, - "webkit-border-end-width": webkitBorderEndWidth_export_definition, - webkitBorderFit: webkitBorderFit_export_definition, - "webkit-border-fit": webkitBorderFit_export_definition, - webkitBorderHorizontalSpacing: webkitBorderHorizontalSpacing_export_definition, - "webkit-border-horizontal-spacing": webkitBorderHorizontalSpacing_export_definition, - webkitBorderImage: webkitBorderImage_export_definition, - "webkit-border-image": webkitBorderImage_export_definition, - webkitBorderRadius: webkitBorderRadius_export_definition, - "webkit-border-radius": webkitBorderRadius_export_definition, - webkitBorderStart: webkitBorderStart_export_definition, - "webkit-border-start": webkitBorderStart_export_definition, webkitBorderStartColor: webkitBorderStartColor_export_definition, "webkit-border-start-color": webkitBorderStartColor_export_definition, - webkitBorderStartStyle: webkitBorderStartStyle_export_definition, - "webkit-border-start-style": webkitBorderStartStyle_export_definition, - webkitBorderStartWidth: webkitBorderStartWidth_export_definition, - "webkit-border-start-width": webkitBorderStartWidth_export_definition, - webkitBorderVerticalSpacing: webkitBorderVerticalSpacing_export_definition, - "webkit-border-vertical-spacing": webkitBorderVerticalSpacing_export_definition, - webkitBoxAlign: webkitBoxAlign_export_definition, - "webkit-box-align": webkitBoxAlign_export_definition, - webkitBoxDirection: webkitBoxDirection_export_definition, - "webkit-box-direction": webkitBoxDirection_export_definition, - webkitBoxFlex: webkitBoxFlex_export_definition, - "webkit-box-flex": webkitBoxFlex_export_definition, - webkitBoxFlexGroup: webkitBoxFlexGroup_export_definition, - "webkit-box-flex-group": webkitBoxFlexGroup_export_definition, - webkitBoxLines: webkitBoxLines_export_definition, - "webkit-box-lines": webkitBoxLines_export_definition, - webkitBoxOrdinalGroup: webkitBoxOrdinalGroup_export_definition, - "webkit-box-ordinal-group": webkitBoxOrdinalGroup_export_definition, - webkitBoxOrient: webkitBoxOrient_export_definition, - "webkit-box-orient": webkitBoxOrient_export_definition, - webkitBoxPack: webkitBoxPack_export_definition, - "webkit-box-pack": webkitBoxPack_export_definition, - webkitBoxReflect: webkitBoxReflect_export_definition, - "webkit-box-reflect": webkitBoxReflect_export_definition, - webkitBoxShadow: webkitBoxShadow_export_definition, - "webkit-box-shadow": webkitBoxShadow_export_definition, - webkitColorCorrection: webkitColorCorrection_export_definition, - "webkit-color-correction": webkitColorCorrection_export_definition, - webkitColumnAxis: webkitColumnAxis_export_definition, - "webkit-column-axis": webkitColumnAxis_export_definition, - webkitColumnBreakAfter: webkitColumnBreakAfter_export_definition, - "webkit-column-break-after": webkitColumnBreakAfter_export_definition, - webkitColumnBreakBefore: webkitColumnBreakBefore_export_definition, - "webkit-column-break-before": webkitColumnBreakBefore_export_definition, - webkitColumnBreakInside: webkitColumnBreakInside_export_definition, - "webkit-column-break-inside": webkitColumnBreakInside_export_definition, - webkitColumnCount: webkitColumnCount_export_definition, - "webkit-column-count": webkitColumnCount_export_definition, - webkitColumnGap: webkitColumnGap_export_definition, - "webkit-column-gap": webkitColumnGap_export_definition, - webkitColumnRule: webkitColumnRule_export_definition, - "webkit-column-rule": webkitColumnRule_export_definition, webkitColumnRuleColor: webkitColumnRuleColor_export_definition, "webkit-column-rule-color": webkitColumnRuleColor_export_definition, - webkitColumnRuleStyle: webkitColumnRuleStyle_export_definition, - "webkit-column-rule-style": webkitColumnRuleStyle_export_definition, - webkitColumnRuleWidth: webkitColumnRuleWidth_export_definition, - "webkit-column-rule-width": webkitColumnRuleWidth_export_definition, - webkitColumnSpan: webkitColumnSpan_export_definition, - "webkit-column-span": webkitColumnSpan_export_definition, - webkitColumnWidth: webkitColumnWidth_export_definition, - "webkit-column-width": webkitColumnWidth_export_definition, - webkitColumns: webkitColumns_export_definition, - "webkit-columns": webkitColumns_export_definition, - webkitFilter: webkitFilter_export_definition, - "webkit-filter": webkitFilter_export_definition, - webkitFlexAlign: webkitFlexAlign_export_definition, - "webkit-flex-align": webkitFlexAlign_export_definition, - webkitFlexDirection: webkitFlexDirection_export_definition, - "webkit-flex-direction": webkitFlexDirection_export_definition, - webkitFlexFlow: webkitFlexFlow_export_definition, - "webkit-flex-flow": webkitFlexFlow_export_definition, - webkitFlexItemAlign: webkitFlexItemAlign_export_definition, - "webkit-flex-item-align": webkitFlexItemAlign_export_definition, - webkitFlexLinePack: webkitFlexLinePack_export_definition, - "webkit-flex-line-pack": webkitFlexLinePack_export_definition, - webkitFlexOrder: webkitFlexOrder_export_definition, - "webkit-flex-order": webkitFlexOrder_export_definition, - webkitFlexPack: webkitFlexPack_export_definition, - "webkit-flex-pack": webkitFlexPack_export_definition, - webkitFlexWrap: webkitFlexWrap_export_definition, - "webkit-flex-wrap": webkitFlexWrap_export_definition, - webkitFlowFrom: webkitFlowFrom_export_definition, - "webkit-flow-from": webkitFlowFrom_export_definition, - webkitFlowInto: webkitFlowInto_export_definition, - "webkit-flow-into": webkitFlowInto_export_definition, - webkitFontFeatureSettings: webkitFontFeatureSettings_export_definition, - "webkit-font-feature-settings": webkitFontFeatureSettings_export_definition, - webkitFontKerning: webkitFontKerning_export_definition, - "webkit-font-kerning": webkitFontKerning_export_definition, - webkitFontSizeDelta: webkitFontSizeDelta_export_definition, - "webkit-font-size-delta": webkitFontSizeDelta_export_definition, - webkitFontSmoothing: webkitFontSmoothing_export_definition, - "webkit-font-smoothing": webkitFontSmoothing_export_definition, - webkitFontVariantLigatures: webkitFontVariantLigatures_export_definition, - "webkit-font-variant-ligatures": webkitFontVariantLigatures_export_definition, - webkitHighlight: webkitHighlight_export_definition, - "webkit-highlight": webkitHighlight_export_definition, - webkitHyphenateCharacter: webkitHyphenateCharacter_export_definition, - "webkit-hyphenate-character": webkitHyphenateCharacter_export_definition, - webkitHyphenateLimitAfter: webkitHyphenateLimitAfter_export_definition, - "webkit-hyphenate-limit-after": webkitHyphenateLimitAfter_export_definition, - webkitHyphenateLimitBefore: webkitHyphenateLimitBefore_export_definition, - "webkit-hyphenate-limit-before": webkitHyphenateLimitBefore_export_definition, - webkitHyphenateLimitLines: webkitHyphenateLimitLines_export_definition, - "webkit-hyphenate-limit-lines": webkitHyphenateLimitLines_export_definition, - webkitHyphens: webkitHyphens_export_definition, - "webkit-hyphens": webkitHyphens_export_definition, - webkitLineAlign: webkitLineAlign_export_definition, - "webkit-line-align": webkitLineAlign_export_definition, - webkitLineBoxContain: webkitLineBoxContain_export_definition, - "webkit-line-box-contain": webkitLineBoxContain_export_definition, - webkitLineBreak: webkitLineBreak_export_definition, - "webkit-line-break": webkitLineBreak_export_definition, - webkitLineClamp: webkitLineClamp_export_definition, - "webkit-line-clamp": webkitLineClamp_export_definition, - webkitLineGrid: webkitLineGrid_export_definition, - "webkit-line-grid": webkitLineGrid_export_definition, - webkitLineSnap: webkitLineSnap_export_definition, - "webkit-line-snap": webkitLineSnap_export_definition, - webkitLocale: webkitLocale_export_definition, - "webkit-locale": webkitLocale_export_definition, - webkitLogicalHeight: webkitLogicalHeight_export_definition, - "webkit-logical-height": webkitLogicalHeight_export_definition, - webkitLogicalWidth: webkitLogicalWidth_export_definition, - "webkit-logical-width": webkitLogicalWidth_export_definition, - webkitMarginAfter: webkitMarginAfter_export_definition, - "webkit-margin-after": webkitMarginAfter_export_definition, - webkitMarginAfterCollapse: webkitMarginAfterCollapse_export_definition, - "webkit-margin-after-collapse": webkitMarginAfterCollapse_export_definition, - webkitMarginBefore: webkitMarginBefore_export_definition, - "webkit-margin-before": webkitMarginBefore_export_definition, - webkitMarginBeforeCollapse: webkitMarginBeforeCollapse_export_definition, - "webkit-margin-before-collapse": webkitMarginBeforeCollapse_export_definition, - webkitMarginBottomCollapse: webkitMarginBottomCollapse_export_definition, - "webkit-margin-bottom-collapse": webkitMarginBottomCollapse_export_definition, - webkitMarginCollapse: webkitMarginCollapse_export_definition, - "webkit-margin-collapse": webkitMarginCollapse_export_definition, - webkitMarginEnd: webkitMarginEnd_export_definition, - "webkit-margin-end": webkitMarginEnd_export_definition, - webkitMarginStart: webkitMarginStart_export_definition, - "webkit-margin-start": webkitMarginStart_export_definition, - webkitMarginTopCollapse: webkitMarginTopCollapse_export_definition, - "webkit-margin-top-collapse": webkitMarginTopCollapse_export_definition, - webkitMarquee: webkitMarquee_export_definition, - "webkit-marquee": webkitMarquee_export_definition, - webkitMarqueeDirection: webkitMarqueeDirection_export_definition, - "webkit-marquee-direction": webkitMarqueeDirection_export_definition, - webkitMarqueeIncrement: webkitMarqueeIncrement_export_definition, - "webkit-marquee-increment": webkitMarqueeIncrement_export_definition, - webkitMarqueeRepetition: webkitMarqueeRepetition_export_definition, - "webkit-marquee-repetition": webkitMarqueeRepetition_export_definition, - webkitMarqueeSpeed: webkitMarqueeSpeed_export_definition, - "webkit-marquee-speed": webkitMarqueeSpeed_export_definition, - webkitMarqueeStyle: webkitMarqueeStyle_export_definition, - "webkit-marquee-style": webkitMarqueeStyle_export_definition, - webkitMask: webkitMask_export_definition, - "webkit-mask": webkitMask_export_definition, - webkitMaskAttachment: webkitMaskAttachment_export_definition, - "webkit-mask-attachment": webkitMaskAttachment_export_definition, - webkitMaskBoxImage: webkitMaskBoxImage_export_definition, - "webkit-mask-box-image": webkitMaskBoxImage_export_definition, - webkitMaskBoxImageOutset: webkitMaskBoxImageOutset_export_definition, - "webkit-mask-box-image-outset": webkitMaskBoxImageOutset_export_definition, - webkitMaskBoxImageRepeat: webkitMaskBoxImageRepeat_export_definition, - "webkit-mask-box-image-repeat": webkitMaskBoxImageRepeat_export_definition, - webkitMaskBoxImageSlice: webkitMaskBoxImageSlice_export_definition, - "webkit-mask-box-image-slice": webkitMaskBoxImageSlice_export_definition, - webkitMaskBoxImageSource: webkitMaskBoxImageSource_export_definition, - "webkit-mask-box-image-source": webkitMaskBoxImageSource_export_definition, - webkitMaskBoxImageWidth: webkitMaskBoxImageWidth_export_definition, - "webkit-mask-box-image-width": webkitMaskBoxImageWidth_export_definition, - webkitMaskClip: webkitMaskClip_export_definition, - "webkit-mask-clip": webkitMaskClip_export_definition, - webkitMaskComposite: webkitMaskComposite_export_definition, - "webkit-mask-composite": webkitMaskComposite_export_definition, - webkitMaskImage: webkitMaskImage_export_definition, - "webkit-mask-image": webkitMaskImage_export_definition, - webkitMaskOrigin: webkitMaskOrigin_export_definition, - "webkit-mask-origin": webkitMaskOrigin_export_definition, - webkitMaskPosition: webkitMaskPosition_export_definition, - "webkit-mask-position": webkitMaskPosition_export_definition, - webkitMaskPositionX: webkitMaskPositionX_export_definition, - "webkit-mask-position-x": webkitMaskPositionX_export_definition, - webkitMaskPositionY: webkitMaskPositionY_export_definition, - "webkit-mask-position-y": webkitMaskPositionY_export_definition, - webkitMaskRepeat: webkitMaskRepeat_export_definition, - "webkit-mask-repeat": webkitMaskRepeat_export_definition, - webkitMaskRepeatX: webkitMaskRepeatX_export_definition, - "webkit-mask-repeat-x": webkitMaskRepeatX_export_definition, - webkitMaskRepeatY: webkitMaskRepeatY_export_definition, - "webkit-mask-repeat-y": webkitMaskRepeatY_export_definition, - webkitMaskSize: webkitMaskSize_export_definition, - "webkit-mask-size": webkitMaskSize_export_definition, webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition, "webkit-match-nearest-mail-blockquote-color": webkitMatchNearestMailBlockquoteColor_export_definition, - webkitMaxLogicalHeight: webkitMaxLogicalHeight_export_definition, - "webkit-max-logical-height": webkitMaxLogicalHeight_export_definition, - webkitMaxLogicalWidth: webkitMaxLogicalWidth_export_definition, - "webkit-max-logical-width": webkitMaxLogicalWidth_export_definition, - webkitMinLogicalHeight: webkitMinLogicalHeight_export_definition, - "webkit-min-logical-height": webkitMinLogicalHeight_export_definition, - webkitMinLogicalWidth: webkitMinLogicalWidth_export_definition, - "webkit-min-logical-width": webkitMinLogicalWidth_export_definition, - webkitNbspMode: webkitNbspMode_export_definition, - "webkit-nbsp-mode": webkitNbspMode_export_definition, - webkitOverflowScrolling: webkitOverflowScrolling_export_definition, - "webkit-overflow-scrolling": webkitOverflowScrolling_export_definition, - webkitPaddingAfter: webkitPaddingAfter_export_definition, - "webkit-padding-after": webkitPaddingAfter_export_definition, - webkitPaddingBefore: webkitPaddingBefore_export_definition, - "webkit-padding-before": webkitPaddingBefore_export_definition, - webkitPaddingEnd: webkitPaddingEnd_export_definition, - "webkit-padding-end": webkitPaddingEnd_export_definition, - webkitPaddingStart: webkitPaddingStart_export_definition, - "webkit-padding-start": webkitPaddingStart_export_definition, - webkitPerspective: webkitPerspective_export_definition, - "webkit-perspective": webkitPerspective_export_definition, - webkitPerspectiveOrigin: webkitPerspectiveOrigin_export_definition, - "webkit-perspective-origin": webkitPerspectiveOrigin_export_definition, - webkitPerspectiveOriginX: webkitPerspectiveOriginX_export_definition, - "webkit-perspective-origin-x": webkitPerspectiveOriginX_export_definition, - webkitPerspectiveOriginY: webkitPerspectiveOriginY_export_definition, - "webkit-perspective-origin-y": webkitPerspectiveOriginY_export_definition, - webkitPrintColorAdjust: webkitPrintColorAdjust_export_definition, - "webkit-print-color-adjust": webkitPrintColorAdjust_export_definition, - webkitRegionBreakAfter: webkitRegionBreakAfter_export_definition, - "webkit-region-break-after": webkitRegionBreakAfter_export_definition, - webkitRegionBreakBefore: webkitRegionBreakBefore_export_definition, - "webkit-region-break-before": webkitRegionBreakBefore_export_definition, - webkitRegionBreakInside: webkitRegionBreakInside_export_definition, - "webkit-region-break-inside": webkitRegionBreakInside_export_definition, - webkitRegionOverflow: webkitRegionOverflow_export_definition, - "webkit-region-overflow": webkitRegionOverflow_export_definition, - webkitRtlOrdering: webkitRtlOrdering_export_definition, - "webkit-rtl-ordering": webkitRtlOrdering_export_definition, - webkitSvgShadow: webkitSvgShadow_export_definition, - "webkit-svg-shadow": webkitSvgShadow_export_definition, webkitTapHighlightColor: webkitTapHighlightColor_export_definition, "webkit-tap-highlight-color": webkitTapHighlightColor_export_definition, - webkitTextCombine: webkitTextCombine_export_definition, - "webkit-text-combine": webkitTextCombine_export_definition, - webkitTextDecorationsInEffect: webkitTextDecorationsInEffect_export_definition, - "webkit-text-decorations-in-effect": webkitTextDecorationsInEffect_export_definition, - webkitTextEmphasis: webkitTextEmphasis_export_definition, - "webkit-text-emphasis": webkitTextEmphasis_export_definition, webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition, "webkit-text-emphasis-color": webkitTextEmphasisColor_export_definition, - webkitTextEmphasisPosition: webkitTextEmphasisPosition_export_definition, - "webkit-text-emphasis-position": webkitTextEmphasisPosition_export_definition, - webkitTextEmphasisStyle: webkitTextEmphasisStyle_export_definition, - "webkit-text-emphasis-style": webkitTextEmphasisStyle_export_definition, webkitTextFillColor: webkitTextFillColor_export_definition, "webkit-text-fill-color": webkitTextFillColor_export_definition, - webkitTextOrientation: webkitTextOrientation_export_definition, - "webkit-text-orientation": webkitTextOrientation_export_definition, - webkitTextSecurity: webkitTextSecurity_export_definition, - "webkit-text-security": webkitTextSecurity_export_definition, - webkitTextSizeAdjust: webkitTextSizeAdjust_export_definition, - "webkit-text-size-adjust": webkitTextSizeAdjust_export_definition, - webkitTextStroke: webkitTextStroke_export_definition, - "webkit-text-stroke": webkitTextStroke_export_definition, webkitTextStrokeColor: webkitTextStrokeColor_export_definition, "webkit-text-stroke-color": webkitTextStrokeColor_export_definition, - webkitTextStrokeWidth: webkitTextStrokeWidth_export_definition, - "webkit-text-stroke-width": webkitTextStrokeWidth_export_definition, - webkitTransform: webkitTransform_export_definition, - "webkit-transform": webkitTransform_export_definition, - webkitTransformOrigin: webkitTransformOrigin_export_definition, - "webkit-transform-origin": webkitTransformOrigin_export_definition, - webkitTransformOriginX: webkitTransformOriginX_export_definition, - "webkit-transform-origin-x": webkitTransformOriginX_export_definition, - webkitTransformOriginY: webkitTransformOriginY_export_definition, - "webkit-transform-origin-y": webkitTransformOriginY_export_definition, - webkitTransformOriginZ: webkitTransformOriginZ_export_definition, - "webkit-transform-origin-z": webkitTransformOriginZ_export_definition, - webkitTransformStyle: webkitTransformStyle_export_definition, - "webkit-transform-style": webkitTransformStyle_export_definition, - webkitTransition: webkitTransition_export_definition, - "webkit-transition": webkitTransition_export_definition, - webkitTransitionDelay: webkitTransitionDelay_export_definition, - "webkit-transition-delay": webkitTransitionDelay_export_definition, - webkitTransitionDuration: webkitTransitionDuration_export_definition, - "webkit-transition-duration": webkitTransitionDuration_export_definition, - webkitTransitionProperty: webkitTransitionProperty_export_definition, - "webkit-transition-property": webkitTransitionProperty_export_definition, - webkitTransitionTimingFunction: webkitTransitionTimingFunction_export_definition, - "webkit-transition-timing-function": webkitTransitionTimingFunction_export_definition, - webkitUserDrag: webkitUserDrag_export_definition, - "webkit-user-drag": webkitUserDrag_export_definition, - webkitUserModify: webkitUserModify_export_definition, - "webkit-user-modify": webkitUserModify_export_definition, - webkitUserSelect: webkitUserSelect_export_definition, - "webkit-user-select": webkitUserSelect_export_definition, - webkitWrap: webkitWrap_export_definition, - "webkit-wrap": webkitWrap_export_definition, - webkitWrapFlow: webkitWrapFlow_export_definition, - "webkit-wrap-flow": webkitWrapFlow_export_definition, - webkitWrapMargin: webkitWrapMargin_export_definition, - "webkit-wrap-margin": webkitWrapMargin_export_definition, - webkitWrapPadding: webkitWrapPadding_export_definition, - "webkit-wrap-padding": webkitWrapPadding_export_definition, - webkitWrapShapeInside: webkitWrapShapeInside_export_definition, - "webkit-wrap-shape-inside": webkitWrapShapeInside_export_definition, - webkitWrapShapeOutside: webkitWrapShapeOutside_export_definition, - "webkit-wrap-shape-outside": webkitWrapShapeOutside_export_definition, - webkitWrapThrough: webkitWrapThrough_export_definition, - "webkit-wrap-through": webkitWrapThrough_export_definition, - webkitWritingMode: webkitWritingMode_export_definition, - "webkit-writing-mode": webkitWritingMode_export_definition, - whiteSpace: whiteSpace_export_definition, - "white-space": whiteSpace_export_definition, - widows: widows_export_definition, - width: width_export_definition, - wordBreak: wordBreak_export_definition, - "word-break": wordBreak_export_definition, - wordSpacing: wordSpacing_export_definition, - "word-spacing": wordSpacing_export_definition, - wordWrap: wordWrap_export_definition, - "word-wrap": wordWrap_export_definition, - writingMode: writingMode_export_definition, - "writing-mode": writingMode_export_definition, - zIndex: zIndex_export_definition, - "z-index": zIndex_export_definition, - zoom: zoom_export_definition + width: width_export_definition }); }; diff --git a/node_modules/cssstyle/lib/properties/alignmentBaseline.js b/node_modules/cssstyle/lib/properties/alignmentBaseline.js deleted file mode 100644 index c9a4963..0000000 --- a/node_modules/cssstyle/lib/properties/alignmentBaseline.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('alignment-baseline', v); - }, - get: function () { - return this.getPropertyValue('alignment-baseline'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/azimuth.js b/node_modules/cssstyle/lib/properties/azimuth.js index d48be84..f23a68d 100644 --- a/node_modules/cssstyle/lib/properties/azimuth.js +++ b/node_modules/cssstyle/lib/properties/azimuth.js @@ -3,63 +3,65 @@ var parsers = require('../parsers'); module.exports.definition = { - set: function (v) { - var valueType = parsers.valueType(v); - if (valueType === parsers.TYPES.ANGLE) { - return this._setProperty('azimuth', parsers.parseAngle(v)); - } - if (valueType === parsers.TYPES.KEYWORD) { - var keywords = v.toLowerCase().trim().split(/\s+/); - var hasBehind = false; - if (keywords.length > 2) { - return; - } - var behindIndex = keywords.indexOf('behind'); - hasBehind = (behindIndex !== -1); + set: function(v) { + var valueType = parsers.valueType(v); + if (valueType === parsers.TYPES.ANGLE) { + return this._setProperty('azimuth', parsers.parseAngle(v)); + } + if (valueType === parsers.TYPES.KEYWORD) { + var keywords = v + .toLowerCase() + .trim() + .split(/\s+/); + var hasBehind = false; + if (keywords.length > 2) { + return; + } + var behindIndex = keywords.indexOf('behind'); + hasBehind = behindIndex !== -1; - if (keywords.length === 2) { - if (!hasBehind) { - return; - } - keywords.splice(behindIndex, 1); - } - if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') { - if (hasBehind) { - return; - } - return this._setProperty('azimuth', keywords[0]); - } - if (keywords[0] === 'behind') { - return this._setProperty('azimuth', '180deg'); - } - var deg; - switch (keywords[0]) { - case 'left-side': - return this._setProperty('azimuth', '270deg'); - case 'far-left': - return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg'); - case 'left': - return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg'); - case 'center-left': - return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg'); - case 'center': - return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg'); - case 'center-right': - return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg'); - case 'right': - return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg'); - case 'far-right': - return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg'); - case 'right-side': - return this._setProperty('azimuth', '90deg'); - default: - return; - } + if (keywords.length === 2) { + if (!hasBehind) { + return; } - }, - get: function () { - return this.getPropertyValue('azimuth'); - }, - enumerable: true, - configurable: true + keywords.splice(behindIndex, 1); + } + if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') { + if (hasBehind) { + return; + } + return this._setProperty('azimuth', keywords[0]); + } + if (keywords[0] === 'behind') { + return this._setProperty('azimuth', '180deg'); + } + switch (keywords[0]) { + case 'left-side': + return this._setProperty('azimuth', '270deg'); + case 'far-left': + return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg'); + case 'left': + return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg'); + case 'center-left': + return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg'); + case 'center': + return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg'); + case 'center-right': + return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg'); + case 'right': + return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg'); + case 'far-right': + return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg'); + case 'right-side': + return this._setProperty('azimuth', '90deg'); + default: + return; + } + } + }, + get: function() { + return this.getPropertyValue('azimuth'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/background.js b/node_modules/cssstyle/lib/properties/background.js index 3f62c27..b843e0c 100644 --- a/node_modules/cssstyle/lib/properties/background.js +++ b/node_modules/cssstyle/lib/properties/background.js @@ -1,24 +1,19 @@ 'use strict'; -var shorthandParser = require('../parsers').shorthandParser; var shorthandSetter = require('../parsers').shorthandSetter; var shorthandGetter = require('../parsers').shorthandGetter; var shorthand_for = { - 'background-color': require('./backgroundColor'), - 'background-image': require('./backgroundImage'), - 'background-repeat': require('./backgroundRepeat'), - 'background-attachment': require('./backgroundAttachment'), - 'background-position': require('./backgroundPosition') -}; - -module.exports.isValid = function isValid(v) { - return shorthandParser(v, shorthand_for) !== undefined; + 'background-color': require('./backgroundColor'), + 'background-image': require('./backgroundImage'), + 'background-repeat': require('./backgroundRepeat'), + 'background-attachment': require('./backgroundAttachment'), + 'background-position': require('./backgroundPosition'), }; module.exports.definition = { - set: shorthandSetter('background', shorthand_for), - get: shorthandGetter('background', shorthand_for), - enumerable: true, - configurable: true + set: shorthandSetter('background', shorthand_for), + get: shorthandGetter('background', shorthand_for), + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/backgroundAttachment.js b/node_modules/cssstyle/lib/properties/backgroundAttachment.js index 3bcb1f1..98c8f76 100644 --- a/node_modules/cssstyle/lib/properties/backgroundAttachment.js +++ b/node_modules/cssstyle/lib/properties/backgroundAttachment.js @@ -2,21 +2,23 @@ var parsers = require('../parsers'); -var isValid = module.exports.isValid = function isValid(v) { - return parsers.valueType(v) === parsers.TYPES.KEYWORD && - (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit'); -}; +var isValid = (module.exports.isValid = function isValid(v) { + return ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit') + ); +}); module.exports.definition = { - set: function (v) { - if (!isValid(v)) { - return; - } - this._setProperty('background-attachment', v); - }, - get: function () { - return this.getPropertyValue('background-attachment'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (!isValid(v)) { + return; + } + this._setProperty('background-attachment', v); + }, + get: function() { + return this.getPropertyValue('background-attachment'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/backgroundClip.js b/node_modules/cssstyle/lib/properties/backgroundClip.js deleted file mode 100644 index e7a1557..0000000 --- a/node_modules/cssstyle/lib/properties/backgroundClip.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('background-clip', v); - }, - get: function () { - return this.getPropertyValue('background-clip'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/backgroundColor.js b/node_modules/cssstyle/lib/properties/backgroundColor.js index 994975a..5cee717 100644 --- a/node_modules/cssstyle/lib/properties/backgroundColor.js +++ b/node_modules/cssstyle/lib/properties/backgroundColor.js @@ -3,31 +3,34 @@ var parsers = require('../parsers'); var parse = function parse(v) { - var parsed = parsers.parseColor(v); - if (parsed !== undefined) { - return parsed; - } - if (parsers.valueType(v) === parsers.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) { - return v; - } - return undefined; + var parsed = parsers.parseColor(v); + if (parsed !== undefined) { + return parsed; + } + if ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit') + ) { + return v; + } + return undefined; }; module.exports.isValid = function isValid(v) { - return parse(v) !== undefined; + return parse(v) !== undefined; }; module.exports.definition = { - set: function (v) { - var parsed = parse(v); - if (parsed === undefined) { - return; - } - this._setProperty('background-color', parsed); - }, - get: function () { - return this.getPropertyValue('background-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + var parsed = parse(v); + if (parsed === undefined) { + return; + } + this._setProperty('background-color', parsed); + }, + get: function() { + return this.getPropertyValue('background-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/backgroundImage.js b/node_modules/cssstyle/lib/properties/backgroundImage.js index 5bb79f9..b6479a1 100644 --- a/node_modules/cssstyle/lib/properties/backgroundImage.js +++ b/node_modules/cssstyle/lib/properties/backgroundImage.js @@ -3,27 +3,30 @@ var parsers = require('../parsers'); var parse = function parse(v) { - var parsed = parsers.parseUrl(v); - if (parsed !== undefined) { - return parsed; - } - if (parsers.valueType(v) === parsers.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) { - return v; - } - return undefined; + var parsed = parsers.parseUrl(v); + if (parsed !== undefined) { + return parsed; + } + if ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit') + ) { + return v; + } + return undefined; }; module.exports.isValid = function isValid(v) { - return parse(v) !== undefined; + return parse(v) !== undefined; }; module.exports.definition = { - set: function (v) { - this._setProperty('background-image', parse(v)); - }, - get: function () { - return this.getPropertyValue('background-image'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('background-image', parse(v)); + }, + get: function() { + return this.getPropertyValue('background-image'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/backgroundOrigin.js b/node_modules/cssstyle/lib/properties/backgroundOrigin.js deleted file mode 100644 index 79bfdc2..0000000 --- a/node_modules/cssstyle/lib/properties/backgroundOrigin.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('background-origin', v); - }, - get: function () { - return this.getPropertyValue('background-origin'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/backgroundPosition.js b/node_modules/cssstyle/lib/properties/backgroundPosition.js index b4c78d7..4405fe6 100644 --- a/node_modules/cssstyle/lib/properties/backgroundPosition.js +++ b/node_modules/cssstyle/lib/properties/backgroundPosition.js @@ -5,52 +5,54 @@ var parsers = require('../parsers'); var valid_keywords = ['top', 'center', 'bottom', 'left', 'right']; var parse = function parse(v) { - if (v === '' || v === null) { - return undefined; + if (v === '' || v === null) { + return undefined; + } + var parts = v.split(/\s+/); + if (parts.length > 2 || parts.length < 1) { + return undefined; + } + var types = []; + parts.forEach(function(part, index) { + types[index] = parsers.valueType(part); + }); + if (parts.length === 1) { + if (types[0] === parsers.TYPES.LENGTH || types[0] === parsers.TYPES.PERCENT) { + return v; } - var parts = v.split(/\s+/); - if (parts.length > 2 || parts.length < 1) { - return undefined; - } - var types = []; - parts.forEach(function (part, index) { - types[index] = parsers.valueType(part); - }); - if (parts.length === 1) { - if (types[0] === parsers.TYPES.LENGTH || types[0] === parsers.TYPES.PERCENT) { - return v; - } - if (types[0] === parsers.TYPES.KEYWORD) { - if (valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') { - return v; - } - } - return undefined; - } - if ((types[0] === parsers.TYPES.LENGTH || types[0] === parsers.TYPES.PERCENT) && - (types[1] === parsers.TYPES.LENGTH || types[1] === parsers.TYPES.PERCENT)) { - return v; - } - if (types[0] !== parsers.TYPES.KEYWORD || types[1] !== parsers.TYPES.KEYWORD) { - return undefined; - } - if (valid_keywords.indexOf(parts[0]) !== -1 && valid_keywords.indexOf(parts[1]) !== -1) { + if (types[0] === parsers.TYPES.KEYWORD) { + if (valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') { return v; + } } return undefined; + } + if ( + (types[0] === parsers.TYPES.LENGTH || types[0] === parsers.TYPES.PERCENT) && + (types[1] === parsers.TYPES.LENGTH || types[1] === parsers.TYPES.PERCENT) + ) { + return v; + } + if (types[0] !== parsers.TYPES.KEYWORD || types[1] !== parsers.TYPES.KEYWORD) { + return undefined; + } + if (valid_keywords.indexOf(parts[0]) !== -1 && valid_keywords.indexOf(parts[1]) !== -1) { + return v; + } + return undefined; }; module.exports.isValid = function isValid(v) { - return parse(v) !== undefined; + return parse(v) !== undefined; }; module.exports.definition = { - set: function (v) { - this._setProperty('background-position', parse(v)); - }, - get: function () { - return this.getPropertyValue('background-position'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('background-position', parse(v)); + }, + get: function() { + return this.getPropertyValue('background-position'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/backgroundPositionX.js b/node_modules/cssstyle/lib/properties/backgroundPositionX.js deleted file mode 100644 index 8f0f7f0..0000000 --- a/node_modules/cssstyle/lib/properties/backgroundPositionX.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('background-position-x', v); - }, - get: function () { - return this.getPropertyValue('background-position-x'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/backgroundPositionY.js b/node_modules/cssstyle/lib/properties/backgroundPositionY.js deleted file mode 100644 index 3981d37..0000000 --- a/node_modules/cssstyle/lib/properties/backgroundPositionY.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('background-position-y', v); - }, - get: function () { - return this.getPropertyValue('background-position-y'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/backgroundRepeat.js b/node_modules/cssstyle/lib/properties/backgroundRepeat.js index 765a06d..379ade0 100644 --- a/node_modules/cssstyle/lib/properties/backgroundRepeat.js +++ b/node_modules/cssstyle/lib/properties/backgroundRepeat.js @@ -3,23 +3,30 @@ var parsers = require('../parsers'); var parse = function parse(v) { - if (parsers.valueType(v) === parsers.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) { - return v; - } - return undefined; + if ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'repeat' || + v.toLowerCase() === 'repeat-x' || + v.toLowerCase() === 'repeat-y' || + v.toLowerCase() === 'no-repeat' || + v.toLowerCase() === 'inherit') + ) { + return v; + } + return undefined; }; module.exports.isValid = function isValid(v) { - return parse(v) !== undefined; + return parse(v) !== undefined; }; module.exports.definition = { - set: function (v) { - this._setProperty('background-repeat', parse(v)); - }, - get: function () { - return this.getPropertyValue('background-repeat'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('background-repeat', parse(v)); + }, + get: function() { + return this.getPropertyValue('background-repeat'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/backgroundRepeatX.js b/node_modules/cssstyle/lib/properties/backgroundRepeatX.js deleted file mode 100644 index ddc0fc8..0000000 --- a/node_modules/cssstyle/lib/properties/backgroundRepeatX.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('background-repeat-x', v); - }, - get: function () { - return this.getPropertyValue('background-repeat-x'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/backgroundRepeatY.js b/node_modules/cssstyle/lib/properties/backgroundRepeatY.js deleted file mode 100644 index 583e0d7..0000000 --- a/node_modules/cssstyle/lib/properties/backgroundRepeatY.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('background-repeat-y', v); - }, - get: function () { - return this.getPropertyValue('background-repeat-y'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/backgroundSize.js b/node_modules/cssstyle/lib/properties/backgroundSize.js deleted file mode 100644 index c4b4af2..0000000 --- a/node_modules/cssstyle/lib/properties/backgroundSize.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('background-size', v); - }, - get: function () { - return this.getPropertyValue('background-size'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/baselineShift.js b/node_modules/cssstyle/lib/properties/baselineShift.js deleted file mode 100644 index a52252c..0000000 --- a/node_modules/cssstyle/lib/properties/baselineShift.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('baseline-shift', v); - }, - get: function () { - return this.getPropertyValue('baseline-shift'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/border.js b/node_modules/cssstyle/lib/properties/border.js index 8cf97f6..bf5b5d6 100644 --- a/node_modules/cssstyle/lib/properties/border.js +++ b/node_modules/cssstyle/lib/properties/border.js @@ -1,49 +1,33 @@ 'use strict'; -var shorthandParser = require('../parsers').shorthandParser; var shorthandSetter = require('../parsers').shorthandSetter; var shorthandGetter = require('../parsers').shorthandGetter; var shorthand_for = { - 'border-width': require('./borderWidth'), - 'border-style': require('./borderStyle'), - 'border-color': require('./borderColor') -}; - -var isValid = function isValid(v) { - return shorthandParser(v, shorthand_for) !== undefined; -}; -module.exports.isValid = isValid; - -var parser = function (v) { - if (v.toString().toLowerCase() === 'none') { - v = ''; - } - if (isValid(v)) { - return v; - } - return undefined; + 'border-width': require('./borderWidth'), + 'border-style': require('./borderStyle'), + 'border-color': require('./borderColor'), }; var myShorthandSetter = shorthandSetter('border', shorthand_for); var myShorthandGetter = shorthandGetter('border', shorthand_for); module.exports.definition = { - set: function (v) { - if (v.toString().toLowerCase() === 'none') { - v = ''; - } - myShorthandSetter.call(this, v); - this.removeProperty('border-top'); - this.removeProperty('border-left'); - this.removeProperty('border-right'); - this.removeProperty('border-bottom'); - this._values['border-top'] = this._values.border; - this._values['border-left'] = this._values.border; - this._values['border-right'] = this._values.border; - this._values['border-bottom'] = this._values.border; - }, - get: myShorthandGetter, - enumerable: true, - configurable: true + set: function(v) { + if (v.toString().toLowerCase() === 'none') { + v = ''; + } + myShorthandSetter.call(this, v); + this.removeProperty('border-top'); + this.removeProperty('border-left'); + this.removeProperty('border-right'); + this.removeProperty('border-bottom'); + this._values['border-top'] = this._values.border; + this._values['border-left'] = this._values.border; + this._values['border-right'] = this._values.border; + this._values['border-bottom'] = this._values.border; + }, + get: myShorthandGetter, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderBottom.js b/node_modules/cssstyle/lib/properties/borderBottom.js index bc01dd3..aae2e5f 100644 --- a/node_modules/cssstyle/lib/properties/borderBottom.js +++ b/node_modules/cssstyle/lib/properties/borderBottom.js @@ -2,22 +2,16 @@ var shorthandSetter = require('../parsers').shorthandSetter; var shorthandGetter = require('../parsers').shorthandGetter; -var shorthandParser = require('../parsers').shorthandParser; var shorthand_for = { - 'border-bottom-width': require('./borderBottomWidth'), - 'border-bottom-style': require('./borderBottomStyle'), - 'border-bottom-color': require('./borderBottomColor') + 'border-bottom-width': require('./borderBottomWidth'), + 'border-bottom-style': require('./borderBottomStyle'), + 'border-bottom-color': require('./borderBottomColor'), }; -var isValid = function isValid(v) { - return shorthandParser(v, shorthand_for) !== undefined; -}; -module.exports.isValid = isValid; - module.exports.definition = { - set: shorthandSetter('border-bottom', shorthand_for), - get: shorthandGetter('border-bottom', shorthand_for), - enumerable: true, - configurable: true + set: shorthandSetter('border-bottom', shorthand_for), + get: shorthandGetter('border-bottom', shorthand_for), + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderBottomColor.js b/node_modules/cssstyle/lib/properties/borderBottomColor.js index f7581bb..da5a4b5 100644 --- a/node_modules/cssstyle/lib/properties/borderBottomColor.js +++ b/node_modules/cssstyle/lib/properties/borderBottomColor.js @@ -1,16 +1,16 @@ 'use strict'; -var isValid = module.exports.isValid = require('./borderColor').isValid; +var isValid = (module.exports.isValid = require('./borderColor').isValid); module.exports.definition = { - set: function (v) { - if (isValid(v)) { - this._setProperty('border-bottom-color', v); - } - }, - get: function () { - return this.getPropertyValue('border-bottom-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + this._setProperty('border-bottom-color', v); + } + }, + get: function() { + return this.getPropertyValue('border-bottom-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderBottomLeftRadius.js b/node_modules/cssstyle/lib/properties/borderBottomLeftRadius.js deleted file mode 100644 index 0d340b7..0000000 --- a/node_modules/cssstyle/lib/properties/borderBottomLeftRadius.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-bottom-left-radius', v); - }, - get: function () { - return this.getPropertyValue('border-bottom-left-radius'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderBottomRightRadius.js b/node_modules/cssstyle/lib/properties/borderBottomRightRadius.js deleted file mode 100644 index a63bffd..0000000 --- a/node_modules/cssstyle/lib/properties/borderBottomRightRadius.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-bottom-right-radius', v); - }, - get: function () { - return this.getPropertyValue('border-bottom-right-radius'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderBottomStyle.js b/node_modules/cssstyle/lib/properties/borderBottomStyle.js index 59c8e93..35c44f0 100644 --- a/node_modules/cssstyle/lib/properties/borderBottomStyle.js +++ b/node_modules/cssstyle/lib/properties/borderBottomStyle.js @@ -4,18 +4,18 @@ var isValid = require('./borderStyle').isValid; module.exports.isValid = isValid; module.exports.definition = { - set: function (v) { - if (isValid(v)) { - if (v.toLowerCase() === 'none') { - v = ''; - this.removeProperty('border-bottom-width'); - } - this._setProperty('border-bottom-style', v); - } - }, - get: function () { - return this.getPropertyValue('border-bottom-style'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-bottom-width'); + } + this._setProperty('border-bottom-style', v); + } + }, + get: function() { + return this.getPropertyValue('border-bottom-style'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderBottomWidth.js b/node_modules/cssstyle/lib/properties/borderBottomWidth.js index f03bd6f..db2e3b8 100644 --- a/node_modules/cssstyle/lib/properties/borderBottomWidth.js +++ b/node_modules/cssstyle/lib/properties/borderBottomWidth.js @@ -1,16 +1,16 @@ 'use strict'; -var isValid = module.exports.isValid = require('./borderWidth').isValid; +var isValid = (module.exports.isValid = require('./borderWidth').isValid); module.exports.definition = { - set: function (v) { - if (isValid(v)) { - this._setProperty('border-bottom-width', v); - } - }, - get: function () { - return this.getPropertyValue('border-bottom-width'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + this._setProperty('border-bottom-width', v); + } + }, + get: function() { + return this.getPropertyValue('border-bottom-width'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderCollapse.js b/node_modules/cssstyle/lib/properties/borderCollapse.js index 9df8b42..49bdeb0 100644 --- a/node_modules/cssstyle/lib/properties/borderCollapse.js +++ b/node_modules/cssstyle/lib/properties/borderCollapse.js @@ -3,23 +3,24 @@ var parsers = require('../parsers'); var parse = function parse(v) { - if (parsers.valueType(v) === parsers.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) { - return v; - } - return undefined; -}; - -module.exports.isValid = function isValid(v) { - return parse(v) !== undefined; + if ( + parsers.valueType(v) === parsers.TYPES.KEYWORD && + (v.toLowerCase() === 'collapse' || + v.toLowerCase() === 'separate' || + v.toLowerCase() === 'inherit') + ) { + return v; + } + return undefined; }; module.exports.definition = { - set: function (v) { - this._setProperty('border-collapse', parse(v)); - }, - get: function () { - return this.getPropertyValue('border-collapse'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('border-collapse', parse(v)); + }, + get: function() { + return this.getPropertyValue('border-collapse'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderColor.js b/node_modules/cssstyle/lib/properties/borderColor.js index a3c7a45..6605e07 100644 --- a/node_modules/cssstyle/lib/properties/borderColor.js +++ b/node_modules/cssstyle/lib/properties/borderColor.js @@ -4,25 +4,27 @@ var parsers = require('../parsers'); var implicitSetter = require('../parsers').implicitSetter; module.exports.isValid = function parse(v) { - if (typeof v !== 'string') { - return false; - } - return (v === '' || v.toLowerCase() === 'transparent' || parsers.valueType(v) === parsers.TYPES.COLOR); + if (typeof v !== 'string') { + return false; + } + return ( + v === '' || v.toLowerCase() === 'transparent' || parsers.valueType(v) === parsers.TYPES.COLOR + ); }; var isValid = module.exports.isValid; -var parser = function (v) { - if (isValid(v)) { - return v.toLowerCase(); - } - return undefined; +var parser = function(v) { + if (isValid(v)) { + return v.toLowerCase(); + } + return undefined; }; module.exports.definition = { - set: implicitSetter('border', 'color', isValid, parser), - get: function () { - return this.getPropertyValue('border-color'); - }, - enumerable: true, - configurable: true + set: implicitSetter('border', 'color', isValid, parser), + get: function() { + return this.getPropertyValue('border-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderImage.js b/node_modules/cssstyle/lib/properties/borderImage.js deleted file mode 100644 index 6cbc016..0000000 --- a/node_modules/cssstyle/lib/properties/borderImage.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-image', v); - }, - get: function () { - return this.getPropertyValue('border-image'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderImageOutset.js b/node_modules/cssstyle/lib/properties/borderImageOutset.js deleted file mode 100644 index 4df8fca..0000000 --- a/node_modules/cssstyle/lib/properties/borderImageOutset.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-image-outset', v); - }, - get: function () { - return this.getPropertyValue('border-image-outset'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderImageRepeat.js b/node_modules/cssstyle/lib/properties/borderImageRepeat.js deleted file mode 100644 index 0752d86..0000000 --- a/node_modules/cssstyle/lib/properties/borderImageRepeat.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-image-repeat', v); - }, - get: function () { - return this.getPropertyValue('border-image-repeat'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderImageSlice.js b/node_modules/cssstyle/lib/properties/borderImageSlice.js deleted file mode 100644 index 8429007..0000000 --- a/node_modules/cssstyle/lib/properties/borderImageSlice.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-image-slice', v); - }, - get: function () { - return this.getPropertyValue('border-image-slice'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderImageSource.js b/node_modules/cssstyle/lib/properties/borderImageSource.js deleted file mode 100644 index 9f6228b..0000000 --- a/node_modules/cssstyle/lib/properties/borderImageSource.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-image-source', v); - }, - get: function () { - return this.getPropertyValue('border-image-source'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderImageWidth.js b/node_modules/cssstyle/lib/properties/borderImageWidth.js deleted file mode 100644 index 492fe73..0000000 --- a/node_modules/cssstyle/lib/properties/borderImageWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-image-width', v); - }, - get: function () { - return this.getPropertyValue('border-image-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderLeft.js b/node_modules/cssstyle/lib/properties/borderLeft.js index 7f54157..a05945e 100644 --- a/node_modules/cssstyle/lib/properties/borderLeft.js +++ b/node_modules/cssstyle/lib/properties/borderLeft.js @@ -2,22 +2,16 @@ var shorthandSetter = require('../parsers').shorthandSetter; var shorthandGetter = require('../parsers').shorthandGetter; -var shorthandParser = require('../parsers').shorthandParser; var shorthand_for = { - 'border-left-width': require('./borderLeftWidth'), - 'border-left-style': require('./borderLeftStyle'), - 'border-left-color': require('./borderLeftColor') + 'border-left-width': require('./borderLeftWidth'), + 'border-left-style': require('./borderLeftStyle'), + 'border-left-color': require('./borderLeftColor'), }; -var isValid = function isValid(v) { - return shorthandParser(v, shorthand_for) !== undefined; -}; -module.exports.isValid = isValid; - module.exports.definition = { - set: shorthandSetter('border-left', shorthand_for), - get: shorthandGetter('border-left', shorthand_for), - enumerable: true, - configurable: true + set: shorthandSetter('border-left', shorthand_for), + get: shorthandGetter('border-left', shorthand_for), + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderLeftColor.js b/node_modules/cssstyle/lib/properties/borderLeftColor.js index e28e531..eb3f273 100644 --- a/node_modules/cssstyle/lib/properties/borderLeftColor.js +++ b/node_modules/cssstyle/lib/properties/borderLeftColor.js @@ -1,16 +1,16 @@ 'use strict'; -var isValid = module.exports.isValid = require('./borderColor').isValid; +var isValid = (module.exports.isValid = require('./borderColor').isValid); module.exports.definition = { - set: function (v) { - if (isValid(v)) { - this._setProperty('border-left-color', v); - } - }, - get: function () { - return this.getPropertyValue('border-left-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + this._setProperty('border-left-color', v); + } + }, + get: function() { + return this.getPropertyValue('border-left-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderLeftStyle.js b/node_modules/cssstyle/lib/properties/borderLeftStyle.js index 402823a..5e8a113 100644 --- a/node_modules/cssstyle/lib/properties/borderLeftStyle.js +++ b/node_modules/cssstyle/lib/properties/borderLeftStyle.js @@ -4,18 +4,18 @@ var isValid = require('./borderStyle').isValid; module.exports.isValid = isValid; module.exports.definition = { - set: function (v) { - if (isValid(v)) { - if (v.toLowerCase() === 'none') { - v = ''; - this.removeProperty('border-left-width'); - } - this._setProperty('border-left-style', v); - } - }, - get: function () { - return this.getPropertyValue('border-left-style'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-left-width'); + } + this._setProperty('border-left-style', v); + } + }, + get: function() { + return this.getPropertyValue('border-left-style'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderLeftWidth.js b/node_modules/cssstyle/lib/properties/borderLeftWidth.js index e0e76e3..8c680b1 100644 --- a/node_modules/cssstyle/lib/properties/borderLeftWidth.js +++ b/node_modules/cssstyle/lib/properties/borderLeftWidth.js @@ -1,16 +1,16 @@ 'use strict'; -var isValid = module.exports.isValid = require('./borderWidth').isValid; +var isValid = (module.exports.isValid = require('./borderWidth').isValid); module.exports.definition = { - set: function (v) { - if (isValid(v)) { - this._setProperty('border-left-width', v); - } - }, - get: function () { - return this.getPropertyValue('border-left-width'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + this._setProperty('border-left-width', v); + } + }, + get: function() { + return this.getPropertyValue('border-left-width'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderRadius.js b/node_modules/cssstyle/lib/properties/borderRadius.js deleted file mode 100644 index 9b85c9e..0000000 --- a/node_modules/cssstyle/lib/properties/borderRadius.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-radius', v); - }, - get: function () { - return this.getPropertyValue('border-radius'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderRight.js b/node_modules/cssstyle/lib/properties/borderRight.js index bfe1a78..17e26df 100644 --- a/node_modules/cssstyle/lib/properties/borderRight.js +++ b/node_modules/cssstyle/lib/properties/borderRight.js @@ -2,22 +2,16 @@ var shorthandSetter = require('../parsers').shorthandSetter; var shorthandGetter = require('../parsers').shorthandGetter; -var shorthandParser = require('../parsers').shorthandParser; var shorthand_for = { - 'border-right-width': require('./borderRightWidth'), - 'border-right-style': require('./borderRightStyle'), - 'border-right-color': require('./borderRightColor') + 'border-right-width': require('./borderRightWidth'), + 'border-right-style': require('./borderRightStyle'), + 'border-right-color': require('./borderRightColor'), }; -var isValid = function isValid(v) { - return shorthandParser(v, shorthand_for) !== undefined; -}; -module.exports.isValid = isValid; - module.exports.definition = { - set: shorthandSetter('border-right', shorthand_for), - get: shorthandGetter('border-right', shorthand_for), - enumerable: true, - configurable: true + set: shorthandSetter('border-right', shorthand_for), + get: shorthandGetter('border-right', shorthand_for), + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderRightColor.js b/node_modules/cssstyle/lib/properties/borderRightColor.js index fe9e512..7c188f2 100644 --- a/node_modules/cssstyle/lib/properties/borderRightColor.js +++ b/node_modules/cssstyle/lib/properties/borderRightColor.js @@ -1,16 +1,16 @@ 'use strict'; -var isValid = module.exports.isValid = require('./borderColor').isValid; +var isValid = (module.exports.isValid = require('./borderColor').isValid); module.exports.definition = { - set: function (v) { - if (isValid(v)) { - this._setProperty('border-right-color', v); - } - }, - get: function () { - return this.getPropertyValue('border-right-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + this._setProperty('border-right-color', v); + } + }, + get: function() { + return this.getPropertyValue('border-right-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderRightStyle.js b/node_modules/cssstyle/lib/properties/borderRightStyle.js index 7b794a2..68e8209 100644 --- a/node_modules/cssstyle/lib/properties/borderRightStyle.js +++ b/node_modules/cssstyle/lib/properties/borderRightStyle.js @@ -4,18 +4,18 @@ var isValid = require('./borderStyle').isValid; module.exports.isValid = isValid; module.exports.definition = { - set: function (v) { - if (isValid(v)) { - if (v.toLowerCase() === 'none') { - v = ''; - this.removeProperty('border-right-width'); - } - this._setProperty('border-right-style', v); - } - }, - get: function () { - return this.getPropertyValue('border-right-style'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-right-width'); + } + this._setProperty('border-right-style', v); + } + }, + get: function() { + return this.getPropertyValue('border-right-style'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderRightWidth.js b/node_modules/cssstyle/lib/properties/borderRightWidth.js index a9fe7dc..d1090d7 100644 --- a/node_modules/cssstyle/lib/properties/borderRightWidth.js +++ b/node_modules/cssstyle/lib/properties/borderRightWidth.js @@ -1,16 +1,16 @@ 'use strict'; -var isValid = module.exports.isValid = require('./borderWidth').isValid; +var isValid = (module.exports.isValid = require('./borderWidth').isValid); module.exports.definition = { - set: function (v) { - if (isValid(v)) { - this._setProperty('border-right-width', v); - } - }, - get: function () { - return this.getPropertyValue('border-right-width'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + this._setProperty('border-right-width', v); + } + }, + get: function() { + return this.getPropertyValue('border-right-width'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderSpacing.js b/node_modules/cssstyle/lib/properties/borderSpacing.js index 7979bd2..ff1ce88 100644 --- a/node_modules/cssstyle/lib/properties/borderSpacing.js +++ b/node_modules/cssstyle/lib/properties/borderSpacing.js @@ -7,36 +7,35 @@ var parsers = require('../parsers'); // if two, the first applies to the horizontal and the second applies to vertical spacing var parse = function parse(v) { - if (v === '' || v === null) { - return undefined; - } - if (v.toLowerCase() === 'inherit') { - return v; - } - var parts = v.split(/\s+/); - if (parts.length !== 1 && parts.length !== 2) { - return undefined; - } - parts.forEach(function (part) { - if (parsers.valueType(part) !== parsers.TYPES.LENGTH) { - return undefined; - } - }); - + if (v === '' || v === null) { + return undefined; + } + if (v === 0) { + return '0px'; + } + if (v.toLowerCase() === 'inherit') { return v; -}; + } + var parts = v.split(/\s+/); + if (parts.length !== 1 && parts.length !== 2) { + return undefined; + } + parts.forEach(function(part) { + if (parsers.valueType(part) !== parsers.TYPES.LENGTH) { + return undefined; + } + }); -module.exports.isValid = function isValid(v) { - return parse(v) !== undefined; + return v; }; module.exports.definition = { - set: function (v) { - this._setProperty('border-spacing', parse(v)); - }, - get: function () { - return this.getPropertyValue('border-spacing'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('border-spacing', parse(v)); + }, + get: function() { + return this.getPropertyValue('border-spacing'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderStyle.js b/node_modules/cssstyle/lib/properties/borderStyle.js index 6f79f43..6e3e674 100644 --- a/node_modules/cssstyle/lib/properties/borderStyle.js +++ b/node_modules/cssstyle/lib/properties/borderStyle.js @@ -3,25 +3,36 @@ var implicitSetter = require('../parsers').implicitSetter; // the valid border-styles: -var styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset']; +var styles = [ + 'none', + 'hidden', + 'dotted', + 'dashed', + 'solid', + 'double', + 'groove', + 'ridge', + 'inset', + 'outset', +]; module.exports.isValid = function parse(v) { - return typeof v === 'string' && (v === '' || styles.indexOf(v) !== -1); + return typeof v === 'string' && (v === '' || styles.indexOf(v) !== -1); }; var isValid = module.exports.isValid; -var parser = function (v) { - if (isValid(v)) { - return v.toLowerCase(); - } - return undefined; +var parser = function(v) { + if (isValid(v)) { + return v.toLowerCase(); + } + return undefined; }; module.exports.definition = { - set: implicitSetter('border', 'style', isValid, parser), - get: function () { - return this.getPropertyValue('border-style'); - }, - enumerable: true, - configurable: true + set: implicitSetter('border', 'style', isValid, parser), + get: function() { + return this.getPropertyValue('border-style'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderTop.js b/node_modules/cssstyle/lib/properties/borderTop.js index 98480e7..c56d592 100644 --- a/node_modules/cssstyle/lib/properties/borderTop.js +++ b/node_modules/cssstyle/lib/properties/borderTop.js @@ -2,21 +2,16 @@ var shorthandSetter = require('../parsers').shorthandSetter; var shorthandGetter = require('../parsers').shorthandGetter; -var shorthandParser = require('../parsers').shorthandParser; var shorthand_for = { - 'border-top-width': require('./borderTopWidth'), - 'border-top-style': require('./borderTopStyle'), - 'border-top-color': require('./borderTopColor') -}; - -module.exports.isValid = function (v) { - return shorthandParser(v, shorthand_for) !== undefined; + 'border-top-width': require('./borderTopWidth'), + 'border-top-style': require('./borderTopStyle'), + 'border-top-color': require('./borderTopColor'), }; module.exports.definition = { - set: shorthandSetter('border-top', shorthand_for), - get: shorthandGetter('border-top', shorthand_for), - enumerable: true, - configurable: true + set: shorthandSetter('border-top', shorthand_for), + get: shorthandGetter('border-top', shorthand_for), + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderTopColor.js b/node_modules/cssstyle/lib/properties/borderTopColor.js index 60857df..cc35392 100644 --- a/node_modules/cssstyle/lib/properties/borderTopColor.js +++ b/node_modules/cssstyle/lib/properties/borderTopColor.js @@ -1,16 +1,16 @@ 'use strict'; -var isValid = module.exports.isValid = require('./borderColor').isValid; +var isValid = (module.exports.isValid = require('./borderColor').isValid); module.exports.definition = { - set: function (v) { - if (isValid(v)) { - this._setProperty('border-top-color', v); - } - }, - get: function () { - return this.getPropertyValue('border-top-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + this._setProperty('border-top-color', v); + } + }, + get: function() { + return this.getPropertyValue('border-top-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderTopLeftRadius.js b/node_modules/cssstyle/lib/properties/borderTopLeftRadius.js deleted file mode 100644 index 36c5ba1..0000000 --- a/node_modules/cssstyle/lib/properties/borderTopLeftRadius.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-top-left-radius', v); - }, - get: function () { - return this.getPropertyValue('border-top-left-radius'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderTopRightRadius.js b/node_modules/cssstyle/lib/properties/borderTopRightRadius.js deleted file mode 100644 index 43a6bba..0000000 --- a/node_modules/cssstyle/lib/properties/borderTopRightRadius.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('border-top-right-radius', v); - }, - get: function () { - return this.getPropertyValue('border-top-right-radius'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/borderTopStyle.js b/node_modules/cssstyle/lib/properties/borderTopStyle.js index a593161..938ea40 100644 --- a/node_modules/cssstyle/lib/properties/borderTopStyle.js +++ b/node_modules/cssstyle/lib/properties/borderTopStyle.js @@ -4,18 +4,18 @@ var isValid = require('./borderStyle').isValid; module.exports.isValid = isValid; module.exports.definition = { - set: function (v) { - if (isValid(v)) { - if (v.toLowerCase() === 'none') { - v = ''; - this.removeProperty('border-top-width'); - } - this._setProperty('border-top-style', v); - } - }, - get: function () { - return this.getPropertyValue('border-top-style'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + if (v.toLowerCase() === 'none') { + v = ''; + this.removeProperty('border-top-width'); + } + this._setProperty('border-top-style', v); + } + }, + get: function() { + return this.getPropertyValue('border-top-style'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderTopWidth.js b/node_modules/cssstyle/lib/properties/borderTopWidth.js index 49deee8..9407253 100644 --- a/node_modules/cssstyle/lib/properties/borderTopWidth.js +++ b/node_modules/cssstyle/lib/properties/borderTopWidth.js @@ -4,14 +4,14 @@ var isValid = require('./borderWidth').isValid; module.exports.isValid = isValid; module.exports.definition = { - set: function (v) { - if (isValid(v)) { - this._setProperty('border-top-width', v); - } - }, - get: function () { - return this.getPropertyValue('border-top-width'); - }, - enumerable: true, - configurable: true + set: function(v) { + if (isValid(v)) { + this._setProperty('border-top-width', v); + } + }, + get: function() { + return this.getPropertyValue('border-top-width'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/borderWidth.js b/node_modules/cssstyle/lib/properties/borderWidth.js index 0bcc63b..2b6d871 100644 --- a/node_modules/cssstyle/lib/properties/borderWidth.js +++ b/node_modules/cssstyle/lib/properties/borderWidth.js @@ -1,6 +1,5 @@ 'use strict'; -var parsers = require('../parsers'); var parsers = require('../parsers'); var implicitSetter = require('../parsers').implicitSetter; @@ -8,40 +7,40 @@ var implicitSetter = require('../parsers').implicitSetter; var widths = ['thin', 'medium', 'thick']; module.exports.isValid = function parse(v) { - var length = parsers.parseLength(v); - if (length !== undefined) { - return true; - } - if (typeof v !== 'string') { - return false; - } - if (v === '') { - return true; - } - v = v.toLowerCase(); - if (widths.indexOf(v) === -1) { - return false; - } + var length = parsers.parseLength(v); + if (length !== undefined) { return true; + } + if (typeof v !== 'string') { + return false; + } + if (v === '') { + return true; + } + v = v.toLowerCase(); + if (widths.indexOf(v) === -1) { + return false; + } + return true; }; var isValid = module.exports.isValid; -var parser = function (v) { - var length = parsers.parseLength(v); - if (length !== undefined) { - return length; - } - if (isValid(v)) { - return v.toLowerCase(); - } - return undefined; +var parser = function(v) { + var length = parsers.parseLength(v); + if (length !== undefined) { + return length; + } + if (isValid(v)) { + return v.toLowerCase(); + } + return undefined; }; module.exports.definition = { - set: implicitSetter('border', 'width', isValid, parser), - get: function () { - return this.getPropertyValue('border-width'); - }, - enumerable: true, - configurable: true + set: implicitSetter('border', 'width', isValid, parser), + get: function() { + return this.getPropertyValue('border-width'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/bottom.js b/node_modules/cssstyle/lib/properties/bottom.js index c7dda96..e9d72b2 100644 --- a/node_modules/cssstyle/lib/properties/bottom.js +++ b/node_modules/cssstyle/lib/properties/bottom.js @@ -3,12 +3,12 @@ var parseMeasurement = require('../parsers').parseMeasurement; module.exports.definition = { - set: function (v) { - this._setProperty('bottom', parseMeasurement(v)); - }, - get: function () { - return this.getPropertyValue('bottom'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('bottom', parseMeasurement(v)); + }, + get: function() { + return this.getPropertyValue('bottom'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/boxShadow.js b/node_modules/cssstyle/lib/properties/boxShadow.js deleted file mode 100644 index e178451..0000000 --- a/node_modules/cssstyle/lib/properties/boxShadow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('box-shadow', v); - }, - get: function () { - return this.getPropertyValue('box-shadow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/boxSizing.js b/node_modules/cssstyle/lib/properties/boxSizing.js deleted file mode 100644 index 35c6371..0000000 --- a/node_modules/cssstyle/lib/properties/boxSizing.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('box-sizing', v); - }, - get: function () { - return this.getPropertyValue('box-sizing'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/captionSide.js b/node_modules/cssstyle/lib/properties/captionSide.js deleted file mode 100644 index c1ef22b..0000000 --- a/node_modules/cssstyle/lib/properties/captionSide.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('caption-side', v); - }, - get: function () { - return this.getPropertyValue('caption-side'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/clear.js b/node_modules/cssstyle/lib/properties/clear.js index 44070e7..22d9802 100644 --- a/node_modules/cssstyle/lib/properties/clear.js +++ b/node_modules/cssstyle/lib/properties/clear.js @@ -2,15 +2,15 @@ var parseKeyword = require('../parsers').parseKeyword; -var clear_keywords = [ 'none', 'left', 'right', 'both', 'inherit' ]; +var clear_keywords = ['none', 'left', 'right', 'both', 'inherit']; module.exports.definition = { - set: function (v) { - this._setProperty('clear', parseKeyword(v, clear_keywords)); - }, - get: function () { - return this.getPropertyValue('clear'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('clear', parseKeyword(v, clear_keywords)); + }, + get: function() { + return this.getPropertyValue('clear'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/clip.js b/node_modules/cssstyle/lib/properties/clip.js index fe8bc93..91ba675 100644 --- a/node_modules/cssstyle/lib/properties/clip.js +++ b/node_modules/cssstyle/lib/properties/clip.js @@ -2,48 +2,46 @@ var parseMeasurement = require('../parsers').parseMeasurement; -/*jslint regexp: true*/ var shape_regex = /^rect\((.*)\)$/i; -/*jslint regexp: false*/ -var parse = function (val) { - if (val === '' || val === null) { - return val; - } - if (typeof val !== 'string') { - return undefined; - } - val = val.toLowerCase(); - if (val === 'auto' || val === 'inherit') { - return val; - } - var matches = val.match(shape_regex); - if (!matches) { - return undefined; - } - var parts = matches[1].split(/\s*,\s*/); - if (parts.length !== 4) { - return undefined; - } - var valid = parts.every(function (part, index) { - var measurement = parseMeasurement(part); - parts[index] = measurement; - return measurement !== undefined; - }); - if (!valid) { - return undefined; - } - parts = parts.join(', '); - return val.replace(matches[1], parts); +var parse = function(val) { + if (val === '' || val === null) { + return val; + } + if (typeof val !== 'string') { + return undefined; + } + val = val.toLowerCase(); + if (val === 'auto' || val === 'inherit') { + return val; + } + var matches = val.match(shape_regex); + if (!matches) { + return undefined; + } + var parts = matches[1].split(/\s*,\s*/); + if (parts.length !== 4) { + return undefined; + } + var valid = parts.every(function(part, index) { + var measurement = parseMeasurement(part); + parts[index] = measurement; + return measurement !== undefined; + }); + if (!valid) { + return undefined; + } + parts = parts.join(', '); + return val.replace(matches[1], parts); }; module.exports.definition = { - set: function (v) { - this._setProperty('clip', parse(v)); - }, - get: function () { - return this.getPropertyValue('clip'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('clip', parse(v)); + }, + get: function() { + return this.getPropertyValue('clip'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/color.js b/node_modules/cssstyle/lib/properties/color.js index a709c6b..1b5ca3d 100644 --- a/node_modules/cssstyle/lib/properties/color.js +++ b/node_modules/cssstyle/lib/properties/color.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/colorInterpolation.js b/node_modules/cssstyle/lib/properties/colorInterpolation.js deleted file mode 100644 index 929f5de..0000000 --- a/node_modules/cssstyle/lib/properties/colorInterpolation.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('color-interpolation', v); - }, - get: function () { - return this.getPropertyValue('color-interpolation'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/colorInterpolationFilters.js b/node_modules/cssstyle/lib/properties/colorInterpolationFilters.js deleted file mode 100644 index 4aab1a2..0000000 --- a/node_modules/cssstyle/lib/properties/colorInterpolationFilters.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('color-interpolation-filters', v); - }, - get: function () { - return this.getPropertyValue('color-interpolation-filters'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/colorProfile.js b/node_modules/cssstyle/lib/properties/colorProfile.js deleted file mode 100644 index 1440d06..0000000 --- a/node_modules/cssstyle/lib/properties/colorProfile.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('color-profile', v); - }, - get: function () { - return this.getPropertyValue('color-profile'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/colorRendering.js b/node_modules/cssstyle/lib/properties/colorRendering.js deleted file mode 100644 index 58a4eb4..0000000 --- a/node_modules/cssstyle/lib/properties/colorRendering.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('color-rendering', v); - }, - get: function () { - return this.getPropertyValue('color-rendering'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/content.js b/node_modules/cssstyle/lib/properties/content.js deleted file mode 100644 index 68c4f43..0000000 --- a/node_modules/cssstyle/lib/properties/content.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('content', v); - }, - get: function () { - return this.getPropertyValue('content'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/counterIncrement.js b/node_modules/cssstyle/lib/properties/counterIncrement.js deleted file mode 100644 index b5b6591..0000000 --- a/node_modules/cssstyle/lib/properties/counterIncrement.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('counter-increment', v); - }, - get: function () { - return this.getPropertyValue('counter-increment'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/counterReset.js b/node_modules/cssstyle/lib/properties/counterReset.js deleted file mode 100644 index f4370f5..0000000 --- a/node_modules/cssstyle/lib/properties/counterReset.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('counter-reset', v); - }, - get: function () { - return this.getPropertyValue('counter-reset'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/cssFloat.js b/node_modules/cssstyle/lib/properties/cssFloat.js index 65b4eda..1c619cc 100644 --- a/node_modules/cssstyle/lib/properties/cssFloat.js +++ b/node_modules/cssstyle/lib/properties/cssFloat.js @@ -1,12 +1,12 @@ 'use strict'; module.exports.definition = { - set: function (v) { - this._setProperty('float', v); - }, - get: function () { - return this.getPropertyValue('float'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('float', v); + }, + get: function() { + return this.getPropertyValue('float'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/cue.js b/node_modules/cssstyle/lib/properties/cue.js deleted file mode 100644 index 59820a1..0000000 --- a/node_modules/cssstyle/lib/properties/cue.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('cue', v); - }, - get: function () { - return this.getPropertyValue('cue'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/cueAfter.js b/node_modules/cssstyle/lib/properties/cueAfter.js deleted file mode 100644 index dea8630..0000000 --- a/node_modules/cssstyle/lib/properties/cueAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('cue-after', v); - }, - get: function () { - return this.getPropertyValue('cue-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/cueBefore.js b/node_modules/cssstyle/lib/properties/cueBefore.js deleted file mode 100644 index ebdb6f2..0000000 --- a/node_modules/cssstyle/lib/properties/cueBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('cue-before', v); - }, - get: function () { - return this.getPropertyValue('cue-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/cursor.js b/node_modules/cssstyle/lib/properties/cursor.js deleted file mode 100644 index 6a16a45..0000000 --- a/node_modules/cssstyle/lib/properties/cursor.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('cursor', v); - }, - get: function () { - return this.getPropertyValue('cursor'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/direction.js b/node_modules/cssstyle/lib/properties/direction.js deleted file mode 100644 index 0bd1c33..0000000 --- a/node_modules/cssstyle/lib/properties/direction.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('direction', v); - }, - get: function () { - return this.getPropertyValue('direction'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/display.js b/node_modules/cssstyle/lib/properties/display.js deleted file mode 100644 index 1701669..0000000 --- a/node_modules/cssstyle/lib/properties/display.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('display', v); - }, - get: function () { - return this.getPropertyValue('display'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/dominantBaseline.js b/node_modules/cssstyle/lib/properties/dominantBaseline.js deleted file mode 100644 index bb43287..0000000 --- a/node_modules/cssstyle/lib/properties/dominantBaseline.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('dominant-baseline', v); - }, - get: function () { - return this.getPropertyValue('dominant-baseline'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/elevation.js b/node_modules/cssstyle/lib/properties/elevation.js deleted file mode 100644 index 4ba071a..0000000 --- a/node_modules/cssstyle/lib/properties/elevation.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('elevation', v); - }, - get: function () { - return this.getPropertyValue('elevation'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/emptyCells.js b/node_modules/cssstyle/lib/properties/emptyCells.js deleted file mode 100644 index b4dc471..0000000 --- a/node_modules/cssstyle/lib/properties/emptyCells.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('empty-cells', v); - }, - get: function () { - return this.getPropertyValue('empty-cells'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/enableBackground.js b/node_modules/cssstyle/lib/properties/enableBackground.js deleted file mode 100644 index 9572476..0000000 --- a/node_modules/cssstyle/lib/properties/enableBackground.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('enable-background', v); - }, - get: function () { - return this.getPropertyValue('enable-background'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/fill.js b/node_modules/cssstyle/lib/properties/fill.js deleted file mode 100644 index d848500..0000000 --- a/node_modules/cssstyle/lib/properties/fill.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('fill', v); - }, - get: function () { - return this.getPropertyValue('fill'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/fillOpacity.js b/node_modules/cssstyle/lib/properties/fillOpacity.js deleted file mode 100644 index abf941a..0000000 --- a/node_modules/cssstyle/lib/properties/fillOpacity.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('fill-opacity', v); - }, - get: function () { - return this.getPropertyValue('fill-opacity'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/fillRule.js b/node_modules/cssstyle/lib/properties/fillRule.js deleted file mode 100644 index 1d56429..0000000 --- a/node_modules/cssstyle/lib/properties/fillRule.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('fill-rule', v); - }, - get: function () { - return this.getPropertyValue('fill-rule'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/filter.js b/node_modules/cssstyle/lib/properties/filter.js deleted file mode 100644 index 0c602f9..0000000 --- a/node_modules/cssstyle/lib/properties/filter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('filter', v); - }, - get: function () { - return this.getPropertyValue('filter'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/flex.js b/node_modules/cssstyle/lib/properties/flex.js new file mode 100644 index 0000000..b56fd55 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/flex.js @@ -0,0 +1,45 @@ +'use strict'; + +var shorthandParser = require('../parsers').shorthandParser; +var shorthandSetter = require('../parsers').shorthandSetter; +var shorthandGetter = require('../parsers').shorthandGetter; + +var shorthand_for = { + 'flex-grow': require('./flexGrow'), + 'flex-shrink': require('./flexShrink'), + 'flex-basis': require('./flexBasis'), +}; + +var myShorthandSetter = shorthandSetter('flex', shorthand_for); + +module.exports.isValid = function isValid(v) { + return shorthandParser(v, shorthand_for) !== undefined; +}; + +module.exports.definition = { + set: function(v) { + var normalizedValue = String(v) + .trim() + .toLowerCase(); + + if (normalizedValue === 'none') { + myShorthandSetter.call(this, '0 0 auto'); + return; + } + if (normalizedValue === 'initial') { + myShorthandSetter.call(this, '0 1 auto'); + return; + } + if (normalizedValue === 'auto') { + this.removeProperty('flex-grow'); + this.removeProperty('flex-shrink'); + this.setProperty('flex-basis', normalizedValue); + return; + } + + myShorthandSetter.call(this, v); + }, + get: shorthandGetter('flex', shorthand_for), + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/flexBasis.js b/node_modules/cssstyle/lib/properties/flexBasis.js new file mode 100644 index 0000000..0c7cddf --- /dev/null +++ b/node_modules/cssstyle/lib/properties/flexBasis.js @@ -0,0 +1,28 @@ +'use strict'; + +var parseMeasurement = require('../parsers').parseMeasurement; + +function parse(v) { + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + return parseMeasurement(v); +} + +module.exports.isValid = function isValid(v) { + return parse(v) !== undefined; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('flex-basis', parse(v)); + }, + get: function() { + return this.getPropertyValue('flex-basis'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/flexGrow.js b/node_modules/cssstyle/lib/properties/flexGrow.js new file mode 100644 index 0000000..6e29663 --- /dev/null +++ b/node_modules/cssstyle/lib/properties/flexGrow.js @@ -0,0 +1,19 @@ +'use strict'; + +var parseNumber = require('../parsers').parseNumber; +var POSITION_AT_SHORTHAND = require('../constants').POSITION_AT_SHORTHAND; + +module.exports.isValid = function isValid(v, positionAtFlexShorthand) { + return parseNumber(v) !== undefined && positionAtFlexShorthand === POSITION_AT_SHORTHAND.first; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('flex-grow', parseNumber(v)); + }, + get: function() { + return this.getPropertyValue('flex-grow'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/flexShrink.js b/node_modules/cssstyle/lib/properties/flexShrink.js new file mode 100644 index 0000000..63ff86f --- /dev/null +++ b/node_modules/cssstyle/lib/properties/flexShrink.js @@ -0,0 +1,19 @@ +'use strict'; + +var parseNumber = require('../parsers').parseNumber; +var POSITION_AT_SHORTHAND = require('../constants').POSITION_AT_SHORTHAND; + +module.exports.isValid = function isValid(v, positionAtFlexShorthand) { + return parseNumber(v) !== undefined && positionAtFlexShorthand === POSITION_AT_SHORTHAND.second; +}; + +module.exports.definition = { + set: function(v) { + this._setProperty('flex-shrink', parseNumber(v)); + }, + get: function() { + return this.getPropertyValue('flex-shrink'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/float.js b/node_modules/cssstyle/lib/properties/float.js new file mode 100644 index 0000000..1c619cc --- /dev/null +++ b/node_modules/cssstyle/lib/properties/float.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports.definition = { + set: function(v) { + this._setProperty('float', v); + }, + get: function() { + return this.getPropertyValue('float'); + }, + enumerable: true, + configurable: true, +}; diff --git a/node_modules/cssstyle/lib/properties/floodColor.js b/node_modules/cssstyle/lib/properties/floodColor.js index 3a1d077..8a4f29c 100644 --- a/node_modules/cssstyle/lib/properties/floodColor.js +++ b/node_modules/cssstyle/lib/properties/floodColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('flood-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('flood-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('flood-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('flood-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/floodOpacity.js b/node_modules/cssstyle/lib/properties/floodOpacity.js deleted file mode 100644 index f4055b3..0000000 --- a/node_modules/cssstyle/lib/properties/floodOpacity.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('flood-opacity', v); - }, - get: function () { - return this.getPropertyValue('flood-opacity'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/font.js b/node_modules/cssstyle/lib/properties/font.js index 8ec869d..9492dc6 100644 --- a/node_modules/cssstyle/lib/properties/font.js +++ b/node_modules/cssstyle/lib/properties/font.js @@ -7,34 +7,37 @@ var shorthandSetter = require('../parsers').shorthandSetter; var shorthandGetter = require('../parsers').shorthandGetter; var shorthand_for = { - 'font-family': require('./fontFamily'), - 'font-size': require('./fontSize'), - 'font-style': require('./fontStyle'), - 'font-variant': require('./fontVariant'), - 'font-weight': require('./fontWeight'), - 'line-height': require('./lineHeight') + 'font-family': require('./fontFamily'), + 'font-size': require('./fontSize'), + 'font-style': require('./fontStyle'), + 'font-variant': require('./fontVariant'), + 'font-weight': require('./fontWeight'), + 'line-height': require('./lineHeight'), }; -var static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit']; - -module.exports.isValid = function isValid(v) { - return (shorthandParser(v, shorthand_for) !== undefined) || - (valueType(v) === TYPES.KEYWORD && static_fonts.indexOf(v.toLowerCase()) !== -1); -}; +var static_fonts = [ + 'caption', + 'icon', + 'menu', + 'message-box', + 'small-caption', + 'status-bar', + 'inherit', +]; var setter = shorthandSetter('font', shorthand_for); module.exports.definition = { - set: function (v) { - var short = shorthandParser(v, shorthand_for); - if (short !== undefined) { - return setter.call(this, v); - } - if (valueType(v) === TYPES.KEYWORD && static_fonts.indexOf(v.toLowerCase()) !== -1) { - this._setProperty('font', v); - } - }, - get: shorthandGetter('font', shorthand_for), - enumerable: true, - configurable: true + set: function(v) { + var short = shorthandParser(v, shorthand_for); + if (short !== undefined) { + return setter.call(this, v); + } + if (valueType(v) === TYPES.KEYWORD && static_fonts.indexOf(v.toLowerCase()) !== -1) { + this._setProperty('font', v); + } + }, + get: shorthandGetter('font', shorthand_for), + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/fontFamily.js b/node_modules/cssstyle/lib/properties/fontFamily.js index c7169c1..40bd1c1 100644 --- a/node_modules/cssstyle/lib/properties/fontFamily.js +++ b/node_modules/cssstyle/lib/properties/fontFamily.js @@ -5,29 +5,29 @@ var valueType = require('../parsers').valueType; var partsRegEx = /\s*,\s*/; module.exports.isValid = function isValid(v) { - if (v === '' || v === null) { - return true; + if (v === '' || v === null) { + return true; + } + var parts = v.split(partsRegEx); + var len = parts.length; + var i; + var type; + for (i = 0; i < len; i++) { + type = valueType(parts[i]); + if (type === TYPES.STRING || type === TYPES.KEYWORD) { + return true; } - var parts = v.split(partsRegEx); - var len = parts.length; - var i; - var type; - for (i = 0; i < len; i++) { - type = valueType(parts[i]); - if (type === TYPES.STRING || type === TYPES.KEYWORD) { - return true; - } - } - return false; + } + return false; }; module.exports.definition = { - set: function (v) { - this._setProperty('font-family', v); - }, - get: function () { - return this.getPropertyValue('font-family'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('font-family', v); + }, + get: function() { + return this.getPropertyValue('font-family'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/fontSize.js b/node_modules/cssstyle/lib/properties/fontSize.js index 0e33784..287c82a 100644 --- a/node_modules/cssstyle/lib/properties/fontSize.js +++ b/node_modules/cssstyle/lib/properties/fontSize.js @@ -6,20 +6,23 @@ var valueType = require('../parsers').valueType; var absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; var relativeSizes = ['larger', 'smaller']; -module.exports.isValid = function (v) { - var type = valueType(v.toLowerCase()); - return type === TYPES.LENGTH || type === TYPES.PERCENT || - (type === TYPES.KEYWORD && absoluteSizes.indexOf(v.toLowerCase()) !== -1) || - (type === TYPES.KEYWORD && relativeSizes.indexOf(v.toLowerCase()) !== -1); +module.exports.isValid = function(v) { + var type = valueType(v.toLowerCase()); + return ( + type === TYPES.LENGTH || + type === TYPES.PERCENT || + (type === TYPES.KEYWORD && absoluteSizes.indexOf(v.toLowerCase()) !== -1) || + (type === TYPES.KEYWORD && relativeSizes.indexOf(v.toLowerCase()) !== -1) + ); }; module.exports.definition = { - set: function (v) { - this._setProperty('font-size', v); - }, - get: function () { - return this.getPropertyValue('font-size'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('font-size', v); + }, + get: function() { + return this.getPropertyValue('font-size'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/fontSizeAdjust.js b/node_modules/cssstyle/lib/properties/fontSizeAdjust.js deleted file mode 100644 index ad8a45f..0000000 --- a/node_modules/cssstyle/lib/properties/fontSizeAdjust.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('font-size-adjust', v); - }, - get: function () { - return this.getPropertyValue('font-size-adjust'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/fontStretch.js b/node_modules/cssstyle/lib/properties/fontStretch.js deleted file mode 100644 index da486a7..0000000 --- a/node_modules/cssstyle/lib/properties/fontStretch.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('font-stretch', v); - }, - get: function () { - return this.getPropertyValue('font-stretch'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/fontStyle.js b/node_modules/cssstyle/lib/properties/fontStyle.js index d0eefbb..63d5e92 100644 --- a/node_modules/cssstyle/lib/properties/fontStyle.js +++ b/node_modules/cssstyle/lib/properties/fontStyle.js @@ -2,17 +2,17 @@ var valid_styles = ['normal', 'italic', 'oblique', 'inherit']; -module.exports.isValid = function (v) { - return valid_styles.indexOf(v.toLowerCase()) !== -1; +module.exports.isValid = function(v) { + return valid_styles.indexOf(v.toLowerCase()) !== -1; }; module.exports.definition = { - set: function (v) { - this._setProperty('font-style', v); - }, - get: function () { - return this.getPropertyValue('font-style'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('font-style', v); + }, + get: function() { + return this.getPropertyValue('font-style'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/fontVariant.js b/node_modules/cssstyle/lib/properties/fontVariant.js index 84711a4..f03b5ea 100644 --- a/node_modules/cssstyle/lib/properties/fontVariant.js +++ b/node_modules/cssstyle/lib/properties/fontVariant.js @@ -3,16 +3,16 @@ var valid_variants = ['normal', 'small-caps', 'inherit']; module.exports.isValid = function isValid(v) { - return valid_variants.indexOf(v.toLowerCase()) !== -1; + return valid_variants.indexOf(v.toLowerCase()) !== -1; }; module.exports.definition = { - set: function (v) { - this._setProperty('font-variant', v); - }, - get: function () { - return this.getPropertyValue('font-variant'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('font-variant', v); + }, + get: function() { + return this.getPropertyValue('font-variant'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/fontWeight.js b/node_modules/cssstyle/lib/properties/fontWeight.js index 7d6702d..b854f6a 100644 --- a/node_modules/cssstyle/lib/properties/fontWeight.js +++ b/node_modules/cssstyle/lib/properties/fontWeight.js @@ -1,18 +1,33 @@ 'use strict'; -var valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit']; +var valid_weights = [ + 'normal', + 'bold', + 'bolder', + 'lighter', + '100', + '200', + '300', + '400', + '500', + '600', + '700', + '800', + '900', + 'inherit', +]; module.exports.isValid = function isValid(v) { - return valid_weights.indexOf(v.toLowerCase()) !== -1; + return valid_weights.indexOf(v.toLowerCase()) !== -1; }; module.exports.definition = { - set: function (v) { - this._setProperty('font-weight', v); - }, - get: function () { - return this.getPropertyValue('font-weight'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('font-weight', v); + }, + get: function() { + return this.getPropertyValue('font-weight'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/glyphOrientationHorizontal.js b/node_modules/cssstyle/lib/properties/glyphOrientationHorizontal.js deleted file mode 100644 index fb685ef..0000000 --- a/node_modules/cssstyle/lib/properties/glyphOrientationHorizontal.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('glyph-orientation-horizontal', v); - }, - get: function () { - return this.getPropertyValue('glyph-orientation-horizontal'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/glyphOrientationVertical.js b/node_modules/cssstyle/lib/properties/glyphOrientationVertical.js deleted file mode 100644 index 8eb59d0..0000000 --- a/node_modules/cssstyle/lib/properties/glyphOrientationVertical.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('glyph-orientation-vertical', v); - }, - get: function () { - return this.getPropertyValue('glyph-orientation-vertical'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/height.js b/node_modules/cssstyle/lib/properties/height.js index dec46da..82543c0 100644 --- a/node_modules/cssstyle/lib/properties/height.js +++ b/node_modules/cssstyle/lib/properties/height.js @@ -3,22 +3,22 @@ var parseMeasurement = require('../parsers').parseMeasurement; function parse(v) { - if (String(v).toLowerCase() === 'auto') { - return 'auto'; - } - if (String(v).toLowerCase() === 'inherit') { - return 'inherit'; - } - return parseMeasurement(v); + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + return parseMeasurement(v); } module.exports.definition = { - set: function (v) { - this._setProperty('height', parse(v)); - }, - get: function () { - return this.getPropertyValue('height'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('height', parse(v)); + }, + get: function() { + return this.getPropertyValue('height'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/imageRendering.js b/node_modules/cssstyle/lib/properties/imageRendering.js deleted file mode 100644 index 4c09b3c..0000000 --- a/node_modules/cssstyle/lib/properties/imageRendering.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('image-rendering', v); - }, - get: function () { - return this.getPropertyValue('image-rendering'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/kerning.js b/node_modules/cssstyle/lib/properties/kerning.js deleted file mode 100644 index 2762746..0000000 --- a/node_modules/cssstyle/lib/properties/kerning.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('kerning', v); - }, - get: function () { - return this.getPropertyValue('kerning'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/left.js b/node_modules/cssstyle/lib/properties/left.js index 040d3ba..72bb2fa 100644 --- a/node_modules/cssstyle/lib/properties/left.js +++ b/node_modules/cssstyle/lib/properties/left.js @@ -3,12 +3,12 @@ var parseMeasurement = require('../parsers').parseMeasurement; module.exports.definition = { - set: function (v) { - this._setProperty('left', parseMeasurement(v)); - }, - get: function () { - return this.getPropertyValue('left'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('left', parseMeasurement(v)); + }, + get: function() { + return this.getPropertyValue('left'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/letterSpacing.js b/node_modules/cssstyle/lib/properties/letterSpacing.js deleted file mode 100644 index 43ffdd7..0000000 --- a/node_modules/cssstyle/lib/properties/letterSpacing.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('letter-spacing', v); - }, - get: function () { - return this.getPropertyValue('letter-spacing'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/lightingColor.js b/node_modules/cssstyle/lib/properties/lightingColor.js index 162f4b7..9f9643d 100644 --- a/node_modules/cssstyle/lib/properties/lightingColor.js +++ b/node_modules/cssstyle/lib/properties/lightingColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('lighting-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('lighting-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('lighting-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('lighting-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/lineHeight.js b/node_modules/cssstyle/lib/properties/lineHeight.js index e77a42b..6f7a037 100644 --- a/node_modules/cssstyle/lib/properties/lineHeight.js +++ b/node_modules/cssstyle/lib/properties/lineHeight.js @@ -4,18 +4,23 @@ var TYPES = require('../parsers').TYPES; var valueType = require('../parsers').valueType; module.exports.isValid = function isValid(v) { - var type = valueType(v); - return (type === TYPES.KEYWORD && (v.toLowerCase() === 'normal') || (v.toLowerCase() === 'inherit')) || - type === TYPES.NUMBER || type === TYPES.LENGTH || type === TYPES.PERCENT; + var type = valueType(v); + return ( + (type === TYPES.KEYWORD && v.toLowerCase() === 'normal') || + v.toLowerCase() === 'inherit' || + type === TYPES.NUMBER || + type === TYPES.LENGTH || + type === TYPES.PERCENT + ); }; module.exports.definition = { - set: function (v) { - this._setProperty('line-height', v); - }, - get: function () { - return this.getPropertyValue('line-height'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('line-height', v); + }, + get: function() { + return this.getPropertyValue('line-height'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/listStyle.js b/node_modules/cssstyle/lib/properties/listStyle.js deleted file mode 100644 index 4757b8b..0000000 --- a/node_modules/cssstyle/lib/properties/listStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('list-style', v); - }, - get: function () { - return this.getPropertyValue('list-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/listStyleImage.js b/node_modules/cssstyle/lib/properties/listStyleImage.js deleted file mode 100644 index 15324b2..0000000 --- a/node_modules/cssstyle/lib/properties/listStyleImage.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('list-style-image', v); - }, - get: function () { - return this.getPropertyValue('list-style-image'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/listStylePosition.js b/node_modules/cssstyle/lib/properties/listStylePosition.js deleted file mode 100644 index 55afa70..0000000 --- a/node_modules/cssstyle/lib/properties/listStylePosition.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('list-style-position', v); - }, - get: function () { - return this.getPropertyValue('list-style-position'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/listStyleType.js b/node_modules/cssstyle/lib/properties/listStyleType.js deleted file mode 100644 index 353c98f..0000000 --- a/node_modules/cssstyle/lib/properties/listStyleType.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('list-style-type', v); - }, - get: function () { - return this.getPropertyValue('list-style-type'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/margin.js b/node_modules/cssstyle/lib/properties/margin.js index 35803a8..2a8f972 100644 --- a/node_modules/cssstyle/lib/properties/margin.js +++ b/node_modules/cssstyle/lib/properties/margin.js @@ -3,56 +3,65 @@ var parsers = require('../parsers.js'); var TYPES = parsers.TYPES; -var isValid = function (v) { - if (v.toLowerCase() === "auto") { - return true; - } - var type = parsers.valueType(v); - return type === TYPES.LENGTH || type === TYPES.PERCENT || (type === TYPES.INTEGER && (v === '0' || v === 0)); +var isValid = function(v) { + if (v.toLowerCase() === 'auto') { + return true; + } + var type = parsers.valueType(v); + return ( + type === TYPES.LENGTH || + type === TYPES.PERCENT || + (type === TYPES.INTEGER && (v === '0' || v === 0)) + ); }; -var parser = function (v) { - var V = v.toLowerCase(); - if (V === "auto") { - return V; - } - return parsers.parseMeasurement(v); +var parser = function(v) { + var V = v.toLowerCase(); + if (V === 'auto') { + return V; + } + return parsers.parseMeasurement(v); }; var mySetter = parsers.implicitSetter('margin', '', isValid, parser); -var myGlobal = parsers.implicitSetter('margin', '', function () { +var myGlobal = parsers.implicitSetter( + 'margin', + '', + function() { return true; -}, function (v) { + }, + function(v) { return v; -}); + } +); module.exports.definition = { - set: function (v) { - if (typeof v === "number") { - v = String(v); - } - if (typeof v !== "string") { - return; - } - var V = v.toLowerCase(); - switch (V) { - case 'inherit': - case 'initial': - case 'unset': - case '': - myGlobal.call(this, V); - break; + set: function(v) { + if (typeof v === 'number') { + v = String(v); + } + if (typeof v !== 'string') { + return; + } + var V = v.toLowerCase(); + switch (V) { + case 'inherit': + case 'initial': + case 'unset': + case '': + myGlobal.call(this, V); + break; - default: - mySetter.call(this, v); - break; - } - }, - get: function () { - return this.getPropertyValue('margin'); - }, - enumerable: true, - configurable: true + default: + mySetter.call(this, v); + break; + } + }, + get: function() { + return this.getPropertyValue('margin'); + }, + enumerable: true, + configurable: true, }; module.exports.isValid = isValid; diff --git a/node_modules/cssstyle/lib/properties/marginBottom.js b/node_modules/cssstyle/lib/properties/marginBottom.js index 05fbb47..378172e 100644 --- a/node_modules/cssstyle/lib/properties/marginBottom.js +++ b/node_modules/cssstyle/lib/properties/marginBottom.js @@ -4,10 +4,10 @@ var margin = require('./margin.js'); var parsers = require('../parsers.js'); module.exports.definition = { - set: parsers.subImplicitSetter('margin', 'bottom', margin.isValid, margin.parser), - get: function () { - return this.getPropertyValue('margin-bottom'); - }, - enumerable: true, - configurable: true + set: parsers.subImplicitSetter('margin', 'bottom', margin.isValid, margin.parser), + get: function() { + return this.getPropertyValue('margin-bottom'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/marginLeft.js b/node_modules/cssstyle/lib/properties/marginLeft.js index e1b884d..0c67317 100644 --- a/node_modules/cssstyle/lib/properties/marginLeft.js +++ b/node_modules/cssstyle/lib/properties/marginLeft.js @@ -4,10 +4,10 @@ var margin = require('./margin.js'); var parsers = require('../parsers.js'); module.exports.definition = { - set: parsers.subImplicitSetter('margin', 'left', margin.isValid, margin.parser), - get: function () { - return this.getPropertyValue('margin-left'); - }, - enumerable: true, - configurable: true + set: parsers.subImplicitSetter('margin', 'left', margin.isValid, margin.parser), + get: function() { + return this.getPropertyValue('margin-left'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/marginRight.js b/node_modules/cssstyle/lib/properties/marginRight.js index addb7f8..6cdf26b 100644 --- a/node_modules/cssstyle/lib/properties/marginRight.js +++ b/node_modules/cssstyle/lib/properties/marginRight.js @@ -4,10 +4,10 @@ var margin = require('./margin.js'); var parsers = require('../parsers.js'); module.exports.definition = { - set: parsers.subImplicitSetter('margin', 'right', margin.isValid, margin.parser), - get: function () { - return this.getPropertyValue('margin-right'); - }, - enumerable: true, - configurable: true + set: parsers.subImplicitSetter('margin', 'right', margin.isValid, margin.parser), + get: function() { + return this.getPropertyValue('margin-right'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/marginTop.js b/node_modules/cssstyle/lib/properties/marginTop.js index 40aedd4..6a57621 100644 --- a/node_modules/cssstyle/lib/properties/marginTop.js +++ b/node_modules/cssstyle/lib/properties/marginTop.js @@ -4,10 +4,10 @@ var margin = require('./margin.js'); var parsers = require('../parsers.js'); module.exports.definition = { - set: parsers.subImplicitSetter('margin', 'top', margin.isValid, margin.parser), - get: function () { - return this.getPropertyValue('margin-top'); - }, - enumerable: true, - configurable: true + set: parsers.subImplicitSetter('margin', 'top', margin.isValid, margin.parser), + get: function() { + return this.getPropertyValue('margin-top'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/marker.js b/node_modules/cssstyle/lib/properties/marker.js deleted file mode 100644 index 5084cc0..0000000 --- a/node_modules/cssstyle/lib/properties/marker.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('marker', v); - }, - get: function () { - return this.getPropertyValue('marker'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/markerEnd.js b/node_modules/cssstyle/lib/properties/markerEnd.js deleted file mode 100644 index 4d3d75b..0000000 --- a/node_modules/cssstyle/lib/properties/markerEnd.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('marker-end', v); - }, - get: function () { - return this.getPropertyValue('marker-end'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/markerMid.js b/node_modules/cssstyle/lib/properties/markerMid.js deleted file mode 100644 index d0237f6..0000000 --- a/node_modules/cssstyle/lib/properties/markerMid.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('marker-mid', v); - }, - get: function () { - return this.getPropertyValue('marker-mid'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/markerOffset.js b/node_modules/cssstyle/lib/properties/markerOffset.js deleted file mode 100644 index 17dcbe0..0000000 --- a/node_modules/cssstyle/lib/properties/markerOffset.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('marker-offset', v); - }, - get: function () { - return this.getPropertyValue('marker-offset'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/markerStart.js b/node_modules/cssstyle/lib/properties/markerStart.js deleted file mode 100644 index c941644..0000000 --- a/node_modules/cssstyle/lib/properties/markerStart.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('marker-start', v); - }, - get: function () { - return this.getPropertyValue('marker-start'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/marks.js b/node_modules/cssstyle/lib/properties/marks.js deleted file mode 100644 index 5d3d475..0000000 --- a/node_modules/cssstyle/lib/properties/marks.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('marks', v); - }, - get: function () { - return this.getPropertyValue('marks'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/mask.js b/node_modules/cssstyle/lib/properties/mask.js deleted file mode 100644 index aa0350a..0000000 --- a/node_modules/cssstyle/lib/properties/mask.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('mask', v); - }, - get: function () { - return this.getPropertyValue('mask'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/maxHeight.js b/node_modules/cssstyle/lib/properties/maxHeight.js deleted file mode 100644 index 3c30aca..0000000 --- a/node_modules/cssstyle/lib/properties/maxHeight.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('max-height', v); - }, - get: function () { - return this.getPropertyValue('max-height'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/maxWidth.js b/node_modules/cssstyle/lib/properties/maxWidth.js deleted file mode 100644 index 1a12056..0000000 --- a/node_modules/cssstyle/lib/properties/maxWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('max-width', v); - }, - get: function () { - return this.getPropertyValue('max-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/minHeight.js b/node_modules/cssstyle/lib/properties/minHeight.js deleted file mode 100644 index 7e02a8a..0000000 --- a/node_modules/cssstyle/lib/properties/minHeight.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('min-height', v); - }, - get: function () { - return this.getPropertyValue('min-height'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/minWidth.js b/node_modules/cssstyle/lib/properties/minWidth.js deleted file mode 100644 index 1fca174..0000000 --- a/node_modules/cssstyle/lib/properties/minWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('min-width', v); - }, - get: function () { - return this.getPropertyValue('min-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/opacity.js b/node_modules/cssstyle/lib/properties/opacity.js index 2f5c547..b26a3b6 100644 --- a/node_modules/cssstyle/lib/properties/opacity.js +++ b/node_modules/cssstyle/lib/properties/opacity.js @@ -3,12 +3,12 @@ var parseNumber = require('../parsers').parseNumber; module.exports.definition = { - set: function (v) { - this._setProperty('opacity', parseNumber(v)); - }, - get: function () { - return this.getPropertyValue('opacity'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('opacity', parseNumber(v)); + }, + get: function() { + return this.getPropertyValue('opacity'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/orphans.js b/node_modules/cssstyle/lib/properties/orphans.js deleted file mode 100644 index a68614d..0000000 --- a/node_modules/cssstyle/lib/properties/orphans.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('orphans', v); - }, - get: function () { - return this.getPropertyValue('orphans'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/outline.js b/node_modules/cssstyle/lib/properties/outline.js deleted file mode 100644 index 779f6ec..0000000 --- a/node_modules/cssstyle/lib/properties/outline.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('outline', v); - }, - get: function () { - return this.getPropertyValue('outline'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/outlineColor.js b/node_modules/cssstyle/lib/properties/outlineColor.js index ae2135a..fc8093d 100644 --- a/node_modules/cssstyle/lib/properties/outlineColor.js +++ b/node_modules/cssstyle/lib/properties/outlineColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('outline-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('outline-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('outline-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('outline-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/outlineOffset.js b/node_modules/cssstyle/lib/properties/outlineOffset.js deleted file mode 100644 index fba8ce4..0000000 --- a/node_modules/cssstyle/lib/properties/outlineOffset.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('outline-offset', v); - }, - get: function () { - return this.getPropertyValue('outline-offset'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/outlineStyle.js b/node_modules/cssstyle/lib/properties/outlineStyle.js deleted file mode 100644 index 1a59938..0000000 --- a/node_modules/cssstyle/lib/properties/outlineStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('outline-style', v); - }, - get: function () { - return this.getPropertyValue('outline-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/outlineWidth.js b/node_modules/cssstyle/lib/properties/outlineWidth.js deleted file mode 100644 index dcef18b..0000000 --- a/node_modules/cssstyle/lib/properties/outlineWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('outline-width', v); - }, - get: function () { - return this.getPropertyValue('outline-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/overflow.js b/node_modules/cssstyle/lib/properties/overflow.js deleted file mode 100644 index 61092e3..0000000 --- a/node_modules/cssstyle/lib/properties/overflow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('overflow', v); - }, - get: function () { - return this.getPropertyValue('overflow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/overflowX.js b/node_modules/cssstyle/lib/properties/overflowX.js deleted file mode 100644 index 1e9951f..0000000 --- a/node_modules/cssstyle/lib/properties/overflowX.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('overflow-x', v); - }, - get: function () { - return this.getPropertyValue('overflow-x'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/overflowY.js b/node_modules/cssstyle/lib/properties/overflowY.js deleted file mode 100644 index dfe0387..0000000 --- a/node_modules/cssstyle/lib/properties/overflowY.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('overflow-y', v); - }, - get: function () { - return this.getPropertyValue('overflow-y'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/padding.js b/node_modules/cssstyle/lib/properties/padding.js index 3d82872..1287b19 100644 --- a/node_modules/cssstyle/lib/properties/padding.js +++ b/node_modules/cssstyle/lib/properties/padding.js @@ -3,49 +3,58 @@ var parsers = require('../parsers.js'); var TYPES = parsers.TYPES; -var isValid = function (v) { - var type = parsers.valueType(v); - return type === TYPES.LENGTH || type === TYPES.PERCENT || (type === TYPES.INTEGER && (v === '0' || v === 0)); +var isValid = function(v) { + var type = parsers.valueType(v); + return ( + type === TYPES.LENGTH || + type === TYPES.PERCENT || + (type === TYPES.INTEGER && (v === '0' || v === 0)) + ); }; -var parser = function (v) { - return parsers.parseMeasurement(v); +var parser = function(v) { + return parsers.parseMeasurement(v); }; var mySetter = parsers.implicitSetter('padding', '', isValid, parser); -var myGlobal = parsers.implicitSetter('padding', '', function () { +var myGlobal = parsers.implicitSetter( + 'padding', + '', + function() { return true; -}, function (v) { + }, + function(v) { return v; -}); + } +); module.exports.definition = { - set: function (v) { - if (typeof v === "number") { - v = String(v); - } - if (typeof v !== "string") { - return; - } - var V = v.toLowerCase(); - switch (V) { - case 'inherit': - case 'initial': - case 'unset': - case '': - myGlobal.call(this, V); - break; + set: function(v) { + if (typeof v === 'number') { + v = String(v); + } + if (typeof v !== 'string') { + return; + } + var V = v.toLowerCase(); + switch (V) { + case 'inherit': + case 'initial': + case 'unset': + case '': + myGlobal.call(this, V); + break; - default: - mySetter.call(this, v); - break; - } - }, - get: function () { - return this.getPropertyValue('padding'); - }, - enumerable: true, - configurable: true + default: + mySetter.call(this, v); + break; + } + }, + get: function() { + return this.getPropertyValue('padding'); + }, + enumerable: true, + configurable: true, }; module.exports.isValid = isValid; diff --git a/node_modules/cssstyle/lib/properties/paddingBottom.js b/node_modules/cssstyle/lib/properties/paddingBottom.js index 1645a78..3ce88e5 100644 --- a/node_modules/cssstyle/lib/properties/paddingBottom.js +++ b/node_modules/cssstyle/lib/properties/paddingBottom.js @@ -4,10 +4,10 @@ var padding = require('./padding.js'); var parsers = require('../parsers.js'); module.exports.definition = { - set: parsers.subImplicitSetter('padding', 'bottom', padding.isValid, padding.parser), - get: function () { - return this.getPropertyValue('padding-bottom'); - }, - enumerable: true, - configurable: true + set: parsers.subImplicitSetter('padding', 'bottom', padding.isValid, padding.parser), + get: function() { + return this.getPropertyValue('padding-bottom'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/paddingLeft.js b/node_modules/cssstyle/lib/properties/paddingLeft.js index 8ace3ae..0436338 100644 --- a/node_modules/cssstyle/lib/properties/paddingLeft.js +++ b/node_modules/cssstyle/lib/properties/paddingLeft.js @@ -4,10 +4,10 @@ var padding = require('./padding.js'); var parsers = require('../parsers.js'); module.exports.definition = { - set: parsers.subImplicitSetter('padding', 'left', padding.isValid, padding.parser), - get: function () { - return this.getPropertyValue('padding-left'); - }, - enumerable: true, - configurable: true + set: parsers.subImplicitSetter('padding', 'left', padding.isValid, padding.parser), + get: function() { + return this.getPropertyValue('padding-left'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/paddingRight.js b/node_modules/cssstyle/lib/properties/paddingRight.js index c32e7c1..ff9bd34 100644 --- a/node_modules/cssstyle/lib/properties/paddingRight.js +++ b/node_modules/cssstyle/lib/properties/paddingRight.js @@ -4,10 +4,10 @@ var padding = require('./padding.js'); var parsers = require('../parsers.js'); module.exports.definition = { - set: parsers.subImplicitSetter('padding', 'right', padding.isValid, padding.parser), - get: function () { - return this.getPropertyValue('padding-right'); - }, - enumerable: true, - configurable: true + set: parsers.subImplicitSetter('padding', 'right', padding.isValid, padding.parser), + get: function() { + return this.getPropertyValue('padding-right'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/paddingTop.js b/node_modules/cssstyle/lib/properties/paddingTop.js index 9df114d..eca8781 100644 --- a/node_modules/cssstyle/lib/properties/paddingTop.js +++ b/node_modules/cssstyle/lib/properties/paddingTop.js @@ -4,10 +4,10 @@ var padding = require('./padding.js'); var parsers = require('../parsers.js'); module.exports.definition = { - set: parsers.subImplicitSetter('padding', 'top', padding.isValid, padding.parser), - get: function () { - return this.getPropertyValue('padding-top'); - }, - enumerable: true, - configurable: true + set: parsers.subImplicitSetter('padding', 'top', padding.isValid, padding.parser), + get: function() { + return this.getPropertyValue('padding-top'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/page.js b/node_modules/cssstyle/lib/properties/page.js deleted file mode 100644 index 02b4e21..0000000 --- a/node_modules/cssstyle/lib/properties/page.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('page', v); - }, - get: function () { - return this.getPropertyValue('page'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pageBreakAfter.js b/node_modules/cssstyle/lib/properties/pageBreakAfter.js deleted file mode 100644 index 7a61f1f..0000000 --- a/node_modules/cssstyle/lib/properties/pageBreakAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('page-break-after', v); - }, - get: function () { - return this.getPropertyValue('page-break-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pageBreakBefore.js b/node_modules/cssstyle/lib/properties/pageBreakBefore.js deleted file mode 100644 index 94a4987..0000000 --- a/node_modules/cssstyle/lib/properties/pageBreakBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('page-break-before', v); - }, - get: function () { - return this.getPropertyValue('page-break-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pageBreakInside.js b/node_modules/cssstyle/lib/properties/pageBreakInside.js deleted file mode 100644 index e458e6a..0000000 --- a/node_modules/cssstyle/lib/properties/pageBreakInside.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('page-break-inside', v); - }, - get: function () { - return this.getPropertyValue('page-break-inside'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pause.js b/node_modules/cssstyle/lib/properties/pause.js deleted file mode 100644 index dbf94b7..0000000 --- a/node_modules/cssstyle/lib/properties/pause.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('pause', v); - }, - get: function () { - return this.getPropertyValue('pause'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pauseAfter.js b/node_modules/cssstyle/lib/properties/pauseAfter.js deleted file mode 100644 index 11ce039..0000000 --- a/node_modules/cssstyle/lib/properties/pauseAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('pause-after', v); - }, - get: function () { - return this.getPropertyValue('pause-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pauseBefore.js b/node_modules/cssstyle/lib/properties/pauseBefore.js deleted file mode 100644 index 3059ea5..0000000 --- a/node_modules/cssstyle/lib/properties/pauseBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('pause-before', v); - }, - get: function () { - return this.getPropertyValue('pause-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pitch.js b/node_modules/cssstyle/lib/properties/pitch.js deleted file mode 100644 index b47cbd2..0000000 --- a/node_modules/cssstyle/lib/properties/pitch.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('pitch', v); - }, - get: function () { - return this.getPropertyValue('pitch'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pitchRange.js b/node_modules/cssstyle/lib/properties/pitchRange.js deleted file mode 100644 index d442840..0000000 --- a/node_modules/cssstyle/lib/properties/pitchRange.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('pitch-range', v); - }, - get: function () { - return this.getPropertyValue('pitch-range'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/playDuring.js b/node_modules/cssstyle/lib/properties/playDuring.js deleted file mode 100644 index ce478ee..0000000 --- a/node_modules/cssstyle/lib/properties/playDuring.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('play-during', v); - }, - get: function () { - return this.getPropertyValue('play-during'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/pointerEvents.js b/node_modules/cssstyle/lib/properties/pointerEvents.js deleted file mode 100644 index 067ea62..0000000 --- a/node_modules/cssstyle/lib/properties/pointerEvents.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('pointer-events', v); - }, - get: function () { - return this.getPropertyValue('pointer-events'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/position.js b/node_modules/cssstyle/lib/properties/position.js deleted file mode 100644 index 9535b76..0000000 --- a/node_modules/cssstyle/lib/properties/position.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('position', v); - }, - get: function () { - return this.getPropertyValue('position'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/quotes.js b/node_modules/cssstyle/lib/properties/quotes.js deleted file mode 100644 index c90f09b..0000000 --- a/node_modules/cssstyle/lib/properties/quotes.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('quotes', v); - }, - get: function () { - return this.getPropertyValue('quotes'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/resize.js b/node_modules/cssstyle/lib/properties/resize.js deleted file mode 100644 index 4ec6adc..0000000 --- a/node_modules/cssstyle/lib/properties/resize.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('resize', v); - }, - get: function () { - return this.getPropertyValue('resize'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/richness.js b/node_modules/cssstyle/lib/properties/richness.js deleted file mode 100644 index 76ec02a..0000000 --- a/node_modules/cssstyle/lib/properties/richness.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('richness', v); - }, - get: function () { - return this.getPropertyValue('richness'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/right.js b/node_modules/cssstyle/lib/properties/right.js index aa5db0e..eb4c3d4 100644 --- a/node_modules/cssstyle/lib/properties/right.js +++ b/node_modules/cssstyle/lib/properties/right.js @@ -3,12 +3,12 @@ var parseMeasurement = require('../parsers').parseMeasurement; module.exports.definition = { - set: function (v) { - this._setProperty('right', parseMeasurement(v)); - }, - get: function () { - return this.getPropertyValue('right'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('right', parseMeasurement(v)); + }, + get: function() { + return this.getPropertyValue('right'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/shapeRendering.js b/node_modules/cssstyle/lib/properties/shapeRendering.js deleted file mode 100644 index d8b0191..0000000 --- a/node_modules/cssstyle/lib/properties/shapeRendering.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('shape-rendering', v); - }, - get: function () { - return this.getPropertyValue('shape-rendering'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/size.js b/node_modules/cssstyle/lib/properties/size.js deleted file mode 100644 index 76792c9..0000000 --- a/node_modules/cssstyle/lib/properties/size.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('size', v); - }, - get: function () { - return this.getPropertyValue('size'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/speak.js b/node_modules/cssstyle/lib/properties/speak.js deleted file mode 100644 index 422ae8b..0000000 --- a/node_modules/cssstyle/lib/properties/speak.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('speak', v); - }, - get: function () { - return this.getPropertyValue('speak'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/speakHeader.js b/node_modules/cssstyle/lib/properties/speakHeader.js deleted file mode 100644 index 09bf191..0000000 --- a/node_modules/cssstyle/lib/properties/speakHeader.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('speak-header', v); - }, - get: function () { - return this.getPropertyValue('speak-header'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/speakNumeral.js b/node_modules/cssstyle/lib/properties/speakNumeral.js deleted file mode 100644 index c41e38a..0000000 --- a/node_modules/cssstyle/lib/properties/speakNumeral.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('speak-numeral', v); - }, - get: function () { - return this.getPropertyValue('speak-numeral'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/speakPunctuation.js b/node_modules/cssstyle/lib/properties/speakPunctuation.js deleted file mode 100644 index dc60da0..0000000 --- a/node_modules/cssstyle/lib/properties/speakPunctuation.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('speak-punctuation', v); - }, - get: function () { - return this.getPropertyValue('speak-punctuation'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/speechRate.js b/node_modules/cssstyle/lib/properties/speechRate.js deleted file mode 100644 index d561f9b..0000000 --- a/node_modules/cssstyle/lib/properties/speechRate.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('speech-rate', v); - }, - get: function () { - return this.getPropertyValue('speech-rate'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/src.js b/node_modules/cssstyle/lib/properties/src.js deleted file mode 100644 index a04dbea..0000000 --- a/node_modules/cssstyle/lib/properties/src.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('src', v); - }, - get: function () { - return this.getPropertyValue('src'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/stopColor.js b/node_modules/cssstyle/lib/properties/stopColor.js index c6919bb..912d8e2 100644 --- a/node_modules/cssstyle/lib/properties/stopColor.js +++ b/node_modules/cssstyle/lib/properties/stopColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('stop-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('stop-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('stop-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('stop-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/stopOpacity.js b/node_modules/cssstyle/lib/properties/stopOpacity.js deleted file mode 100644 index 4e60be0..0000000 --- a/node_modules/cssstyle/lib/properties/stopOpacity.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stop-opacity', v); - }, - get: function () { - return this.getPropertyValue('stop-opacity'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/stress.js b/node_modules/cssstyle/lib/properties/stress.js deleted file mode 100644 index 6e369a7..0000000 --- a/node_modules/cssstyle/lib/properties/stress.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stress', v); - }, - get: function () { - return this.getPropertyValue('stress'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/stroke.js b/node_modules/cssstyle/lib/properties/stroke.js deleted file mode 100644 index c58dd22..0000000 --- a/node_modules/cssstyle/lib/properties/stroke.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stroke', v); - }, - get: function () { - return this.getPropertyValue('stroke'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/strokeDasharray.js b/node_modules/cssstyle/lib/properties/strokeDasharray.js deleted file mode 100644 index 92334b2..0000000 --- a/node_modules/cssstyle/lib/properties/strokeDasharray.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stroke-dasharray', v); - }, - get: function () { - return this.getPropertyValue('stroke-dasharray'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/strokeDashoffset.js b/node_modules/cssstyle/lib/properties/strokeDashoffset.js deleted file mode 100644 index 54d496f..0000000 --- a/node_modules/cssstyle/lib/properties/strokeDashoffset.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stroke-dashoffset', v); - }, - get: function () { - return this.getPropertyValue('stroke-dashoffset'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/strokeLinecap.js b/node_modules/cssstyle/lib/properties/strokeLinecap.js deleted file mode 100644 index e241a87..0000000 --- a/node_modules/cssstyle/lib/properties/strokeLinecap.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stroke-linecap', v); - }, - get: function () { - return this.getPropertyValue('stroke-linecap'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/strokeLinejoin.js b/node_modules/cssstyle/lib/properties/strokeLinejoin.js deleted file mode 100644 index 61ef9d9..0000000 --- a/node_modules/cssstyle/lib/properties/strokeLinejoin.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stroke-linejoin', v); - }, - get: function () { - return this.getPropertyValue('stroke-linejoin'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/strokeMiterlimit.js b/node_modules/cssstyle/lib/properties/strokeMiterlimit.js deleted file mode 100644 index fe69cbf..0000000 --- a/node_modules/cssstyle/lib/properties/strokeMiterlimit.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stroke-miterlimit', v); - }, - get: function () { - return this.getPropertyValue('stroke-miterlimit'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/strokeOpacity.js b/node_modules/cssstyle/lib/properties/strokeOpacity.js deleted file mode 100644 index 1dc9324..0000000 --- a/node_modules/cssstyle/lib/properties/strokeOpacity.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stroke-opacity', v); - }, - get: function () { - return this.getPropertyValue('stroke-opacity'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/strokeWidth.js b/node_modules/cssstyle/lib/properties/strokeWidth.js deleted file mode 100644 index 84d3268..0000000 --- a/node_modules/cssstyle/lib/properties/strokeWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('stroke-width', v); - }, - get: function () { - return this.getPropertyValue('stroke-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/tableLayout.js b/node_modules/cssstyle/lib/properties/tableLayout.js deleted file mode 100644 index 48f7484..0000000 --- a/node_modules/cssstyle/lib/properties/tableLayout.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('table-layout', v); - }, - get: function () { - return this.getPropertyValue('table-layout'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textAlign.js b/node_modules/cssstyle/lib/properties/textAlign.js deleted file mode 100644 index f6d994f..0000000 --- a/node_modules/cssstyle/lib/properties/textAlign.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-align', v); - }, - get: function () { - return this.getPropertyValue('text-align'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textAnchor.js b/node_modules/cssstyle/lib/properties/textAnchor.js deleted file mode 100644 index 392799b..0000000 --- a/node_modules/cssstyle/lib/properties/textAnchor.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-anchor', v); - }, - get: function () { - return this.getPropertyValue('text-anchor'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textDecoration.js b/node_modules/cssstyle/lib/properties/textDecoration.js deleted file mode 100644 index 680e808..0000000 --- a/node_modules/cssstyle/lib/properties/textDecoration.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-decoration', v); - }, - get: function () { - return this.getPropertyValue('text-decoration'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textIndent.js b/node_modules/cssstyle/lib/properties/textIndent.js deleted file mode 100644 index 3c07750..0000000 --- a/node_modules/cssstyle/lib/properties/textIndent.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-indent', v); - }, - get: function () { - return this.getPropertyValue('text-indent'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textLineThrough.js b/node_modules/cssstyle/lib/properties/textLineThrough.js deleted file mode 100644 index 29f4c3c..0000000 --- a/node_modules/cssstyle/lib/properties/textLineThrough.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-line-through', v); - }, - get: function () { - return this.getPropertyValue('text-line-through'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textLineThroughColor.js b/node_modules/cssstyle/lib/properties/textLineThroughColor.js index 2357ed8..ae53dbb 100644 --- a/node_modules/cssstyle/lib/properties/textLineThroughColor.js +++ b/node_modules/cssstyle/lib/properties/textLineThroughColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('text-line-through-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('text-line-through-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('text-line-through-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('text-line-through-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/textLineThroughMode.js b/node_modules/cssstyle/lib/properties/textLineThroughMode.js deleted file mode 100644 index dca3d9b..0000000 --- a/node_modules/cssstyle/lib/properties/textLineThroughMode.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-line-through-mode', v); - }, - get: function () { - return this.getPropertyValue('text-line-through-mode'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textLineThroughStyle.js b/node_modules/cssstyle/lib/properties/textLineThroughStyle.js deleted file mode 100644 index db1ad85..0000000 --- a/node_modules/cssstyle/lib/properties/textLineThroughStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-line-through-style', v); - }, - get: function () { - return this.getPropertyValue('text-line-through-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textLineThroughWidth.js b/node_modules/cssstyle/lib/properties/textLineThroughWidth.js deleted file mode 100644 index 1c64a50..0000000 --- a/node_modules/cssstyle/lib/properties/textLineThroughWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-line-through-width', v); - }, - get: function () { - return this.getPropertyValue('text-line-through-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textOverflow.js b/node_modules/cssstyle/lib/properties/textOverflow.js deleted file mode 100644 index e6fc25e..0000000 --- a/node_modules/cssstyle/lib/properties/textOverflow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-overflow', v); - }, - get: function () { - return this.getPropertyValue('text-overflow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textOverline.js b/node_modules/cssstyle/lib/properties/textOverline.js deleted file mode 100644 index 1991b6b..0000000 --- a/node_modules/cssstyle/lib/properties/textOverline.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-overline', v); - }, - get: function () { - return this.getPropertyValue('text-overline'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textOverlineColor.js b/node_modules/cssstyle/lib/properties/textOverlineColor.js index 578fda5..c6adf7c 100644 --- a/node_modules/cssstyle/lib/properties/textOverlineColor.js +++ b/node_modules/cssstyle/lib/properties/textOverlineColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('text-overline-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('text-overline-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('text-overline-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('text-overline-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/textOverlineMode.js b/node_modules/cssstyle/lib/properties/textOverlineMode.js deleted file mode 100644 index 597adae..0000000 --- a/node_modules/cssstyle/lib/properties/textOverlineMode.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-overline-mode', v); - }, - get: function () { - return this.getPropertyValue('text-overline-mode'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textOverlineStyle.js b/node_modules/cssstyle/lib/properties/textOverlineStyle.js deleted file mode 100644 index 83165f0..0000000 --- a/node_modules/cssstyle/lib/properties/textOverlineStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-overline-style', v); - }, - get: function () { - return this.getPropertyValue('text-overline-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textOverlineWidth.js b/node_modules/cssstyle/lib/properties/textOverlineWidth.js deleted file mode 100644 index b40ef7e..0000000 --- a/node_modules/cssstyle/lib/properties/textOverlineWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-overline-width', v); - }, - get: function () { - return this.getPropertyValue('text-overline-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textRendering.js b/node_modules/cssstyle/lib/properties/textRendering.js deleted file mode 100644 index 2886ef3..0000000 --- a/node_modules/cssstyle/lib/properties/textRendering.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-rendering', v); - }, - get: function () { - return this.getPropertyValue('text-rendering'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textShadow.js b/node_modules/cssstyle/lib/properties/textShadow.js deleted file mode 100644 index e50d9fa..0000000 --- a/node_modules/cssstyle/lib/properties/textShadow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-shadow', v); - }, - get: function () { - return this.getPropertyValue('text-shadow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textTransform.js b/node_modules/cssstyle/lib/properties/textTransform.js deleted file mode 100644 index 3836e00..0000000 --- a/node_modules/cssstyle/lib/properties/textTransform.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-transform', v); - }, - get: function () { - return this.getPropertyValue('text-transform'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textUnderline.js b/node_modules/cssstyle/lib/properties/textUnderline.js deleted file mode 100644 index baeaf65..0000000 --- a/node_modules/cssstyle/lib/properties/textUnderline.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-underline', v); - }, - get: function () { - return this.getPropertyValue('text-underline'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textUnderlineColor.js b/node_modules/cssstyle/lib/properties/textUnderlineColor.js index 2814dea..a243a9c 100644 --- a/node_modules/cssstyle/lib/properties/textUnderlineColor.js +++ b/node_modules/cssstyle/lib/properties/textUnderlineColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('text-underline-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('text-underline-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('text-underline-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('text-underline-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/textUnderlineMode.js b/node_modules/cssstyle/lib/properties/textUnderlineMode.js deleted file mode 100644 index dcb6e71..0000000 --- a/node_modules/cssstyle/lib/properties/textUnderlineMode.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-underline-mode', v); - }, - get: function () { - return this.getPropertyValue('text-underline-mode'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textUnderlineStyle.js b/node_modules/cssstyle/lib/properties/textUnderlineStyle.js deleted file mode 100644 index ac3a77e..0000000 --- a/node_modules/cssstyle/lib/properties/textUnderlineStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-underline-style', v); - }, - get: function () { - return this.getPropertyValue('text-underline-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/textUnderlineWidth.js b/node_modules/cssstyle/lib/properties/textUnderlineWidth.js deleted file mode 100644 index 91b0d88..0000000 --- a/node_modules/cssstyle/lib/properties/textUnderlineWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('text-underline-width', v); - }, - get: function () { - return this.getPropertyValue('text-underline-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/top.js b/node_modules/cssstyle/lib/properties/top.js index aac4005..f71986f 100644 --- a/node_modules/cssstyle/lib/properties/top.js +++ b/node_modules/cssstyle/lib/properties/top.js @@ -3,12 +3,12 @@ var parseMeasurement = require('../parsers').parseMeasurement; module.exports.definition = { - set: function (v) { - this._setProperty('top', parseMeasurement(v)); - }, - get: function () { - return this.getPropertyValue('top'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('top', parseMeasurement(v)); + }, + get: function() { + return this.getPropertyValue('top'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/unicodeBidi.js b/node_modules/cssstyle/lib/properties/unicodeBidi.js deleted file mode 100644 index c443a9e..0000000 --- a/node_modules/cssstyle/lib/properties/unicodeBidi.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('unicode-bidi', v); - }, - get: function () { - return this.getPropertyValue('unicode-bidi'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/unicodeRange.js b/node_modules/cssstyle/lib/properties/unicodeRange.js deleted file mode 100644 index e084396..0000000 --- a/node_modules/cssstyle/lib/properties/unicodeRange.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('unicode-range', v); - }, - get: function () { - return this.getPropertyValue('unicode-range'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/vectorEffect.js b/node_modules/cssstyle/lib/properties/vectorEffect.js deleted file mode 100644 index 353c79d..0000000 --- a/node_modules/cssstyle/lib/properties/vectorEffect.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('vector-effect', v); - }, - get: function () { - return this.getPropertyValue('vector-effect'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/verticalAlign.js b/node_modules/cssstyle/lib/properties/verticalAlign.js deleted file mode 100644 index a0dbd66..0000000 --- a/node_modules/cssstyle/lib/properties/verticalAlign.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('vertical-align', v); - }, - get: function () { - return this.getPropertyValue('vertical-align'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/visibility.js b/node_modules/cssstyle/lib/properties/visibility.js deleted file mode 100644 index 08a2a6f..0000000 --- a/node_modules/cssstyle/lib/properties/visibility.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('visibility', v); - }, - get: function () { - return this.getPropertyValue('visibility'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/voiceFamily.js b/node_modules/cssstyle/lib/properties/voiceFamily.js deleted file mode 100644 index b275aa4..0000000 --- a/node_modules/cssstyle/lib/properties/voiceFamily.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('voic-family', v); - }, - get: function () { - return this.getPropertyValue('voice-family'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/volume.js b/node_modules/cssstyle/lib/properties/volume.js deleted file mode 100644 index 422270e..0000000 --- a/node_modules/cssstyle/lib/properties/volume.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('volume', v); - }, - get: function () { - return this.getPropertyValue('volume'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimation.js b/node_modules/cssstyle/lib/properties/webkitAnimation.js deleted file mode 100644 index 6a283a1..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimation.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimationDelay.js b/node_modules/cssstyle/lib/properties/webkitAnimationDelay.js deleted file mode 100644 index 329484b..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimationDelay.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation-delay', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-delay'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimationDirection.js b/node_modules/cssstyle/lib/properties/webkitAnimationDirection.js deleted file mode 100644 index 9bc92d9..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimationDirection.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation-direction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-direction'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimationDuration.js b/node_modules/cssstyle/lib/properties/webkitAnimationDuration.js deleted file mode 100644 index be36b9d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimationDuration.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation-duration', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-duration'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimationFillMode.js b/node_modules/cssstyle/lib/properties/webkitAnimationFillMode.js deleted file mode 100644 index 1a23ac0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimationFillMode.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation-fill-mode', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-fill-mode'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimationIterationCount.js b/node_modules/cssstyle/lib/properties/webkitAnimationIterationCount.js deleted file mode 100644 index af37315..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimationIterationCount.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation-iteration-count', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-iteration-count'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimationName.js b/node_modules/cssstyle/lib/properties/webkitAnimationName.js deleted file mode 100644 index 8358409..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimationName.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation-name', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-name'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimationPlayState.js b/node_modules/cssstyle/lib/properties/webkitAnimationPlayState.js deleted file mode 100644 index 9ee0eb4..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimationPlayState.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation-play-state', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-play-state'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAnimationTimingFunction.js b/node_modules/cssstyle/lib/properties/webkitAnimationTimingFunction.js deleted file mode 100644 index e9eeb1e..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAnimationTimingFunction.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-animation-timing-function', v); - }, - get: function () { - return this.getPropertyValue('-webkit-animation-timing-function'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAppearance.js b/node_modules/cssstyle/lib/properties/webkitAppearance.js deleted file mode 100644 index 6387fa2..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAppearance.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-appearance', v); - }, - get: function () { - return this.getPropertyValue('-webkit-appearance'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitAspectRatio.js b/node_modules/cssstyle/lib/properties/webkitAspectRatio.js deleted file mode 100644 index c4271c7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitAspectRatio.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-aspect-ratio', v); - }, - get: function () { - return this.getPropertyValue('-webkit-aspect-ratio'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBackfaceVisibility.js b/node_modules/cssstyle/lib/properties/webkitBackfaceVisibility.js deleted file mode 100644 index 074a11d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBackfaceVisibility.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-backface-visibility', v); - }, - get: function () { - return this.getPropertyValue('-webkit-backface-visibility'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBackgroundClip.js b/node_modules/cssstyle/lib/properties/webkitBackgroundClip.js deleted file mode 100644 index 7a0f017..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBackgroundClip.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-background-clip', v); - }, - get: function () { - return this.getPropertyValue('-webkit-background-clip'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBackgroundComposite.js b/node_modules/cssstyle/lib/properties/webkitBackgroundComposite.js deleted file mode 100644 index 530a6fa..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBackgroundComposite.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-background-composite', v); - }, - get: function () { - return this.getPropertyValue('-webkit-background-composite'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBackgroundOrigin.js b/node_modules/cssstyle/lib/properties/webkitBackgroundOrigin.js deleted file mode 100644 index 799e930..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBackgroundOrigin.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-background-origin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-background-origin'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBackgroundSize.js b/node_modules/cssstyle/lib/properties/webkitBackgroundSize.js deleted file mode 100644 index ea3ed26..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBackgroundSize.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-background-size', v); - }, - get: function () { - return this.getPropertyValue('-webkit-background-size'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderAfter.js b/node_modules/cssstyle/lib/properties/webkitBorderAfter.js deleted file mode 100644 index 5d7fd61..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js b/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js index d967ce6..ed02194 100644 --- a/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js +++ b/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-after-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-border-after-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-border-after-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-border-after-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderAfterStyle.js b/node_modules/cssstyle/lib/properties/webkitBorderAfterStyle.js deleted file mode 100644 index 7e8f2bb..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderAfterStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-after-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-after-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderAfterWidth.js b/node_modules/cssstyle/lib/properties/webkitBorderAfterWidth.js deleted file mode 100644 index eb2d344..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderAfterWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-after-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-after-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderBefore.js b/node_modules/cssstyle/lib/properties/webkitBorderBefore.js deleted file mode 100644 index 22f881b..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js b/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js index f259ab2..a4507a1 100644 --- a/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js +++ b/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-before-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-border-before-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-border-before-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-border-before-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderBeforeStyle.js b/node_modules/cssstyle/lib/properties/webkitBorderBeforeStyle.js deleted file mode 100644 index b2b57ad..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderBeforeStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-before-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-before-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderBeforeWidth.js b/node_modules/cssstyle/lib/properties/webkitBorderBeforeWidth.js deleted file mode 100644 index aed2f9c..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderBeforeWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-before-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-before-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderEnd.js b/node_modules/cssstyle/lib/properties/webkitBorderEnd.js deleted file mode 100644 index 3744f98..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderEnd.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-end', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-end'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js b/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js index 421d80b..499545d 100644 --- a/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js +++ b/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-end-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-border-end-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-border-end-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-border-end-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderEndStyle.js b/node_modules/cssstyle/lib/properties/webkitBorderEndStyle.js deleted file mode 100644 index 31648ea..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderEndStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-end-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-end-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderEndWidth.js b/node_modules/cssstyle/lib/properties/webkitBorderEndWidth.js deleted file mode 100644 index 948a9aa..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderEndWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-end-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-end-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderFit.js b/node_modules/cssstyle/lib/properties/webkitBorderFit.js deleted file mode 100644 index 81eaf70..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderFit.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-fit', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-fit'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderHorizontalSpacing.js b/node_modules/cssstyle/lib/properties/webkitBorderHorizontalSpacing.js deleted file mode 100644 index 73cbd2f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderHorizontalSpacing.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-horizontal-spacing', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-horizontal-spacing'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderImage.js b/node_modules/cssstyle/lib/properties/webkitBorderImage.js deleted file mode 100644 index 9ea9214..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderImage.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-image', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-image'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderRadius.js b/node_modules/cssstyle/lib/properties/webkitBorderRadius.js deleted file mode 100644 index af8a6dd..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderRadius.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-radius', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-radius'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderStart.js b/node_modules/cssstyle/lib/properties/webkitBorderStart.js deleted file mode 100644 index 0a415d9..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderStart.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-start', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-start'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js b/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js index c6fd7c4..8429e32 100644 --- a/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js +++ b/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-start-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-border-start-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-border-start-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-border-start-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderStartStyle.js b/node_modules/cssstyle/lib/properties/webkitBorderStartStyle.js deleted file mode 100644 index 74a666a..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderStartStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-start-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-start-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderStartWidth.js b/node_modules/cssstyle/lib/properties/webkitBorderStartWidth.js deleted file mode 100644 index cf5cb1f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderStartWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-start-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-start-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBorderVerticalSpacing.js b/node_modules/cssstyle/lib/properties/webkitBorderVerticalSpacing.js deleted file mode 100644 index 7d96425..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBorderVerticalSpacing.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-border-vertical-spacing', v); - }, - get: function () { - return this.getPropertyValue('-webkit-border-vertical-spacing'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxAlign.js b/node_modules/cssstyle/lib/properties/webkitBoxAlign.js deleted file mode 100644 index c5483b5..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxAlign.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-align', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-align'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxDirection.js b/node_modules/cssstyle/lib/properties/webkitBoxDirection.js deleted file mode 100644 index 0aad038..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxDirection.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-direction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-direction'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxFlex.js b/node_modules/cssstyle/lib/properties/webkitBoxFlex.js deleted file mode 100644 index 510fb58..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxFlex.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-flex', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-flex'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxFlexGroup.js b/node_modules/cssstyle/lib/properties/webkitBoxFlexGroup.js deleted file mode 100644 index 94dd158..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxFlexGroup.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-flex-group', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-flex-group'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxLines.js b/node_modules/cssstyle/lib/properties/webkitBoxLines.js deleted file mode 100644 index 4ba077c..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxLines.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-lines', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-lines'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxOrdinalGroup.js b/node_modules/cssstyle/lib/properties/webkitBoxOrdinalGroup.js deleted file mode 100644 index fc1705d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxOrdinalGroup.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-ordinal-group', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-ordinal-group'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxOrient.js b/node_modules/cssstyle/lib/properties/webkitBoxOrient.js deleted file mode 100644 index 930d183..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxOrient.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-orient', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-orient'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxPack.js b/node_modules/cssstyle/lib/properties/webkitBoxPack.js deleted file mode 100644 index 0fa82d4..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxPack.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-pack', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-pack'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxReflect.js b/node_modules/cssstyle/lib/properties/webkitBoxReflect.js deleted file mode 100644 index 0efc0fc..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxReflect.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-reflect', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-reflect'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitBoxShadow.js b/node_modules/cssstyle/lib/properties/webkitBoxShadow.js deleted file mode 100644 index 9a25857..0000000 --- a/node_modules/cssstyle/lib/properties/webkitBoxShadow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-box-shadow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-box-shadow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColorCorrection.js b/node_modules/cssstyle/lib/properties/webkitColorCorrection.js deleted file mode 100644 index c53d360..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColorCorrection.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-color-correction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-color-correction'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnAxis.js b/node_modules/cssstyle/lib/properties/webkitColumnAxis.js deleted file mode 100644 index 6e32388..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnAxis.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-axis', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-axis'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnBreakAfter.js b/node_modules/cssstyle/lib/properties/webkitColumnBreakAfter.js deleted file mode 100644 index 640af1d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnBreakAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-break-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-break-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnBreakBefore.js b/node_modules/cssstyle/lib/properties/webkitColumnBreakBefore.js deleted file mode 100644 index ef82ede..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnBreakBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-break-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-break-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnBreakInside.js b/node_modules/cssstyle/lib/properties/webkitColumnBreakInside.js deleted file mode 100644 index a300301..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnBreakInside.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-break-inside', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-break-inside'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnCount.js b/node_modules/cssstyle/lib/properties/webkitColumnCount.js deleted file mode 100644 index 513d5f7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnCount.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-count', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-count'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnGap.js b/node_modules/cssstyle/lib/properties/webkitColumnGap.js deleted file mode 100644 index 4e18e6b..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnGap.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-gap', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-gap'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnRule.js b/node_modules/cssstyle/lib/properties/webkitColumnRule.js deleted file mode 100644 index e7eb990..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnRule.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-rule', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-rule'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js b/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js index e5ea7a2..7130d5f 100644 --- a/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js +++ b/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-rule-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-column-rule-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-column-rule-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-column-rule-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnRuleStyle.js b/node_modules/cssstyle/lib/properties/webkitColumnRuleStyle.js deleted file mode 100644 index d72fd8c..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnRuleStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-rule-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-rule-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnRuleWidth.js b/node_modules/cssstyle/lib/properties/webkitColumnRuleWidth.js deleted file mode 100644 index c8da6f4..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnRuleWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-rule-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-rule-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnSpan.js b/node_modules/cssstyle/lib/properties/webkitColumnSpan.js deleted file mode 100644 index a881a6c..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnSpan.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-span', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-span'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumnWidth.js b/node_modules/cssstyle/lib/properties/webkitColumnWidth.js deleted file mode 100644 index 7bc231f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumnWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-column-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-column-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitColumns.js b/node_modules/cssstyle/lib/properties/webkitColumns.js deleted file mode 100644 index 9381098..0000000 --- a/node_modules/cssstyle/lib/properties/webkitColumns.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-columns', v); - }, - get: function () { - return this.getPropertyValue('-webkit-columns'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFilter.js b/node_modules/cssstyle/lib/properties/webkitFilter.js deleted file mode 100644 index 7c81be0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFilter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-filter', v); - }, - get: function () { - return this.getPropertyValue('-webkit-filter'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlexAlign.js b/node_modules/cssstyle/lib/properties/webkitFlexAlign.js deleted file mode 100644 index c55e282..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlexAlign.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flex-align', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-align'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlexDirection.js b/node_modules/cssstyle/lib/properties/webkitFlexDirection.js deleted file mode 100644 index 3dd5807..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlexDirection.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flex-direction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-direction'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlexFlow.js b/node_modules/cssstyle/lib/properties/webkitFlexFlow.js deleted file mode 100644 index aa9da48..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlexFlow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flex-flow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-flow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlexItemAlign.js b/node_modules/cssstyle/lib/properties/webkitFlexItemAlign.js deleted file mode 100644 index cbf8b8f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlexItemAlign.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flex-item-align', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-item-align'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlexLinePack.js b/node_modules/cssstyle/lib/properties/webkitFlexLinePack.js deleted file mode 100644 index 78b528e..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlexLinePack.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flex-line-pack', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-line-pack'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlexOrder.js b/node_modules/cssstyle/lib/properties/webkitFlexOrder.js deleted file mode 100644 index 7f77aec..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlexOrder.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flex-order', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-order'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlexPack.js b/node_modules/cssstyle/lib/properties/webkitFlexPack.js deleted file mode 100644 index 6636612..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlexPack.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flex-pack', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-pack'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlexWrap.js b/node_modules/cssstyle/lib/properties/webkitFlexWrap.js deleted file mode 100644 index 4d03ec6..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlexWrap.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flex-wrap', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flex-wrap'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlowFrom.js b/node_modules/cssstyle/lib/properties/webkitFlowFrom.js deleted file mode 100644 index 0f60e76..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlowFrom.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flow-from', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flow-from'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFlowInto.js b/node_modules/cssstyle/lib/properties/webkitFlowInto.js deleted file mode 100644 index 7ea20bd..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFlowInto.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-flow-into', v); - }, - get: function () { - return this.getPropertyValue('-webkit-flow-into'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFontFeatureSettings.js b/node_modules/cssstyle/lib/properties/webkitFontFeatureSettings.js deleted file mode 100644 index c83f4b8..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFontFeatureSettings.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-font-feature-settings', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-feature-settings'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFontKerning.js b/node_modules/cssstyle/lib/properties/webkitFontKerning.js deleted file mode 100644 index eba2339..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFontKerning.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-font-kerning', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-kerning'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFontSizeDelta.js b/node_modules/cssstyle/lib/properties/webkitFontSizeDelta.js deleted file mode 100644 index 89aaca5..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFontSizeDelta.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-font-size-delta', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-size-delta'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFontSmoothing.js b/node_modules/cssstyle/lib/properties/webkitFontSmoothing.js deleted file mode 100644 index c3dc1ab..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFontSmoothing.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-font-smoothing', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-smoothing'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitFontVariantLigatures.js b/node_modules/cssstyle/lib/properties/webkitFontVariantLigatures.js deleted file mode 100644 index 79f07e4..0000000 --- a/node_modules/cssstyle/lib/properties/webkitFontVariantLigatures.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-font-variant-ligatures', v); - }, - get: function () { - return this.getPropertyValue('-webkit-font-variant-ligatures'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitHighlight.js b/node_modules/cssstyle/lib/properties/webkitHighlight.js deleted file mode 100644 index 355d8f2..0000000 --- a/node_modules/cssstyle/lib/properties/webkitHighlight.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-highlight', v); - }, - get: function () { - return this.getPropertyValue('-webkit-highlight'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitHyphenateCharacter.js b/node_modules/cssstyle/lib/properties/webkitHyphenateCharacter.js deleted file mode 100644 index 287473f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitHyphenateCharacter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-hyphenate-character', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphenate-character'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitHyphenateLimitAfter.js b/node_modules/cssstyle/lib/properties/webkitHyphenateLimitAfter.js deleted file mode 100644 index a20a859..0000000 --- a/node_modules/cssstyle/lib/properties/webkitHyphenateLimitAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-hyphenate-limit-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphenate-limit-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitHyphenateLimitBefore.js b/node_modules/cssstyle/lib/properties/webkitHyphenateLimitBefore.js deleted file mode 100644 index 8fc1c2d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitHyphenateLimitBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-hyphenate-limit-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphenate-limit-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitHyphenateLimitLines.js b/node_modules/cssstyle/lib/properties/webkitHyphenateLimitLines.js deleted file mode 100644 index c145b1d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitHyphenateLimitLines.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-hyphenate-limit-lines', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphenate-limit-lines'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitHyphens.js b/node_modules/cssstyle/lib/properties/webkitHyphens.js deleted file mode 100644 index 3dfe9a7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitHyphens.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-hyphens', v); - }, - get: function () { - return this.getPropertyValue('-webkit-hyphens'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLineAlign.js b/node_modules/cssstyle/lib/properties/webkitLineAlign.js deleted file mode 100644 index 1246968..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLineAlign.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-line-align', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-align'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLineBoxContain.js b/node_modules/cssstyle/lib/properties/webkitLineBoxContain.js deleted file mode 100644 index 492d9fa..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLineBoxContain.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-line-box-contain', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-box-contain'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLineBreak.js b/node_modules/cssstyle/lib/properties/webkitLineBreak.js deleted file mode 100644 index 3a6737e..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLineBreak.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-line-break', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-break'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLineClamp.js b/node_modules/cssstyle/lib/properties/webkitLineClamp.js deleted file mode 100644 index 43d09f9..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLineClamp.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-line-clamp', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-clamp'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLineGrid.js b/node_modules/cssstyle/lib/properties/webkitLineGrid.js deleted file mode 100644 index 427351f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLineGrid.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-line-grid', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-grid'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLineSnap.js b/node_modules/cssstyle/lib/properties/webkitLineSnap.js deleted file mode 100644 index 3c49780..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLineSnap.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-line-snap', v); - }, - get: function () { - return this.getPropertyValue('-webkit-line-snap'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLocale.js b/node_modules/cssstyle/lib/properties/webkitLocale.js deleted file mode 100644 index fba69d1..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLocale.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-locale', v); - }, - get: function () { - return this.getPropertyValue('-webkit-locale'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLogicalHeight.js b/node_modules/cssstyle/lib/properties/webkitLogicalHeight.js deleted file mode 100644 index be3cfa0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLogicalHeight.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-logical-height', v); - }, - get: function () { - return this.getPropertyValue('-webkit-logical-height'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitLogicalWidth.js b/node_modules/cssstyle/lib/properties/webkitLogicalWidth.js deleted file mode 100644 index 14efe8a..0000000 --- a/node_modules/cssstyle/lib/properties/webkitLogicalWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-logical-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-logical-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginAfter.js b/node_modules/cssstyle/lib/properties/webkitMarginAfter.js deleted file mode 100644 index 9efa007..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginAfterCollapse.js b/node_modules/cssstyle/lib/properties/webkitMarginAfterCollapse.js deleted file mode 100644 index f7a3bdf..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginAfterCollapse.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-after-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-after-collapse'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginBefore.js b/node_modules/cssstyle/lib/properties/webkitMarginBefore.js deleted file mode 100644 index 8324cc7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginBeforeCollapse.js b/node_modules/cssstyle/lib/properties/webkitMarginBeforeCollapse.js deleted file mode 100644 index 5d8b04f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginBeforeCollapse.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-before-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-before-collapse'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginBottomCollapse.js b/node_modules/cssstyle/lib/properties/webkitMarginBottomCollapse.js deleted file mode 100644 index 749eb22..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginBottomCollapse.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-bottom-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-bottom-collapse'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginCollapse.js b/node_modules/cssstyle/lib/properties/webkitMarginCollapse.js deleted file mode 100644 index 71442e0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginCollapse.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-collapse'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginEnd.js b/node_modules/cssstyle/lib/properties/webkitMarginEnd.js deleted file mode 100644 index 1994ed7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginEnd.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-end', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-end'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginStart.js b/node_modules/cssstyle/lib/properties/webkitMarginStart.js deleted file mode 100644 index 6c348f6..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginStart.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-start', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-start'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarginTopCollapse.js b/node_modules/cssstyle/lib/properties/webkitMarginTopCollapse.js deleted file mode 100644 index 9325fca..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarginTopCollapse.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-margin-top-collapse', v); - }, - get: function () { - return this.getPropertyValue('-webkit-margin-top-collapse'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarquee.js b/node_modules/cssstyle/lib/properties/webkitMarquee.js deleted file mode 100644 index dc1d99f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarquee.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-marquee', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarqueeDirection.js b/node_modules/cssstyle/lib/properties/webkitMarqueeDirection.js deleted file mode 100644 index 1f73245..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarqueeDirection.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-marquee-direction', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-direction'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarqueeIncrement.js b/node_modules/cssstyle/lib/properties/webkitMarqueeIncrement.js deleted file mode 100644 index 9ae4a5d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarqueeIncrement.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-marquee-increment', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-increment'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarqueeRepetition.js b/node_modules/cssstyle/lib/properties/webkitMarqueeRepetition.js deleted file mode 100644 index f718ced..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarqueeRepetition.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-marquee-repetition', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-repetition'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarqueeSpeed.js b/node_modules/cssstyle/lib/properties/webkitMarqueeSpeed.js deleted file mode 100644 index 99dbad7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarqueeSpeed.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-marquee-speed', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-speed'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMarqueeStyle.js b/node_modules/cssstyle/lib/properties/webkitMarqueeStyle.js deleted file mode 100644 index 9bd0631..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMarqueeStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-marquee-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-marquee-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMask.js b/node_modules/cssstyle/lib/properties/webkitMask.js deleted file mode 100644 index 6a9603c..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMask.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskAttachment.js b/node_modules/cssstyle/lib/properties/webkitMaskAttachment.js deleted file mode 100644 index bc5ea46..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskAttachment.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-attachment', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-attachment'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskBoxImage.js b/node_modules/cssstyle/lib/properties/webkitMaskBoxImage.js deleted file mode 100644 index 93955a6..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskBoxImage.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageOutset.js b/node_modules/cssstyle/lib/properties/webkitMaskBoxImageOutset.js deleted file mode 100644 index d539302..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageOutset.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-outset', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-outset'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageRepeat.js b/node_modules/cssstyle/lib/properties/webkitMaskBoxImageRepeat.js deleted file mode 100644 index 3a02cf6..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageRepeat.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-repeat', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-repeat'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSlice.js b/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSlice.js deleted file mode 100644 index 7bb49e7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSlice.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-slice', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-slice'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSource.js b/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSource.js deleted file mode 100644 index 9508871..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageSource.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-source', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-source'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageWidth.js b/node_modules/cssstyle/lib/properties/webkitMaskBoxImageWidth.js deleted file mode 100644 index f500bbb..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskBoxImageWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-box-image-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-box-image-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskClip.js b/node_modules/cssstyle/lib/properties/webkitMaskClip.js deleted file mode 100644 index 4140c1e..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskClip.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-clip', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-clip'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskComposite.js b/node_modules/cssstyle/lib/properties/webkitMaskComposite.js deleted file mode 100644 index 88fedab..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskComposite.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-composite', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-composite'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskImage.js b/node_modules/cssstyle/lib/properties/webkitMaskImage.js deleted file mode 100644 index 8155e71..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskImage.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-image', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-image'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskOrigin.js b/node_modules/cssstyle/lib/properties/webkitMaskOrigin.js deleted file mode 100644 index 9eb2c5a..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskOrigin.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-origin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-origin'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskPosition.js b/node_modules/cssstyle/lib/properties/webkitMaskPosition.js deleted file mode 100644 index a0c228c..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskPosition.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-position', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-position'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskPositionX.js b/node_modules/cssstyle/lib/properties/webkitMaskPositionX.js deleted file mode 100644 index 6aae1d2..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskPositionX.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-position-x', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-position-x'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskPositionY.js b/node_modules/cssstyle/lib/properties/webkitMaskPositionY.js deleted file mode 100644 index 3dd7dbc..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskPositionY.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-position-y', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-position-y'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskRepeat.js b/node_modules/cssstyle/lib/properties/webkitMaskRepeat.js deleted file mode 100644 index ef66b66..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskRepeat.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-repeat', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-repeat'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskRepeatX.js b/node_modules/cssstyle/lib/properties/webkitMaskRepeatX.js deleted file mode 100644 index 35f47d8..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskRepeatX.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-repeat-x', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-repeat-x'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskRepeatY.js b/node_modules/cssstyle/lib/properties/webkitMaskRepeatY.js deleted file mode 100644 index 8c743c0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskRepeatY.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-repeat-y', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-repeat-y'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaskSize.js b/node_modules/cssstyle/lib/properties/webkitMaskSize.js deleted file mode 100644 index 3327343..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaskSize.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-mask-size', v); - }, - get: function () { - return this.getPropertyValue('-webkit-mask-size'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js b/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js index c4a2153..e075891 100644 --- a/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js +++ b/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-match-nearest-mail-blockquote-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-match-nearest-mail-blockquote-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitMaxLogicalHeight.js b/node_modules/cssstyle/lib/properties/webkitMaxLogicalHeight.js deleted file mode 100644 index 97a293d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaxLogicalHeight.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-max-logical-height', v); - }, - get: function () { - return this.getPropertyValue('-webkit-max-logical-height'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMaxLogicalWidth.js b/node_modules/cssstyle/lib/properties/webkitMaxLogicalWidth.js deleted file mode 100644 index f746b72..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMaxLogicalWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-max-logical-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-max-logical-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMinLogicalHeight.js b/node_modules/cssstyle/lib/properties/webkitMinLogicalHeight.js deleted file mode 100644 index 948b899..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMinLogicalHeight.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-min-logical-height', v); - }, - get: function () { - return this.getPropertyValue('-webkit-min-logical-height'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitMinLogicalWidth.js b/node_modules/cssstyle/lib/properties/webkitMinLogicalWidth.js deleted file mode 100644 index eb990b0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitMinLogicalWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-min-logical-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-min-logical-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitNbspMode.js b/node_modules/cssstyle/lib/properties/webkitNbspMode.js deleted file mode 100644 index 1d93619..0000000 --- a/node_modules/cssstyle/lib/properties/webkitNbspMode.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-nbsp-mode', v); - }, - get: function () { - return this.getPropertyValue('-webkit-nbsp-mode'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitOverflowScrolling.js b/node_modules/cssstyle/lib/properties/webkitOverflowScrolling.js deleted file mode 100644 index 7ba9e57..0000000 --- a/node_modules/cssstyle/lib/properties/webkitOverflowScrolling.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-overflow-scrolling', v); - }, - get: function () { - return this.getPropertyValue('-webkit-overflow-scrolling'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPaddingAfter.js b/node_modules/cssstyle/lib/properties/webkitPaddingAfter.js deleted file mode 100644 index 033cde8..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPaddingAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-padding-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-padding-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPaddingBefore.js b/node_modules/cssstyle/lib/properties/webkitPaddingBefore.js deleted file mode 100644 index 04e3796..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPaddingBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-padding-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-padding-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPaddingEnd.js b/node_modules/cssstyle/lib/properties/webkitPaddingEnd.js deleted file mode 100644 index 1677ebc..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPaddingEnd.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-padding-end', v); - }, - get: function () { - return this.getPropertyValue('-webkit-padding-end'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPaddingStart.js b/node_modules/cssstyle/lib/properties/webkitPaddingStart.js deleted file mode 100644 index 1c89a92..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPaddingStart.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-padding-start', v); - }, - get: function () { - return this.getPropertyValue('-webkit-padding-start'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPerspective.js b/node_modules/cssstyle/lib/properties/webkitPerspective.js deleted file mode 100644 index 9544932..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPerspective.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-perspective', v); - }, - get: function () { - return this.getPropertyValue('-webkit-perspective'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPerspectiveOrigin.js b/node_modules/cssstyle/lib/properties/webkitPerspectiveOrigin.js deleted file mode 100644 index f6531f1..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPerspectiveOrigin.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-perspective-origin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-perspective-origin'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginX.js b/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginX.js deleted file mode 100644 index 5cc28a4..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginX.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-perspective-origin-x', v); - }, - get: function () { - return this.getPropertyValue('-webkit-perspective-origin-x'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginY.js b/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginY.js deleted file mode 100644 index 05d5393..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPerspectiveOriginY.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-perspective-origin-y', v); - }, - get: function () { - return this.getPropertyValue('-webkit-perspective-origin-y'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitPrintColorAdjust.js b/node_modules/cssstyle/lib/properties/webkitPrintColorAdjust.js deleted file mode 100644 index 9254283..0000000 --- a/node_modules/cssstyle/lib/properties/webkitPrintColorAdjust.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-print-color-adjust', v); - }, - get: function () { - return this.getPropertyValue('-webkit-print-color-adjust'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitRegionBreakAfter.js b/node_modules/cssstyle/lib/properties/webkitRegionBreakAfter.js deleted file mode 100644 index 27210e1..0000000 --- a/node_modules/cssstyle/lib/properties/webkitRegionBreakAfter.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-region-break-after', v); - }, - get: function () { - return this.getPropertyValue('-webkit-region-break-after'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitRegionBreakBefore.js b/node_modules/cssstyle/lib/properties/webkitRegionBreakBefore.js deleted file mode 100644 index 52d068f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitRegionBreakBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-region-break-before', v); - }, - get: function () { - return this.getPropertyValue('-webkit-region-break-before'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitRegionBreakInside.js b/node_modules/cssstyle/lib/properties/webkitRegionBreakInside.js deleted file mode 100644 index 5adc8f7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitRegionBreakInside.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-region-break-inside', v); - }, - get: function () { - return this.getPropertyValue('-webkit-region-break-inside'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitRegionOverflow.js b/node_modules/cssstyle/lib/properties/webkitRegionOverflow.js deleted file mode 100644 index 730b0b4..0000000 --- a/node_modules/cssstyle/lib/properties/webkitRegionOverflow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-region-overflow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-region-overflow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitRtlOrdering.js b/node_modules/cssstyle/lib/properties/webkitRtlOrdering.js deleted file mode 100644 index 08c2b42..0000000 --- a/node_modules/cssstyle/lib/properties/webkitRtlOrdering.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-rtl-ordering', v); - }, - get: function () { - return this.getPropertyValue('-webkit-rtl-ordering'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitSvgShadow.js b/node_modules/cssstyle/lib/properties/webkitSvgShadow.js deleted file mode 100644 index 33fccf4..0000000 --- a/node_modules/cssstyle/lib/properties/webkitSvgShadow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-svg-shadow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-svg-shadow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js b/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js index 9510b78..d019329 100644 --- a/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js +++ b/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-tap-highlight-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-tap-highlight-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-tap-highlight-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-tap-highlight-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitTextCombine.js b/node_modules/cssstyle/lib/properties/webkitTextCombine.js deleted file mode 100644 index aab7223..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextCombine.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-combine', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-combine'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextDecorationsInEffect.js b/node_modules/cssstyle/lib/properties/webkitTextDecorationsInEffect.js deleted file mode 100644 index f6defb0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextDecorationsInEffect.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-decorations-in-effect', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-decorations-in-effect'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextEmphasis.js b/node_modules/cssstyle/lib/properties/webkitTextEmphasis.js deleted file mode 100644 index b7523dc..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextEmphasis.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-emphasis', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-emphasis'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js b/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js index 14b269f..cdeab53 100644 --- a/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js +++ b/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-emphasis-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-text-emphasis-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-text-emphasis-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-text-emphasis-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitTextEmphasisPosition.js b/node_modules/cssstyle/lib/properties/webkitTextEmphasisPosition.js deleted file mode 100644 index 2a1cc25..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextEmphasisPosition.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-emphasis-position', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-emphasis-position'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextEmphasisStyle.js b/node_modules/cssstyle/lib/properties/webkitTextEmphasisStyle.js deleted file mode 100644 index 69f3e5a..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextEmphasisStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-emphasis-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-emphasis-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextFillColor.js b/node_modules/cssstyle/lib/properties/webkitTextFillColor.js index 1d0981d..ef5bd67 100644 --- a/node_modules/cssstyle/lib/properties/webkitTextFillColor.js +++ b/node_modules/cssstyle/lib/properties/webkitTextFillColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-fill-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-text-fill-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-text-fill-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-text-fill-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitTextOrientation.js b/node_modules/cssstyle/lib/properties/webkitTextOrientation.js deleted file mode 100644 index b43bfe8..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextOrientation.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-orientation', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-orientation'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextSecurity.js b/node_modules/cssstyle/lib/properties/webkitTextSecurity.js deleted file mode 100644 index 27cd712..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextSecurity.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-security', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-security'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextSizeAdjust.js b/node_modules/cssstyle/lib/properties/webkitTextSizeAdjust.js deleted file mode 100644 index 42a1769..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextSizeAdjust.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-size-adjust', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-size-adjust'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextStroke.js b/node_modules/cssstyle/lib/properties/webkitTextStroke.js deleted file mode 100644 index 95f08f0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextStroke.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-stroke', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-stroke'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js b/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js index 34aa180..72a2277 100644 --- a/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js +++ b/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js @@ -3,12 +3,12 @@ var parseColor = require('../parsers').parseColor; module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-stroke-color', parseColor(v)); - }, - get: function () { - return this.getPropertyValue('-webkit-text-stroke-color'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('-webkit-text-stroke-color', parseColor(v)); + }, + get: function() { + return this.getPropertyValue('-webkit-text-stroke-color'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/webkitTextStrokeWidth.js b/node_modules/cssstyle/lib/properties/webkitTextStrokeWidth.js deleted file mode 100644 index 9abdb0d..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTextStrokeWidth.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-text-stroke-width', v); - }, - get: function () { - return this.getPropertyValue('-webkit-text-stroke-width'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransform.js b/node_modules/cssstyle/lib/properties/webkitTransform.js deleted file mode 100644 index 55025d0..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransform.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transform', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransformOrigin.js b/node_modules/cssstyle/lib/properties/webkitTransformOrigin.js deleted file mode 100644 index 17f2470..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransformOrigin.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transform-origin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-origin'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransformOriginX.js b/node_modules/cssstyle/lib/properties/webkitTransformOriginX.js deleted file mode 100644 index 27f356c..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransformOriginX.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transform-origin-x', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-origin-x'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransformOriginY.js b/node_modules/cssstyle/lib/properties/webkitTransformOriginY.js deleted file mode 100644 index cd9fe41..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransformOriginY.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transform-origin-y', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-origin-y'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransformOriginZ.js b/node_modules/cssstyle/lib/properties/webkitTransformOriginZ.js deleted file mode 100644 index 448a4c6..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransformOriginZ.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transform-origin-z', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-origin-z'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransformStyle.js b/node_modules/cssstyle/lib/properties/webkitTransformStyle.js deleted file mode 100644 index 7258af3..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransformStyle.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transform-style', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transform-style'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransition.js b/node_modules/cssstyle/lib/properties/webkitTransition.js deleted file mode 100644 index e8e611a..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransition.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transition', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransitionDelay.js b/node_modules/cssstyle/lib/properties/webkitTransitionDelay.js deleted file mode 100644 index 0e4a855..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransitionDelay.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transition-delay', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition-delay'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransitionDuration.js b/node_modules/cssstyle/lib/properties/webkitTransitionDuration.js deleted file mode 100644 index 916354e..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransitionDuration.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transition-duration', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition-duration'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransitionProperty.js b/node_modules/cssstyle/lib/properties/webkitTransitionProperty.js deleted file mode 100644 index 2c05b93..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransitionProperty.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transition-property', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition-property'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitTransitionTimingFunction.js b/node_modules/cssstyle/lib/properties/webkitTransitionTimingFunction.js deleted file mode 100644 index 6000a5a..0000000 --- a/node_modules/cssstyle/lib/properties/webkitTransitionTimingFunction.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-transition-timing-function', v); - }, - get: function () { - return this.getPropertyValue('-webkit-transition-timing-function'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitUserDrag.js b/node_modules/cssstyle/lib/properties/webkitUserDrag.js deleted file mode 100644 index 91979ce..0000000 --- a/node_modules/cssstyle/lib/properties/webkitUserDrag.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-user-drag', v); - }, - get: function () { - return this.getPropertyValue('-webkit-user-drag'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitUserModify.js b/node_modules/cssstyle/lib/properties/webkitUserModify.js deleted file mode 100644 index f681902..0000000 --- a/node_modules/cssstyle/lib/properties/webkitUserModify.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-user-modify', v); - }, - get: function () { - return this.getPropertyValue('-webkit-user-modify'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitUserSelect.js b/node_modules/cssstyle/lib/properties/webkitUserSelect.js deleted file mode 100644 index a33611f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitUserSelect.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-user-select', v); - }, - get: function () { - return this.getPropertyValue('-webkit-user-select'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitWrap.js b/node_modules/cssstyle/lib/properties/webkitWrap.js deleted file mode 100644 index 1861f67..0000000 --- a/node_modules/cssstyle/lib/properties/webkitWrap.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-wrap', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitWrapFlow.js b/node_modules/cssstyle/lib/properties/webkitWrapFlow.js deleted file mode 100644 index f213f11..0000000 --- a/node_modules/cssstyle/lib/properties/webkitWrapFlow.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-wrap-flow', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-flow'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitWrapMargin.js b/node_modules/cssstyle/lib/properties/webkitWrapMargin.js deleted file mode 100644 index 27b6d57..0000000 --- a/node_modules/cssstyle/lib/properties/webkitWrapMargin.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-wrap-margin', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-margin'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitWrapPadding.js b/node_modules/cssstyle/lib/properties/webkitWrapPadding.js deleted file mode 100644 index b408d5f..0000000 --- a/node_modules/cssstyle/lib/properties/webkitWrapPadding.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-wrap-padding', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-padding'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitWrapShapeInside.js b/node_modules/cssstyle/lib/properties/webkitWrapShapeInside.js deleted file mode 100644 index 52e04cc..0000000 --- a/node_modules/cssstyle/lib/properties/webkitWrapShapeInside.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-wrap-shape-inside', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-shape-inside'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitWrapShapeOutside.js b/node_modules/cssstyle/lib/properties/webkitWrapShapeOutside.js deleted file mode 100644 index 8bb0407..0000000 --- a/node_modules/cssstyle/lib/properties/webkitWrapShapeOutside.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-wrap-shape-outside', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-shape-outside'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitWrapThrough.js b/node_modules/cssstyle/lib/properties/webkitWrapThrough.js deleted file mode 100644 index a6dc684..0000000 --- a/node_modules/cssstyle/lib/properties/webkitWrapThrough.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-wrap-through', v); - }, - get: function () { - return this.getPropertyValue('-webkit-wrap-through'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/webkitWritingMode.js b/node_modules/cssstyle/lib/properties/webkitWritingMode.js deleted file mode 100644 index ef1b1f7..0000000 --- a/node_modules/cssstyle/lib/properties/webkitWritingMode.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('-webkit-writing-mode', v); - }, - get: function () { - return this.getPropertyValue('-webkit-writing-mode'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/whiteSpace.js b/node_modules/cssstyle/lib/properties/whiteSpace.js deleted file mode 100644 index 969718f..0000000 --- a/node_modules/cssstyle/lib/properties/whiteSpace.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('white-space', v); - }, - get: function () { - return this.getPropertyValue('white-space'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/widows.js b/node_modules/cssstyle/lib/properties/widows.js deleted file mode 100644 index 02b7298..0000000 --- a/node_modules/cssstyle/lib/properties/widows.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('widows', v); - }, - get: function () { - return this.getPropertyValue('widows'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/width.js b/node_modules/cssstyle/lib/properties/width.js index b64161e..a8c365d 100644 --- a/node_modules/cssstyle/lib/properties/width.js +++ b/node_modules/cssstyle/lib/properties/width.js @@ -3,22 +3,22 @@ var parseMeasurement = require('../parsers').parseMeasurement; function parse(v) { - if (String(v).toLowerCase() === 'auto') { - return 'auto'; - } - if (String(v).toLowerCase() === 'inherit') { - return 'inherit'; - } - return parseMeasurement(v); + if (String(v).toLowerCase() === 'auto') { + return 'auto'; + } + if (String(v).toLowerCase() === 'inherit') { + return 'inherit'; + } + return parseMeasurement(v); } module.exports.definition = { - set: function (v) { - this._setProperty('width', parse(v)); - }, - get: function () { - return this.getPropertyValue('width'); - }, - enumerable: true, - configurable: true + set: function(v) { + this._setProperty('width', parse(v)); + }, + get: function() { + return this.getPropertyValue('width'); + }, + enumerable: true, + configurable: true, }; diff --git a/node_modules/cssstyle/lib/properties/wordBreak.js b/node_modules/cssstyle/lib/properties/wordBreak.js deleted file mode 100644 index 568f19b..0000000 --- a/node_modules/cssstyle/lib/properties/wordBreak.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('word-break', v); - }, - get: function () { - return this.getPropertyValue('word-break'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/wordSpacing.js b/node_modules/cssstyle/lib/properties/wordSpacing.js deleted file mode 100644 index bfb77e4..0000000 --- a/node_modules/cssstyle/lib/properties/wordSpacing.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('word-spacing', v); - }, - get: function () { - return this.getPropertyValue('word-spacing'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/wordWrap.js b/node_modules/cssstyle/lib/properties/wordWrap.js deleted file mode 100644 index f826c91..0000000 --- a/node_modules/cssstyle/lib/properties/wordWrap.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('word-wrap', v); - }, - get: function () { - return this.getPropertyValue('word-wrap'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/writingMode.js b/node_modules/cssstyle/lib/properties/writingMode.js deleted file mode 100644 index e5affa4..0000000 --- a/node_modules/cssstyle/lib/properties/writingMode.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('writing-mode', v); - }, - get: function () { - return this.getPropertyValue('writing-mode'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/zIndex.js b/node_modules/cssstyle/lib/properties/zIndex.js deleted file mode 100644 index 3d81e08..0000000 --- a/node_modules/cssstyle/lib/properties/zIndex.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('z-index', v); - }, - get: function () { - return this.getPropertyValue('z-index'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/properties/zoom.js b/node_modules/cssstyle/lib/properties/zoom.js deleted file mode 100644 index e563185..0000000 --- a/node_modules/cssstyle/lib/properties/zoom.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports.definition = { - set: function (v) { - this._setProperty('zoom', v); - }, - get: function () { - return this.getPropertyValue('zoom'); - }, - enumerable: true, - configurable: true -}; diff --git a/node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js b/node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js new file mode 100644 index 0000000..ded2cc4 --- /dev/null +++ b/node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = function getBasicPropertyDescriptor(name) { + return { + set: function(v) { + this._setProperty(name, v); + }, + get: function() { + return this.getPropertyValue(name); + }, + enumerable: true, + configurable: true, + }; +}; diff --git a/node_modules/cssstyle/package.json b/node_modules/cssstyle/package.json index 578317b..3f8810c 100644 --- a/node_modules/cssstyle/package.json +++ b/node_modules/cssstyle/package.json @@ -1,32 +1,42 @@ { - "_from": "cssstyle@>= 0.2.37 < 0.3.0", - "_id": "cssstyle@0.2.37", + "_from": "cssstyle@^1.1.1", + "_id": "cssstyle@1.2.2", "_inBundle": false, - "_integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "_integrity": "sha512-43wY3kl1CVQSvL7wUY1qXkxVGkStjpkDmVjiIKX8R97uhajy8Bybay78uOtqvh7Q5GK75dNPfW0geWjE6qQQow==", "_location": "/cssstyle", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "cssstyle@>= 0.2.37 < 0.3.0", + "raw": "cssstyle@^1.1.1", "name": "cssstyle", "escapedName": "cssstyle", - "rawSpec": ">= 0.2.37 < 0.3.0", + "rawSpec": "^1.1.1", "saveSpec": null, - "fetchSpec": ">= 0.2.37 < 0.3.0" + "fetchSpec": "^1.1.1" }, "_requiredBy": [ "/jsdom" ], - "_resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", - "_shasum": "541097234cb2513c83ceed3acddc27ff27987d54", - "_spec": "cssstyle@>= 0.2.37 < 0.3.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom", + "_resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.2.tgz", + "_shasum": "427ea4d585b18624f6fdbf9de7a2a1a3ba713077", + "_spec": "cssstyle@^1.1.1", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom", "bugs": { - "url": "https://github.com/chad3814/CSSStyleDeclaration/issues" + "url": "https://github.com/jsakas/CSSStyleDeclaration/issues" }, "bundleDependencies": false, "contributors": [ + { + "name": "Chad Walker", + "email": "chad@chad-cat-lore-eddie.com", + "url": "https://github.com/chad3814" + }, + { + "name": "Rafał Ruciński", + "email": "fatfisz@gmail.com", + "url": "https://fatfisz.com" + }, { "name": "Nikita Vasilyev", "email": "me@elv1s.ru" @@ -44,17 +54,23 @@ "deprecated": false, "description": "CSSStyleDeclaration Object Model implementation", "devDependencies": { - "babel-generator": "~6.11.4", - "babel-traverse": "~6.13.0", - "babel-types": "~6.13.0", - "babylon": "~6.8.4", - "nodeunit": "~0.8.0", - "resolve": "~1.1.7" + "babel-generator": "~6.26.1", + "babel-traverse": "~6.26.0", + "babel-types": "~6.26.0", + "babylon": "~6.18.0", + "eslint": "5.13.0", + "eslint-config-prettier": "4.0.0", + "eslint-plugin-prettier": "3.0.1", + "nodeunit": "~0.11.3", + "npm-run-all": "^4.1.5", + "prettier": "1.16.4", + "request": "^2.88.0", + "resolve": "~1.8.1" }, "directories": { "lib": "./lib" }, - "homepage": "https://github.com/chad3814/CSSStyleDeclaration", + "homepage": "https://github.com/jsakas/CSSStyleDeclaration", "keywords": [ "CSS", "CSSStyleDeclaration", @@ -64,19 +80,26 @@ "main": "./lib/CSSStyleDeclaration.js", "maintainers": [ { - "name": "Chad Walker", - "email": "chad@chad-cat-lore-eddie.com", - "url": "https://github.com/chad3814" + "name": "Jon Sakas", + "email": "jon.sakas@gmail.com", + "url": "https://jon.sakas.co/" } ], "name": "cssstyle", "repository": { "type": "git", - "url": "git+https://github.com/chad3814/CSSStyleDeclaration.git" + "url": "git+https://github.com/jsakas/CSSStyleDeclaration.git" }, "scripts": { - "prepublish": "node ./scripts/generate_properties.js", - "test": "./scripts/run_tests.sh" + "download": "node ./scripts/download_latest_properties.js && eslint lib/allProperties.js --fix", + "generate": "run-p generate:*", + "generate:implemented_properties": "node ./scripts/generate_implemented_properties.js", + "generate:properties": "node ./scripts/generate_properties.js", + "lint": "npm run generate && eslint . --max-warnings 0", + "lint:fix": "eslint . --fix --max-warnings 0", + "prepublishOnly": "npm run test-ci", + "test": "npm run generate && nodeunit tests", + "test-ci": "npm run lint && npm run test" }, - "version": "0.2.37" + "version": "1.2.2" } diff --git a/node_modules/cssstyle/scripts/download_latest_properties.js b/node_modules/cssstyle/scripts/download_latest_properties.js new file mode 100644 index 0000000..5f17ef5 --- /dev/null +++ b/node_modules/cssstyle/scripts/download_latest_properties.js @@ -0,0 +1,88 @@ +'use strict'; + +/* + * W3C provides JSON list of all CSS properties and their status in the standard + * + * documentation: https://www.w3.org/Style/CSS/all-properties.en.html + * JSON url: ( https://www.w3.org/Style/CSS/all-properties.en.json ) + * + * Download that file, filter out duplicates and filter the properties based on the wanted standard level + * + * ED - Editors' Draft (not a W3C Technical Report) + * FPWD - First Public Working Draft + * WD - Working Draft + * LC - Last Call Working Draft + * CR - Candidate Recommendation + * PR - Proposed Recommendation + * REC - Recommendation + * NOTE - Working Group Note + */ + +var fs = require('fs'); +var path = require('path'); + +var request = require('request'); + +const { camelToDashed } = require('../lib/parsers'); + +var url = 'https://www.w3.org/Style/CSS/all-properties.en.json'; + +console.log('Downloading CSS properties...'); + +function toCamelCase(propName) { + return propName.replace(/-([a-z])/g, function(g) { + return g[1].toUpperCase(); + }); +} + +request(url, function(error, response, body) { + if (!error && response.statusCode === 200) { + var allCSSProperties = JSON.parse(body); + + // Filter out all properties newer than Working Draft + var workingDraftAndOlderProperties = allCSSProperties.filter(function(cssProp) { + // TODO: --* css Needs additional logic to this module, so filter it out for now + return cssProp.status !== 'ED' && cssProp.status !== 'FPWD' && cssProp.property !== '--*'; + }); + + // Remove duplicates, there can be many properties in different states of standard + // and add only property names to the list + var CSSpropertyNames = []; + workingDraftAndOlderProperties.forEach(function(cssProp) { + const camelCaseName = toCamelCase(cssProp.property); + + if (CSSpropertyNames.indexOf(camelCaseName) === -1) { + CSSpropertyNames.push(camelCaseName); + } + }); + + var out_file = fs.createWriteStream(path.resolve(__dirname, './../lib/allProperties.js'), { + encoding: 'utf-8', + }); + + var date_today = new Date(); + out_file.write( + "'use strict';\n\n// autogenerated - " + + (date_today.getMonth() + 1 + '/' + date_today.getDate() + '/' + date_today.getFullYear()) + + '\n\n' + ); + out_file.write('/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\n'); + + out_file.write('var allProperties = new Set();\n'); + out_file.write('module.exports = allProperties;\n'); + + CSSpropertyNames.forEach(function(property) { + out_file.write('allProperties.add(' + JSON.stringify(camelToDashed(property)) + ');\n'); + }); + + out_file.end(function(err) { + if (err) { + throw err; + } + + console.log('Generated ' + Object.keys(CSSpropertyNames).length + ' properties.'); + }); + } else { + throw error; + } +}); diff --git a/node_modules/cssstyle/scripts/generate_implemented_properties.js b/node_modules/cssstyle/scripts/generate_implemented_properties.js new file mode 100644 index 0000000..caa88f1 --- /dev/null +++ b/node_modules/cssstyle/scripts/generate_implemented_properties.js @@ -0,0 +1,61 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const t = require('babel-types'); +const generate = require('babel-generator').default; +const camelToDashed = require('../lib/parsers').camelToDashed; + +const dashedProperties = fs + .readdirSync(path.resolve(__dirname, '../lib/properties')) + .filter(propertyFile => propertyFile.substr(-3) === '.js') + .map(propertyFile => camelToDashed(propertyFile.replace('.js', ''))); + +const out_file = fs.createWriteStream(path.resolve(__dirname, '../lib/implementedProperties.js'), { + encoding: 'utf-8', +}); +var date_today = new Date(); +out_file.write( + "'use strict';\n\n// autogenerated - " + + (date_today.getMonth() + 1 + '/' + date_today.getDate() + '/' + date_today.getFullYear()) + + '\n\n' +); +out_file.write('/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\n'); + +const statements = []; +statements.push( + t.variableDeclaration('var', [ + t.variableDeclarator( + t.identifier('implementedProperties'), + t.newExpression(t.identifier('Set'), []) + ), + ]) +); + +dashedProperties.forEach(property => { + statements.push( + t.expressionStatement( + t.callExpression( + t.memberExpression(t.identifier('implementedProperties'), t.identifier('add')), + [t.stringLiteral(property)] + ) + ) + ); +}); + +statements.push( + t.expressionStatement( + t.assignmentExpression( + '=', + t.memberExpression(t.identifier('module'), t.identifier('exports')), + t.identifier('implementedProperties') + ) + ) +); + +out_file.write(generate(t.program(statements)).code + '\n'); +out_file.end(function(err) { + if (err) { + throw err; + } +}); diff --git a/node_modules/cssstyle/scripts/generate_properties.js b/node_modules/cssstyle/scripts/generate_properties.js index b8c8afd..33a4272 100644 --- a/node_modules/cssstyle/scripts/generate_properties.js +++ b/node_modules/cssstyle/scripts/generate_properties.js @@ -18,31 +18,39 @@ function getUniqueIndex() { return uniqueIndex++; } -var property_files = fs.readdirSync(path.resolve(__dirname, '../lib/properties')).filter(function (property) { +var property_files = fs + .readdirSync(path.resolve(__dirname, '../lib/properties')) + .filter(function(property) { return property.substr(-3) === '.js'; + }); +var out_file = fs.createWriteStream(path.resolve(__dirname, '../lib/properties.js'), { + encoding: 'utf-8', }); -var out_file = fs.createWriteStream(path.resolve(__dirname, '../lib/properties.js'), {encoding: 'utf-8'}); - -out_file.write('\'use strict\';\n\n// autogenerated\n\n'); -out_file.write('/*\n *\n * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties\n */\n\n'); +var date_today = new Date(); +out_file.write( + "'use strict';\n\n// autogenerated - " + + (date_today.getMonth() + 1 + '/' + date_today.getDate() + '/' + date_today.getFullYear()) + + '\n\n' +); +out_file.write('/*\n *\n * https://www.w3.org/Style/CSS/all-properties.en.html\n */\n\n'); function isModuleDotExports(node) { return ( - t.isMemberExpression(node, {computed: false}) && - t.isIdentifier(node.object, {name: 'module'}) && - t.isIdentifier(node.property, {name: 'exports'}) + t.isMemberExpression(node, { computed: false }) && + t.isIdentifier(node.object, { name: 'module' }) && + t.isIdentifier(node.property, { name: 'exports' }) ); } function isRequire(node, filename) { if ( t.isCallExpression(node) && - t.isIdentifier(node.callee, {name: 'require'}) && + t.isIdentifier(node.callee, { name: 'require' }) && node.arguments.length === 1 && t.isStringLiteral(node.arguments[0]) ) { var relative = node.arguments[0].value; - var fullPath = resolve.sync(relative, {basedir: dirname(filename)}); - return {relative: relative, fullPath: fullPath}; + var fullPath = resolve.sync(relative, { basedir: dirname(filename) }); + return { relative: relative, fullPath: fullPath }; } else { return false; } @@ -50,26 +58,26 @@ function isRequire(node, filename) { // step 1: parse all files and figure out their dependencies var parsedFilesByPath = {}; -property_files.map(function (property) { - var filename = path.resolve(__dirname, '../lib/properties/' + property); - var src = fs.readFileSync(filename, 'utf8'); - property = basename(property, '.js'); - var ast = babylon.parse(src); - var dependencies = []; - traverse(ast, { - enter(path) { - var r; - if (r = isRequire(path.node, filename)) { - dependencies.push(r.fullPath); - } +property_files.map(function(property) { + var filename = path.resolve(__dirname, '../lib/properties/' + property); + var src = fs.readFileSync(filename, 'utf8'); + property = basename(property, '.js'); + var ast = babylon.parse(src); + var dependencies = []; + traverse(ast, { + enter(path) { + var r; + if ((r = isRequire(path.node, filename))) { + dependencies.push(r.fullPath); } - }); - parsedFilesByPath[filename] = { - filename: filename, - property: property, - ast: ast, - dependencies: dependencies, - }; + }, + }); + parsedFilesByPath[filename] = { + filename: filename, + property: property, + ast: ast, + dependencies: dependencies, + }; }); // step 2: serialize the files in an order where dependencies are always above @@ -81,7 +89,10 @@ function addFile(filename, dependencyPath) { if (dependencyPath.indexOf(filename) !== -1) { throw new Error( 'Circular dependency: ' + - dependencyPath.slice(dependencyPath.indexOf(filename)).concat([filename]).join(' -> ') + dependencyPath + .slice(dependencyPath.indexOf(filename)) + .concat([filename]) + .join(' -> ') ); } var file = parsedFilesByPath[filename]; @@ -91,14 +102,14 @@ function addFile(filename, dependencyPath) { if (!file) { externalDependencies.push(filename); } else { - file.dependencies.forEach(function (dependency) { + file.dependencies.forEach(function(dependency) { addFile(dependency, dependencyPath.concat([filename])); }); parsedFiles.push(parsedFilesByPath[filename]); } addedFiles[filename] = true; } -Object.keys(parsedFilesByPath).forEach(function (filename) { +Object.keys(parsedFilesByPath).forEach(function(filename) { addFile(filename, []); }); // Step 3: add files to output @@ -106,50 +117,37 @@ Object.keys(parsedFilesByPath).forEach(function (filename) { // and updating require calls as appropriate var moduleExportsByPath = {}; var statements = []; -externalDependencies.forEach(function (filename, i) { +externalDependencies.forEach(function(filename, i) { var id = t.identifier( - 'external_dependency_' + - basename(filename, '.js').replace(/[^A-Za-z]/g, '') + - '_' + i + 'external_dependency_' + basename(filename, '.js').replace(/[^A-Za-z]/g, '') + '_' + i ); - moduleExportsByPath[filename] = {defaultExports: id}; + moduleExportsByPath[filename] = { defaultExports: id }; var relativePath = path.relative(path.resolve(__dirname + '/../lib'), filename); if (relativePath[0] !== '.') { relativePath = './' + relativePath; } - statements.push(t.variableDeclaration( - 'var', - [ + statements.push( + t.variableDeclaration('var', [ t.variableDeclarator( id, - t.callExpression( - t.identifier('require'), - [ - t.stringLiteral( - relativePath - ) - ] - ) - ) - ] - )); + t.callExpression(t.identifier('require'), [t.stringLiteral(relativePath)]) + ), + ]) + ); }); function getRequireValue(node, file) { - var r; + var r, e; // replace require("./foo").bar with the named export from foo if ( - t.isMemberExpression(node, {computed: false}) && + t.isMemberExpression(node, { computed: false }) && (r = isRequire(node.object, file.filename)) ) { - var e = moduleExportsByPath[r.fullPath]; + e = moduleExportsByPath[r.fullPath]; if (!e) { return; } if (!e.namedExports) { - return t.memberExpression( - e.defaultExports, - node.property - ); + return t.memberExpression(e.defaultExports, node.property); } if (!e.namedExports[node.property.name]) { throw new Error(r.relative + ' does not export ' + node.property.name); @@ -157,8 +155,8 @@ function getRequireValue(node, file) { return e.namedExports[node.property.name]; // replace require("./foo") with the default export of foo - } else if (r = isRequire(node, file.filename)) { - var e = moduleExportsByPath[r.fullPath]; + } else if ((r = isRequire(node, file.filename))) { + e = moduleExportsByPath[r.fullPath]; if (!e) { if (/^\.\.\//.test(r.relative)) { node.arguments[0].value = r.relative.substr(1); @@ -168,7 +166,7 @@ function getRequireValue(node, file) { return e.defaultExports; } } -parsedFiles.forEach(function (file) { +parsedFiles.forEach(function(file) { var namedExports = {}; var localVariableMap = {}; @@ -176,7 +174,7 @@ parsedFiles.forEach(function (file) { enter(path) { // replace require calls with the corresponding value var r; - if (r = getRequireValue(path.node, file)) { + if ((r = getRequireValue(path.node, file))) { path.replaceWith(r); return; } @@ -190,21 +188,21 @@ parsedFiles.forEach(function (file) { (r = getRequireValue(path.node.declarations[0].init, file)) ) { var newName = 'compiled_local_variable_reference_' + getUniqueIndex(); - path.scope.rename( - path.node.declarations[0].id.name, - newName - ); + path.scope.rename(path.node.declarations[0].id.name, newName); localVariableMap[newName] = r; path.remove(); return; } + // rename all top level functions to keep them local to the module + if (t.isFunctionDeclaration(path.node) && t.isProgram(path.parent)) { + path.scope.rename(path.node.id.name, file.property + '_local_fn_' + path.node.id.name); + return; + } + // rename all top level variables to keep them local to the module - if ( - t.isVariableDeclaration(path.node) && - t.isProgram(path.parent) - ) { - path.node.declarations.forEach(function (declaration) { + if (t.isVariableDeclaration(path.node) && t.isProgram(path.parent)) { + path.node.declarations.forEach(function(declaration) { path.scope.rename( declaration.id.name, file.property + '_local_var_' + declaration.id.name @@ -215,7 +213,7 @@ parsedFiles.forEach(function (file) { // replace module.exports.bar with a variable for the named export if ( - t.isMemberExpression(path.node, {computed: false}) && + t.isMemberExpression(path.node, { computed: false }) && isModuleDotExports(path.node.object) ) { var name = path.node.property.name; @@ -223,7 +221,7 @@ parsedFiles.forEach(function (file) { path.replaceWith(identifier); namedExports[name] = identifier; } - } + }, }); traverse(file.ast, { enter(path) { @@ -233,25 +231,29 @@ parsedFiles.forEach(function (file) { ) { path.replaceWith(localVariableMap[path.node.name]); } - } + }, }); - var defaultExports = t.objectExpression(Object.keys(namedExports).map(function (name) { - return t.objectProperty(t.identifier(name), namedExports[name]); - })); + var defaultExports = t.objectExpression( + Object.keys(namedExports).map(function(name) { + return t.objectProperty(t.identifier(name), namedExports[name]); + }) + ); moduleExportsByPath[file.filename] = { namedExports: namedExports, - defaultExports: defaultExports + defaultExports: defaultExports, }; - statements.push(t.variableDeclaration( - 'var', - Object.keys(namedExports).map(function (name) { - return t.variableDeclarator(namedExports[name]); - }) - )) + statements.push( + t.variableDeclaration( + 'var', + Object.keys(namedExports).map(function(name) { + return t.variableDeclarator(namedExports[name]); + }) + ) + ); statements.push.apply(statements, file.ast.program.body); }); var propertyDefinitions = []; -parsedFiles.forEach(function (file) { +parsedFiles.forEach(function(file) { var dashed = camelToDashed(file.property); propertyDefinitions.push( t.objectProperty( @@ -261,42 +263,30 @@ parsedFiles.forEach(function (file) { ); if (file.property !== dashed) { propertyDefinitions.push( - t.objectProperty( - t.stringLiteral(dashed), - t.identifier(file.property + '_export_definition') - ) + t.objectProperty(t.stringLiteral(dashed), t.identifier(file.property + '_export_definition')) ); } }); var definePropertiesCall = t.callExpression( - t.memberExpression( - t.identifier('Object'), - t.identifier('defineProperties') - ), - [ - t.identifier('prototype'), - t.objectExpression( - propertyDefinitions - ) - ] + t.memberExpression(t.identifier('Object'), t.identifier('defineProperties')), + [t.identifier('prototype'), t.objectExpression(propertyDefinitions)] ); -statements.push(t.expressionStatement( - t.assignmentExpression( - '=', - t.memberExpression( - t.identifier('module'), - t.identifier('exports') - ), - t.functionExpression( - null, - [t.identifier('prototype')], - t.blockStatement([t.expressionStatement(definePropertiesCall)]) +statements.push( + t.expressionStatement( + t.assignmentExpression( + '=', + t.memberExpression(t.identifier('module'), t.identifier('exports')), + t.functionExpression( + null, + [t.identifier('prototype')], + t.blockStatement([t.expressionStatement(definePropertiesCall)]) + ) ) ) -)); -out_file.write(generate(t.program(statements)).code + '\n') -out_file.end(function (err) { - if (err) { - throw err; - } +); +out_file.write(generate(t.program(statements)).code + '\n'); +out_file.end(function(err) { + if (err) { + throw err; + } }); diff --git a/node_modules/cssstyle/scripts/run_tests.sh b/node_modules/cssstyle/scripts/run_tests.sh deleted file mode 100755 index dc32fc3..0000000 --- a/node_modules/cssstyle/scripts/run_tests.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -node ./scripts/generate_properties.js -nodeunit tests diff --git a/node_modules/cssstyle/tests/tests.js b/node_modules/cssstyle/tests/tests.js index 8227711..945040c 100644 --- a/node_modules/cssstyle/tests/tests.js +++ b/node_modules/cssstyle/tests/tests.js @@ -1,405 +1,669 @@ -"use strict"; -var util = require('util'); +'use strict'; var cssstyle = require('../lib/CSSStyleDeclaration'); -var camelToDashed = require('../lib/parsers').camelToDashed; +var { dashedToCamelCase } = require('../lib/parsers'); -/** - * These are the required properties - * see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties - **/ -var properties = [ 'azimuth', 'background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage', 'backgroundPosition', 'backgroundRepeat', 'border', 'borderCollapse', 'borderColor', 'borderSpacing', 'borderStyle', 'borderTop', 'borderRight', 'borderBottom', 'borderLeft', 'borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor', 'borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle', 'borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth', 'borderWidth', 'bottom', 'captionSide', 'clear', 'clip', 'color', 'content', 'counterIncrement', 'counterReset', 'cue', 'cueAfter', 'cueBefore', 'cursor', 'direction', 'display', 'elevation', 'emptyCells', 'cssFloat', 'font', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontWeight', 'height', 'left', 'letterSpacing', 'lineHeight', 'listStyle', 'listStyleImage', 'listStylePosition', 'listStyleType', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'orphans', 'outline', 'outlineColor', 'outlineStyle', 'outlineWidth', 'overflow', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'page', 'pageBreakAfter', 'pageBreakBefore', 'pageBreakInside', 'pause', 'pauseAfter', 'pauseBefore', 'pitch', 'pitchRange', 'playDuring', 'position', 'quotes', 'richness', 'right', 'size', 'speak', 'speakHeader', 'speakNumeral', 'speakPunctuation', 'speechRate', 'stress', 'tableLayout', 'textAlign', 'textDecoration', 'textIndent', 'textShadow', 'textTransform', 'top', 'unicodeBidi', 'verticalAlign', 'visibility', 'voiceFamily', 'volume', 'whiteSpace', 'widows', 'width', 'wordSpacing', 'zIndex']; -var dashed_properties = properties.map(function (property) { - return camelToDashed(property); +var dashedProperties = [ + ...require('../lib/allProperties'), + ...require('../lib/allExtraProperties'), +]; +var allowedProperties = dashedProperties.map(dashedToCamelCase); +var implementedProperties = Array.from(require('../lib/implementedProperties')).map( + dashedToCamelCase +); +var invalidProperties = implementedProperties.filter(function(property) { + return !allowedProperties.includes(property); }); module.exports = { - 'Verify Has Properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(properties.length * 2); - properties.forEach(function (property) { - test.ok(style.__lookupGetter__(property), 'missing ' + property + ' property'); - test.ok(style.__lookupSetter__(property), 'missing ' + property + ' property'); - }); - test.done(); - }, - 'Verify Has Dashed Properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(dashed_properties.length * 2); - dashed_properties.forEach(function (property) { - test.ok(style.__lookupGetter__(property), 'missing ' + property + ' property'); - test.ok(style.__lookupSetter__(property), 'missing ' + property + ' property'); - }); - test.done(); - }, - 'Verify Has Functions': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(6); - test.ok(typeof style.getPropertyValue === 'function', 'missing getPropertyValue()'); - test.ok(typeof style.getPropertyCSSValue === 'function', 'missing getPropertyCSSValue()'); - test.ok(typeof style.removeProperty === 'function', 'missing removeProperty()'); - test.ok(typeof style.getPropertyPriority === 'function', 'missing getPropertyPriority()'); - test.ok(typeof style.setProperty === 'function', 'missing setProperty()'); - test.ok(typeof style.item === 'function', 'missing item()'); - test.done(); - }, - 'Verify Has Special Properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(5); - test.ok(style.__lookupGetter__('cssText'), 'missing cssText getter'); - test.ok(style.__lookupSetter__('cssText'), 'missing cssText setter'); - test.ok(style.__lookupGetter__('length'), 'missing length getter'); - test.ok(style.__lookupSetter__('length'), 'missing length setter'); - test.ok(style.__lookupGetter__('parentRule'), 'missing parentRule getter'); - test.done(); - }, - 'Test From Style String': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(8); - style.cssText = 'color: blue; background-color: red; width: 78%'; - test.ok(3 === style.length, 'length is not 3'); - test.ok('color: blue; background-color: red; width: 78%;' === style.cssText, 'cssText is wrong'); - test.ok('blue' === style.getPropertyValue('color'), "getPropertyValue('color') failed"); - test.ok('color' === style.item(0), 'item(0) failed'); - test.ok('background-color' === style[1], 'style[1] failed'); - test.ok('red' === style.backgroundColor, 'style.backgroundColor failed with "' + style.backgroundColor + '"'); - style.cssText = ''; - test.ok('' === style.cssText, 'cssText is not empty'); - test.ok(0 === style.length, 'length is not 0'); - test.done(); - }, - 'Test From Properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(11); - style.color = 'blue'; - test.ok(1 === style.length, 'length is not 1'); - test.ok('color' === style[0], 'style[0] is not color'); - test.ok('color: blue;' === style.cssText, 'cssText is wrong'); - test.ok('color' === style.item(0), 'item(0) is not color'); - test.ok('blue' === style.color, 'color is not blue'); - style.backgroundColor = 'red'; - test.ok(2 === style.length, 'length is not 2'); - test.ok('color' === style[0], 'style[0] is not color'); - test.ok('background-color' === style[1], 'style[1] is not background-color'); - test.ok('color: blue; background-color: red;' === style.cssText, 'cssText is wrong'); - test.ok('red' === style.backgroundColor, 'backgroundColor is not red'); - style.removeProperty('color'); - test.ok('background-color' === style[0], 'style[0] is not background-color'); - test.done(); - }, - 'Test Shorthand Properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(11); - style.background = 'blue url(http://www.example.com/some_img.jpg)'; - test.ok('blue' === style.backgroundColor, 'backgroundColor is not blue'); - test.ok('url(http://www.example.com/some_img.jpg)' === style.backgroundImage, 'backgroundImage is wrong'); - test.ok('blue url(http://www.example.com/some_img.jpg)' === style.background, 'background is different'); - style.border = '0 solid black'; - test.ok('0px' === style.borderWidth, 'borderWidth is not 0px'); - test.ok('solid' === style.borderStyle, 'borderStyle is not solid'); - test.ok('black' === style.borderColor, 'borderColor is not black'); - test.ok('0px' === style.borderTopWidth, 'borderTopWidth is not 0px'); - test.ok('solid' === style.borderLeftStyle, 'borderLeftStyle is not solid'); - test.ok('black' === style.borderBottomColor, 'borderBottomColor is not black'); - style.font = '12em monospace'; - test.ok('12em' === style.fontSize, 'fontSize is not 12em'); - test.ok('monospace' === style.fontFamily, 'fontFamily is not monospace'); - test.done(); - }, - 'Test width and height Properties and null and empty strings': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(7); - style.height = 6; - test.ok('' === style.height, 'height does not remain unset'); - style.width = 0; - test.ok('0px' === style.width, 'width is not 0px'); - style.height = '34%'; - test.ok('34%' === style.height, 'height is not 34%'); - style.height = ''; - test.ok(style.length === 1, 'length is not 1'); - test.ok('width: 0px;' === style.cssText, 'cssText is not "width: 0px;"'); - style.width = null; - test.ok(style.length === 0, 'length is not 0'); - test.ok('' === style.cssText, 'cssText is not empty string'); - test.done(); - }, - 'Test Implicit Properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(7); - style.borderWidth = 0; - test.ok(1 === style.length, 'length is not 1'); - test.ok('0px' === style.borderWidth, 'borderWidth is not 0px'); - test.ok('0px' === style.borderTopWidth, 'borderTopWidth is not 0px'); - test.ok('0px' === style.borderBottomWidth, 'borderBottomWidth is not 0px'); - test.ok('0px' === style.borderLeftWidth, 'borderLeftWidth is not 0px'); - test.ok('0px' === style.borderRightWidth, 'borderRightWidth is not 0px'); - test.ok('border-width: 0px;' === style.cssText, 'cssText is not "border-width: 0px", "' + style.cssText + '"'); - test.done(); - }, - 'Test Top, Left, Right, Bottom Properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(6); - style.top = 0; - style.left = '0%'; - style.right = '5em'; - style.bottom = '12pt'; - test.ok('0px' === style.top, 'top is not 0px'); - test.ok('0%' === style.left, 'left is not 0%'); - test.ok('5em' === style.right, 'right is not 5em'); - test.ok('12pt' === style.bottom, 'bottom is not 12pt'); - test.ok(4 === style.length, 'length is not 4'); - test.ok('top: 0px; left: 0%; right: 5em; bottom: 12pt;' === style.cssText, 'text is not "top: 0px; left: 0%; right: 5em; bottom: 12pt;"'); - test.done(); - }, - 'Test Clear and Clip Properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(10); - style.clear = 'none'; - test.ok('none' === style.clear, 'clear is not none'); - style.clear = 'lfet'; // intentionally wrong - test.ok('none' === style.clear, 'clear is not still none'); - style.clear = 'left'; - test.ok('left' === style.clear, 'clear is not left'); - style.clear = 'right'; - test.ok('right' === style.clear, 'clear is not right'); - style.clear = 'both'; - test.ok('both' === style.clear, 'clear is not both'); - style.clip = 'elipse(5px, 10px)'; - test.ok('' === style.clip, 'clip should not be set'); - test.ok(1 === style.length, 'length is not 1'); - style.clip = 'rect(0, 3Em, 2pt, 50%)'; - test.ok('rect(0px, 3em, 2pt, 50%)' === style.clip, 'clip is not "rect(0px, 3em, 2pt, 50%)", "' + style.clip + '"'); - test.ok(2 === style.length, 'length is not 2'); - test.ok('clear: both; clip: rect(0px, 3em, 2pt, 50%);' === style.cssText, 'cssText is not "clear: both; clip: rect(0px, 3em, 2pt, 50%);"'); - test.done(); - }, - 'Test colors': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(4); - style.color = 'rgba(0,0,0,0)'; - test.ok('rgba(0, 0, 0, 0)' === style.color, 'color is not rgba(0, 0, 0, 0)'); - style.color = 'rgba(5%, 10%, 20%, 0.4)'; - test.ok('rgba(12, 25, 51, 0.4)' === style.color, 'color is not rgba(12, 25, 51, 0.4)'); - style.color = 'rgb(33%, 34%, 33%)'; - test.ok('rgb(84, 86, 84)' === style.color, 'color is not rgb(84, 86, 84)'); - style.color = 'rgba(300, 200, 100, 1.5)'; - test.ok('rgb(255, 200, 100)' === style.color, 'color is not rgb(255, 200, 100) ' + style.color); - test.done(); - }, - 'Test short hand properties with embedded spaces': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(4); - style.background = 'rgb(0, 0, 0) url(/something/somewhere.jpg)'; - test.ok('rgb(0, 0, 0)' === style.backgroundColor, 'backgroundColor is not rgb(0, 0, 0): ' + style.backgroundColor); - test.ok('url(/something/somewhere.jpg)' === style.backgroundImage, 'backgroundImage is not url(/something/somewhere.jpg): ' + style.backgroundImage); - test.ok('background: rgb(0, 0, 0) url(/something/somewhere.jpg);' === style.cssText, 'cssText is not correct: ' + style.cssText); - style = new cssstyle.CSSStyleDeclaration(); - style.border = ' 1px solid black '; - test.ok('1px solid black' === style.border, 'multiple spaces not properly parsed: ' + style.border); - test.done(); - }, - 'Setting shorthand properties to an empty string should clear all dependent properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(2); - style.borderWidth = '1px'; - test.ok('border-width: 1px;' === style.cssText, 'cssText is not "border-width: 1px;": ' + style.cssText); - style.border = ''; - test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); - test.done(); - }, - 'Setting implicit properties to an empty string should clear all dependent properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(2); - style.borderTopWidth = '1px'; - test.ok('border-top-width: 1px;' === style.cssText, 'cssText is not "border-top-width: 1px;": ' + style.cssText); - style.borderWidth = ''; - test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); - test.done(); - }, - 'Setting a shorthand property, whose shorthands are implicit properties, to an empty string should clear all dependent properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(4); - style.borderTopWidth = '1px'; - test.ok('border-top-width: 1px;' === style.cssText, 'cssText is not "border-top-width: 1px;": ' + style.cssText); - style.border = ''; - test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); - style.borderTop = '1px solid black'; - test.ok('border-top: 1px solid black;' === style.cssText, 'cssText is not "border-top: 1px solid black;": ' + style.cssText); - style.border = ''; - test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); - test.done(); - }, - 'Setting border values to "none" should clear dependent values': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(8); - style.borderTopWidth = '1px'; - test.ok('border-top-width: 1px;' === style.cssText, 'cssText is not "border-top-width: 1px;": ' + style.cssText); - style.border = 'none'; - test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); - style.borderTopWidth = '1px'; - test.ok('border-top-width: 1px;' === style.cssText, 'cssText is not "border-top-width: 1px;": ' + style.cssText); - style.borderTopStyle = 'none'; - test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); - style.borderTopWidth = '1px'; - test.ok('border-top-width: 1px;' === style.cssText, 'cssText is not "border-top-width: 1px;": ' + style.cssText); - style.borderTop = 'none'; - test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); - style.borderTopWidth = '1px'; - style.borderLeftWidth = '1px'; - test.ok('border-top-width: 1px; border-left-width: 1px;' === style.cssText, 'cssText is not "border-top-width: 1px; border-left-width: 1px;": ' + style.cssText); - style.borderTop = 'none'; - test.ok('border-left-width: 1px;' === style.cssText, 'cssText is not "border-left-width: 1px;": ' + style.cssText); - test.done(); - }, - 'Setting border to 0 should be okay': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(1); - style.border = 0; - test.ok('border: 0px;' === style.cssText, 'cssText is not "border: 0px;": ' + style.cssText); - test.done(); - }, - 'Setting values implicit and shorthand properties via cssText and setProperty should propagate to dependent properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(4); - style.cssText = 'border: 1px solid black;'; - test.ok('border: 1px solid black;' === style.cssText, 'cssText is not "border: 1px solid black;": ' + style.cssText); - test.ok('1px solid black' === style.borderTop, 'borderTop is not "1px solid black": ' + style.borderTop); - style.border = ''; - test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); - style.setProperty('border', '1px solid black'); - test.ok('border: 1px solid black;' === style.cssText, 'cssText is not "border: 1px solid black;": ' + style.cssText); - test.done(); - }, - 'Setting opacity should work': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(3); - style.setProperty('opacity', 0.75); - test.ok('opacity: 0.75;' === style.cssText, 'cssText is not "opacity: 0.75;": ' + style.cssText); - style.opacity = '0.50'; - test.ok('opacity: 0.5;' === style.cssText, 'cssText is not "opacity: 0.5;": ' + style.cssText); - style.opacity = 1.0; - test.ok('opacity: 1;' === style.cssText, 'cssText is not "opacity: 1;": ' + style.cssText); - test.done(); - }, - 'Width and height of auto should work': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(4); - style.width = "auto"; - test.equal(style.cssText,'width: auto;', 'cssText is not "width: auto;": ' + style.cssText); - test.equal(style.width,'auto', 'width is not "auto": ' + style.width); - style = new cssstyle.CSSStyleDeclaration(); - style.height = "auto"; - test.equal(style.cssText,'height: auto;', 'cssText is not "height: auto;": ' + style.cssText); - test.equal(style.height,'auto', 'height is not "auto": ' + style.height); - test.done(); - }, - 'Padding and margin should set/clear shorthand properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - var parts = ["Top","Right","Bottom","Left"]; - var testParts = function (name,v,V) { - style[name] = v; - for (var i = 0; i < 4; i++) { - var part = name + parts[i]; - test.equal(V[i],style[part], part + ' is not "' + V[i] + '": "' + style[part] + '"'); - } - test.equal(v,style[name], name + ' is not "' + v + '": "' + style[name] + '"'); - style[name] = ""; - }; - test.expect(50); - testParts("padding","1px",["1px","1px","1px","1px"]); - testParts("padding","1px 2%",["1px","2%","1px","2%"]); - testParts("padding","1px 2px 3px",["1px","2px","3px","2px"]); - testParts("padding","1px 2px 3px 4px",["1px","2px","3px","4px"]); - style.paddingTop = style.paddingRight = style.paddingBottom = style.paddingLeft = "1px"; - testParts("padding","",["","","",""]); - testParts("margin","1px",["1px","1px","1px","1px"]); - testParts("margin","1px auto",["1px","auto","1px","auto"]); - testParts("margin","1px 2% 3px",["1px","2%","3px","2%"]); - testParts("margin","1px 2px 3px 4px",["1px","2px","3px","4px"]); - style.marginTop = style.marginRight = style.marginBottom = style.marginLeft = "1px"; - testParts("margin","",["","","",""]); - test.done(); - }, - 'Padding and margin shorthands should set main properties': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - var parts = ["Top","Right","Bottom","Left"]; - var testParts = function (name,v,V) { - var expect; - for (var i = 0; i < 4; i++) { - style[name] = v; - style[name+parts[i]] = V; - expect = v.split(/ /); - expect[i] = V; - expect = expect.join(" "); - test.equal(expect,style[name], name + ' is not "' + expect + '": "' + style[name] + '"'); - } - }; - test.expect(12); - testParts("padding","1px 2px 3px 4px","10px"); - testParts("margin","1px 2px 3px 4px","10px"); - testParts("margin","1px 2px 3px 4px","auto"); - test.done(); - }, - 'Setting a value to 0 should return the string value': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(1); - style.setProperty('fill-opacity', 0); - test.ok('0' === style.fillOpacity, 'fillOpacity is not "0": ' + style.fillOpacity); - test.done(); - }, - 'onChange callback should be called when the cssText changes': function (test) { - var style = new cssstyle.CSSStyleDeclaration(function (cssText) { - test.ok('opacity: 0;' === cssText, 'cssText is not "opacity: 0;": ' + cssText); - test.done(); - }); - test.expect(1); - style.setProperty('opacity', 0); - }, - 'Setting float should work the same as cssFloat': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(1); - style.float = 'left'; - test.ok('left' === style.cssFloat, 'cssFloat is not "left": ' + style.cssFloat); - test.done(); - }, - 'Setting improper css to cssText should not throw': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(2); - style.cssText = 'color: '; - test.ok('' === style.cssText, 'cssText wasn\'t cleared: ' + style.cssText); - style.color = 'black'; - style.cssText = 'float: '; - test.ok('' === style.cssText, 'cssText wasn\'t cleared: ' + style.cssText); - test.done(); - }, - 'Make sure url parsing works with quotes': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(3); - style.backgroundImage = 'url(http://some/url/here1.png)'; - test.ok('url(http://some/url/here1.png)' === style.backgroundImage, 'background-image wasn\'t url(http://some/url/here1.png): ' + style.backgroundImage); - style.backgroundImage = 'url(\'http://some/url/here2.png\')'; - test.ok('url(http://some/url/here2.png)' === style.backgroundImage, 'background-image wasn\'t url(http://some/url/here2.png): ' + style.backgroundImage); - style.backgroundImage = 'url("http://some/url/here3.png")'; - test.ok('url(http://some/url/here3.png)' === style.backgroundImage, 'background-image wasn\'t url(http://some/url/here3.png): ' + style.backgroundImage); - test.done(); - }, - 'Make sure setting 0 to a padding or margin works': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(2); - style.padding = 0; - test.equal(style.cssText, 'padding: 0px;', 'padding is not 0px'); - style.margin = '1em'; - style.marginTop = '0' - test.equal(style.marginTop, '0px', 'margin-top is not 0px'); - test.done(); - }, - 'Make sure setting null to background works': function (test) { - var style = new cssstyle.CSSStyleDeclaration(); - test.expect(2); - style.background = 'red'; - test.equal(style.cssText, 'background: red;', 'background is not red'); - style.background = null; - test.equal(style.cssText, '', 'cssText is not empty'); - test.done(); - } + 'Verify Has Only Valid Properties Implemented': function(test) { + test.expect(1); + test.ok( + invalidProperties.length === 0, + invalidProperties.length + + ' invalid properties implemented: ' + + Array.from(invalidProperties).join(', ') + ); + test.done(); + }, + 'Verify Has All Properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(allowedProperties.length * 2); + allowedProperties.forEach(function(property) { + test.ok(style.__lookupGetter__(property), 'missing ' + property + ' property'); + test.ok(style.__lookupSetter__(property), 'missing ' + property + ' property'); + }); + test.done(); + }, + 'Verify Has All Dashed Properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(dashedProperties.length * 2); + dashedProperties.forEach(function(property) { + test.ok(style.__lookupGetter__(property), 'missing ' + property + ' property'); + test.ok(style.__lookupSetter__(property), 'missing ' + property + ' property'); + }); + test.done(); + }, + 'Verify Has Functions': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(6); + test.ok(typeof style.getPropertyValue === 'function', 'missing getPropertyValue()'); + test.ok(typeof style.getPropertyCSSValue === 'function', 'missing getPropertyCSSValue()'); + test.ok(typeof style.removeProperty === 'function', 'missing removeProperty()'); + test.ok(typeof style.getPropertyPriority === 'function', 'missing getPropertyPriority()'); + test.ok(typeof style.setProperty === 'function', 'missing setProperty()'); + test.ok(typeof style.item === 'function', 'missing item()'); + test.done(); + }, + 'Verify Has Special Properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(5); + test.ok(style.__lookupGetter__('cssText'), 'missing cssText getter'); + test.ok(style.__lookupSetter__('cssText'), 'missing cssText setter'); + test.ok(style.__lookupGetter__('length'), 'missing length getter'); + test.ok(style.__lookupSetter__('length'), 'missing length setter'); + test.ok(style.__lookupGetter__('parentRule'), 'missing parentRule getter'); + test.done(); + }, + 'Test From Style String': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(8); + style.cssText = 'color: blue; background-color: red; width: 78%; height: 50vh;'; + test.ok(4 === style.length, 'length is not 4'); + test.ok( + 'color: blue; background-color: red; width: 78%; height: 50vh;' === style.cssText, + 'cssText is wrong' + ); + test.ok('blue' === style.getPropertyValue('color'), "getPropertyValue('color') failed"); + test.ok('color' === style.item(0), 'item(0) failed'); + test.ok('background-color' === style[1], 'style[1] failed'); + test.ok( + 'red' === style.backgroundColor, + 'style.backgroundColor failed with "' + style.backgroundColor + '"' + ); + style.cssText = ''; + test.ok('' === style.cssText, 'cssText is not empty'); + test.ok(0 === style.length, 'length is not 0'); + test.done(); + }, + 'Test From Properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(11); + style.color = 'blue'; + test.ok(1 === style.length, 'length is not 1'); + test.ok('color' === style[0], 'style[0] is not color'); + test.ok('color: blue;' === style.cssText, 'cssText is wrong'); + test.ok('color' === style.item(0), 'item(0) is not color'); + test.ok('blue' === style.color, 'color is not blue'); + style.backgroundColor = 'red'; + test.ok(2 === style.length, 'length is not 2'); + test.ok('color' === style[0], 'style[0] is not color'); + test.ok('background-color' === style[1], 'style[1] is not background-color'); + test.ok('color: blue; background-color: red;' === style.cssText, 'cssText is wrong'); + test.ok('red' === style.backgroundColor, 'backgroundColor is not red'); + style.removeProperty('color'); + test.ok('background-color' === style[0], 'style[0] is not background-color'); + test.done(); + }, + 'Test Shorthand Properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(11); + style.background = 'blue url(http://www.example.com/some_img.jpg)'; + test.ok('blue' === style.backgroundColor, 'backgroundColor is not blue'); + test.ok( + 'url(http://www.example.com/some_img.jpg)' === style.backgroundImage, + 'backgroundImage is wrong' + ); + test.ok( + 'blue url(http://www.example.com/some_img.jpg)' === style.background, + 'background is different' + ); + style.border = '0 solid black'; + test.ok('0px' === style.borderWidth, 'borderWidth is not 0px'); + test.ok('solid' === style.borderStyle, 'borderStyle is not solid'); + test.ok('black' === style.borderColor, 'borderColor is not black'); + test.ok('0px' === style.borderTopWidth, 'borderTopWidth is not 0px'); + test.ok('solid' === style.borderLeftStyle, 'borderLeftStyle is not solid'); + test.ok('black' === style.borderBottomColor, 'borderBottomColor is not black'); + style.font = '12em monospace'; + test.ok('12em' === style.fontSize, 'fontSize is not 12em'); + test.ok('monospace' === style.fontFamily, 'fontFamily is not monospace'); + test.done(); + }, + 'Test width and height Properties and null and empty strings': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(9); + style.height = 6; + test.ok('' === style.height, 'height does not remain unset'); + style.width = 0; + test.ok('0px' === style.width, 'width is not 0px'); + style.height = '34%'; + test.ok('34%' === style.height, 'height is not 34%'); + style.height = '100vh'; + test.ok('100vh' === style.height, 'height is not 100vh'); + style.height = '100vw'; + test.ok('100vw' === style.height, 'height is not 100vw'); + style.height = ''; + test.ok(style.length === 1, 'length is not 1'); + test.ok('width: 0px;' === style.cssText, 'cssText is not "width: 0px;"'); + style.width = null; + test.ok(style.length === 0, 'length is not 0'); + test.ok('' === style.cssText, 'cssText is not empty string'); + test.done(); + }, + 'Test Implicit Properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(7); + style.borderWidth = 0; + test.ok(1 === style.length, 'length is not 1'); + test.ok('0px' === style.borderWidth, 'borderWidth is not 0px'); + test.ok('0px' === style.borderTopWidth, 'borderTopWidth is not 0px'); + test.ok('0px' === style.borderBottomWidth, 'borderBottomWidth is not 0px'); + test.ok('0px' === style.borderLeftWidth, 'borderLeftWidth is not 0px'); + test.ok('0px' === style.borderRightWidth, 'borderRightWidth is not 0px'); + test.ok( + 'border-width: 0px;' === style.cssText, + 'cssText is not "border-width: 0px", "' + style.cssText + '"' + ); + test.done(); + }, + 'Test Top, Left, Right, Bottom Properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(6); + style.top = 0; + style.left = '0%'; + style.right = '5em'; + style.bottom = '12pt'; + test.ok('0px' === style.top, 'top is not 0px'); + test.ok('0%' === style.left, 'left is not 0%'); + test.ok('5em' === style.right, 'right is not 5em'); + test.ok('12pt' === style.bottom, 'bottom is not 12pt'); + test.ok(4 === style.length, 'length is not 4'); + test.ok( + 'top: 0px; left: 0%; right: 5em; bottom: 12pt;' === style.cssText, + 'text is not "top: 0px; left: 0%; right: 5em; bottom: 12pt;"' + ); + test.done(); + }, + 'Test Clear and Clip Properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(10); + style.clear = 'none'; + test.ok('none' === style.clear, 'clear is not none'); + style.clear = 'lfet'; // intentionally wrong + test.ok('none' === style.clear, 'clear is not still none'); + style.clear = 'left'; + test.ok('left' === style.clear, 'clear is not left'); + style.clear = 'right'; + test.ok('right' === style.clear, 'clear is not right'); + style.clear = 'both'; + test.ok('both' === style.clear, 'clear is not both'); + style.clip = 'elipse(5px, 10px)'; + test.ok('' === style.clip, 'clip should not be set'); + test.ok(1 === style.length, 'length is not 1'); + style.clip = 'rect(0, 3Em, 2pt, 50%)'; + test.ok( + 'rect(0px, 3em, 2pt, 50%)' === style.clip, + 'clip is not "rect(0px, 3em, 2pt, 50%)", "' + style.clip + '"' + ); + test.ok(2 === style.length, 'length is not 2'); + test.ok( + 'clear: both; clip: rect(0px, 3em, 2pt, 50%);' === style.cssText, + 'cssText is not "clear: both; clip: rect(0px, 3em, 2pt, 50%);"' + ); + test.done(); + }, + 'Test colors': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(9); + style.color = 'rgba(0,0,0,0)'; + test.ok('rgba(0, 0, 0, 0)' === style.color, 'color is not rgba(0, 0, 0, 0)'); + style.color = 'rgba(5%, 10%, 20%, 0.4)'; + test.ok('rgba(12, 25, 51, 0.4)' === style.color, 'color is not rgba(12, 25, 51, 0.4)'); + style.color = 'rgb(33%, 34%, 33%)'; + test.ok('rgb(84, 86, 84)' === style.color, 'color is not rgb(84, 86, 84)'); + style.color = 'rgba(300, 200, 100, 1.5)'; + test.ok('rgb(255, 200, 100)' === style.color, 'color is not rgb(255, 200, 100) ' + style.color); + style.color = 'hsla(0, 1%, 2%, 0.5)'; + test.ok( + 'hsla(0, 1%, 2%, 0.5)' === style.color, + 'color is not hsla(0, 1%, 2%, 0.5) ' + style.color + ); + style.color = 'hsl(0, 1%, 2%)'; + test.ok('hsl(0, 1%, 2%)' === style.color, 'color is not hsl(0, 1%, 2%) ' + style.color); + style.color = 'rebeccapurple'; + test.ok('rebeccapurple' === style.color, 'color is not rebeccapurple ' + style.color); + style.color = 'transparent'; + test.ok('transparent' === style.color, 'color is not transparent ' + style.color); + style.color = 'currentcolor'; + test.ok('currentcolor' === style.color, 'color is not currentcolor ' + style.color); + test.done(); + }, + 'Test short hand properties with embedded spaces': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(4); + style.background = 'rgb(0, 0, 0) url(/something/somewhere.jpg)'; + test.ok( + 'rgb(0, 0, 0)' === style.backgroundColor, + 'backgroundColor is not rgb(0, 0, 0): ' + style.backgroundColor + ); + test.ok( + 'url(/something/somewhere.jpg)' === style.backgroundImage, + 'backgroundImage is not url(/something/somewhere.jpg): ' + style.backgroundImage + ); + test.ok( + 'background: rgb(0, 0, 0) url(/something/somewhere.jpg);' === style.cssText, + 'cssText is not correct: ' + style.cssText + ); + style = new cssstyle.CSSStyleDeclaration(); + style.border = ' 1px solid black '; + test.ok( + '1px solid black' === style.border, + 'multiple spaces not properly parsed: ' + style.border + ); + test.done(); + }, + 'Setting shorthand properties to an empty string should clear all dependent properties': function( + test + ) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.borderWidth = '1px'; + test.ok( + 'border-width: 1px;' === style.cssText, + 'cssText is not "border-width: 1px;": ' + style.cssText + ); + style.border = ''; + test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); + test.done(); + }, + 'Setting implicit properties to an empty string should clear all dependent properties': function( + test + ) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.borderTopWidth = '1px'; + test.ok( + 'border-top-width: 1px;' === style.cssText, + 'cssText is not "border-top-width: 1px;": ' + style.cssText + ); + style.borderWidth = ''; + test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); + test.done(); + }, + 'Setting a shorthand property, whose shorthands are implicit properties, to an empty string should clear all dependent properties': function( + test + ) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(4); + style.borderTopWidth = '1px'; + test.ok( + 'border-top-width: 1px;' === style.cssText, + 'cssText is not "border-top-width: 1px;": ' + style.cssText + ); + style.border = ''; + test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); + style.borderTop = '1px solid black'; + test.ok( + 'border-top: 1px solid black;' === style.cssText, + 'cssText is not "border-top: 1px solid black;": ' + style.cssText + ); + style.border = ''; + test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); + test.done(); + }, + 'Setting border values to "none" should clear dependent values': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(8); + style.borderTopWidth = '1px'; + test.ok( + 'border-top-width: 1px;' === style.cssText, + 'cssText is not "border-top-width: 1px;": ' + style.cssText + ); + style.border = 'none'; + test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); + style.borderTopWidth = '1px'; + test.ok( + 'border-top-width: 1px;' === style.cssText, + 'cssText is not "border-top-width: 1px;": ' + style.cssText + ); + style.borderTopStyle = 'none'; + test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); + style.borderTopWidth = '1px'; + test.ok( + 'border-top-width: 1px;' === style.cssText, + 'cssText is not "border-top-width: 1px;": ' + style.cssText + ); + style.borderTop = 'none'; + test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); + style.borderTopWidth = '1px'; + style.borderLeftWidth = '1px'; + test.ok( + 'border-top-width: 1px; border-left-width: 1px;' === style.cssText, + 'cssText is not "border-top-width: 1px; border-left-width: 1px;": ' + style.cssText + ); + style.borderTop = 'none'; + test.ok( + 'border-left-width: 1px;' === style.cssText, + 'cssText is not "border-left-width: 1px;": ' + style.cssText + ); + test.done(); + }, + 'Setting border to 0 should be okay': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(1); + style.border = 0; + test.ok('border: 0px;' === style.cssText, 'cssText is not "border: 0px;": ' + style.cssText); + test.done(); + }, + 'Setting values implicit and shorthand properties via cssText and setProperty should propagate to dependent properties': function( + test + ) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(4); + style.cssText = 'border: 1px solid black;'; + test.ok( + 'border: 1px solid black;' === style.cssText, + 'cssText is not "border: 1px solid black;": ' + style.cssText + ); + test.ok( + '1px solid black' === style.borderTop, + 'borderTop is not "1px solid black": ' + style.borderTop + ); + style.border = ''; + test.ok('' === style.cssText, 'cssText is not "": ' + style.cssText); + style.setProperty('border', '1px solid black'); + test.ok( + 'border: 1px solid black;' === style.cssText, + 'cssText is not "border: 1px solid black;": ' + style.cssText + ); + test.done(); + }, + 'Setting opacity should work': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(3); + style.setProperty('opacity', 0.75); + test.ok( + 'opacity: 0.75;' === style.cssText, + 'cssText is not "opacity: 0.75;": ' + style.cssText + ); + style.opacity = '0.50'; + test.ok('opacity: 0.5;' === style.cssText, 'cssText is not "opacity: 0.5;": ' + style.cssText); + style.opacity = 1.0; + test.ok('opacity: 1;' === style.cssText, 'cssText is not "opacity: 1;": ' + style.cssText); + test.done(); + }, + 'Width and height of auto should work': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(4); + style.width = 'auto'; + test.equal(style.cssText, 'width: auto;', 'cssText is not "width: auto;": ' + style.cssText); + test.equal(style.width, 'auto', 'width is not "auto": ' + style.width); + style = new cssstyle.CSSStyleDeclaration(); + style.height = 'auto'; + test.equal(style.cssText, 'height: auto;', 'cssText is not "height: auto;": ' + style.cssText); + test.equal(style.height, 'auto', 'height is not "auto": ' + style.height); + test.done(); + }, + 'Padding and margin should set/clear shorthand properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + var parts = ['Top', 'Right', 'Bottom', 'Left']; + var testParts = function(name, v, V) { + style[name] = v; + for (var i = 0; i < 4; i++) { + var part = name + parts[i]; + test.equal(V[i], style[part], part + ' is not "' + V[i] + '": "' + style[part] + '"'); + } + test.equal(v, style[name], name + ' is not "' + v + '": "' + style[name] + '"'); + style[name] = ''; + }; + test.expect(50); + testParts('padding', '1px', ['1px', '1px', '1px', '1px']); + testParts('padding', '1px 2%', ['1px', '2%', '1px', '2%']); + testParts('padding', '1px 2px 3px', ['1px', '2px', '3px', '2px']); + testParts('padding', '1px 2px 3px 4px', ['1px', '2px', '3px', '4px']); + style.paddingTop = style.paddingRight = style.paddingBottom = style.paddingLeft = '1px'; + testParts('padding', '', ['', '', '', '']); + testParts('margin', '1px', ['1px', '1px', '1px', '1px']); + testParts('margin', '1px auto', ['1px', 'auto', '1px', 'auto']); + testParts('margin', '1px 2% 3px', ['1px', '2%', '3px', '2%']); + testParts('margin', '1px 2px 3px 4px', ['1px', '2px', '3px', '4px']); + style.marginTop = style.marginRight = style.marginBottom = style.marginLeft = '1px'; + testParts('margin', '', ['', '', '', '']); + test.done(); + }, + 'Padding and margin shorthands should set main properties': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + var parts = ['Top', 'Right', 'Bottom', 'Left']; + var testParts = function(name, v, V) { + var expect; + for (var i = 0; i < 4; i++) { + style[name] = v; + style[name + parts[i]] = V; + expect = v.split(/ /); + expect[i] = V; + expect = expect.join(' '); + test.equal(expect, style[name], name + ' is not "' + expect + '": "' + style[name] + '"'); + } + }; + test.expect(12); + testParts('padding', '1px 2px 3px 4px', '10px'); + testParts('margin', '1px 2px 3px 4px', '10px'); + testParts('margin', '1px 2px 3px 4px', 'auto'); + test.done(); + }, + 'Setting a value to 0 should return the string value': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(1); + style.setProperty('fill-opacity', 0); + test.ok('0' === style.fillOpacity, 'fillOpacity is not "0": ' + style.fillOpacity); + test.done(); + }, + 'onChange callback should be called when the cssText changes': function(test) { + var style = new cssstyle.CSSStyleDeclaration(function(cssText) { + test.ok('opacity: 0;' === cssText, 'cssText is not "opacity: 0;": ' + cssText); + test.done(); + }); + test.expect(1); + style.setProperty('opacity', 0); + }, + 'Setting float should work the same as cssFloat': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(1); + style.float = 'left'; + test.ok('left' === style.cssFloat, 'cssFloat is not "left": ' + style.cssFloat); + test.done(); + }, + 'Setting improper css to cssText should not throw': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.cssText = 'color: '; + test.ok('' === style.cssText, "cssText wasn't cleared: " + style.cssText); + style.color = 'black'; + style.cssText = 'float: '; + test.ok('' === style.cssText, "cssText wasn't cleared: " + style.cssText); + test.done(); + }, + 'Make sure url parsing works with quotes': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(3); + style.backgroundImage = 'url(http://some/url/here1.png)'; + test.ok( + 'url(http://some/url/here1.png)' === style.backgroundImage, + "background-image wasn't url(http://some/url/here1.png): " + style.backgroundImage + ); + style.backgroundImage = "url('http://some/url/here2.png')"; + test.ok( + 'url(http://some/url/here2.png)' === style.backgroundImage, + "background-image wasn't url(http://some/url/here2.png): " + style.backgroundImage + ); + style.backgroundImage = 'url("http://some/url/here3.png")'; + test.ok( + 'url(http://some/url/here3.png)' === style.backgroundImage, + "background-image wasn't url(http://some/url/here3.png): " + style.backgroundImage + ); + test.done(); + }, + 'Make sure setting 0 to a padding or margin works': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.padding = 0; + test.equal(style.cssText, 'padding: 0px;', 'padding is not 0px'); + style.margin = '1em'; + style.marginTop = '0'; + test.equal(style.marginTop, '0px', 'margin-top is not 0px'); + test.done(); + }, + 'Make sure setting ex units to a padding or margin works': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.padding = '1ex'; + test.equal(style.cssText, 'padding: 1ex;', 'padding is not 1ex'); + style.margin = '1em'; + style.marginTop = '0.5ex'; + test.equal(style.marginTop, '0.5ex', 'margin-top is not 0.5ex'); + test.done(); + }, + 'Make sure setting null to background works': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.background = 'red'; + test.equal(style.cssText, 'background: red;', 'background is not red'); + style.background = null; + test.equal(style.cssText, '', 'cssText is not empty'); + test.done(); + }, + 'Flex properties should keep their values': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.flexDirection = 'column'; + test.equal(style.cssText, 'flex-direction: column;', 'flex-direction is not column'); + style.flexDirection = 'row'; + test.equal(style.cssText, 'flex-direction: row;', 'flex-direction is not column'); + test.done(); + }, + 'Make sure camelCase properties are not assigned with `.setProperty()`': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(1); + style.setProperty('fontSize', '12px'); + test.equal(style.cssText, '', 'cssText is not empty'); + test.done(); + }, + 'Make sure casing is ignored in `.setProperty()`': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.setProperty('FoNt-SiZe', '12px'); + test.equal(style.fontSize, '12px', 'font-size: 12px'); + test.equal(style.getPropertyValue('font-size'), '12px', 'font-size: 12px'); + test.done(); + }, + 'Support non string entries in border-spacing': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(1); + style.borderSpacing = 0; + test.equal(style.cssText, 'border-spacing: 0px;', 'border-spacing is not 0'); + test.done(); + }, + 'Float should be valid property for `.setProperty()`': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.setProperty('float', 'left'); + test.equal(style.float, 'left'); + test.equal(style.getPropertyValue('float'), 'left', 'float: left'); + test.done(); + }, + 'Make sure flex-shrink works': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(3); + style.setProperty('flex-shrink', 0); + test.equal(style.getPropertyValue('flex-shrink'), '0', 'flex-shrink is not 0'); + style.setProperty('flex-shrink', 1); + test.equal(style.getPropertyValue('flex-shrink'), '1', 'flex-shrink is not 1'); + test.equal(style.cssText, 'flex-shrink: 1;', 'flex-shrink cssText is incorrect'); + test.done(); + }, + 'Make sure flex-grow works': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(2); + style.setProperty('flex-grow', 2); + test.equal(style.getPropertyValue('flex-grow'), '2', 'flex-grow is not 2'); + test.equal(style.cssText, 'flex-grow: 2;', 'flex-grow cssText is incorrect'); + test.done(); + }, + 'Make sure flex-basis works': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(5); + + style.setProperty('flex-basis', 0); + test.equal(style.getPropertyValue('flex-basis'), '0px', 'flex-basis is not 0px'); + + style.setProperty('flex-basis', '250px'); + test.equal(style.getPropertyValue('flex-basis'), '250px', 'flex-basis is not 250px'); + + style.setProperty('flex-basis', '10em'); + test.equal(style.getPropertyValue('flex-basis'), '10em', 'flex-basis is not 10em'); + + style.setProperty('flex-basis', '30%'); + test.equal(style.getPropertyValue('flex-basis'), '30%', 'flex-basis is not 30%'); + + test.equal(style.cssText, 'flex-basis: 30%;', 'flex-basis cssText is incorrect'); + + test.done(); + }, + 'Make sure shorthand flex works': function(test) { + var style = new cssstyle.CSSStyleDeclaration(); + test.expect(19); + + style.setProperty('flex', 'none'); + test.equal(style.getPropertyValue('flex-grow'), '0', 'flex-grow is not 0 if flex: none;'); + test.equal(style.getPropertyValue('flex-shrink'), '0', 'flex-shrink is not 0 if flex: none;'); + test.equal( + style.getPropertyValue('flex-basis'), + 'auto', + 'flex-basis is not `auto` if flex: none;' + ); + style.removeProperty('flex'); + style.removeProperty('flex-basis'); + + style.setProperty('flex', 'auto'); + test.equal(style.getPropertyValue('flex-grow'), '', 'flex-grow is not empty if flex: auto;'); + test.equal( + style.getPropertyValue('flex-shrink'), + '', + 'flex-shrink is not empty if flex: auto;' + ); + test.equal( + style.getPropertyValue('flex-basis'), + 'auto', + 'flex-basis is not `auto` if flex: auto;' + ); + style.removeProperty('flex'); + + style.setProperty('flex', '0 1 250px'); + test.equal(style.getPropertyValue('flex'), '0 1 250px', 'flex value is not `0 1 250px`'); + test.equal(style.getPropertyValue('flex-grow'), '0', 'flex-grow is not 0'); + test.equal(style.getPropertyValue('flex-shrink'), '1', 'flex-shrink is not 1'); + test.equal(style.getPropertyValue('flex-basis'), '250px', 'flex-basis is not 250px'); + style.removeProperty('flex'); + + style.setProperty('flex', '2'); + test.equal(style.getPropertyValue('flex-grow'), '2', 'flex-grow is not 2'); + test.equal(style.getPropertyValue('flex-shrink'), '', 'flex-shrink is not empty'); + test.equal(style.getPropertyValue('flex-basis'), '', 'flex-basis is not empty'); + style.removeProperty('flex'); + + style.setProperty('flex', '20%'); + test.equal(style.getPropertyValue('flex-grow'), '', 'flex-grow is not empty'); + test.equal(style.getPropertyValue('flex-shrink'), '', 'flex-shrink is not empty'); + test.equal(style.getPropertyValue('flex-basis'), '20%', 'flex-basis is not 20%'); + style.removeProperty('flex'); + + style.setProperty('flex', '2 2'); + test.equal(style.getPropertyValue('flex-grow'), '2', 'flex-grow is not 2'); + test.equal(style.getPropertyValue('flex-shrink'), '2', 'flex-shrink is not 2'); + test.equal(style.getPropertyValue('flex-basis'), '', 'flex-basis is not empty'); + style.removeProperty('flex'); + + test.done(); + }, }; diff --git a/node_modules/dashdash/package.json b/node_modules/dashdash/package.json index 125c6b9..7316dee 100644 --- a/node_modules/dashdash/package.json +++ b/node_modules/dashdash/package.json @@ -1,27 +1,32 @@ { - "_from": "dashdash@^1.12.0", + "_args": [ + [ + "dashdash@1.14.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "dashdash@1.14.1", "_id": "dashdash@1.14.1", "_inBundle": false, "_integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "_location": "/dashdash", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "dashdash@^1.12.0", + "raw": "dashdash@1.14.1", "name": "dashdash", "escapedName": "dashdash", - "rawSpec": "^1.12.0", + "rawSpec": "1.14.1", "saveSpec": null, - "fetchSpec": "^1.12.0" + "fetchSpec": "1.14.1" }, "_requiredBy": [ "/sshpk" ], "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "_shasum": "853cfa0f7cbe2fed5de20326b8dd581035f6e2f0", - "_spec": "dashdash@^1.12.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/sshpk", + "_spec": "1.14.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Trent Mick", "email": "trentm@gmail.com", @@ -30,11 +35,9 @@ "bugs": { "url": "https://github.com/trentm/node-dashdash/issues" }, - "bundleDependencies": false, "dependencies": { "assert-plus": "^1.0.0" }, - "deprecated": false, "description": "A light, featureful and explicit option parsing library.", "devDependencies": { "nodeunit": "0.9.x" diff --git a/node_modules/data-urls/README.md b/node_modules/data-urls/README.md index ed7e265..fdbf544 100644 --- a/node_modules/data-urls/README.md +++ b/node_modules/data-urls/README.md @@ -32,7 +32,7 @@ As shown in the examples above, both of these have useful `toString()` methods f ### A word of caution on string decoding -Because Node.js's `Buffer.prototype.toString()` assumes a UTF-8 encoding, simply doing `dataURL.body.toString()` may not work correctly if the `data:` URLs contents were not originally written in UTF-8. This includes if the encoding is "US-ASCII", [aka windows-1252](https://encoding.spec.whatwg.org/#names-and-labels), which is notable for being the default in many cases. +Because Node.js's `Buffer.prototype.toString()` assumes a UTF-8 encoding, simply doing `dataURL.body.toString()` may not work correctly if the `data:` URL's contents were not originally written in UTF-8. This includes if the encoding is "US-ASCII", [aka windows-1252](https://encoding.spec.whatwg.org/#names-and-labels), which is notable for being the default in many cases. A more complete decoding example would use the [whatwg-encoding](https://www.npmjs.com/package/whatwg-encoding) package as follows: diff --git a/node_modules/data-urls/package.json b/node_modules/data-urls/package.json index 05be290..9c453bf 100644 --- a/node_modules/data-urls/package.json +++ b/node_modules/data-urls/package.json @@ -1,27 +1,27 @@ { - "_from": "data-urls@^1.0.0", - "_id": "data-urls@1.0.0", + "_from": "data-urls@^1.1.0", + "_id": "data-urls@1.1.0", "_inBundle": false, - "_integrity": "sha512-ai40PPQR0Fn1lD2PPie79CibnlMN2AYiDhwFX/rZHVsxbs5kNJSjegqXIprhouGXlRdEnfybva7kqRGnB6mypA==", + "_integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", "_location": "/data-urls", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "data-urls@^1.0.0", + "raw": "data-urls@^1.1.0", "name": "data-urls", "escapedName": "data-urls", - "rawSpec": "^1.0.0", + "rawSpec": "^1.1.0", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "^1.1.0" }, "_requiredBy": [ "/jsdom" ], - "_resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.0.0.tgz", - "_shasum": "24802de4e81c298ea8a9388bb0d8e461c774684f", - "_spec": "data-urls@^1.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom", + "_resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", + "_shasum": "15ee0582baa5e22bb59c77140da8f9c76963bbfe", + "_spec": "data-urls@^1.1.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom", "author": { "name": "Domenic Denicola", "email": "d@domenic.me", @@ -32,16 +32,16 @@ }, "bundleDependencies": false, "dependencies": { - "abab": "^1.0.4", - "whatwg-mimetype": "^2.0.0", - "whatwg-url": "^6.4.0" + "abab": "^2.0.0", + "whatwg-mimetype": "^2.2.0", + "whatwg-url": "^7.0.0" }, "deprecated": false, "description": "Parses data: URLs", "devDependencies": { - "eslint": "^4.13.0", - "jest": "^21.2.1", - "request": "^2.83.0" + "eslint": "^5.7.0", + "jest": "^23.6.0", + "request": "^2.88.0" }, "files": [ "lib/" @@ -56,6 +56,9 @@ "testEnvironment": "node", "testMatch": [ "/test/**/*.js" + ], + "coveragePathIgnorePatterns": [ + "/node_modules/(?!(abab/lib/atob.js))" ] }, "keywords": [ @@ -79,5 +82,5 @@ "pretest": "node scripts/get-latest-platform-tests.js", "test": "jest" }, - "version": "1.0.0" + "version": "1.1.0" } diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json index a721417..5cf42e0 100644 --- a/node_modules/debug/package.json +++ b/node_modules/debug/package.json @@ -1,28 +1,33 @@ { - "_from": "debug@^2.6.9", + "_args": [ + [ + "debug@2.6.9", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "debug@2.6.9", "_id": "debug@2.6.9", "_inBundle": false, "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "_location": "/debug", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "debug@^2.6.9", + "raw": "debug@2.6.9", "name": "debug", "escapedName": "debug", - "rawSpec": "^2.6.9", + "rawSpec": "2.6.9", "saveSpec": null, - "fetchSpec": "^2.6.9" + "fetchSpec": "2.6.9" }, "_requiredBy": [ "/babel-core", "/babel-traverse" ], "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "_shasum": "5d128515df134ff327e90a4c93f4e077a536341f", - "_spec": "debug@^2.6.9", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-core", + "_spec": "2.6.9", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" @@ -31,7 +36,6 @@ "bugs": { "url": "https://github.com/visionmedia/debug/issues" }, - "bundleDependencies": false, "component": { "scripts": { "debug/index.js": "browser.js", @@ -52,7 +56,6 @@ "dependencies": { "ms": "2.0.0" }, - "deprecated": false, "description": "small debugging utility", "devDependencies": { "browserify": "9.0.3", diff --git a/node_modules/deep-is/package.json b/node_modules/deep-is/package.json index b9588b3..243abef 100644 --- a/node_modules/deep-is/package.json +++ b/node_modules/deep-is/package.json @@ -1,27 +1,32 @@ { - "_from": "deep-is@~0.1.3", + "_args": [ + [ + "deep-is@0.1.3", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "deep-is@0.1.3", "_id": "deep-is@0.1.3", "_inBundle": false, "_integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "_location": "/deep-is", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "deep-is@~0.1.3", + "raw": "deep-is@0.1.3", "name": "deep-is", "escapedName": "deep-is", - "rawSpec": "~0.1.3", + "rawSpec": "0.1.3", "saveSpec": null, - "fetchSpec": "~0.1.3" + "fetchSpec": "0.1.3" }, "_requiredBy": [ "/optionator" ], "_resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "_shasum": "b369d6fb5dbc13eecf524f91b070feedc357cf34", - "_spec": "deep-is@~0.1.3", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/optionator", + "_spec": "0.1.3", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Thorsten Lorenz", "email": "thlorenz@gmx.de", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/thlorenz/deep-is/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "node's assert.deepEqual algorithm except for NaN being equal to NaN", "devDependencies": { "tape": "~1.0.2" diff --git a/node_modules/define-properties/package.json b/node_modules/define-properties/package.json index 7861e8f..c29bfe2 100644 --- a/node_modules/define-properties/package.json +++ b/node_modules/define-properties/package.json @@ -1,40 +1,43 @@ { - "_from": "define-properties@^1.1.2", + "_args": [ + [ + "define-properties@1.1.2", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "define-properties@1.1.2", "_id": "define-properties@1.1.2", "_inBundle": false, "_integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "_location": "/define-properties", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "define-properties@^1.1.2", + "raw": "define-properties@1.1.2", "name": "define-properties", "escapedName": "define-properties", - "rawSpec": "^1.1.2", + "rawSpec": "1.1.2", "saveSpec": null, - "fetchSpec": "^1.1.2" + "fetchSpec": "1.1.2" }, "_requiredBy": [ "/object.getownpropertydescriptors", "/util.promisify" ], "_resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "_shasum": "83a73f2fea569898fb737193c8f873caf6d45c94", - "_spec": "define-properties@^1.1.2", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/util.promisify", + "_spec": "1.1.2", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Jordan Harband" }, "bugs": { "url": "https://github.com/ljharb/define-properties/issues" }, - "bundleDependencies": false, "dependencies": { "foreach": "^2.0.5", "object-keys": "^1.0.8" }, - "deprecated": false, "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", "devDependencies": { "@ljharb/eslint-config": "^1.3.0", diff --git a/node_modules/delayed-stream/package.json b/node_modules/delayed-stream/package.json index 1a62a8c..bb953a9 100644 --- a/node_modules/delayed-stream/package.json +++ b/node_modules/delayed-stream/package.json @@ -1,27 +1,32 @@ { - "_from": "delayed-stream@~1.0.0", + "_args": [ + [ + "delayed-stream@1.0.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "delayed-stream@1.0.0", "_id": "delayed-stream@1.0.0", "_inBundle": false, "_integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "_location": "/delayed-stream", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "delayed-stream@~1.0.0", + "raw": "delayed-stream@1.0.0", "name": "delayed-stream", "escapedName": "delayed-stream", - "rawSpec": "~1.0.0", + "rawSpec": "1.0.0", "saveSpec": null, - "fetchSpec": "~1.0.0" + "fetchSpec": "1.0.0" }, "_requiredBy": [ "/combined-stream" ], "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "_shasum": "df3ae199acadfb7d440aaae0b29e2272b24ec619", - "_spec": "delayed-stream@~1.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/combined-stream", + "_spec": "1.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Felix Geisendörfer", "email": "felix@debuggable.com", @@ -30,7 +35,6 @@ "bugs": { "url": "https://github.com/felixge/node-delayed-stream/issues" }, - "bundleDependencies": false, "contributors": [ { "name": "Mike Atkins", @@ -38,7 +42,6 @@ } ], "dependencies": {}, - "deprecated": false, "description": "Buffers events from a stream until you are ready to handle them.", "devDependencies": { "fake": "0.2.0", diff --git a/node_modules/detect-indent/package.json b/node_modules/detect-indent/package.json index 300479e..0a2d0c5 100644 --- a/node_modules/detect-indent/package.json +++ b/node_modules/detect-indent/package.json @@ -1,27 +1,32 @@ { - "_from": "detect-indent@^4.0.0", + "_args": [ + [ + "detect-indent@4.0.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "detect-indent@4.0.0", "_id": "detect-indent@4.0.0", "_inBundle": false, "_integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "_location": "/detect-indent", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "detect-indent@^4.0.0", + "raw": "detect-indent@4.0.0", "name": "detect-indent", "escapedName": "detect-indent", - "rawSpec": "^4.0.0", + "rawSpec": "4.0.0", "saveSpec": null, - "fetchSpec": "^4.0.0" + "fetchSpec": "4.0.0" }, "_requiredBy": [ "/babel-generator" ], "_resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "_shasum": "f76d064352cdf43a1cb6ce619c4ee3a9475de208", - "_spec": "detect-indent@^4.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-generator", + "_spec": "4.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -30,11 +35,9 @@ "bugs": { "url": "https://github.com/sindresorhus/detect-indent/issues" }, - "bundleDependencies": false, "dependencies": { "repeating": "^2.0.0" }, - "deprecated": false, "description": "Detect the indentation of code", "devDependencies": { "ava": "*", diff --git a/node_modules/domexception/package.json b/node_modules/domexception/package.json index 11649f7..9b76083 100644 --- a/node_modules/domexception/package.json +++ b/node_modules/domexception/package.json @@ -1,27 +1,32 @@ { - "_from": "domexception@^1.0.0", + "_args": [ + [ + "domexception@1.0.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "domexception@1.0.1", "_id": "domexception@1.0.1", "_inBundle": false, "_integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", "_location": "/domexception", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "domexception@^1.0.0", + "raw": "domexception@1.0.1", "name": "domexception", "escapedName": "domexception", - "rawSpec": "^1.0.0", + "rawSpec": "1.0.1", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "1.0.1" }, "_requiredBy": [ "/jsdom" ], "_resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", - "_shasum": "937442644ca6a31261ef36e3ec677fe805582c90", - "_spec": "domexception@^1.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom", + "_spec": "1.0.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Domenic Denicola", "email": "d@domenic.me", @@ -30,11 +35,9 @@ "bugs": { "url": "https://github.com/jsdom/domexception/issues" }, - "bundleDependencies": false, "dependencies": { "webidl-conversions": "^4.0.2" }, - "deprecated": false, "description": "An implementation of the DOMException class from browsers", "devDependencies": { "eslint": "^4.3.0", diff --git a/node_modules/ecc-jsbn/.npmignore b/node_modules/ecc-jsbn/.npmignore deleted file mode 100644 index a72b52e..0000000 --- a/node_modules/ecc-jsbn/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules diff --git a/node_modules/ecc-jsbn/index.js b/node_modules/ecc-jsbn/index.js index 2437281..fb19a1d 100644 --- a/node_modules/ecc-jsbn/index.js +++ b/node_modules/ecc-jsbn/index.js @@ -1,6 +1,7 @@ var crypto = require("crypto"); var BigInteger = require("jsbn").BigInteger; var ECPointFp = require("./lib/ec.js").ECPointFp; +var Buffer = require("safer-buffer").Buffer; exports.ECCurves = require("./lib/sec.js"); // zero prepad @@ -40,17 +41,17 @@ exports.ECKey = function(curve, key, isPublic) if(this.P) { // var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2); -// this.PublicKey = new Buffer("04"+pubhex,"hex"); - this.PublicKey = new Buffer(c.getCurve().encodeCompressedPointHex(this.P),"hex"); +// this.PublicKey = Buffer.from("04"+pubhex,"hex"); + this.PublicKey = Buffer.from(c.getCurve().encodeCompressedPointHex(this.P),"hex"); } if(priv) { - this.PrivateKey = new Buffer(unstupid(priv.toString(16),bytes*2),"hex"); + this.PrivateKey = Buffer.from(unstupid(priv.toString(16),bytes*2),"hex"); this.deriveSharedSecret = function(key) { if(!key || !key.P) return false; var S = key.P.multiply(priv); - return new Buffer(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex"); + return Buffer.from(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex"); } } } diff --git a/node_modules/ecc-jsbn/package.json b/node_modules/ecc-jsbn/package.json index 6aeadf4..b3e2030 100644 --- a/node_modules/ecc-jsbn/package.json +++ b/node_modules/ecc-jsbn/package.json @@ -1,8 +1,8 @@ { "_from": "ecc-jsbn@~0.1.1", - "_id": "ecc-jsbn@0.1.1", + "_id": "ecc-jsbn@0.1.2", "_inBundle": false, - "_integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "_integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "_location": "/ecc-jsbn", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/sshpk" ], - "_resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "_shasum": "0fc73a9ed5f0d53c38193398523ef7e543777505", + "_resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "_shasum": "3a83a904e54353287874c564b7549386849a98c9", "_spec": "ecc-jsbn@~0.1.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/sshpk", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\sshpk", "author": { "name": "Jeremie Miller", "email": "jeremie@jabber.org", @@ -32,7 +32,8 @@ }, "bundleDependencies": false, "dependencies": { - "jsbn": "~0.1.0" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" }, "deprecated": false, "description": "ECC JS code based on JSBN", @@ -60,5 +61,5 @@ "type": "git", "url": "git+https://github.com/quartzjer/ecc-jsbn.git" }, - "version": "0.1.1" + "version": "0.1.2" } diff --git a/node_modules/es-abstract/package.json b/node_modules/es-abstract/package.json index 23f3fb9..de19223 100644 --- a/node_modules/es-abstract/package.json +++ b/node_modules/es-abstract/package.json @@ -1,27 +1,32 @@ { - "_from": "es-abstract@^1.5.1", + "_args": [ + [ + "es-abstract@1.11.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "es-abstract@1.11.0", "_id": "es-abstract@1.11.0", "_inBundle": false, "_integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", "_location": "/es-abstract", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "es-abstract@^1.5.1", + "raw": "es-abstract@1.11.0", "name": "es-abstract", "escapedName": "es-abstract", - "rawSpec": "^1.5.1", + "rawSpec": "1.11.0", "saveSpec": null, - "fetchSpec": "^1.5.1" + "fetchSpec": "1.11.0" }, "_requiredBy": [ "/object.getownpropertydescriptors" ], "_resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", - "_shasum": "cce87d518f0496893b1a30cd8461835535480681", - "_spec": "es-abstract@^1.5.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/object.getownpropertydescriptors", + "_spec": "1.11.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", @@ -30,7 +35,6 @@ "bugs": { "url": "https://github.com/ljharb/es-abstract/issues" }, - "bundleDependencies": false, "contributors": [ { "name": "Jordan Harband", @@ -45,7 +49,6 @@ "is-callable": "^1.1.3", "is-regex": "^1.0.4" }, - "deprecated": false, "description": "ECMAScript spec abstract operations.", "devDependencies": { "@ljharb/eslint-config": "^12.2.1", diff --git a/node_modules/es-to-primitive/package.json b/node_modules/es-to-primitive/package.json index 5c6a169..c7cf4eb 100644 --- a/node_modules/es-to-primitive/package.json +++ b/node_modules/es-to-primitive/package.json @@ -1,40 +1,43 @@ { - "_from": "es-to-primitive@^1.1.1", + "_args": [ + [ + "es-to-primitive@1.1.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "es-to-primitive@1.1.1", "_id": "es-to-primitive@1.1.1", "_inBundle": false, "_integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "_location": "/es-to-primitive", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "es-to-primitive@^1.1.1", + "raw": "es-to-primitive@1.1.1", "name": "es-to-primitive", "escapedName": "es-to-primitive", - "rawSpec": "^1.1.1", + "rawSpec": "1.1.1", "saveSpec": null, - "fetchSpec": "^1.1.1" + "fetchSpec": "1.1.1" }, "_requiredBy": [ "/es-abstract" ], "_resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "_shasum": "45355248a88979034b6792e19bb81f2b7975dd0d", - "_spec": "es-to-primitive@^1.1.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/es-abstract", + "_spec": "1.1.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Jordan Harband" }, "bugs": { "url": "https://github.com/ljharb/es-to-primitive/issues" }, - "bundleDependencies": false, "dependencies": { "is-callable": "^1.1.1", "is-date-object": "^1.0.1", "is-symbol": "^1.0.1" }, - "deprecated": false, "description": "ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES6 versions.", "devDependencies": { "@ljharb/eslint-config": "^1.6.1", diff --git a/node_modules/escape-string-regexp/package.json b/node_modules/escape-string-regexp/package.json index 7b566d7..9163cb0 100644 --- a/node_modules/escape-string-regexp/package.json +++ b/node_modules/escape-string-regexp/package.json @@ -1,27 +1,33 @@ { - "_from": "escape-string-regexp@^1.0.2", + "_args": [ + [ + "escape-string-regexp@1.0.5", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "escape-string-regexp@1.0.5", "_id": "escape-string-regexp@1.0.5", "_inBundle": false, "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "_location": "/escape-string-regexp", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "escape-string-regexp@^1.0.2", + "raw": "escape-string-regexp@1.0.5", "name": "escape-string-regexp", "escapedName": "escape-string-regexp", - "rawSpec": "^1.0.2", + "rawSpec": "1.0.5", "saveSpec": null, - "fetchSpec": "^1.0.2" + "fetchSpec": "1.0.5" }, "_requiredBy": [ + "/@babel/highlight/chalk", "/chalk" ], "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4", - "_spec": "escape-string-regexp@^1.0.2", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/chalk", + "_spec": "1.0.5", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -30,8 +36,6 @@ "bugs": { "url": "https://github.com/sindresorhus/escape-string-regexp/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Escape RegExp special characters", "devDependencies": { "ava": "*", diff --git a/node_modules/escodegen/escodegen.js b/node_modules/escodegen/escodegen.js index efcca69..a8d0170 100644 --- a/node_modules/escodegen/escodegen.js +++ b/node_modules/escodegen/escodegen.js @@ -82,7 +82,6 @@ Precedence = { Sequence: 0, Yield: 1, - Await: 1, Assignment: 1, Conditional: 2, ArrowFunction: 2, @@ -96,6 +95,7 @@ BitwiseSHIFT: 10, Additive: 11, Multiplicative: 12, + Await: 13, Unary: 13, Postfix: 14, Call: 15, @@ -868,13 +868,15 @@ } function generateMethodPrefix(prop) { - var func = prop.value; + var func = prop.value, prefix = ''; if (func.async) { - return generateAsyncPrefix(func, !prop.computed); - } else { - // avoid space before method name - return generateStarSuffix(func) ? '*' : ''; + prefix += generateAsyncPrefix(func, !prop.computed); } + if (func.generator) { + // avoid space before method name + prefix += generateStarSuffix(func) ? '*' : ''; + } + return prefix; } CodeGenerator.prototype.generatePattern = function (node, precedence, flags) { @@ -951,7 +953,7 @@ }; CodeGenerator.prototype.generateIterationForStatement = function (operator, stmt, flags) { - var result = ['for' + space + '('], that = this; + var result = ['for' + space + (stmt.await ? 'await' + space : '') + '('], that = this; withIndent(function () { if (stmt.left.type === Syntax.VariableDeclaration) { withIndent(function () { @@ -965,7 +967,7 @@ result = join(result, operator); result = [join( result, - that.generateExpression(stmt.right, Precedence.Sequence, E_TTT) + that.generateExpression(stmt.right, Precedence.Assignment, E_TTT) ), ')']; }); result.push(this.maybeBlock(stmt.body, flags)); @@ -1943,9 +1945,9 @@ MetaProperty: function (expr, precedence, flags) { var result; result = []; - result.push(expr.meta); + result.push(typeof expr.meta === "string" ? expr.meta : generateIdentifier(expr.meta)); result.push('.'); - result.push(expr.property); + result.push(typeof expr.property === "string" ? expr.property : generateIdentifier(expr.property)); return parenthesize(result, Precedence.Member, precedence); }, diff --git a/node_modules/escodegen/node_modules/source-map/package.json b/node_modules/escodegen/node_modules/source-map/package.json index c3d546c..698c6dc 100644 --- a/node_modules/escodegen/node_modules/source-map/package.json +++ b/node_modules/escodegen/node_modules/source-map/package.json @@ -1,27 +1,33 @@ { - "_from": "source-map@~0.6.1", + "_args": [ + [ + "source-map@0.6.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "source-map@0.6.1", "_id": "source-map@0.6.1", "_inBundle": false, "_integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "_location": "/escodegen/source-map", + "_optional": true, "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "source-map@~0.6.1", + "raw": "source-map@0.6.1", "name": "source-map", "escapedName": "source-map", - "rawSpec": "~0.6.1", + "rawSpec": "0.6.1", "saveSpec": null, - "fetchSpec": "~0.6.1" + "fetchSpec": "0.6.1" }, "_requiredBy": [ "/escodegen" ], "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "_shasum": "74722af32e9614e9c287a8d0bbde48b5e2f1a263", - "_spec": "source-map@~0.6.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/escodegen", + "_spec": "0.6.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Nick Fitzgerald", "email": "nfitzgerald@mozilla.com" @@ -29,7 +35,6 @@ "bugs": { "url": "https://github.com/mozilla/source-map/issues" }, - "bundleDependencies": false, "contributors": [ { "name": "Tobias Koppers", @@ -176,7 +181,6 @@ "email": "nicolas.lalevee@hibnet.org" } ], - "deprecated": false, "description": "Generates and consumes source maps", "devDependencies": { "doctoc": "^0.15.0", diff --git a/node_modules/escodegen/package.json b/node_modules/escodegen/package.json index caf5236..bd93e56 100644 --- a/node_modules/escodegen/package.json +++ b/node_modules/escodegen/package.json @@ -1,27 +1,27 @@ { - "_from": "escodegen@^1.9.0", - "_id": "escodegen@1.9.1", + "_from": "escodegen@^1.11.0", + "_id": "escodegen@1.11.1", "_inBundle": false, - "_integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", + "_integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", "_location": "/escodegen", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "escodegen@^1.9.0", + "raw": "escodegen@^1.11.0", "name": "escodegen", "escapedName": "escodegen", - "rawSpec": "^1.9.0", + "rawSpec": "^1.11.0", "saveSpec": null, - "fetchSpec": "^1.9.0" + "fetchSpec": "^1.11.0" }, "_requiredBy": [ "/jsdom" ], - "_resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "_shasum": "dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2", - "_spec": "escodegen@^1.9.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom", + "_resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", + "_shasum": "c485ff8d6b4cdb89e27f4a856e91f118401ca510", + "_spec": "escodegen@^1.11.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom", "bin": { "esgenerate": "./bin/esgenerate.js", "escodegen": "./bin/escodegen.js" @@ -86,5 +86,5 @@ "test": "gulp travis", "unit-test": "gulp test" }, - "version": "1.9.1" + "version": "1.11.1" } diff --git a/node_modules/esprima/package.json b/node_modules/esprima/package.json index 37cd782..3983fd1 100644 --- a/node_modules/esprima/package.json +++ b/node_modules/esprima/package.json @@ -1,27 +1,32 @@ { - "_from": "esprima@^3.1.3", + "_args": [ + [ + "esprima@3.1.3", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "esprima@3.1.3", "_id": "esprima@3.1.3", "_inBundle": false, "_integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", "_location": "/esprima", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "esprima@^3.1.3", + "raw": "esprima@3.1.3", "name": "esprima", "escapedName": "esprima", - "rawSpec": "^3.1.3", + "rawSpec": "3.1.3", "saveSpec": null, - "fetchSpec": "^3.1.3" + "fetchSpec": "3.1.3" }, "_requiredBy": [ "/escodegen" ], "_resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "_shasum": "fdca51cee6133895e3c88d535ce49dbff62a4633", - "_spec": "esprima@^3.1.3", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/escodegen", + "_spec": "3.1.3", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Ariya Hidayat", "email": "ariya.hidayat@gmail.com" @@ -33,8 +38,6 @@ "bugs": { "url": "https://github.com/jquery/esprima/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "ECMAScript parsing infrastructure for multipurpose analysis", "devDependencies": { "codecov.io": "~0.1.6", diff --git a/node_modules/estraverse/package.json b/node_modules/estraverse/package.json index ca797fd..af5fb33 100644 --- a/node_modules/estraverse/package.json +++ b/node_modules/estraverse/package.json @@ -1,32 +1,35 @@ { - "_from": "estraverse@^4.2.0", + "_args": [ + [ + "estraverse@4.2.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "estraverse@4.2.0", "_id": "estraverse@4.2.0", "_inBundle": false, "_integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", "_location": "/estraverse", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "estraverse@^4.2.0", + "raw": "estraverse@4.2.0", "name": "estraverse", "escapedName": "estraverse", - "rawSpec": "^4.2.0", + "rawSpec": "4.2.0", "saveSpec": null, - "fetchSpec": "^4.2.0" + "fetchSpec": "4.2.0" }, "_requiredBy": [ "/escodegen" ], "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "_shasum": "0dee3fed31fcd469618ce7342099fc1afa0bdb13", - "_spec": "estraverse@^4.2.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/escodegen", + "_spec": "4.2.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "bugs": { "url": "https://github.com/estools/estraverse/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "ECMAScript JS AST traversal functions", "devDependencies": { "babel-preset-es2015": "^6.3.13", diff --git a/node_modules/esutils/package.json b/node_modules/esutils/package.json index d626e84..d8374af 100644 --- a/node_modules/esutils/package.json +++ b/node_modules/esutils/package.json @@ -1,33 +1,40 @@ { - "_from": "esutils@^2.0.2", + "_args": [ + [ + "esutils@2.0.2", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "esutils@2.0.2", "_id": "esutils@2.0.2", "_inBundle": false, "_integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "_location": "/esutils", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "esutils@^2.0.2", + "raw": "esutils@2.0.2", "name": "esutils", "escapedName": "esutils", - "rawSpec": "^2.0.2", + "rawSpec": "2.0.2", "saveSpec": null, - "fetchSpec": "^2.0.2" + "fetchSpec": "2.0.2" }, "_requiredBy": [ + "/@babel/highlight", + "/@babel/types", "/babel-code-frame", - "/babel-types" + "/babel-plugin-transform-property-literals", + "/babel-types", + "/escodegen" ], "_resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "_shasum": "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b", - "_spec": "esutils@^2.0.2", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-code-frame", + "_spec": "2.0.2", + "_where": "E:\\projects\\p\\minifyfromhtml", "bugs": { "url": "https://github.com/estools/esutils/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "utility box for ECMAScript language tools", "devDependencies": { "chai": "~1.7.2", diff --git a/node_modules/expand-brackets/LICENSE b/node_modules/expand-brackets/LICENSE deleted file mode 100644 index 1e49edf..0000000 --- a/node_modules/expand-brackets/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/expand-brackets/README.md b/node_modules/expand-brackets/README.md deleted file mode 100644 index d3c913e..0000000 --- a/node_modules/expand-brackets/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# expand-brackets [![NPM version](https://img.shields.io/npm/v/expand-brackets.svg?style=flat)](https://www.npmjs.com/package/expand-brackets) [![NPM downloads](https://img.shields.io/npm/dm/expand-brackets.svg?style=flat)](https://npmjs.org/package/expand-brackets) [![Build Status](https://img.shields.io/travis/jonschlinkert/expand-brackets.svg?style=flat)](https://travis-ci.org/jonschlinkert/expand-brackets) - -> Expand POSIX bracket expressions (character classes) in glob patterns. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install expand-brackets --save -``` - -## Usage - -```js -var brackets = require('expand-brackets'); - -brackets('[![:lower:]]'); -//=> '[^a-z]' -``` - -## .isMatch - -Return true if the given string matches the bracket expression: - -```js -brackets.isMatch('A', '[![:lower:]]'); -//=> true - -brackets.isMatch('a', '[![:lower:]]'); -//=> false -``` - -## .makeRe - -Make a regular expression from a bracket expression: - -```js -brackets.makeRe('[![:lower:]]'); -//=> /[^a-z]/ -``` - -The following named POSIX bracket expressions are supported: - -* `[:alnum:]`: Alphanumeric characters (`a-zA-Z0-9]`) -* `[:alpha:]`: Alphabetic characters (`a-zA-Z]`) -* `[:blank:]`: Space and tab (`[ t]`) -* `[:digit:]`: Digits (`[0-9]`) -* `[:lower:]`: Lowercase letters (`[a-z]`) -* `[:punct:]`: Punctuation and symbols. (`[!"#$%&'()*+, -./:;<=>?@ [\]^_``{|}~]`) -* `[:upper:]`: Uppercase letters (`[A-Z]`) -* `[:word:]`: Word characters (letters, numbers and underscores) (`[A-Za-z0-9_]`) -* `[:xdigit:]`: Hexadecimal digits (`[A-Fa-f0-9]`) - -Collating sequences are not supported. - -## Related projects - -You might also be interested in these projects: - -* [extglob](https://www.npmjs.com/package/extglob): Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to… [more](https://www.npmjs.com/package/extglob) | [homepage](https://github.com/jonschlinkert/extglob) -* [is-extglob](https://www.npmjs.com/package/is-extglob): Returns true if a string has an extglob. | [homepage](https://github.com/jonschlinkert/is-extglob) -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern.… [more](https://www.npmjs.com/package/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob) -* [is-posix-bracket](https://www.npmjs.com/package/is-posix-bracket): Returns true if the given string is a POSIX bracket expression (POSIX character class). | [homepage](https://github.com/jonschlinkert/is-posix-bracket) -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/expand-brackets/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -verb © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/expand-brackets/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v, on April 01, 2016._ \ No newline at end of file diff --git a/node_modules/expand-brackets/index.js b/node_modules/expand-brackets/index.js deleted file mode 100644 index b843cc2..0000000 --- a/node_modules/expand-brackets/index.js +++ /dev/null @@ -1,163 +0,0 @@ -/*! - * expand-brackets - * - * Copyright (c) 2015 Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -var isPosixBracket = require('is-posix-bracket'); - -/** - * POSIX character classes - */ - -var POSIX = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E', - punct: '-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9', -}; - -/** - * Expose `brackets` - */ - -module.exports = brackets; - -function brackets(str) { - if (!isPosixBracket(str)) { - return str; - } - - var negated = false; - if (str.indexOf('[^') !== -1) { - negated = true; - str = str.split('[^').join('['); - } - if (str.indexOf('[!') !== -1) { - negated = true; - str = str.split('[!').join('['); - } - - var a = str.split('['); - var b = str.split(']'); - var imbalanced = a.length !== b.length; - - var parts = str.split(/(?::\]\[:|\[?\[:|:\]\]?)/); - var len = parts.length, i = 0; - var end = '', beg = ''; - var res = []; - - // start at the end (innermost) first - while (len--) { - var inner = parts[i++]; - if (inner === '^[!' || inner === '[!') { - inner = ''; - negated = true; - } - - var prefix = negated ? '^' : ''; - var ch = POSIX[inner]; - - if (ch) { - res.push('[' + prefix + ch + ']'); - } else if (inner) { - if (/^\[?\w-\w\]?$/.test(inner)) { - if (i === parts.length) { - res.push('[' + prefix + inner); - } else if (i === 1) { - res.push(prefix + inner + ']'); - } else { - res.push(prefix + inner); - } - } else { - if (i === 1) { - beg += inner; - } else if (i === parts.length) { - end += inner; - } else { - res.push('[' + prefix + inner + ']'); - } - } - } - } - - var result = res.join('|'); - var rlen = res.length || 1; - if (rlen > 1) { - result = '(?:' + result + ')'; - rlen = 1; - } - if (beg) { - rlen++; - if (beg.charAt(0) === '[') { - if (imbalanced) { - beg = '\\[' + beg.slice(1); - } else { - beg += ']'; - } - } - result = beg + result; - } - if (end) { - rlen++; - if (end.slice(-1) === ']') { - if (imbalanced) { - end = end.slice(0, end.length - 1) + '\\]'; - } else { - end = '[' + end; - } - } - result += end; - } - - if (rlen > 1) { - result = result.split('][').join(']|['); - if (result.indexOf('|') !== -1 && !/\(\?/.test(result)) { - result = '(?:' + result + ')'; - } - } - - result = result.replace(/\[+=|=\]+/g, '\\b'); - return result; -} - -brackets.makeRe = function(pattern) { - try { - return new RegExp(brackets(pattern)); - } catch (err) {} -}; - -brackets.isMatch = function(str, pattern) { - try { - return brackets.makeRe(pattern).test(str); - } catch (err) { - return false; - } -}; - -brackets.match = function(arr, pattern) { - var len = arr.length, i = 0; - var res = arr.slice(); - - var re = brackets.makeRe(pattern); - while (i < len) { - var ele = arr[i++]; - if (!re.test(ele)) { - continue; - } - res.splice(i, 1); - } - return res; -}; diff --git a/node_modules/expand-brackets/package.json b/node_modules/expand-brackets/package.json deleted file mode 100644 index b2305f5..0000000 --- a/node_modules/expand-brackets/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_from": "expand-brackets@^0.1.4", - "_id": "expand-brackets@0.1.5", - "_inBundle": false, - "_integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "_location": "/expand-brackets", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "expand-brackets@^0.1.4", - "name": "expand-brackets", - "escapedName": "expand-brackets", - "rawSpec": "^0.1.4", - "saveSpec": null, - "fetchSpec": "^0.1.4" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "_shasum": "df07284e342a807cd733ac5af72411e581d1177b", - "_spec": "expand-brackets@^0.1.4", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/expand-brackets/issues" - }, - "bundleDependencies": false, - "dependencies": { - "is-posix-bracket": "^0.1.0" - }, - "deprecated": false, - "description": "Expand POSIX bracket expressions (character classes) in glob patterns.", - "devDependencies": { - "gulp-format-md": "^0.1.7", - "mocha": "^2.2.5", - "should": "^7.0.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/expand-brackets", - "keywords": [ - "bracket", - "character class", - "expression", - "posix" - ], - "license": "MIT", - "main": "index.js", - "name": "expand-brackets", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/expand-brackets.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "extglob", - "is-extglob", - "is-glob", - "is-posix-bracket", - "micromatch" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.1.5" -} diff --git a/node_modules/expand-range/LICENSE b/node_modules/expand-range/LICENSE deleted file mode 100644 index b1e51ff..0000000 --- a/node_modules/expand-range/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/expand-range/README.md b/node_modules/expand-range/README.md deleted file mode 100644 index 72c7e8c..0000000 --- a/node_modules/expand-range/README.md +++ /dev/null @@ -1,145 +0,0 @@ -# expand-range [![NPM version](https://img.shields.io/npm/v/expand-range.svg?style=flat)](https://www.npmjs.com/package/expand-range) [![NPM downloads](https://img.shields.io/npm/dm/expand-range.svg?style=flat)](https://npmjs.org/package/expand-range) [![Build Status](https://img.shields.io/travis/jonschlinkert/expand-range.svg?style=flat)](https://travis-ci.org/jonschlinkert/expand-range) - -Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install expand-range --save -``` - -Wraps [fill-range] to do range expansion using `..` separated strings. See [fill-range] for the full list of options and features. - -## Example usage - -```js -var expand = require('expand-range'); -``` - -**Params** - -```js -expand(start, stop, increment); -``` - -* `start`: the number or letter to start with -* `end`: the number or letter to end with -* `increment`: optionally pass the increment to use. works for letters or numbers - -**Examples** - -```js -expand('a..e') -//=> ['a', 'b', 'c', 'd', 'e'] - -expand('a..e..2') -//=> ['a', 'c', 'e'] - -expand('A..E..2') -//=> ['A', 'C', 'E'] - -expand('1..3') -//=> ['1', '2', '3'] - -expand('0..-5') -//=> [ '0', '-1', '-2', '-3', '-4', '-5' ] - -expand('-9..9..3') -//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ]) - -expand('-1..-10..-2') -//=> [ '-1', '-3', '-5', '-7', '-9' ] - -expand('1..10..2') -//=> [ '1', '3', '5', '7', '9' ] -``` - -### Custom function - -Optionally pass a custom function as the second argument: - -```js -expand('a..e', function (val, isNumber, pad, i) { - if (!isNumber) { - return String.fromCharCode(val) + i; - } - return val; -}); -//=> ['a0', 'b1', 'c2', 'd3', 'e4'] -``` - -## Benchmarks - -```sh -# benchmark/fixtures/alpha-lower.js (29 bytes) - brace-expansion x 145,653 ops/sec ±0.89% (87 runs sampled) - expand-range x 453,213 ops/sec ±1.66% (85 runs sampled) - minimatch x 152,193 ops/sec ±1.17% (86 runs sampled) - -# benchmark/fixtures/alpha-upper.js (29 bytes) - brace-expansion x 149,975 ops/sec ±1.10% (88 runs sampled) - expand-range x 459,390 ops/sec ±1.27% (84 runs sampled) - minimatch x 155,253 ops/sec ±1.25% (88 runs sampled) - -# benchmark/fixtures/padded.js (33 bytes) - brace-expansion x 14,694 ops/sec ±1.37% (85 runs sampled) - expand-range x 169,393 ops/sec ±1.76% (80 runs sampled) - minimatch x 15,052 ops/sec ±1.15% (88 runs sampled) - -# benchmark/fixtures/range.js (29 bytes) - brace-expansion x 142,968 ops/sec ±1.35% (86 runs sampled) - expand-range x 465,579 ops/sec ±1.43% (86 runs sampled) - minimatch x 126,872 ops/sec ±1.18% (90 runs sampled) -``` - -## Related projects - -You might also be interested in these projects: - -* [braces](https://www.npmjs.com/package/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://www.npmjs.com/package/braces) | [homepage](https://github.com/jonschlinkert/braces) -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range) -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/expand-range/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/expand-range/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 05, 2016._ \ No newline at end of file diff --git a/node_modules/expand-range/index.js b/node_modules/expand-range/index.js deleted file mode 100644 index 369962a..0000000 --- a/node_modules/expand-range/index.js +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * expand-range - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -var fill = require('fill-range'); - -module.exports = function expandRange(str, options, fn) { - if (typeof str !== 'string') { - throw new TypeError('expand-range expects a string.'); - } - - if (typeof options === 'function') { - fn = options; - options = {}; - } - - if (typeof options === 'boolean') { - options = {}; - options.makeRe = true; - } - - // create arguments to pass to fill-range - var opts = options || {}; - var args = str.split('..'); - var len = args.length; - if (len > 3) { return str; } - - // if only one argument, it can't expand so return it - if (len === 1) { return args; } - - // if `true`, tell fill-range to regexify the string - if (typeof fn === 'boolean' && fn === true) { - opts.makeRe = true; - } - - args.push(opts); - return fill.apply(null, args.concat(fn)); -}; diff --git a/node_modules/expand-range/package.json b/node_modules/expand-range/package.json deleted file mode 100644 index 834badf..0000000 --- a/node_modules/expand-range/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_from": "expand-range@^1.8.1", - "_id": "expand-range@1.8.2", - "_inBundle": false, - "_integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "_location": "/expand-range", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "expand-range@^1.8.1", - "name": "expand-range", - "escapedName": "expand-range", - "rawSpec": "^1.8.1", - "saveSpec": null, - "fetchSpec": "^1.8.1" - }, - "_requiredBy": [ - "/braces" - ], - "_resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "_shasum": "a299effd335fe2721ebae8e257ec79644fc85337", - "_spec": "expand-range@^1.8.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/braces", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/expand-range/issues" - }, - "bundleDependencies": false, - "dependencies": { - "fill-range": "^2.1.0" - }, - "deprecated": false, - "description": "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.", - "devDependencies": { - "benchmarked": "^0.2.4", - "brace-expansion": "^1.1.4", - "glob": "^7.0.3", - "gulp-format-md": "^0.1.9", - "minimatch": "^3.0.0", - "mocha": "^2.4.5" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/expand-range", - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "expand", - "expansion", - "glob", - "match", - "matches", - "matching", - "number", - "numerical", - "range", - "ranges", - "sh" - ], - "license": "MIT", - "main": "index.js", - "name": "expand-range", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/expand-range.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "toc": false, - "layout": "default", - "lint": { - "reflinks": true - }, - "tasks": [ - "readme" - ], - "related": { - "list": [ - "micromatch", - "fill-range", - "braces" - ] - } - }, - "version": "1.8.2" -} diff --git a/node_modules/extend/.editorconfig b/node_modules/extend/.editorconfig new file mode 100644 index 0000000..bc228f8 --- /dev/null +++ b/node_modules/extend/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/extend/.eslintrc b/node_modules/extend/.eslintrc index 90b3193..a34cf28 100644 --- a/node_modules/extend/.eslintrc +++ b/node_modules/extend/.eslintrc @@ -4,7 +4,7 @@ "extends": "@ljharb", "rules": { - "complexity": [2, 15], + "complexity": [2, 20], "eqeqeq": [2, "allow-null"], "func-name-matching": [1], "max-depth": [1, 4], diff --git a/node_modules/extend/.jscs.json b/node_modules/extend/.jscs.json index 0284c86..3cce01d 100644 --- a/node_modules/extend/.jscs.json +++ b/node_modules/extend/.jscs.json @@ -157,14 +157,14 @@ "requireImportAlphabetized": false, - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, "disallowSpacesInsideTemplateStringPlaceholders": true, - "disallowArrayDestructuringReturn": false, + "disallowArrayDestructuringReturn": false, - "requireNewlineBeforeSingleStatementsInIf": false, + "requireNewlineBeforeSingleStatementsInIf": false, "disallowUnusedVariables": true, diff --git a/node_modules/extend/.npmignore b/node_modules/extend/.npmignore deleted file mode 100644 index 30d74d2..0000000 --- a/node_modules/extend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test \ No newline at end of file diff --git a/node_modules/extend/.travis.yml b/node_modules/extend/.travis.yml index 6bf696c..5ccdfc4 100644 --- a/node_modules/extend/.travis.yml +++ b/node_modules/extend/.travis.yml @@ -2,10 +2,13 @@ language: node_js os: - linux node_js: - - "7.9" - - "6.10" + - "10.7" + - "9.11" + - "8.11" + - "7.10" + - "6.14" - "5.12" - - "4.8" + - "4.9" - "iojs-v3.3" - "iojs-v2.5" - "iojs-v1.8" @@ -13,10 +16,10 @@ node_js: - "0.10" - "0.8" before_install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' - - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' script: - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' @@ -28,10 +31,72 @@ env: matrix: fast_finish: true include: - - node_js: "node" + - node_js: "lts/*" env: PRETEST=true - - node_js: "node" + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" env: COVERAGE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true - node_js: "7.8" env: TEST=true ALLOW_FAILURE=true - node_js: "7.7" @@ -50,6 +115,14 @@ matrix: env: TEST=true ALLOW_FAILURE=true - node_js: "7.0" env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true - node_js: "6.9" env: TEST=true ALLOW_FAILURE=true - node_js: "6.8" @@ -94,6 +167,8 @@ matrix: env: TEST=true ALLOW_FAILURE=true - node_js: "5.0" env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true - node_js: "4.7" env: TEST=true ALLOW_FAILURE=true - node_js: "4.6" @@ -150,30 +225,6 @@ matrix: env: TEST=true ALLOW_FAILURE=true - node_js: "0.4" env: TEST=true ALLOW_FAILURE=true - ##- node_js: "7" - #env: TEST=true - #os: osx - #- node_js: "6" - #env: TEST=true - #os: osx - #- node_js: "5" - #env: TEST=true - #os: osx - #- node_js: "4" - #env: TEST=true - #os: osx - #- node_js: "iojs" - #env: TEST=true - #os: osx - #- node_js: "0.12" - #env: TEST=true - #os: osx - #- node_js: "0.10" - #env: TEST=true - #os: osx - #- node_js: "0.8" - #env: TEST=true - #os: osx allow_failures: - os: osx - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/extend/CHANGELOG.md b/node_modules/extend/CHANGELOG.md index 0fe5287..2cf7de6 100644 --- a/node_modules/extend/CHANGELOG.md +++ b/node_modules/extend/CHANGELOG.md @@ -1,3 +1,9 @@ +3.0.2 / 2018-07-19 +================== + * [Fix] Prevent merging `__proto__` property (#48) + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` + * [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm` + 3.0.1 / 2017-04-27 ================== * [Fix] deep extending should work with a non-object (#46) diff --git a/node_modules/extend/index.js b/node_modules/extend/index.js index bbe53f6..2aa3faa 100644 --- a/node_modules/extend/index.js +++ b/node_modules/extend/index.js @@ -2,6 +2,8 @@ var hasOwn = Object.prototype.hasOwnProperty; var toStr = Object.prototype.toString; +var defineProperty = Object.defineProperty; +var gOPD = Object.getOwnPropertyDescriptor; var isArray = function isArray(arr) { if (typeof Array.isArray === 'function') { @@ -31,6 +33,35 @@ var isPlainObject = function isPlainObject(obj) { return typeof key === 'undefined' || hasOwn.call(obj, key); }; +// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target +var setProperty = function setProperty(target, options) { + if (defineProperty && options.name === '__proto__') { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } +}; + +// Return undefined instead of __proto__ if '__proto__' is not an own property +var getProperty = function getProperty(obj, name) { + if (name === '__proto__') { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + // In early versions of node, obj['__proto__'] is buggy when obj has + // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. + return gOPD(obj, name).value; + } + } + + return obj[name]; +}; + module.exports = function extend() { var options, name, src, copy, copyIsArray, clone; var target = arguments[0]; @@ -55,8 +86,8 @@ module.exports = function extend() { if (options != null) { // Extend the base object for (name in options) { - src = target[name]; - copy = options[name]; + src = getProperty(target, name); + copy = getProperty(options, name); // Prevent never-ending loop if (target !== copy) { @@ -70,11 +101,11 @@ module.exports = function extend() { } // Never move original objects, clone them - target[name] = extend(deep, clone, copy); + setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); // Don't bring in undefined values } else if (typeof copy !== 'undefined') { - target[name] = copy; + setProperty(target, { name: name, newValue: copy }); } } } diff --git a/node_modules/extend/package.json b/node_modules/extend/package.json index c598ac8..048cece 100644 --- a/node_modules/extend/package.json +++ b/node_modules/extend/package.json @@ -1,27 +1,27 @@ { - "_from": "extend@~3.0.1", - "_id": "extend@3.0.1", + "_from": "extend@~3.0.2", + "_id": "extend@3.0.2", "_inBundle": false, - "_integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "_integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "_location": "/extend", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "extend@~3.0.1", + "raw": "extend@~3.0.2", "name": "extend", "escapedName": "extend", - "rawSpec": "~3.0.1", + "rawSpec": "~3.0.2", "saveSpec": null, - "fetchSpec": "~3.0.1" + "fetchSpec": "~3.0.2" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "_shasum": "a755ea7bc1adfcc5a31ce7e762dbaadc5e636444", - "_spec": "extend@~3.0.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/request", + "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "_shasum": "f8b1136b4071fbd8eb140aff858b1019ec2915fa", + "_spec": "extend@~3.0.2", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\request", "author": { "name": "Stefan Thomas", "email": "justmoon@members.fsf.org", @@ -41,11 +41,11 @@ "deprecated": false, "description": "Port of jQuery.extend for node.js and the browser", "devDependencies": { - "@ljharb/eslint-config": "^11.0.0", + "@ljharb/eslint-config": "^12.2.1", "covert": "^1.1.0", - "eslint": "^3.19.0", + "eslint": "^4.19.1", "jscs": "^3.0.7", - "tape": "^4.6.3" + "tape": "^4.9.1" }, "homepage": "https://github.com/justmoon/node-extend#readme", "keywords": [ @@ -71,5 +71,5 @@ "test": "npm run tests-only", "tests-only": "node test" }, - "version": "3.0.1" + "version": "3.0.2" } diff --git a/node_modules/extglob/LICENSE b/node_modules/extglob/LICENSE deleted file mode 100644 index 65f90ac..0000000 --- a/node_modules/extglob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/extglob/README.md b/node_modules/extglob/README.md deleted file mode 100644 index 6664406..0000000 --- a/node_modules/extglob/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# extglob [![NPM version](https://badge.fury.io/js/extglob.svg)](http://badge.fury.io/js/extglob) [![Build Status](https://travis-ci.org/jonschlinkert/extglob.svg)](https://travis-ci.org/jonschlinkert/extglob) - -> Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns. - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i extglob --save -``` - -Used by [micromatch](https://github.com/jonschlinkert/micromatch). - -**Features** - -* Convert an extglob string to a regex-compatible string. **Only converts extglobs**, to handle full globs use [micromatch](https://github.com/jonschlinkert/micromatch). -* Pass `{regex: true}` to return a regex -* Handles nested patterns -* More complete (and correct) support than [minimatch](https://github.com/isaacs/minimatch) - -## Usage - -```js -var extglob = require('extglob'); - -extglob('?(z)'); -//=> '(?:z)?' -extglob('*(z)'); -//=> '(?:z)*' -extglob('+(z)'); -//=> '(?:z)+' -extglob('@(z)'); -//=> '(?:z)' -extglob('!(z)'); -//=> '(?!^(?:(?!z)[^/]*?)).*$' -``` - -**Optionally return regex** - -```js -extglob('!(z)', {regex: true}); -//=> /(?!^(?:(?!z)[^/]*?)).*$/ -``` - -## Extglob patterns - -To learn more about how extglobs work, see the docs for [Bash pattern matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html): - -* `?(pattern)`: Match zero or one occurrence of the given pattern. -* `*(pattern)`: Match zero or more occurrences of the given pattern. -* `+(pattern)`: Match one or more occurrences of the given pattern. -* `@(pattern)`: Match one of the given pattern. -* `!(pattern)`: Match anything except one of the given pattern. - -## Related - -* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) -* [expand-brackets](https://github.com/jonschlinkert/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. -* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://github.com/jonschlinkert/expand-range) -* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://github.com/jonschlinkert/fill-range) -* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://github.com/jonschlinkert/micromatch) - -## Run tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/extglob/issues/new) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 01, 2015._ \ No newline at end of file diff --git a/node_modules/extglob/index.js b/node_modules/extglob/index.js deleted file mode 100644 index 2e774d4..0000000 --- a/node_modules/extglob/index.js +++ /dev/null @@ -1,178 +0,0 @@ -/*! - * extglob - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -/** - * Module dependencies - */ - -var isExtglob = require('is-extglob'); -var re, cache = {}; - -/** - * Expose `extglob` - */ - -module.exports = extglob; - -/** - * Convert the given extglob `string` to a regex-compatible - * string. - * - * ```js - * var extglob = require('extglob'); - * extglob('!(a?(b))'); - * //=> '(?!a(?:b)?)[^/]*?' - * ``` - * - * @param {String} `str` The string to convert. - * @param {Object} `options` - * @option {Boolean} [options] `esc` If `false` special characters will not be escaped. Defaults to `true`. - * @option {Boolean} [options] `regex` If `true` a regular expression is returned instead of a string. - * @return {String} - * @api public - */ - - -function extglob(str, opts) { - opts = opts || {}; - var o = {}, i = 0; - - // fix common character reversals - // '*!(.js)' => '*.!(js)' - str = str.replace(/!\(([^\w*()])/g, '$1!('); - - // support file extension negation - str = str.replace(/([*\/])\.!\([*]\)/g, function (m, ch) { - if (ch === '/') { - return escape('\\/[^.]+'); - } - return escape('[^.]+'); - }); - - // create a unique key for caching by - // combining the string and options - var key = str - + String(!!opts.regex) - + String(!!opts.contains) - + String(!!opts.escape); - - if (cache.hasOwnProperty(key)) { - return cache[key]; - } - - if (!(re instanceof RegExp)) { - re = regex(); - } - - opts.negate = false; - var m; - - while (m = re.exec(str)) { - var prefix = m[1]; - var inner = m[3]; - if (prefix === '!') { - opts.negate = true; - } - - var id = '__EXTGLOB_' + (i++) + '__'; - // use the prefix of the _last_ (outtermost) pattern - o[id] = wrap(inner, prefix, opts.escape); - str = str.split(m[0]).join(id); - } - - var keys = Object.keys(o); - var len = keys.length; - - // we have to loop again to allow us to convert - // patterns in reverse order (starting with the - // innermost/last pattern first) - while (len--) { - var prop = keys[len]; - str = str.split(prop).join(o[prop]); - } - - var result = opts.regex - ? toRegex(str, opts.contains, opts.negate) - : str; - - result = result.split('.').join('\\.'); - - // cache the result and return it - return (cache[key] = result); -} - -/** - * Convert `string` to a regex string. - * - * @param {String} `str` - * @param {String} `prefix` Character that determines how to wrap the string. - * @param {Boolean} `esc` If `false` special characters will not be escaped. Defaults to `true`. - * @return {String} - */ - -function wrap(inner, prefix, esc) { - if (esc) inner = escape(inner); - - switch (prefix) { - case '!': - return '(?!' + inner + ')[^/]' + (esc ? '%%%~' : '*?'); - case '@': - return '(?:' + inner + ')'; - case '+': - return '(?:' + inner + ')+'; - case '*': - return '(?:' + inner + ')' + (esc ? '%%' : '*') - case '?': - return '(?:' + inner + '|)'; - default: - return inner; - } -} - -function escape(str) { - str = str.split('*').join('[^/]%%%~'); - str = str.split('.').join('\\.'); - return str; -} - -/** - * extglob regex. - */ - -function regex() { - return /(\\?[@?!+*$]\\?)(\(([^()]*?)\))/; -} - -/** - * Negation regex - */ - -function negate(str) { - return '(?!^' + str + ').*$'; -} - -/** - * Create the regex to do the matching. If - * the leading character in the `pattern` is `!` - * a negation regex is returned. - * - * @param {String} `pattern` - * @param {Boolean} `contains` Allow loose matching. - * @param {Boolean} `isNegated` True if the pattern is a negation pattern. - */ - -function toRegex(pattern, contains, isNegated) { - var prefix = contains ? '^' : ''; - var after = contains ? '$' : ''; - pattern = ('(?:' + pattern + ')' + after); - if (isNegated) { - pattern = prefix + negate(pattern); - } - return new RegExp(prefix + pattern); -} diff --git a/node_modules/extglob/package.json b/node_modules/extglob/package.json deleted file mode 100644 index 42259fe..0000000 --- a/node_modules/extglob/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "extglob@^0.3.1", - "_id": "extglob@0.3.2", - "_inBundle": false, - "_integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "_location": "/extglob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "extglob@^0.3.1", - "name": "extglob", - "escapedName": "extglob", - "rawSpec": "^0.3.1", - "saveSpec": null, - "fetchSpec": "^0.3.1" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "_shasum": "2e18ff3d2f49ab2765cec9023f011daa8d8349a1", - "_spec": "extglob@^0.3.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/extglob/issues" - }, - "bundleDependencies": false, - "dependencies": { - "is-extglob": "^1.0.0" - }, - "deprecated": false, - "description": "Convert extended globs to regex-compatible strings. Add (almost) the expressive power of regular expressions to glob patterns.", - "devDependencies": { - "ansi-green": "^0.1.1", - "micromatch": "^2.1.6", - "minimatch": "^2.0.1", - "minimist": "^1.1.0", - "mocha": "*", - "should": "*", - "success-symbol": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/extglob", - "keywords": [ - "bash", - "extended", - "extglob", - "glob", - "ksh", - "match", - "wildcard" - ], - "license": "MIT", - "main": "index.js", - "name": "extglob", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/extglob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "micromatch", - "expand-brackets", - "braces", - "fill-range", - "expand-range" - ] - } - }, - "version": "0.3.2" -} diff --git a/node_modules/extsprintf/package.json b/node_modules/extsprintf/package.json index 916ec7d..0c7118d 100644 --- a/node_modules/extsprintf/package.json +++ b/node_modules/extsprintf/package.json @@ -1,4 +1,10 @@ { + "_args": [ + [ + "extsprintf@1.3.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], "_from": "extsprintf@1.3.0", "_id": "extsprintf@1.3.0", "_inBundle": false, @@ -20,14 +26,11 @@ "/verror" ], "_resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "_shasum": "96918440e3041a7a414f8c52e3c574eb3c3e1e05", - "_spec": "extsprintf@1.3.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsprim", + "_spec": "1.3.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "bugs": { "url": "https://github.com/davepacheco/node-extsprintf/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "extended POSIX-style sprintf", "engines": [ "node >=0.6.0" diff --git a/node_modules/fast-deep-equal/README.md b/node_modules/fast-deep-equal/README.md index ee83edd..326bb2a 100644 --- a/node_modules/fast-deep-equal/README.md +++ b/node_modules/fast-deep-equal/README.md @@ -30,15 +30,18 @@ console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true ## Performance benchmark +Node.js v9.11.1: + ``` -fast-deep-equal x 82,915 ops/sec ±0.63% (89 runs sampled) -nano-equal x 50,506 ops/sec ±2.23% (86 runs sampled) -shallow-equal-fuzzy x 14,873 ops/sec ±3.19% (83 runs sampled) -underscore.isEqual x 16,055 ops/sec ±2.29% (85 runs sampled) -lodash.isEqual x 10,740 ops/sec ±1.04% (89 runs sampled) -deep-equal x 12,276 ops/sec ±2.44% (84 runs sampled) -deep-eql x 10,565 ops/sec ±0.89% (90 runs sampled) -assert.deepStrictEqual x 965 ops/sec ±2.99% (81 runs sampled) +fast-deep-equal x 226,960 ops/sec ±1.55% (86 runs sampled) +nano-equal x 218,210 ops/sec ±0.79% (89 runs sampled) +shallow-equal-fuzzy x 206,762 ops/sec ±0.84% (88 runs sampled) +underscore.isEqual x 128,668 ops/sec ±0.75% (91 runs sampled) +lodash.isEqual x 44,895 ops/sec ±0.67% (85 runs sampled) +deep-equal x 51,616 ops/sec ±0.96% (90 runs sampled) +deep-eql x 28,218 ops/sec ±0.42% (85 runs sampled) +assert.deepStrictEqual x 1,777 ops/sec ±1.05% (86 runs sampled) +ramda.equals x 13,466 ops/sec ±0.82% (86 runs sampled) The fastest is fast-deep-equal ``` diff --git a/node_modules/fast-deep-equal/index.js b/node_modules/fast-deep-equal/index.js index 7aaaba3..27264f5 100644 --- a/node_modules/fast-deep-equal/index.js +++ b/node_modules/fast-deep-equal/index.js @@ -7,43 +7,43 @@ var hasProp = Object.prototype.hasOwnProperty; module.exports = function equal(a, b) { if (a === b) return true; - var arrA = isArray(a) - , arrB = isArray(b) - , i - , length - , key; + if (a && b && typeof a == 'object' && typeof b == 'object') { + var arrA = isArray(a) + , arrB = isArray(b) + , i + , length + , key; - if (arrA && arrB) { - length = a.length; - if (length != b.length) return false; - for (i = 0; i < length; i++) - if (!equal(a[i], b[i])) return false; - return true; - } + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } - if (arrA != arrB) return false; + if (arrA != arrB) return false; - var dateA = a instanceof Date - , dateB = b instanceof Date; - if (dateA != dateB) return false; - if (dateA && dateB) return a.getTime() == b.getTime(); + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); - var regexpA = a instanceof RegExp - , regexpB = b instanceof RegExp; - if (regexpA != regexpB) return false; - if (regexpA && regexpB) return a.toString() == b.toString(); + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); - if (a instanceof Object && b instanceof Object) { var keys = keyList(a); length = keys.length; if (length !== keyList(b).length) return false; - for (i = 0; i < length; i++) + for (i = length; i-- !== 0;) if (!hasProp.call(b, keys[i])) return false; - for (i = 0; i < length; i++) { + for (i = length; i-- !== 0;) { key = keys[i]; if (!equal(a[key], b[key])) return false; } @@ -51,5 +51,5 @@ module.exports = function equal(a, b) { return true; } - return false; + return a!==a && b!==b; }; diff --git a/node_modules/fast-deep-equal/package.json b/node_modules/fast-deep-equal/package.json index 0cdeb32..7dd6b78 100644 --- a/node_modules/fast-deep-equal/package.json +++ b/node_modules/fast-deep-equal/package.json @@ -1,27 +1,27 @@ { - "_from": "fast-deep-equal@^1.0.0", - "_id": "fast-deep-equal@1.1.0", + "_from": "fast-deep-equal@^2.0.1", + "_id": "fast-deep-equal@2.0.1", "_inBundle": false, - "_integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "_integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "_location": "/fast-deep-equal", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "fast-deep-equal@^1.0.0", + "raw": "fast-deep-equal@^2.0.1", "name": "fast-deep-equal", "escapedName": "fast-deep-equal", - "rawSpec": "^1.0.0", + "rawSpec": "^2.0.1", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "^2.0.1" }, "_requiredBy": [ "/ajv" ], - "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "_shasum": "c053477817c86b51daa853c81e059b733d023614", - "_spec": "fast-deep-equal@^1.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/ajv", + "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "_shasum": "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49", + "_spec": "fast-deep-equal@^2.0.1", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\ajv", "author": { "name": "Evgeny Poberezkin" }, @@ -34,17 +34,18 @@ "devDependencies": { "benchmark": "^2.1.4", "coveralls": "^2.13.1", - "deep-eql": "^2.0.2", - "deep-equal": "^1.0.1", + "deep-eql": "latest", + "deep-equal": "latest", "eslint": "^4.0.0", - "lodash": "^4.17.4", + "lodash": "latest", "mocha": "^3.4.2", - "nano-equal": "^1.0.1", + "nano-equal": "latest", "nyc": "^11.0.2", "pre-commit": "^1.2.2", - "shallow-equal-fuzzy": "0.0.2", + "ramda": "latest", + "shallow-equal-fuzzy": "latest", "typescript": "^2.6.1", - "underscore": "^1.8.3" + "underscore": "latest" }, "files": [ "index.js", @@ -81,5 +82,5 @@ "test-ts": "tsc --target ES5 --noImplicitAny index.d.ts" }, "types": "index.d.ts", - "version": "1.1.0" + "version": "2.0.1" } diff --git a/node_modules/fast-json-stable-stringify/package.json b/node_modules/fast-json-stable-stringify/package.json index a774522..215f3fb 100644 --- a/node_modules/fast-json-stable-stringify/package.json +++ b/node_modules/fast-json-stable-stringify/package.json @@ -1,27 +1,32 @@ { - "_from": "fast-json-stable-stringify@^2.0.0", + "_args": [ + [ + "fast-json-stable-stringify@2.0.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "fast-json-stable-stringify@2.0.0", "_id": "fast-json-stable-stringify@2.0.0", "_inBundle": false, "_integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "_location": "/fast-json-stable-stringify", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "fast-json-stable-stringify@^2.0.0", + "raw": "fast-json-stable-stringify@2.0.0", "name": "fast-json-stable-stringify", "escapedName": "fast-json-stable-stringify", - "rawSpec": "^2.0.0", + "rawSpec": "2.0.0", "saveSpec": null, - "fetchSpec": "^2.0.0" + "fetchSpec": "2.0.0" }, "_requiredBy": [ "/ajv" ], "_resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "_shasum": "d5142c0caee6b1189f87d3a76111064f86c8bbf2", - "_spec": "fast-json-stable-stringify@^2.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/ajv", + "_spec": "2.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/epoberezkin/fast-json-stable-stringify/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify", "devDependencies": { "benchmark": "^2.1.4", diff --git a/node_modules/fast-levenshtein/package.json b/node_modules/fast-levenshtein/package.json index 93e23b4..128f657 100644 --- a/node_modules/fast-levenshtein/package.json +++ b/node_modules/fast-levenshtein/package.json @@ -1,27 +1,32 @@ { - "_from": "fast-levenshtein@~2.0.4", + "_args": [ + [ + "fast-levenshtein@2.0.6", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "fast-levenshtein@2.0.6", "_id": "fast-levenshtein@2.0.6", "_inBundle": false, "_integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "_location": "/fast-levenshtein", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "fast-levenshtein@~2.0.4", + "raw": "fast-levenshtein@2.0.6", "name": "fast-levenshtein", "escapedName": "fast-levenshtein", - "rawSpec": "~2.0.4", + "rawSpec": "2.0.6", "saveSpec": null, - "fetchSpec": "~2.0.4" + "fetchSpec": "2.0.6" }, "_requiredBy": [ "/optionator" ], "_resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "_shasum": "3d8a5c66883a16a30ca8643e851f19baa7797917", - "_spec": "fast-levenshtein@~2.0.4", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/optionator", + "_spec": "2.0.6", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Ramesh Nair", "email": "ram@hiddentao.com", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/hiddentao/fast-levenshtein/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Efficient implementation of Levenshtein algorithm with locale-specific collator support.", "devDependencies": { "chai": "~1.5.0", diff --git a/node_modules/filename-regex/LICENSE b/node_modules/filename-regex/LICENSE deleted file mode 100644 index d290fe0..0000000 --- a/node_modules/filename-regex/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, 2017, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/filename-regex/README.md b/node_modules/filename-regex/README.md deleted file mode 100644 index 2b6b069..0000000 --- a/node_modules/filename-regex/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# filename-regex [![NPM version](https://img.shields.io/npm/v/filename-regex.svg?style=flat)](https://www.npmjs.com/package/filename-regex) [![NPM monthly downloads](https://img.shields.io/npm/dm/filename-regex.svg?style=flat)](https://npmjs.org/package/filename-regex) [![NPM total downloads](https://img.shields.io/npm/dt/filename-regex.svg?style=flat)](https://npmjs.org/package/filename-regex) [![Linux Build Status](https://img.shields.io/travis/regexhq/filename-regex.svg?style=flat&label=Travis)](https://travis-ci.org/regexhq/filename-regex) - -> Regular expression for matching file names, with or without extension. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save filename-regex -``` - -## Usage - -```js -var regex = require('filename-regex'); - -'a/b/c/d.min.js'.match(regex()); -//=> match[0] = 'd.min.js' - -'a/b/c/.dotfile'.match(regex()); -//=> match[0] = '.dotfile' -``` - -## About - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on April 28, 2017._ \ No newline at end of file diff --git a/node_modules/filename-regex/index.js b/node_modules/filename-regex/index.js deleted file mode 100644 index bb1888b..0000000 --- a/node_modules/filename-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * filename-regex - * - * Copyright (c) 2014-2015, Jon Schlinkert - * Licensed under the MIT license. - */ - -module.exports = function filenameRegex() { - return /([^\\\/]+)$/; -}; diff --git a/node_modules/filename-regex/package.json b/node_modules/filename-regex/package.json deleted file mode 100644 index 0dcf243..0000000 --- a/node_modules/filename-regex/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "filename-regex@^2.0.0", - "_id": "filename-regex@2.0.1", - "_inBundle": false, - "_integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "_location": "/filename-regex", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "filename-regex@^2.0.0", - "name": "filename-regex", - "escapedName": "filename-regex", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "_shasum": "c1c4b9bee3e09725ddb106b75c1e301fe2f18b26", - "_spec": "filename-regex@^2.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/regexhq/filename-regex/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Regular expression for matching file names, with or without extension.", - "devDependencies": { - "gulp-format-md": "^0.1.12" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/regexhq/filename-regex", - "keywords": [ - "basename", - "file", - "filename", - "filepath", - "match", - "name", - "path", - "regex", - "regexp", - "regular expression" - ], - "license": "MIT", - "main": "index.js", - "name": "filename-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/regexhq/filename-regex.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "2.0.1" -} diff --git a/node_modules/fill-range/LICENSE b/node_modules/fill-range/LICENSE deleted file mode 100755 index fa30c4c..0000000 --- a/node_modules/fill-range/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/fill-range/README.md b/node_modules/fill-range/README.md deleted file mode 100755 index c69694a..0000000 --- a/node_modules/fill-range/README.md +++ /dev/null @@ -1,290 +0,0 @@ -# fill-range [![NPM version](https://badge.fury.io/js/fill-range.svg)](http://badge.fury.io/js/fill-range) [![Build Status](https://travis-ci.org/jonschlinkert/fill-range.svg)](https://travis-ci.org/jonschlinkert/fill-range) - -> Fill in a range of numbers or letters, optionally passing an increment or multiplier to use. - -## Install with [npm](npmjs.org) - -```bash -npm i fill-range --save -``` - - - -- [Usage](#usage) - * [Invalid ranges](#invalid-ranges) - * [Custom function](#custom-function) - * [Special characters](#special-characters) - + [plus](#plus) - + [pipe and tilde](#pipe-and-tilde) - + [angle bracket](#angle-bracket) - + [question mark](#question-mark) -- [Other useful libs](#other-useful-libs) -- [Running tests](#running-tests) -- [Contributing](#contributing) -- [Author](#author) -- [License](#license) - -_(Table of contents generated by [verb])_ - - - -## Usage - -```js -var range = require('fill-range'); - -range('a', 'e'); -//=> ['a', 'b', 'c', 'd', 'e'] -``` - -**Params** - -```js -range(start, stop, step, options, fn); -``` - - - `start`: **{String|Number}** the number or letter to start with - - `end`: **{String|Number}** the number or letter to end with - - `step`: **{String|Number}** optionally pass the step to use. works for letters or numbers. - - `options`: **{Object}**: - + `makeRe`: return a regex-compatible string (still returned as an array for consistency) - + `step`: pass the step on the options as an alternative to passing it as an argument - + `silent`: `true` by default, set to false to throw errors for invalid ranges. - - `fn`: **{Function}** optionally [pass a function](#custom-function) to modify each character - - -**Examples** - -```js -range(1, 3) -//=> ['1', '2', '3'] - -range('1', '3') -//=> ['1', '2', '3'] - -range('0', '-5') -//=> [ '0', '-1', '-2', '-3', '-4', '-5' ] - -range(-9, 9, 3) -//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ]) - -range('-1', '-10', '-2') -//=> [ '-1', '-3', '-5', '-7', '-9' ] - -range('1', '10', '2') -//=> [ '1', '3', '5', '7', '9' ] - -range('a', 'e') -//=> ['a', 'b', 'c', 'd', 'e'] - -range('a', 'e', 2) -//=> ['a', 'c', 'e'] - -range('A', 'E', 2) -//=> ['A', 'C', 'E'] -``` - -### Invalid ranges - -When an invalid range is passed, `null` is returned. - -```js -range('1.1', '2'); -//=> null - -range('a', '2'); -//=> null - -range(1, 10, 'foo'); -//=> null -``` - -If you want errors to be throw, pass `silent: false` on the options: - - -### Custom function - -Optionally pass a custom function as the third or fourth argument: - -```js -range('a', 'e', function (val, isNumber, pad, i) { - if (!isNumber) { - return String.fromCharCode(val) + i; - } - return val; -}); -//=> ['a0', 'b1', 'c2', 'd3', 'e4'] -``` - -### Special characters - -A special character may be passed as the third arg instead of a step increment. These characters can be pretty useful for brace expansion, creating file paths, test fixtures and similar use case. - -```js -range('a', 'z', SPECIAL_CHARACTER_HERE); -``` - -**Supported characters** - - - `+`: repeat the given string `n` times - - `|`: create a regex-ready string, instead of an array - - `>`: join values to single array element - - `?`: randomize the given pattern using [randomatic] - -#### plus - -Character: _(`+`)_ - -Repeat the first argument the number of times passed on the second argument. - -**Examples:** - -```js -range('a', 3, '+'); -//=> ['a', 'a', 'a'] - -range('abc', 2, '+'); -//=> ['abc', 'abc'] -``` - -#### pipe and tilde - -Characters: _(`|` and `~`)_ - -Creates a regex-capable string (either a logical `or` or a character class) from the expanded arguments. - -**Examples:** - -```js -range('a', 'c', '|'); -//=> ['(a|b|c)' - -range('a', 'c', '~'); -//=> ['[a-c]' - -range('a', 'z', '|5'); -//=> ['(a|f|k|p|u|z)' -``` - -**Automatic separator correction** - -To avoid this error: - -> `Range out of order in character class` - -Fill-range detects invalid sequences and uses the correct syntax. For example: - -**invalid** (regex) - -If you pass these: - -```js -range('a', 'z', '~5'); -// which would result in this -//=> ['[a-f-k-p-u-z]'] - -range('10', '20', '~'); -// which would result in this -//=> ['[10-20]'] -``` - -**valid** (regex) - -fill-range corrects them to this: - -```js -range('a', 'z', '~5'); -//=> ['(a|f|k|p|u|z)' - -range('10', '20', '~'); -//=> ['(10-20)' -``` - -#### angle bracket - -Character: _(`>`)_ - -Joins all values in the returned array to a single value. - -**Examples:** - -```js -range('a', 'e', '>'); -//=> ['abcde'] - -range('5', '8', '>'); -//=> ['5678'] - -range('2', '20', '2>'); -//=> ['2468101214161820'] -``` - - -#### question mark - -Character: _(`?`)_ - -Uses [randomatic] to generate randomized alpha, numeric, or alpha-numeric patterns based on the provided arguments. - -**Examples:** - -_(actual results would obviously be randomized)_ - -Generate a 5-character, uppercase, alphabetical string: - -```js -range('A', 5, '?'); -//=> ['NSHAK'] -``` - -Generate a 5-digit random number: - -```js -range('0', 5, '?'); -//=> ['36583'] -``` - -Generate a 10-character alpha-numeric string: - -```js -range('A0', 10, '?'); -//=> ['5YJD60VQNN'] -``` - -See the [randomatic] repo for all available options and or to create issues or feature requests related to randomization. - -## Other useful libs - * [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`. - * [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. - * [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. - * [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. - -## Running tests -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/fill-range/issues) - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2014-2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 07, 2015._ - -[randomatic]: https://github.com/jonschlinkert/randomatic -[expand-range]: https://github.com/jonschlinkert/expand-range -[micromatch]: https://github.com/jonschlinkert/micromatch -[braces]: https://github.com/jonschlinkert/braces \ No newline at end of file diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js deleted file mode 100644 index 5657051..0000000 --- a/node_modules/fill-range/index.js +++ /dev/null @@ -1,408 +0,0 @@ -/*! - * fill-range - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isObject = require('isobject'); -var isNumber = require('is-number'); -var randomize = require('randomatic'); -var repeatStr = require('repeat-string'); -var repeat = require('repeat-element'); - -/** - * Expose `fillRange` - */ - -module.exports = fillRange; - -/** - * Return a range of numbers or letters. - * - * @param {String} `a` Start of the range - * @param {String} `b` End of the range - * @param {String} `step` Increment or decrement to use. - * @param {Function} `fn` Custom function to modify each element in the range. - * @return {Array} - */ - -function fillRange(a, b, step, options, fn) { - if (a == null || b == null) { - throw new Error('fill-range expects the first and second args to be strings.'); - } - - if (typeof step === 'function') { - fn = step; options = {}; step = null; - } - - if (typeof options === 'function') { - fn = options; options = {}; - } - - if (isObject(step)) { - options = step; step = ''; - } - - var expand, regex = false, sep = ''; - var opts = options || {}; - - if (typeof opts.silent === 'undefined') { - opts.silent = true; - } - - step = step || opts.step; - - // store a ref to unmodified arg - var origA = a, origB = b; - - b = (b.toString() === '-0') ? 0 : b; - - if (opts.optimize || opts.makeRe) { - step = step ? (step += '~') : step; - expand = true; - regex = true; - sep = '~'; - } - - // handle special step characters - if (typeof step === 'string') { - var match = stepRe().exec(step); - - if (match) { - var i = match.index; - var m = match[0]; - - // repeat string - if (m === '+') { - return repeat(a, b); - - // randomize a, `b` times - } else if (m === '?') { - return [randomize(a, b)]; - - // expand right, no regex reduction - } else if (m === '>') { - step = step.substr(0, i) + step.substr(i + 1); - expand = true; - - // expand to an array, or if valid create a reduced - // string for a regex logic `or` - } else if (m === '|') { - step = step.substr(0, i) + step.substr(i + 1); - expand = true; - regex = true; - sep = m; - - // expand to an array, or if valid create a reduced - // string for a regex range - } else if (m === '~') { - step = step.substr(0, i) + step.substr(i + 1); - expand = true; - regex = true; - sep = m; - } - } else if (!isNumber(step)) { - if (!opts.silent) { - throw new TypeError('fill-range: invalid step.'); - } - return null; - } - } - - if (/[.&*()[\]^%$#@!]/.test(a) || /[.&*()[\]^%$#@!]/.test(b)) { - if (!opts.silent) { - throw new RangeError('fill-range: invalid range arguments.'); - } - return null; - } - - // has neither a letter nor number, or has both letters and numbers - // this needs to be after the step logic - if (!noAlphaNum(a) || !noAlphaNum(b) || hasBoth(a) || hasBoth(b)) { - if (!opts.silent) { - throw new RangeError('fill-range: invalid range arguments.'); - } - return null; - } - - // validate arguments - var isNumA = isNumber(zeros(a)); - var isNumB = isNumber(zeros(b)); - - if ((!isNumA && isNumB) || (isNumA && !isNumB)) { - if (!opts.silent) { - throw new TypeError('fill-range: first range argument is incompatible with second.'); - } - return null; - } - - // by this point both are the same, so we - // can use A to check going forward. - var isNum = isNumA; - var num = formatStep(step); - - // is the range alphabetical? or numeric? - if (isNum) { - // if numeric, coerce to an integer - a = +a; b = +b; - } else { - // otherwise, get the charCode to expand alpha ranges - a = a.charCodeAt(0); - b = b.charCodeAt(0); - } - - // is the pattern descending? - var isDescending = a > b; - - // don't create a character class if the args are < 0 - if (a < 0 || b < 0) { - expand = false; - regex = false; - } - - // detect padding - var padding = isPadded(origA, origB); - var res, pad, arr = []; - var ii = 0; - - // character classes, ranges and logical `or` - if (regex) { - if (shouldExpand(a, b, num, isNum, padding, opts)) { - // make sure the correct separator is used - if (sep === '|' || sep === '~') { - sep = detectSeparator(a, b, num, isNum, isDescending); - } - return wrap([origA, origB], sep, opts); - } - } - - while (isDescending ? (a >= b) : (a <= b)) { - if (padding && isNum) { - pad = padding(a); - } - - // custom function - if (typeof fn === 'function') { - res = fn(a, isNum, pad, ii++); - - // letters - } else if (!isNum) { - if (regex && isInvalidChar(a)) { - res = null; - } else { - res = String.fromCharCode(a); - } - - // numbers - } else { - res = formatPadding(a, pad); - } - - // add result to the array, filtering any nulled values - if (res !== null) arr.push(res); - - // increment or decrement - if (isDescending) { - a -= num; - } else { - a += num; - } - } - - // now that the array is expanded, we need to handle regex - // character classes, ranges or logical `or` that wasn't - // already handled before the loop - if ((regex || expand) && !opts.noexpand) { - // make sure the correct separator is used - if (sep === '|' || sep === '~') { - sep = detectSeparator(a, b, num, isNum, isDescending); - } - if (arr.length === 1 || a < 0 || b < 0) { return arr; } - return wrap(arr, sep, opts); - } - - return arr; -} - -/** - * Wrap the string with the correct regex - * syntax. - */ - -function wrap(arr, sep, opts) { - if (sep === '~') { sep = '-'; } - var str = arr.join(sep); - var pre = opts && opts.regexPrefix; - - // regex logical `or` - if (sep === '|') { - str = pre ? pre + str : str; - str = '(' + str + ')'; - } - - // regex character class - if (sep === '-') { - str = (pre && pre === '^') - ? pre + str - : str; - str = '[' + str + ']'; - } - return [str]; -} - -/** - * Check for invalid characters - */ - -function isCharClass(a, b, step, isNum, isDescending) { - if (isDescending) { return false; } - if (isNum) { return a <= 9 && b <= 9; } - if (a < b) { return step === 1; } - return false; -} - -/** - * Detect the correct separator to use - */ - -function shouldExpand(a, b, num, isNum, padding, opts) { - if (isNum && (a > 9 || b > 9)) { return false; } - return !padding && num === 1 && a < b; -} - -/** - * Detect the correct separator to use - */ - -function detectSeparator(a, b, step, isNum, isDescending) { - var isChar = isCharClass(a, b, step, isNum, isDescending); - if (!isChar) { - return '|'; - } - return '~'; -} - -/** - * Correctly format the step based on type - */ - -function formatStep(step) { - return Math.abs(step >> 0) || 1; -} - -/** - * Format padding, taking leading `-` into account - */ - -function formatPadding(ch, pad) { - var res = pad ? pad + ch : ch; - if (pad && ch.toString().charAt(0) === '-') { - res = '-' + pad + ch.toString().substr(1); - } - return res.toString(); -} - -/** - * Check for invalid characters - */ - -function isInvalidChar(str) { - var ch = toStr(str); - return ch === '\\' - || ch === '[' - || ch === ']' - || ch === '^' - || ch === '(' - || ch === ')' - || ch === '`'; -} - -/** - * Convert to a string from a charCode - */ - -function toStr(ch) { - return String.fromCharCode(ch); -} - - -/** - * Step regex - */ - -function stepRe() { - return /\?|>|\||\+|\~/g; -} - -/** - * Return true if `val` has either a letter - * or a number - */ - -function noAlphaNum(val) { - return /[a-z0-9]/i.test(val); -} - -/** - * Return true if `val` has both a letter and - * a number (invalid) - */ - -function hasBoth(val) { - return /[a-z][0-9]|[0-9][a-z]/i.test(val); -} - -/** - * Normalize zeros for checks - */ - -function zeros(val) { - if (/^-*0+$/.test(val.toString())) { - return '0'; - } - return val; -} - -/** - * Return true if `val` has leading zeros, - * or a similar valid pattern. - */ - -function hasZeros(val) { - return /[^.]\.|^-*0+[0-9]/.test(val); -} - -/** - * If the string is padded, returns a curried function with - * the a cached padding string, or `false` if no padding. - * - * @param {*} `origA` String or number. - * @return {String|Boolean} - */ - -function isPadded(origA, origB) { - if (hasZeros(origA) || hasZeros(origB)) { - var alen = length(origA); - var blen = length(origB); - - var len = alen >= blen - ? alen - : blen; - - return function (a) { - return repeatStr('0', len - length(a)); - }; - } - return false; -} - -/** - * Get the string length of `val` - */ - -function length(val) { - return val.toString().length; -} diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json deleted file mode 100644 index 078d167..0000000 --- a/node_modules/fill-range/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_from": "fill-range@^2.1.0", - "_id": "fill-range@2.2.3", - "_inBundle": false, - "_integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "_location": "/fill-range", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fill-range@^2.1.0", - "name": "fill-range", - "escapedName": "fill-range", - "rawSpec": "^2.1.0", - "saveSpec": null, - "fetchSpec": "^2.1.0" - }, - "_requiredBy": [ - "/expand-range" - ], - "_resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "_shasum": "50b77dfd7e469bc7492470963699fe7a8485a723", - "_spec": "fill-range@^2.1.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/expand-range", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/fill-range/issues" - }, - "bundleDependencies": false, - "dependencies": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^1.1.3", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - }, - "deprecated": false, - "description": "Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.", - "devDependencies": { - "benchmarked": "^0.1.3", - "chalk": "^0.5.1", - "should": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/fill-range", - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "expand", - "expansion", - "glob", - "match", - "matches", - "matching", - "number", - "numerical", - "range", - "ranges", - "sh" - ], - "license": "MIT", - "main": "index.js", - "name": "fill-range", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/fill-range.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "micromatch", - "expand-range", - "braces", - "is-glob" - ] - } - }, - "version": "2.2.3" -} diff --git a/node_modules/for-in/LICENSE b/node_modules/for-in/LICENSE deleted file mode 100644 index d734237..0000000 --- a/node_modules/for-in/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/for-in/README.md b/node_modules/for-in/README.md deleted file mode 100644 index 874e189..0000000 --- a/node_modules/for-in/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# for-in [![NPM version](https://img.shields.io/npm/v/for-in.svg?style=flat)](https://www.npmjs.com/package/for-in) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![NPM total downloads](https://img.shields.io/npm/dt/for-in.svg?style=flat)](https://npmjs.org/package/for-in) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-in.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-in) - -> Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save for-in -``` - -## Usage - -```js -var forIn = require('for-in'); - -var obj = {a: 'foo', b: 'bar', c: 'baz'}; -var values = []; -var keys = []; - -forIn(obj, function (value, key, o) { - keys.push(key); - values.push(value); -}); - -console.log(keys); -//=> ['a', 'b', 'c']; - -console.log(values); -//=> ['foo', 'bar', 'baz']; -``` - -## About - -### Related projects - -* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") -* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") -* [for-own](https://www.npmjs.com/package/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) | [homepage](https://github.com/jonschlinkert/for-own "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 16 | [jonschlinkert](https://github.com/jonschlinkert) | -| 2 | [paulirish](https://github.com/paulirish) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 28, 2017._ \ No newline at end of file diff --git a/node_modules/for-in/index.js b/node_modules/for-in/index.js deleted file mode 100644 index 0b5f95f..0000000 --- a/node_modules/for-in/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * for-in - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -module.exports = function forIn(obj, fn, thisArg) { - for (var key in obj) { - if (fn.call(thisArg, obj[key], key, obj) === false) { - break; - } - } -}; diff --git a/node_modules/for-in/package.json b/node_modules/for-in/package.json deleted file mode 100644 index 9af09ab..0000000 --- a/node_modules/for-in/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_from": "for-in@^1.0.1", - "_id": "for-in@1.0.2", - "_inBundle": false, - "_integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "_location": "/for-in", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "for-in@^1.0.1", - "name": "for-in", - "escapedName": "for-in", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/for-own" - ], - "_resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "_shasum": "81068d295a8142ec0ac726c6e2200c30fb6d5e80", - "_spec": "for-in@^1.0.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/for-own", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/for-in/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Paul Irish", - "url": "http://paulirish.com" - } - ], - "deprecated": false, - "description": "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/for-in", - "keywords": [ - "for", - "for-in", - "for-own", - "has", - "has-own", - "hasOwn", - "in", - "key", - "keys", - "object", - "own", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "for-in", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/for-in.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "arr-flatten", - "collection-map", - "for-own" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.2" -} diff --git a/node_modules/for-own/LICENSE b/node_modules/for-own/LICENSE deleted file mode 100644 index d290fe0..0000000 --- a/node_modules/for-own/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, 2017, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/for-own/README.md b/node_modules/for-own/README.md deleted file mode 100644 index fd56877..0000000 --- a/node_modules/for-own/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# for-own [![NPM version](https://img.shields.io/npm/v/for-own.svg?style=flat)](https://www.npmjs.com/package/for-own) [![NPM monthly downloads](https://img.shields.io/npm/dm/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![NPM total downloads](https://img.shields.io/npm/dt/for-own.svg?style=flat)](https://npmjs.org/package/for-own) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/for-own.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/for-own) - -> Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save for-own -``` - -## Usage - -```js -var forOwn = require('for-own'); - -var obj = {a: 'foo', b: 'bar', c: 'baz'}; -var values = []; -var keys = []; - -forOwn(obj, function (value, key, o) { - keys.push(key); - values.push(value); -}); - -console.log(keys); -//=> ['a', 'b', 'c']; - -console.log(values); -//=> ['foo', 'bar', 'baz']; -``` - -## About - -### Related projects - -* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") -* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") -* [for-in](https://www.npmjs.com/package/for-in): Iterate over the own and inherited enumerable properties of an object, and return an object… [more](https://github.com/jonschlinkert/for-in) | [homepage](https://github.com/jonschlinkert/for-in "Iterate over the own and inherited enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 10 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [javiercejudo](https://github.com/javiercejudo) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file diff --git a/node_modules/for-own/index.js b/node_modules/for-own/index.js deleted file mode 100644 index 74e2d75..0000000 --- a/node_modules/for-own/index.js +++ /dev/null @@ -1,19 +0,0 @@ -/*! - * for-own - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var forIn = require('for-in'); -var hasOwn = Object.prototype.hasOwnProperty; - -module.exports = function forOwn(obj, fn, thisArg) { - forIn(obj, function(val, key) { - if (hasOwn.call(obj, key)) { - return fn.call(thisArg, obj[key], key, obj); - } - }); -}; diff --git a/node_modules/for-own/package.json b/node_modules/for-own/package.json deleted file mode 100644 index d813456..0000000 --- a/node_modules/for-own/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_from": "for-own@^0.1.4", - "_id": "for-own@0.1.5", - "_inBundle": false, - "_integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "_location": "/for-own", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "for-own@^0.1.4", - "name": "for-own", - "escapedName": "for-own", - "rawSpec": "^0.1.4", - "saveSpec": null, - "fetchSpec": "^0.1.4" - }, - "_requiredBy": [ - "/object.omit" - ], - "_resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "_shasum": "5265c681a4f294dabbf17c9509b6763aa84510ce", - "_spec": "for-own@^0.1.4", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/object.omit", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/for-own/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Javier Cejudo", - "email": "javier@javiercejudo.com", - "url": "https://www.javiercejudo.com" - }, - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "for-in": "^1.0.1" - }, - "deprecated": false, - "description": "Iterate over the own enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`. JavaScript/Node.js.", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/for-own", - "keywords": [ - "for", - "for-in", - "for-own", - "has", - "has-own", - "hasOwn", - "key", - "keys", - "object", - "own", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "for-own", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/for-own.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "arr-flatten", - "collection-map", - "for-in" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.1.5" -} diff --git a/node_modules/foreach/package.json b/node_modules/foreach/package.json index ae24c47..c3679b8 100644 --- a/node_modules/foreach/package.json +++ b/node_modules/foreach/package.json @@ -1,27 +1,32 @@ { - "_from": "foreach@^2.0.5", + "_args": [ + [ + "foreach@2.0.5", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "foreach@2.0.5", "_id": "foreach@2.0.5", "_inBundle": false, "_integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", "_location": "/foreach", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "foreach@^2.0.5", + "raw": "foreach@2.0.5", "name": "foreach", "escapedName": "foreach", - "rawSpec": "^2.0.5", + "rawSpec": "2.0.5", "saveSpec": null, - "fetchSpec": "^2.0.5" + "fetchSpec": "2.0.5" }, "_requiredBy": [ "/define-properties" ], "_resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "_shasum": "0bee005018aeb260d0a3af3ae658dd0136ec1b99", - "_spec": "foreach@^2.0.5", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/define-properties", + "_spec": "2.0.5", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Manuel Stofer", "email": "manuel@takimata.ch" @@ -29,7 +34,6 @@ "bugs": { "url": "https://github.com/manuelstofer/foreach/issues" }, - "bundleDependencies": false, "contributors": [ { "name": "Manuel Stofer" @@ -40,7 +44,6 @@ } ], "dependencies": {}, - "deprecated": false, "description": "foreach component + npm package", "devDependencies": { "covert": "*", diff --git a/node_modules/forever-agent/package.json b/node_modules/forever-agent/package.json index b948ac8..a518e1f 100644 --- a/node_modules/forever-agent/package.json +++ b/node_modules/forever-agent/package.json @@ -1,27 +1,32 @@ { - "_from": "forever-agent@~0.6.1", + "_args": [ + [ + "forever-agent@0.6.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "forever-agent@0.6.1", "_id": "forever-agent@0.6.1", "_inBundle": false, "_integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "_location": "/forever-agent", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "forever-agent@~0.6.1", + "raw": "forever-agent@0.6.1", "name": "forever-agent", "escapedName": "forever-agent", - "rawSpec": "~0.6.1", + "rawSpec": "0.6.1", "saveSpec": null, - "fetchSpec": "~0.6.1" + "fetchSpec": "0.6.1" }, "_requiredBy": [ "/request" ], "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "_shasum": "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91", - "_spec": "forever-agent@~0.6.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/request", + "_spec": "0.6.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Mikeal Rogers", "email": "mikeal.rogers@gmail.com", @@ -30,9 +35,7 @@ "bugs": { "url": "https://github.com/mikeal/forever-agent/issues" }, - "bundleDependencies": false, "dependencies": {}, - "deprecated": false, "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.", "devDependencies": {}, "engines": { diff --git a/node_modules/form-data/README.md b/node_modules/form-data/README.md index cb421fb..d780936 100644 --- a/node_modules/form-data/README.md +++ b/node_modules/form-data/README.md @@ -6,11 +6,11 @@ The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface] [xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface -[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.3.2.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data) -[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.3.2.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data) -[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.3.2.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data) +[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.3.3.svg?label=linux:4.x-9.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.3.3.svg?label=macos:4.x-9.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.3.3.svg?label=windows:4.x-9.x)](https://ci.appveyor.com/project/alexindigo/form-data) -[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.3.2.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.3.3.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) [![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) [![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data) diff --git a/node_modules/form-data/package.json b/node_modules/form-data/package.json index 4bb5492..2cd05e0 100644 --- a/node_modules/form-data/package.json +++ b/node_modules/form-data/package.json @@ -1,27 +1,27 @@ { - "_from": "form-data@~2.3.1", - "_id": "form-data@2.3.2", + "_from": "form-data@~2.3.2", + "_id": "form-data@2.3.3", "_inBundle": false, - "_integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "_integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "_location": "/form-data", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "form-data@~2.3.1", + "raw": "form-data@~2.3.2", "name": "form-data", "escapedName": "form-data", - "rawSpec": "~2.3.1", + "rawSpec": "~2.3.2", "saveSpec": null, - "fetchSpec": "~2.3.1" + "fetchSpec": "~2.3.2" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "_shasum": "4970498be604c20c005d4f5c23aecd21d6b49099", - "_spec": "form-data@~2.3.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/request", + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "_shasum": "dcce52c05f644f298c6a7ab936bd724ceffbf3a6", + "_spec": "form-data@~2.3.2", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\request", "author": { "name": "Felix Geisendörfer", "email": "felix@debuggable.com", @@ -34,7 +34,7 @@ "bundleDependencies": false, "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "1.0.6", + "combined-stream": "^1.0.6", "mime-types": "^2.1.12" }, "deprecated": false, @@ -94,5 +94,5 @@ "test": "istanbul cover test/run.js", "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md" }, - "version": "2.3.2" + "version": "2.3.3" } diff --git a/node_modules/form-data/yarn.lock b/node_modules/form-data/yarn.lock new file mode 100644 index 0000000..ab55059 --- /dev/null +++ b/node_modules/form-data/yarn.lock @@ -0,0 +1,2662 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +JSONStream@^1.0.3: + version "1.3.2" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn-node@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.3.0.tgz#5f86d73346743810ef1269b901dbcbded020861b" + dependencies: + acorn "^5.4.1" + xtend "^4.0.1" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.3: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +acorn@^5.2.1, acorn@^5.4.0, acorn@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" + +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv@^4.7.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ajv@^5.1.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +array-filter@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" + +array-map@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" + +array-reduce@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1.js@^4.0.0: + version "4.9.2" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.9.2.tgz#8117ef4f7ed87cd8f89044b5bff97ac243a16c9a" + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + dependencies: + util "0.10.3" + +astw@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/astw/-/astw-2.2.0.tgz#7bd41784d32493987aeb239b6b4e1c57a873b917" + dependencies: + acorn "^4.0.3" + +async@1.x, async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@~0.1.22: + version "0.1.22" + resolved "https://registry.yarnpkg.com/async/-/async-0.1.22.tgz#0fc1aaa088a0e3ef0ebe2d8831bab0dcf8845061" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.2.1, aws4@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.16.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-js@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +boom@4.x.x: + version "4.3.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" + dependencies: + hoek "4.x.x" + +boom@5.x.x: + version "5.2.0" + resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" + dependencies: + hoek "4.x.x" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + +browser-pack@^6.0.1: + version "6.0.4" + resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.4.tgz#9a73beb3b48f9e36868be007b64400102c04a99f" + dependencies: + JSONStream "^1.0.3" + combine-source-map "~0.8.0" + defined "^1.0.0" + safe-buffer "^5.1.1" + through2 "^2.0.0" + umd "^3.0.0" + +browser-resolve@^1.11.0, browser-resolve@^1.7.0: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f" + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + +browserify-istanbul@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/browserify-istanbul/-/browserify-istanbul-2.0.0.tgz#85a4b425da1f7c09e02ba32a3b44f6535d38c257" + dependencies: + minimatch "^3.0.0" + through "^2.3.8" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@~0.1.2: + version "0.1.4" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" + dependencies: + pako "~0.2.0" + +browserify@^13.1.1: + version "13.3.0" + resolved "https://registry.yarnpkg.com/browserify/-/browserify-13.3.0.tgz#b5a9c9020243f0c70e4675bec8223bc627e415ce" + dependencies: + JSONStream "^1.0.3" + assert "^1.4.0" + browser-pack "^6.0.1" + browser-resolve "^1.11.0" + browserify-zlib "~0.1.2" + buffer "^4.1.0" + cached-path-relative "^1.0.0" + concat-stream "~1.5.1" + console-browserify "^1.1.0" + constants-browserify "~1.0.0" + crypto-browserify "^3.0.0" + defined "^1.0.0" + deps-sort "^2.0.0" + domain-browser "~1.1.0" + duplexer2 "~0.1.2" + events "~1.1.0" + glob "^7.1.0" + has "^1.0.0" + htmlescape "^1.1.0" + https-browserify "~0.0.0" + inherits "~2.0.1" + insert-module-globals "^7.0.0" + labeled-stream-splicer "^2.0.0" + module-deps "^4.0.8" + os-browserify "~0.1.1" + parents "^1.0.1" + path-browserify "~0.0.0" + process "~0.11.0" + punycode "^1.3.2" + querystring-es3 "~0.2.0" + read-only-stream "^2.0.0" + readable-stream "^2.0.2" + resolve "^1.1.4" + shasum "^1.0.0" + shell-quote "^1.6.1" + stream-browserify "^2.0.0" + stream-http "^2.0.0" + string_decoder "~0.10.0" + subarg "^1.0.0" + syntax-error "^1.1.1" + through2 "^2.0.0" + timers-browserify "^1.0.1" + tty-browserify "~0.0.0" + url "~0.11.0" + util "~0.10.1" + vm-browserify "~0.0.1" + xtend "^4.0.0" + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + +buffer@^4.1.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + +cached-path-relative@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +clone@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +columnify@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" + dependencies: + strip-ansi "^3.0.0" + wcwidth "^1.0.0" + +combine-source-map@~0.7.1: + version "0.7.2" + resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e" + dependencies: + convert-source-map "~1.1.0" + inline-source-map "~0.6.0" + lodash.memoize "~3.0.3" + source-map "~0.5.3" + +combine-source-map@~0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.8.0.tgz#a58d0df042c186fcf822a8e8015f5450d2d79a8b" + dependencies: + convert-source-map "~1.1.0" + inline-source-map "~0.6.0" + lodash.memoize "~3.0.3" + source-map "~0.5.3" + +combined-stream@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.14.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@1.6.0, concat-stream@^1.4.7, concat-stream@^1.4.8, concat-stream@^1.5.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +concat-stream@~1.5.0, concat-stream@~1.5.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" + dependencies: + inherits "~2.0.1" + readable-stream "~2.0.0" + typedarray "~0.0.5" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +constants-browserify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + +convert-source-map@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +convert-source-map@~1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +coveralls@^2.11.14: + version "2.13.3" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7" + dependencies: + js-yaml "3.6.1" + lcov-parse "0.0.10" + log-driver "1.2.5" + minimist "1.2.0" + request "2.79.0" + +create-ecdh@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + ripemd160 "^2.0.0" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cryptiles@3.x.x: + version "3.1.2" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" + dependencies: + boom "5.x.x" + +crypto-browserify@^3.0.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +debug@2.6.9, debug@^2.1.1: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-equal@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +deeply@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/deeply/-/deeply-1.0.0.tgz#ed573160b5c91ff5138917bf701e5453b19f574b" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +defined@^1.0.0, defined@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +deps-sort@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5" + dependencies: + JSONStream "^1.0.3" + shasum "^1.0.0" + subarg "^1.0.0" + through2 "^2.0.0" + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +detective@^4.0.0: + version "4.7.1" + resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.1.tgz#0eca7314338442febb6d65da54c10bb1c82b246e" + dependencies: + acorn "^5.2.1" + defined "^1.0.0" + +diffie-hellman@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +doctrine@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + dependencies: + esutils "^2.0.2" + +domain-browser@~1.1.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" + +du@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/du/-/du-0.1.0.tgz#f26e340a09c7bc5b6fd69af6dbadea60fa8c6f4d" + dependencies: + async "~0.1.22" + +duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + dependencies: + readable-stream "^2.0.2" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +elliptic@^6.0.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +envar@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/envar/-/envar-2.0.0.tgz#44f7cdafbf976b732b73ad1acb2e8808ecf8876e" + dependencies: + deeply "^1.0.0" + minimist "^1.2.0" + +es-abstract@^1.5.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.38" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.38.tgz#fa7d40d65bbc9bb8a67e1d3f9cc656a00530eed3" + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + +es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-promise@^4.0.3: + version "4.2.4" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@^3.9.1: + version "3.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.5.2" + debug "^2.1.1" + doctrine "^2.0.0" + escope "^3.6.0" + espree "^3.4.0" + esquery "^1.0.0" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~2.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.4.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6" + dependencies: + acorn "^5.4.0" + acorn-jsx "^3.0.0" + +esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" + dependencies: + estraverse "^4.1.0" + object-assign "^4.0.1" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +events@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +extend@~3.0.0, extend@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extract-zip@^1.6.5: + version "1.6.6" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.6.tgz#1290ede8d20d0872b429fd3f351ca128ec5ef85c" + dependencies: + concat-stream "1.6.0" + debug "2.6.9" + mkdirp "0.5.0" + yauzl "2.4.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +fake@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/fake/-/fake-0.2.2.tgz#68fe672725ff0f5c89ba92c539b31111f122d1f3" + +far@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7" + dependencies: + oop "0.0.3" + +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +flat-cache@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +for-each@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.2.tgz#2c40450b9348e97f281322593ba96704b9abd4d4" + dependencies: + is-function "~1.0.0" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +form-data@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +formidable@^1.0.17: + version "1.1.1" + resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.1.1.tgz#96b8886f7c3c3508b932d6bd70c4d3a88f35f1a9" + +fs-extra@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fstream-ignore@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream-npm@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/fstream-npm/-/fstream-npm-1.2.1.tgz#08c4a452f789dcbac4c89a4563c902b2c862fd5b" + dependencies: + fstream-ignore "^1.0.0" + inherits "2" + +fstream@^1.0.0: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +ghostface@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/ghostface/-/ghostface-1.5.0.tgz#b93e7ab6560ec93b4509032fdd43a4bec93044fd" + dependencies: + chalk "^1.0.0" + concat-stream "^1.4.8" + convert-source-map "^1.0.0" + minimist "^1.1.1" + semver "^4.3.3" + source-map "^0.4.2" + which "^1.0.9" + +glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@~7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.14.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +handlebars@^4.0.1: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has@^1.0.0, has@^1.0.1, has@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hash-base@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + dependencies: + inherits "^2.0.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hasha@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" + dependencies: + is-stream "^1.0.1" + pinkie-promise "^2.0.0" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hawk@~6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" + dependencies: + boom "4.x.x" + cryptiles "3.x.x" + hoek "4.x.x" + sntp "2.x.x" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hoek@4.x.x: + version "4.2.0" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" + +htmlescape@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" + +ieee754@^1.1.4: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +ignore@^3.2.0: + version "3.3.7" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +in-publish@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + +inline-source-map@~0.6.0: + version "0.6.2" + resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5" + dependencies: + source-map "~0.5.3" + +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +insert-module-globals@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.1.tgz#c03bf4e01cb086d5b5e5ace8ad0afe7889d638c3" + dependencies: + JSONStream "^1.0.3" + combine-source-map "~0.7.1" + concat-stream "~1.5.1" + is-buffer "^1.1.0" + lexical-scope "^1.2.0" + process "~0.11.0" + through2 "^2.0.0" + xtend "^4.0.0" + +interpret@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" + +is-buffer@^1.1.0, is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-function@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" + +is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: + version "2.17.1" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz#3da98914a70a22f0a8563ef1511a246c6fc55471" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-node-modern@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-node-modern/-/is-node-modern-1.0.0.tgz#cfe2607be7403b05b28a566f66cbf8a583d4fc63" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + dependencies: + path-is-inside "^1.0.1" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + +is-stream@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isarray@~0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +js-yaml@3.x, js-yaml@^3.5.1: + version "3.10.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stable-stringify@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kew@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + +labeled-stream-splicer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59" + dependencies: + inherits "^2.0.1" + isarray "~0.0.1" + stream-splicer "^2.0.0" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcov-parse@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lexical-scope@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/lexical-scope/-/lexical-scope-1.2.0.tgz#fcea5edc704a4b3a8796cdca419c3a0afaf22df4" + dependencies: + astw "^2.0.0" + +lodash.memoize@~3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" + +lodash@^4.0.0, lodash@^4.3.0: + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + +log-driver@1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +map-limit@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/map-limit/-/map-limit-0.0.1.tgz#eb7961031c0f0e8d001bf2d56fab685d58822f38" + dependencies: + once "~1.3.0" + +md5.js@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" + +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7: + version "2.1.17" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" + dependencies: + mime-db "~1.30.0" + +minimalistic-assert@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + dependencies: + minimist "0.0.8" + +mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +module-deps@^4.0.8: + version "4.1.1" + resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd" + dependencies: + JSONStream "^1.0.3" + browser-resolve "^1.7.0" + cached-path-relative "^1.0.0" + concat-stream "~1.5.0" + defined "^1.0.0" + detective "^4.0.0" + duplexer2 "^0.1.2" + inherits "^2.0.1" + parents "^1.0.0" + readable-stream "^2.0.2" + resolve "^1.1.3" + stream-combiner2 "^1.1.1" + subarg "^1.0.0" + through2 "^2.0.0" + xtend "^4.0.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-uuid@~1.4.7: + version "1.4.8" + resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" + +nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1, oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +obake@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/obake/-/obake-0.1.2.tgz#64a477c9ddfbbccc18cff3a750924974d22c29d3" + dependencies: + envar "^2.0.0" + ghostface "^1.5.0" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object-inspect@~1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.3.0.tgz#5b1eb8e6742e2ee83342a637034d844928ba2f6d" + +object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +once@1.x, once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +once@~1.3.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +oop@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-browserify@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-shim@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" + +pako@~0.2.0: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + +parents@^1.0.0, parents@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751" + dependencies: + path-platform "~0.11.15" + +parse-asn1@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + +path-browserify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-platform@~0.11.15: + version "0.11.15" + resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2" + +pbkdf2@^3.0.3: + version "3.0.14" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + +phantomjs-prebuilt@^2.1.13: + version "2.1.16" + resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz#efd212a4a3966d3647684ea8ba788549be2aefef" + dependencies: + es6-promise "^4.0.3" + extract-zip "^1.6.5" + fs-extra "^1.0.0" + hasha "^2.2.0" + kew "^0.7.0" + progress "^1.1.8" + request "^2.81.0" + request-progress "^2.0.1" + which "^1.2.10" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkgfiles@^2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/pkgfiles/-/pkgfiles-2.3.2.tgz#1b54a7a8dbe32caa84b0955f44917e1500d33d05" + dependencies: + columnify "^1.5.4" + du "^0.1.0" + fstream-npm "^1.2.0" + map-limit "0.0.1" + minimist "^1.2.0" + pkgresolve "^1.1.4" + pretty-bytes "^4.0.2" + +pkgresolve@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/pkgresolve/-/pkgresolve-1.1.4.tgz#0fa499ca366888c31e97357446c6053025ae47b6" + dependencies: + minimist "~1.2.0" + +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +pre-commit@^1.1.3: + version "1.2.2" + resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6" + dependencies: + cross-spawn "^5.0.1" + spawn-sync "^1.0.15" + which "1.2.x" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +pretty-bytes@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +process@~0.11.0: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +public-encrypt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + +punycode@^1.3.2, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +qs@~6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + +querystring-es3@~0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.3.tgz#b96b7df587f01dd91726c418f30553b1418e3d62" + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +read-only-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0" + dependencies: + readable-stream "^2.0.2" + +readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + +readable-stream@~2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +request-progress@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" + dependencies: + throttleit "^1.0.0" + +request@2.76.0: + version "2.76.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.76.0.tgz#be44505afef70360a0436955106be3945d95560e" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + +request@2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +request@^2.81.0: + version "2.83.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + hawk "~6.0.2" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + stringstream "~0.0.5" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve@1.1.7, resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6: + version "1.5.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" + dependencies: + path-parse "^1.0.5" + +resolve@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" + dependencies: + path-parse "^1.0.5" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +resumer@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" + dependencies: + through "~2.3.4" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + dependencies: + hash-base "^2.0.0" + inherits "^2.0.1" + +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +semver@^4.3.3: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4: + version "2.4.10" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.10.tgz#b1fde5cd7d11a5626638a07c604ab909cfa31f9b" + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shasum@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f" + dependencies: + json-stable-stringify "~0.0.0" + sha.js "~2.4.4" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shell-quote@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" + dependencies: + array-filter "~0.0.0" + array-map "~0.0.0" + array-reduce "~0.0.0" + jsonify "~0.0.0" + +shelljs@^0.7.5: + version "0.7.8" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sntp@2.x.x: + version "2.1.0" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" + dependencies: + hoek "4.x.x" + +source-map@^0.4.2, source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +source-map@~0.5.1, source-map@~0.5.3: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +spawn-sync@^1.0.15: + version "1.0.15" + resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" + dependencies: + concat-stream "^1.4.7" + os-shim "^0.1.2" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stream-browserify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-combiner2@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + dependencies: + duplexer2 "~0.1.0" + readable-stream "^2.0.2" + +stream-http@^2.0.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.0.tgz#fd86546dac9b1c91aff8fc5d287b98fafb41bc10" + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.3" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-splicer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.2" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string.prototype.trim@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.0" + function-bind "^1.0.2" + +string_decoder@~0.10.0, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +stringstream@~0.0.4, stringstream@~0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +subarg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" + dependencies: + minimist "^1.1.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +syntax-error@^1.1.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c" + dependencies: + acorn-node "^1.2.0" + +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +tape@^4.6.2: + version "4.8.0" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.8.0.tgz#f6a9fec41cc50a1de50fa33603ab580991f6068e" + dependencies: + deep-equal "~1.0.1" + defined "~1.0.0" + for-each "~0.3.2" + function-bind "~1.1.0" + glob "~7.1.2" + has "~1.0.1" + inherits "~2.0.3" + minimist "~1.2.0" + object-inspect "~1.3.0" + resolve "~1.4.0" + resumer "~0.0.0" + string.prototype.trim "~1.1.2" + through "~2.3.8" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + +through2@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +"through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8, through@~2.3.4, through@~2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +timers-browserify@^1.0.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" + dependencies: + process "~0.11.0" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + +tough-cookie@~2.3.0, tough-cookie@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" + dependencies: + punycode "^1.4.1" + +tty-browserify@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +typedarray@^0.0.6, typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +umd@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e" + +url@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +util@0.10.3, util@~0.10.1: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + dependencies: + inherits "2.0.1" + +uuid@^3.0.0, uuid@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@~0.0.1: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +wcwidth@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + dependencies: + defaults "^1.0.3" + +which@1.2.x: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +which@^1.0.9, which@^1.1.1, which@^1.2.10, which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@^1.0.0, wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +yauzl@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" + dependencies: + fd-slicer "~1.0.1" diff --git a/node_modules/fs-readdir-recursive/package.json b/node_modules/fs-readdir-recursive/package.json index a5b0b7d..a34fe7f 100644 --- a/node_modules/fs-readdir-recursive/package.json +++ b/node_modules/fs-readdir-recursive/package.json @@ -1,27 +1,32 @@ { - "_from": "fs-readdir-recursive@^1.0.0", + "_args": [ + [ + "fs-readdir-recursive@1.1.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "fs-readdir-recursive@1.1.0", "_id": "fs-readdir-recursive@1.1.0", "_inBundle": false, "_integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", "_location": "/fs-readdir-recursive", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "fs-readdir-recursive@^1.0.0", + "raw": "fs-readdir-recursive@1.1.0", "name": "fs-readdir-recursive", "escapedName": "fs-readdir-recursive", - "rawSpec": "^1.0.0", + "rawSpec": "1.1.0", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "1.1.0" }, "_requiredBy": [ - "/babel-cli" + "/babel-minify" ], "_resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "_shasum": "e32fc030a2ccee44a6b5371308da54be0b397d27", - "_spec": "fs-readdir-recursive@^1.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-cli", + "_spec": "1.1.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Jonathan Ong", "email": "me@jongleberry.com", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/fs-utils/fs-readdir-recursive/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Recursively read a directory", "devDependencies": { "istanbul": "0", diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json index e349906..8a22843 100644 --- a/node_modules/function-bind/package.json +++ b/node_modules/function-bind/package.json @@ -1,28 +1,33 @@ { - "_from": "function-bind@^1.1.1", + "_args": [ + [ + "function-bind@1.1.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "function-bind@1.1.1", "_id": "function-bind@1.1.1", "_inBundle": false, "_integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "_location": "/function-bind", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "function-bind@^1.1.1", + "raw": "function-bind@1.1.1", "name": "function-bind", "escapedName": "function-bind", - "rawSpec": "^1.1.1", + "rawSpec": "1.1.1", "saveSpec": null, - "fetchSpec": "^1.1.1" + "fetchSpec": "1.1.1" }, "_requiredBy": [ "/es-abstract", "/has" ], "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "_shasum": "a56899d3ea3c9bab874bb9773b7c5ede92f4895d", - "_spec": "function-bind@^1.1.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/es-abstract", + "_spec": "1.1.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Raynos", "email": "raynos2@gmail.com" @@ -31,7 +36,6 @@ "url": "https://github.com/Raynos/function-bind/issues", "email": "raynos2@gmail.com" }, - "bundleDependencies": false, "contributors": [ { "name": "Raynos" @@ -42,7 +46,6 @@ } ], "dependencies": {}, - "deprecated": false, "description": "Implementation of Function.prototype.bind", "devDependencies": { "@ljharb/eslint-config": "^12.2.1", diff --git a/node_modules/getpass/package.json b/node_modules/getpass/package.json index baf4c0b..48a67e4 100644 --- a/node_modules/getpass/package.json +++ b/node_modules/getpass/package.json @@ -1,27 +1,32 @@ { - "_from": "getpass@^0.1.1", + "_args": [ + [ + "getpass@0.1.7", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "getpass@0.1.7", "_id": "getpass@0.1.7", "_inBundle": false, "_integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "_location": "/getpass", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "getpass@^0.1.1", + "raw": "getpass@0.1.7", "name": "getpass", "escapedName": "getpass", - "rawSpec": "^0.1.1", + "rawSpec": "0.1.7", "saveSpec": null, - "fetchSpec": "^0.1.1" + "fetchSpec": "0.1.7" }, "_requiredBy": [ "/sshpk" ], "_resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "_shasum": "5eff8e3e684d569ae4cb2b1282604e8ba62149fa", - "_spec": "getpass@^0.1.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/sshpk", + "_spec": "0.1.7", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Alex Wilson", "email": "alex.wilson@joyent.com" @@ -29,11 +34,9 @@ "bugs": { "url": "https://github.com/arekinath/node-getpass/issues" }, - "bundleDependencies": false, "dependencies": { "assert-plus": "^1.0.0" }, - "deprecated": false, "description": "getpass for node.js", "homepage": "https://github.com/arekinath/node-getpass#readme", "license": "MIT", diff --git a/node_modules/glob-base/LICENSE b/node_modules/glob-base/LICENSE deleted file mode 100644 index 65f90ac..0000000 --- a/node_modules/glob-base/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/glob-base/README.md b/node_modules/glob-base/README.md deleted file mode 100644 index 1da2e82..0000000 --- a/node_modules/glob-base/README.md +++ /dev/null @@ -1,158 +0,0 @@ -# glob-base [![NPM version](https://badge.fury.io/js/glob-base.svg)](http://badge.fury.io/js/glob-base) [![Build Status](https://travis-ci.org/jonschlinkert/glob-base.svg)](https://travis-ci.org/jonschlinkert/glob-base) - -> Returns an object with the (non-glob) base path and the actual pattern. - -Use [glob-parent](https://github.com/es128/glob-parent) if you just want the base path. - -## Install with [npm](npmjs.org) - -```bash -npm i glob-base --save -``` - -## Related projects -* [glob-parent](https://github.com/es128/glob-parent): Strips glob magic from a string to provide the parent path -* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A faster alternative to minimatch (10-45x faster on avg), with all the features you're used to using in your Grunt and gulp tasks. -* [parse-glob](https://github.com/jonschlinkert/parse-glob): Parse a glob pattern into an object of tokens. -* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. -* [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. -* [fill-range](https://github.com/jonschlinkert/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to use. -* [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. - -## Usage - -```js -var globBase = require('glob-base'); - -globBase('a/b/.git/'); -//=> { base: 'a/b/.git/', isGlob: false, glob: '' }) - -globBase('a/b/**/e'); -//=> { base: 'a/b', isGlob: true, glob: '**/e' } - -globBase('a/b/*.{foo,bar}'); -//=> { base: 'a/b', isGlob: true, glob: '*.{foo,bar}' } - -globBase('a/b/.git/**'); -//=> { base: 'a/b/.git', isGlob: true, glob: '**' } - -globBase('a/b/c/*.md'); -//=> { base: 'a/b/c', isGlob: true, glob: '*.md' } - -globBase('a/b/c/.*.md'); -//=> { base: 'a/b/c', isGlob: true, glob: '.*.md' } - -globBase('a/b/{c,d}'); -//=> { base: 'a/b', isGlob: true, glob: '{c,d}' } - -globBase('!*.min.js'); -//=> { base: '.', isGlob: true, glob: '!*.min.js' } - -globBase('!foo'); -//=> { base: '.', isGlob: true, glob: '!foo' } - -globBase('!foo/(a|b).min.js'); -//=> { base: '.', isGlob: true, glob: '!foo/(a|b).min.js' } - -globBase(''); -//=> { base: '.', isGlob: false, glob: '' } - -globBase('**/*.md'); -//=> { base: '.', isGlob: true, glob: '**/*.md' } - -globBase('**/*.min.js'); -//=> { base: '.', isGlob: true, glob: '**/*.min.js' } - -globBase('**/.*'); -//=> { base: '.', isGlob: true, glob: '**/.*' } - -globBase('**/d'); -//=> { base: '.', isGlob: true, glob: '**/d' } - -globBase('*.*'); -//=> { base: '.', isGlob: true, glob: '*.*' } - -globBase('*.min.js'); -//=> { base: '.', isGlob: true, glob: '*.min.js' } - -globBase('*/*'); -//=> { base: '.', isGlob: true, glob: '*/*' } - -globBase('*b'); -//=> { base: '.', isGlob: true, glob: '*b' } - -globBase('.'); -//=> { base: '.', isGlob: false, glob: '.' } - -globBase('.*'); -//=> { base: '.', isGlob: true, glob: '.*' } - -globBase('./*'); -//=> { base: '.', isGlob: true, glob: '*' } - -globBase('/a'); -//=> { base: '/', isGlob: false, glob: 'a' } - -globBase('@(a|b)/e.f.g/'); -//=> { base: '.', isGlob: true, glob: '@(a|b)/e.f.g/' } - -globBase('[a-c]b*'); -//=> { base: '.', isGlob: true, glob: '[a-c]b*' } - -globBase('a'); -//=> { base: '.', isGlob: false, glob: 'a' } - -globBase('a.min.js'); -//=> { base: '.', isGlob: false, glob: 'a.min.js' } - -globBase('a/'); -//=> { base: 'a/', isGlob: false, glob: '' } - -globBase('a/**/j/**/z/*.md'); -//=> { base: 'a', isGlob: true, glob: '**/j/**/z/*.md' } - -globBase('a/*/c/*.md'); -//=> { base: 'a', isGlob: true, glob: '*/c/*.md' } - -globBase('a/?/c.md'); -//=> { base: 'a', isGlob: true, glob: '?/c.md' } - -globBase('a/??/c.js'); -//=> { base: 'a', isGlob: true, glob: '??/c.js' } - -globBase('a?b'); -//=> { base: '.', isGlob: true, glob: 'a?b' } - -globBase('bb'); -//=> { base: '.', isGlob: false, glob: 'bb' } - -globBase('c.md'); -//=> { base: '.', isGlob: false, glob: 'c.md' } -``` - -## Running tests -Install dev dependencies. - -```bash -npm i -d && npm test -``` - - -## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/glob-base/issues) - - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License -Copyright (c) 2015 Jon Schlinkert -Released under the MIT license - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 08, 2015._ diff --git a/node_modules/glob-base/index.js b/node_modules/glob-base/index.js deleted file mode 100644 index 564b4a8..0000000 --- a/node_modules/glob-base/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/*! - * glob-base - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var path = require('path'); -var parent = require('glob-parent'); -var isGlob = require('is-glob'); - -module.exports = function globBase(pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('glob-base expects a string.'); - } - - var res = {}; - res.base = parent(pattern); - res.isGlob = isGlob(pattern); - - if (res.base !== '.') { - res.glob = pattern.substr(res.base.length); - if (res.glob.charAt(0) === '/') { - res.glob = res.glob.substr(1); - } - } else { - res.glob = pattern; - } - - if (!res.isGlob) { - res.base = dirname(pattern); - res.glob = res.base !== '.' - ? pattern.substr(res.base.length) - : pattern; - } - - if (res.glob.substr(0, 2) === './') { - res.glob = res.glob.substr(2); - } - if (res.glob.charAt(0) === '/') { - res.glob = res.glob.substr(1); - } - return res; -}; - -function dirname(glob) { - if (glob.slice(-1) === '/') return glob; - return path.dirname(glob); -} diff --git a/node_modules/glob-base/package.json b/node_modules/glob-base/package.json deleted file mode 100644 index 3613d08..0000000 --- a/node_modules/glob-base/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "glob-base@^0.3.0", - "_id": "glob-base@0.3.0", - "_inBundle": false, - "_integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "_location": "/glob-base", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "glob-base@^0.3.0", - "name": "glob-base", - "escapedName": "glob-base", - "rawSpec": "^0.3.0", - "saveSpec": null, - "fetchSpec": "^0.3.0" - }, - "_requiredBy": [ - "/parse-glob" - ], - "_resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "_shasum": "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "_spec": "glob-base@^0.3.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/parse-glob", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/glob-base/issues" - }, - "bundleDependencies": false, - "dependencies": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "deprecated": false, - "description": "Returns an object with the (non-glob) base path and the actual pattern.", - "devDependencies": { - "mocha": "*", - "should": "^5.1.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/glob-base", - "keywords": [ - "base", - "directory", - "dirname", - "expression", - "glob", - "parent", - "path", - "pattern", - "regex", - "regular", - "root" - ], - "license": { - "type": "MIT", - "url": "https://github.com/jonschlinkert/glob-base/blob/master/LICENSE" - }, - "main": "index.js", - "name": "glob-base", - "repository": { - "type": "git", - "url": "git://github.com/jonschlinkert/glob-base.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "0.3.0" -} diff --git a/node_modules/glob-parent/.npmignore b/node_modules/glob-parent/.npmignore deleted file mode 100644 index 33e391f..0000000 --- a/node_modules/glob-parent/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.DS_Store -npm-debug.log -coverage diff --git a/node_modules/glob-parent/.travis.yml b/node_modules/glob-parent/.travis.yml deleted file mode 100644 index 18fc42f..0000000 --- a/node_modules/glob-parent/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "4" - - "iojs-v3" - - "iojs-v2" - - "iojs-v1" - - "0.12" - - "0.10" diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE deleted file mode 100644 index 734076d..0000000 --- a/node_modules/glob-parent/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2015 Elan Shanker - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md deleted file mode 100644 index ff5310d..0000000 --- a/node_modules/glob-parent/README.md +++ /dev/null @@ -1,43 +0,0 @@ -glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) -====== -Javascript module to extract the non-magic parent path from a glob string. - -[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) -[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) - -Usage ------ -```sh -npm install glob-parent --save -``` - -```js -var globParent = require('glob-parent'); - -globParent('path/to/*.js'); // 'path/to' -globParent('/root/path/to/*.js'); // '/root/path/to' -globParent('/*.js'); // '/' -globParent('*.js'); // '.' -globParent('**/*.js'); // '.' -globParent('path/{to,from}'); // 'path' -globParent('path/!(to|from)'); // 'path' -globParent('path/?(to|from)'); // 'path' -globParent('path/+(to|from)'); // 'path' -globParent('path/*(to|from)'); // 'path' -globParent('path/@(to|from)'); // 'path' -globParent('path/**/*'); // 'path' - -// if provided a non-glob path, returns the nearest dir -globParent('path/foo/bar.js'); // 'path/foo' -globParent('path/foo/'); // 'path/foo' -globParent('path/foo'); // 'path' (see issue #3 for details) - -``` - -Change Log ----------- -[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) - -License -------- -[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js deleted file mode 100644 index 61615f1..0000000 --- a/node_modules/glob-parent/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var path = require('path'); -var isglob = require('is-glob'); - -module.exports = function globParent(str) { - str += 'a'; // preserves full path in case of trailing path separator - do {str = path.dirname(str)} while (isglob(str)); - return str; -}; diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json deleted file mode 100644 index 99ffe2a..0000000 --- a/node_modules/glob-parent/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "glob-parent@^2.0.0", - "_id": "glob-parent@2.0.0", - "_inBundle": false, - "_integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "_location": "/glob-parent", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "glob-parent@^2.0.0", - "name": "glob-parent", - "escapedName": "glob-parent", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/chokidar", - "/glob-base" - ], - "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "_shasum": "81383d72db054fcccf5336daa902f182f6edbb28", - "_spec": "glob-parent@^2.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/chokidar", - "author": { - "name": "Elan Shanker" - }, - "bugs": { - "url": "https://github.com/es128/glob-parent/issues" - }, - "bundleDependencies": false, - "dependencies": { - "is-glob": "^2.0.0" - }, - "deprecated": false, - "description": "Strips glob magic from a string to provide the parent path", - "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.5", - "mocha": "^2.1.0" - }, - "homepage": "https://github.com/es128/glob-parent", - "keywords": [ - "glob", - "parent", - "strip", - "path", - "directory", - "base" - ], - "license": "ISC", - "main": "index.js", - "name": "glob-parent", - "repository": { - "type": "git", - "url": "git+https://github.com/es128/glob-parent.git" - }, - "scripts": { - "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" - }, - "version": "2.0.0" -} diff --git a/node_modules/glob-parent/test.js b/node_modules/glob-parent/test.js deleted file mode 100644 index 01156d2..0000000 --- a/node_modules/glob-parent/test.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var gp = require('./'); -var assert = require('assert'); - -describe('glob-parent', function() { - it('should strip glob magic to return parent path', function() { - assert.equal(gp('path/to/*.js'), 'path/to'); - assert.equal(gp('/root/path/to/*.js'), '/root/path/to'); - assert.equal(gp('/*.js'), '/'); - assert.equal(gp('*.js'), '.'); - assert.equal(gp('**/*.js'), '.'); - assert.equal(gp('path/{to,from}'), 'path'); - assert.equal(gp('path/!(to|from)'), 'path'); - assert.equal(gp('path/?(to|from)'), 'path'); - assert.equal(gp('path/+(to|from)'), 'path'); - assert.equal(gp('path/*(to|from)'), 'path'); - assert.equal(gp('path/@(to|from)'), 'path'); - assert.equal(gp('path/**/*'), 'path'); - assert.equal(gp('path/**/subdir/foo.*'), 'path'); - }); - - it('should return parent dirname from non-glob paths', function() { - assert.equal(gp('path/foo/bar.js'), 'path/foo'); - assert.equal(gp('path/foo/'), 'path/foo'); - assert.equal(gp('path/foo'), 'path'); - }); -}); diff --git a/node_modules/globals/package.json b/node_modules/globals/package.json index acf5e40..9402161 100644 --- a/node_modules/globals/package.json +++ b/node_modules/globals/package.json @@ -1,27 +1,32 @@ { - "_from": "globals@^9.18.0", + "_args": [ + [ + "globals@9.18.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "globals@9.18.0", "_id": "globals@9.18.0", "_inBundle": false, "_integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "_location": "/globals", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "globals@^9.18.0", + "raw": "globals@9.18.0", "name": "globals", "escapedName": "globals", - "rawSpec": "^9.18.0", + "rawSpec": "9.18.0", "saveSpec": null, - "fetchSpec": "^9.18.0" + "fetchSpec": "9.18.0" }, "_requiredBy": [ "/babel-traverse" ], "_resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "_shasum": "aa3896b3e69b487f17e31ed2143d69a8e30c2d8a", - "_spec": "globals@^9.18.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/babel-traverse", + "_spec": "9.18.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/sindresorhus/globals/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Global identifiers from different JavaScript environments", "devDependencies": { "mocha": "*" diff --git a/node_modules/har-schema/package.json b/node_modules/har-schema/package.json index d8756ca..949aadd 100644 --- a/node_modules/har-schema/package.json +++ b/node_modules/har-schema/package.json @@ -1,27 +1,32 @@ { - "_from": "har-schema@^2.0.0", + "_args": [ + [ + "har-schema@2.0.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "har-schema@2.0.0", "_id": "har-schema@2.0.0", "_inBundle": false, "_integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", "_location": "/har-schema", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "har-schema@^2.0.0", + "raw": "har-schema@2.0.0", "name": "har-schema", "escapedName": "har-schema", - "rawSpec": "^2.0.0", + "rawSpec": "2.0.0", "saveSpec": null, - "fetchSpec": "^2.0.0" + "fetchSpec": "2.0.0" }, "_requiredBy": [ "/har-validator" ], "_resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "_shasum": "a94c2224ebcac04782a0d9035521f24735b7ec92", - "_spec": "har-schema@^2.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/har-validator", + "_spec": "2.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Ahmad Nassri", "email": "ahmad@ahmadnassri.com", @@ -30,7 +35,6 @@ "bugs": { "url": "https://github.com/ahmadnassri/har-schema/issues" }, - "bundleDependencies": false, "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" @@ -42,7 +46,6 @@ "email": "e.poberezkin@me.com" } ], - "deprecated": false, "description": "JSON Schema for HTTP Archive (HAR)", "devDependencies": { "ajv": "^5.0.0", diff --git a/node_modules/har-validator/LICENSE b/node_modules/har-validator/LICENSE index ca55c91..a545266 100644 --- a/node_modules/har-validator/LICENSE +++ b/node_modules/har-validator/LICENSE @@ -1,13 +1,9 @@ -Copyright (c) 2015, Ahmad Nassri +MIT License -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Copyright (c) 2018 Ahmad Nassri -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/har-validator/README.md b/node_modules/har-validator/README.md index fc69634..dee6756 100644 --- a/node_modules/har-validator/README.md +++ b/node_modules/har-validator/README.md @@ -1,18 +1,13 @@ -# HAR Validator [![version][npm-version]][npm-url] [![License][license-image]][license-url] +# HAR Validator + +[![License][license-image]][license-url] [![version][npm-image]][npm-url] [![Build Status][circle-image]][circle-url] > Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema. -[![Build Status][travis-image]][travis-url] -[![Downloads][npm-downloads]][npm-url] -[![Code Climate][codeclimate-quality]][codeclimate-url] -[![Coverage Status][codeclimate-coverage]][codeclimate-url] -[![Dependency Status][dependencyci-image]][dependencyci-url] -[![Dependencies][david-image]][david-url] - ## Install ```bash -npm install --only=production --save har-validator +npm install har-validator ``` ## CLI Usage @@ -21,34 +16,22 @@ Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more inf ## API -**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided* +**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/node-har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. _For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided_ - [async API](docs/async.md) - [callback API](docs/async.md) -- [Promise API](docs/promise.md) *(default)* +- [Promise API](docs/promise.md) _(default)_ ----- -> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/)  ·  -> License: [ISC][license-url]  ·  -> Github: [@ahmadnassri](https://github.com/ahmadnassri)  ·  +--- +> Author: [Ahmad Nassri](https://www.ahmadnassri.com/) • +> Github: [@ahmadnassri](https://github.com/ahmadnassri) • > Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri) -[license-url]: http://choosealicense.com/licenses/isc/ -[license-image]: https://img.shields.io/github/license/ahmadnassri/har-validator.svg?style=flat-square +[license-url]: LICENSE +[license-image]: https://img.shields.io/github/license/ahmadnassri/node-har-validator.svg?style=for-the-badge&logo=circleci -[travis-url]: https://travis-ci.org/ahmadnassri/har-validator -[travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square +[circle-url]: https://circleci.com/gh/ahmadnassri/workflows/node-har-validator +[circle-image]: https://img.shields.io/circleci/project/github/ahmadnassri/node-har-validator/master.svg?style=for-the-badge&logo=circleci [npm-url]: https://www.npmjs.com/package/har-validator -[npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square -[npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square - -[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-validator -[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-validator.svg?style=flat-square -[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-validator.svg?style=flat-square - -[david-url]: https://david-dm.org/ahmadnassri/har-validator -[david-image]: https://img.shields.io/david/ahmadnassri/har-validator.svg?style=flat-square - -[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-validator -[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-validator/badge?style=flat-square +[npm-image]: https://img.shields.io/npm/v/har-validator.svg?style=for-the-badge&logo=npm diff --git a/node_modules/har-validator/lib/async.js b/node_modules/har-validator/lib/async.js index fc41667..90701f2 100644 --- a/node_modules/har-validator/lib/async.js +++ b/node_modules/har-validator/lib/async.js @@ -4,14 +4,21 @@ var schemas = require('har-schema') var ajv +function createAjvInstance () { + var ajv = new Ajv({ + allErrors: true + }) + ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')) + ajv.addSchema(schemas) + + return ajv +} + function validate (name, data, next) { data = data || {} // validator config - ajv = ajv || new Ajv({ - allErrors: true, - schemas: schemas - }) + ajv = ajv || createAjvInstance() var validate = ajv.getSchema(name + '.json') diff --git a/node_modules/har-validator/lib/promise.js b/node_modules/har-validator/lib/promise.js index 1ab308c..46f4647 100644 --- a/node_modules/har-validator/lib/promise.js +++ b/node_modules/har-validator/lib/promise.js @@ -4,14 +4,21 @@ var schemas = require('har-schema') var ajv +function createAjvInstance () { + var ajv = new Ajv({ + allErrors: true + }) + ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')) + ajv.addSchema(schemas) + + return ajv +} + function validate (name, data) { data = data || {} // validator config - ajv = ajv || new Ajv({ - allErrors: true, - schemas: schemas - }) + ajv = ajv || createAjvInstance() var validate = ajv.getSchema(name + '.json') diff --git a/node_modules/har-validator/package.json b/node_modules/har-validator/package.json index 2f65eb7..201d8dd 100644 --- a/node_modules/har-validator/package.json +++ b/node_modules/har-validator/package.json @@ -1,54 +1,52 @@ { - "_from": "har-validator@~5.0.3", - "_id": "har-validator@5.0.3", + "_from": "har-validator@~5.1.0", + "_id": "har-validator@5.1.3", "_inBundle": false, - "_integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "_integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "_location": "/har-validator", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "har-validator@~5.0.3", + "raw": "har-validator@~5.1.0", "name": "har-validator", "escapedName": "har-validator", - "rawSpec": "~5.0.3", + "rawSpec": "~5.1.0", "saveSpec": null, - "fetchSpec": "~5.0.3" + "fetchSpec": "~5.1.0" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "_shasum": "ba402c266194f15956ef15e0fcf242993f6a7dfd", - "_spec": "har-validator@~5.0.3", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/request", + "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "_shasum": "1ef89ebd3e4996557675eed9893110dc350fa080", + "_spec": "har-validator@~5.1.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\request", "author": { "name": "Ahmad Nassri", "email": "ahmad@ahmadnassri.com", "url": "https://www.ahmadnassri.com/" }, "bugs": { - "url": "https://github.com/ahmadnassri/har-validator/issues" + "url": "https://github.com/ahmadnassri/node-har-validator/issues" }, "bundleDependencies": false, "dependencies": { - "ajv": "^5.1.0", + "ajv": "^6.5.5", "har-schema": "^2.0.0" }, "deprecated": false, "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema", "devDependencies": { - "echint": "^4.0.1", - "standard": "^10.0.2", - "tap": "^10.3.2" + "tap": "^12.0.1" }, "engines": { - "node": ">=4" + "node": ">=6" }, "files": [ "lib" ], - "homepage": "https://github.com/ahmadnassri/har-validator", + "homepage": "https://github.com/ahmadnassri/node-har-validator", "keywords": [ "har", "cli", @@ -58,18 +56,21 @@ "validate", "validator" ], - "license": "ISC", + "license": "MIT", "main": "lib/promise.js", "name": "har-validator", "repository": { "type": "git", - "url": "git+https://github.com/ahmadnassri/har-validator.git" + "url": "git+https://github.com/ahmadnassri/node-har-validator.git" }, "scripts": { - "coverage": "tap test --reporter silent --coverage", - "lint": "standard && echint", - "pretest": "npm run lint", - "test": "tap test" + "lint": "npx run-p lint:*", + "lint:deps": "npx updated", + "lint:ec": "npx editorconfig-checker .", + "lint:js": "npx eslint .", + "lint:md": "npx remark --quiet --frail .", + "open:coverage": "opener coverage/lcov-report/index.html", + "test": "tap test --coverage-report=lcov --no-browser" }, - "version": "5.0.3" + "version": "5.1.3" } diff --git a/node_modules/has-ansi/package.json b/node_modules/has-ansi/package.json index 3136795..45eac03 100644 --- a/node_modules/has-ansi/package.json +++ b/node_modules/has-ansi/package.json @@ -1,27 +1,32 @@ { - "_from": "has-ansi@^2.0.0", + "_args": [ + [ + "has-ansi@2.0.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "has-ansi@2.0.0", "_id": "has-ansi@2.0.0", "_inBundle": false, "_integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "_location": "/has-ansi", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "has-ansi@^2.0.0", + "raw": "has-ansi@2.0.0", "name": "has-ansi", "escapedName": "has-ansi", - "rawSpec": "^2.0.0", + "rawSpec": "2.0.0", "saveSpec": null, - "fetchSpec": "^2.0.0" + "fetchSpec": "2.0.0" }, "_requiredBy": [ "/chalk" ], "_resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "_shasum": "34f5049ce1ecdf2b0649af3ef24e45ed35416d91", - "_spec": "has-ansi@^2.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/chalk", + "_spec": "2.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -30,11 +35,9 @@ "bugs": { "url": "https://github.com/sindresorhus/has-ansi/issues" }, - "bundleDependencies": false, "dependencies": { "ansi-regex": "^2.0.0" }, - "deprecated": false, "description": "Check if a string has ANSI escape codes", "devDependencies": { "ava": "0.0.4" diff --git a/node_modules/has-flag/package.json b/node_modules/has-flag/package.json index 4672edf..af5e7d7 100644 --- a/node_modules/has-flag/package.json +++ b/node_modules/has-flag/package.json @@ -1,27 +1,32 @@ { - "_from": "has-flag@^3.0.0", + "_args": [ + [ + "has-flag@3.0.0", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "has-flag@3.0.0", "_id": "has-flag@3.0.0", "_inBundle": false, "_integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "_location": "/has-flag", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "has-flag@^3.0.0", + "raw": "has-flag@3.0.0", "name": "has-flag", "escapedName": "has-flag", - "rawSpec": "^3.0.0", + "rawSpec": "3.0.0", "saveSpec": null, - "fetchSpec": "^3.0.0" + "fetchSpec": "3.0.0" }, "_requiredBy": [ "/@babel/highlight/supports-color" ], "_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "_shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd", - "_spec": "has-flag@^3.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/@babel/highlight/node_modules/supports-color", + "_spec": "3.0.0", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/sindresorhus/has-flag/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Check if argv has a specific flag", "devDependencies": { "ava": "*", diff --git a/node_modules/has/package.json b/node_modules/has/package.json index c91062e..345b876 100644 --- a/node_modules/has/package.json +++ b/node_modules/has/package.json @@ -1,28 +1,33 @@ { - "_from": "has@^1.0.1", + "_args": [ + [ + "has@1.0.1", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "has@1.0.1", "_id": "has@1.0.1", "_inBundle": false, "_integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "_location": "/has", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "has@^1.0.1", + "raw": "has@1.0.1", "name": "has", "escapedName": "has", - "rawSpec": "^1.0.1", + "rawSpec": "1.0.1", "saveSpec": null, - "fetchSpec": "^1.0.1" + "fetchSpec": "1.0.1" }, "_requiredBy": [ "/es-abstract", "/is-regex" ], "_resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "_shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28", - "_spec": "has@^1.0.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/es-abstract", + "_spec": "1.0.1", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Thiago de Arruda", "email": "tpadilha84@gmail.com" @@ -30,11 +35,9 @@ "bugs": { "url": "https://github.com/tarruda/has/issues" }, - "bundleDependencies": false, "dependencies": { "function-bind": "^1.0.2" }, - "deprecated": false, "description": "Object.prototype.hasOwnProperty.call shortcut", "devDependencies": { "chai": "~1.7.2", diff --git a/node_modules/hawk/.npmignore b/node_modules/hawk/.npmignore deleted file mode 100755 index 7144676..0000000 --- a/node_modules/hawk/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!lib/** -!dist/** -!client.js -!.npmignore diff --git a/node_modules/hawk/LICENSE b/node_modules/hawk/LICENSE deleted file mode 100755 index b43dce1..0000000 --- a/node_modules/hawk/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012-2017, Eran Hammer and Project contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hueniverse/hawk/graphs/contributors diff --git a/node_modules/hawk/README.md b/node_modules/hawk/README.md deleted file mode 100755 index fc5dd6d..0000000 --- a/node_modules/hawk/README.md +++ /dev/null @@ -1,637 +0,0 @@ -![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png) - - **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial -HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz). - -Current version: **6.x** - -Note: 6.x, 5.x, 4.x, 3.x, and 2.x are the same exact protocol as 1.1. The version increments reflect changes in the node API. - -[![Build Status](https://travis-ci.org/hueniverse/hawk.svg?branch=master)](https://travis-ci.org/hueniverse/hawk) - -# Table of Content - -- [**Introduction**](#introduction) - - [Replay Protection](#replay-protection) - - [Usage Example](#usage-example) - - [Protocol Example](#protocol-example) - - [Payload Validation](#payload-validation) - - [Response Payload Validation](#response-payload-validation) - - [Browser Support and Considerations](#browser-support-and-considerations) -- [**Single URI Authorization**](#single-uri-authorization) - - [Usage Example](#bewit-usage-example) -- [**Security Considerations**](#security-considerations) - - [MAC Keys Transmission](#mac-keys-transmission) - - [Confidentiality of Requests](#confidentiality-of-requests) - - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers) - - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials) - - [Entropy of Keys](#entropy-of-keys) - - [Coverage Limitations](#coverage-limitations) - - [Future Time Manipulation](#future-time-manipulation) - - [Client Clock Poisoning](#client-clock-poisoning) - - [Bewit Limitations](#bewit-limitations) - - [Host Header Forgery](#host-header-forgery) -- [**Frequently Asked Questions**](#frequently-asked-questions) -- [**Implementations**](#implementations) -- [**Acknowledgements**](#acknowledgements) - -# Introduction - -**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with -partial cryptographic verification of the request and response, covering the HTTP method, request URI, host, -and optionally the request payload. - -Similar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of -client credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme, -the key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is -included in its place. - -However, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of -replay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less -"chattiness" (interaction with the server). - -Also unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because -the client and server must both have access to the key material in the clear. - -The primary design goals of this scheme are to: -* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources, -* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where - to send an authenticated request), and -* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client - failure to validate the server's identity as part of its TLS handshake. - -In addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using -a query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk). - -The **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server, -which is beyond the scope of this module. Typically, the shared credentials are established via an initial -TLS-protected phase or derived from some other shared confidential information available to both the client -and the server. - - -## Replay Protection - -Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more -than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when -making requests. This gives the server enough information to prevent replay attacks. - -The nonce is generated by the client, and is a string unique across all requests with the same timestamp and -key identifier combination. - -The timestamp enables the server to restrict the validity period of the credentials where requests occurring afterwards -are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks. -By default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in -practice translates to a maximum of 2 minutes as the skew can be positive or negative). - -Using a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client -clock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types -(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response -to a bad timestamp. - -There is no expectation that the client will adjust its system clock to match the server (in fact, this would be a -potential attack vector). Instead, the client only uses the server's time to calculate an offset used only -for communications with that particular server. The protocol rewards clients with synchronized clocks by reducing -the number of round trips required to authenticate the first request. - - -## Usage Example - -Server code: - -```javascript -const Http = require('http'); -const Hawk = require('hawk'); - - -// Credentials lookup function - -const credentialsFunc = function (id, callback) { - - const credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'Steve' - }; - - return callback(null, credentials); -}; - -// Create HTTP server - -const handler = function (req, res) { - - // Authenticate incoming request - - Hawk.server.authenticate(req, credentialsFunc, {}, (err, credentials, artifacts) => { - - // Prepare response - - const payload = (!err ? `Hello ${credentials.user} ${artifacts.ext}` : 'Shoosh!'); - const headers = { 'Content-Type': 'text/plain' }; - - // Generate Server-Authorization response header - - const header = Hawk.server.header(credentials, artifacts, { payload, contentType: headers['Content-Type'] }); - headers['Server-Authorization'] = header; - - // Send the response back - - res.writeHead(!err ? 200 : 401, headers); - res.end(payload); - }); -}; - -// Start server - -Http.createServer(handler).listen(8000, 'example.com'); -``` - -Client code: - -```javascript -const Request = require('request'); -const Hawk = require('hawk'); - - -// Client credentials - -const credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' -} - -// Request options - -const requestOptions = { - uri: 'http://example.com:8000/resource/1?b=1&a=2', - method: 'GET', - headers: {} -}; - -// Generate Authorization request header - -const header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' }); -requestOptions.headers.Authorization = header.field; - -// Send authenticated request - -Request(requestOptions, function (error, response, body) { - - // Authenticate the server's response - - const isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body }); - - // Output results - - console.log(`${response.statusCode}: ${body}` + (isValid ? ' (valid)' : ' (invalid)')); -}); -``` - -**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local -machine time is used. To automatically retrieve and synchronize the clock within the application, use the SNTP 'start()' method. - -```javascript -Hawk.sntp.start(); -``` - - -## Protocol Example - -The client attempts to access a protected resource without authentication, sending the following HTTP request to -the resource server: - -``` -GET /resource/1?b=1&a=2 HTTP/1.1 -Host: example.com:8000 -``` - -The resource server returns an authentication challenge. - -``` -HTTP/1.1 401 Unauthorized -WWW-Authenticate: Hawk -``` - -The client has previously obtained a set of **Hawk** credentials for accessing resources on the "`http://example.com/`" -server. The **Hawk** credentials issued to the client include the following attributes: - -* Key identifier: `dh37fgj492je` -* Key: `werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn` -* Algorithm: `hmac sha256` -* Hash: `6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=` - -The client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1, -1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline -character): - -``` -hawk.1.header -1353832234 -j4h3g2 -GET -/resource/1?b=1&a=2 -example.com -8000 - -some-app-ext-data - -``` - -The request MAC is calculated using HMAC with the specified hash algorithm "`sha256`" and the key over the normalized request string. -The result is base64-encoded to produce the request MAC: - -``` -6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE= -``` - -The client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using -the HTTP `Authorization` request header field: - -``` -GET /resource/1?b=1&a=2 HTTP/1.1 -Host: example.com:8000 -Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=" -``` - -The server validates the request by calculating the request MAC again based on the request received and verifies the validity -and scope of the **Hawk** credentials. If valid, the server responds with the requested resource. - - -### Payload Validation - -**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash -using the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character): -* `hawk.1.payload` -* the content-type in lowercase, without any parameters (e.g. `application/json`) -* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability) - -For example: - -* Payload: `Thank you for flying Hawk` -* Content Type: `text/plain` -* Algorithm: `sha256` -* Hash: `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=` - -Results in the following input to the payload hash function (newline terminated values): - -``` -hawk.1.payload -text/plain -Thank you for flying Hawk - -``` - -Which produces the following hash value: - -``` -Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY= -``` - -The client constructs the normalized request string (newline terminated values): - -``` -hawk.1.header -1353832234 -j4h3g2 -POST -/resource/1?a=1&b=2 -example.com -8000 -Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY= -some-app-ext-data - -``` - -Then calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data, -and request MAC, with the request using the HTTP `Authorization` request header field: - -``` -POST /resource/1?a=1&b=2 HTTP/1.1 -Host: example.com:8000 -Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=" -``` - -It is up to the server if and when it validates the payload for any given request, based solely on its security policy -and the nature of the data included. - -If the payload is available at the time of authentication, the server uses the hash value provided by the client to construct -the normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value -with the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash. - -However, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed -at a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value -provided by the client after validating the MAC. - -It is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value -included in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided -by the client, the payload may be modified by an attacker. - - -## Response Payload Validation - -**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the -client to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header -as a response header using the exact same syntax as the `Authorization` request header field. - -The header is constructed using the same process as the client's request header. The server uses the same credentials and other -artifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with -new values based on the server response. The rest as identical to those used by the client. - -The result MAC digest is included with the optional `hash` and `ext` values: - -``` -Server-Authorization: Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific" -``` - - -## Browser Support and Considerations - -A browser script is provided for including using a ` -``` - -For more details, see the discussion in [#640](https://github.com/tmpvar/jsdom/issues/640), especially [@matthewkastor](https://github.com/matthewkastor)'s [insightful comment](https://github.com/tmpvar/jsdom/issues/640#issuecomment-22216965). - -#### Listening for script errors during initialization - -Although it is easy to listen for script errors after initialization, via code like - -```js -var window = jsdom.jsdom(...).defaultView; -window.addEventListener("error", function (event) { - console.error("script error!!", event.error); -}); -``` - -it is often also desirable to listen for any script errors during initialization, or errors loading scripts passed to `jsdom.env`. To do this, use the virtual console feature, described in more detail later: - -```js -var virtualConsole = jsdom.createVirtualConsole(); -virtualConsole.on("jsdomError", function (error) { - console.error(error.stack, error.detail); -}); - -var window = jsdom.jsdom(..., { virtualConsole }).defaultView; -``` - -You also get this functionality for free by default if you use `virtualConsole.sendTo`; again, see more below: - -```js -var virtualConsole = jsdom.createVirtualConsole().sendTo(console); -var window = jsdom.jsdom(..., { virtualConsole }).defaultView; -``` - -### On running scripts and being safe - -By default, `jsdom.env` will not process and run external JavaScript, since our sandbox is not foolproof. That is, code running inside the DOM's ` -``` - -To use it with Node.js: - -``` -$ npm install nwmatcher -``` - -NWMatcher currently supports browsers (as a global, `NW.Dom`) and headless environments (as a CommonJS module). - - -## Supported Selectors - -Here is a list of all the CSS2/CSS3 [Supported selectors](https://github.com/dperini/nwmatcher/wiki/CSS-supported-selectors). - - -## Features and Compliance - -You can read more about NWMatcher [features and compliance](https://github.com/dperini/nwmatcher/wiki/Features-and-compliance) on the wiki. - - -## API - -### DOM Selection - -#### `first( selector, context )` - -Returns a reference to the first element matching `selector`, starting at `context`. - -#### `match( element, selector, context )` - -Returns `true` if `element` matches `selector`, starting at `context`; returns `false` otherwise. - -#### `select( selector, context, callback )` - -Returns an array of all the elements matching `selector`, starting at `context`. If `callback` is provided, it is invoked for each matching element. - - -### DOM Helpers - -#### `byId( id, from )` - -Returns a reference to the first element with ID `id`, optionally filtered to descendants of the element `from`. - -#### `byTag( tag, from )` - -Returns an array of elements having the specified tag name `tag`, optionally filtered to descendants of the element `from`. - -#### `byClass( class, from )` - -Returns an array of elements having the specified class name `class`, optionally filtered to descendants of the element `from`. - -#### `byName( name, from )` - -Returns an array of elements having the specified value `name` for their name attribute, optionally filtered to descendants of the element `from`. - -#### `getAttribute( element, attribute )` - -Return the value read from the attribute of `element` with name `attribute`, as a string. - -#### `hasAttribute( element, attribute )` - -Returns true `element` has an attribute with name `attribute` set; returns `false` otherwise. - - -### Engine Configuration - -#### `configure( options )` - -The following is the list of currently available configuration options, their default values and descriptions, they are boolean flags that can be set to `true` or `false`: - -* `CACHING`: false - false to disable caching of result sets, true to enable -* `ESCAPECHR`: true - true to allow CSS escaped identifiers, false to disallow -* `NON_ASCII`: true - true to allow identifiers containing non-ASCII (utf-8) chars -* `SELECTOR3`: true - switch syntax RE, true to use Level 3, false to use Level 2 -* `UNICODE16`: true - true to allow identifiers containing Unicode (utf-16) chars -* `SHORTCUTS`: false - false to disable mangled selector strings like "+div" or "ul>" -* `SIMPLENOT`: true - true to disallow complex selectors nested in ':not()' classes -* `SVG_LCASE`: false - false to disable matching lowercase tag names of SVG elements -* `UNIQUE_ID`: true - true to disallow multiple elements with the same id (strict) -* `USE_HTML5`: true - true to use HTML5 specs for ":checked" and similar UI states -* `USE_QSAPI`: true - true to use browsers native Query Selector API if available -* `VERBOSITY`: true - true to throw exceptions, false to skip throwing exceptions -* `LOGERRORS`: true - true to print console errors or warnings, false to mute them - -Example: - -```js -NW.Dom.configure( { USE_QSAPI: false, VERBOSITY: false } ); -``` - -#### `registerOperator( symbol, resolver )` - -Registers a new symbol and its matching resolver in the operators table. Example: - -```js -NW.Dom.registerOperator( '!=', 'n!="%m"' ); -``` - -#### `registerSelector( name, rexp, func )` - -Registers a new selector, with the matching regular expression and the appropriate resolver function, in the selectors table. diff --git a/node_modules/nwmatcher/package.json b/node_modules/nwmatcher/package.json deleted file mode 100644 index 11a1d7a..0000000 --- a/node_modules/nwmatcher/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "nwmatcher@^1.4.3", - "_id": "nwmatcher@1.4.4", - "_inBundle": false, - "_integrity": "sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ==", - "_location": "/nwmatcher", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "nwmatcher@^1.4.3", - "name": "nwmatcher", - "escapedName": "nwmatcher", - "rawSpec": "^1.4.3", - "saveSpec": null, - "fetchSpec": "^1.4.3" - }, - "_requiredBy": [ - "/jsdom" - ], - "_resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.4.tgz", - "_shasum": "2285631f34a95f0d0395cd900c96ed39b58f346e", - "_spec": "nwmatcher@^1.4.3", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/jsdom", - "author": { - "name": "Diego Perini", - "email": "diego.perini@gmail.com", - "url": "http://www.iport.it/" - }, - "bugs": { - "url": "http://github.com/dperini/nwmatcher/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A CSS3-compliant JavaScript selector engine.", - "ender": "./lib/ender/bridge.js", - "homepage": "http://javascript.nwbox.com/NWMatcher/", - "keywords": [ - "css", - "matcher", - "selector", - "ender" - ], - "license": "MIT", - "main": "./src/nwmatcher", - "maintainers": [ - { - "name": "Diego Perini", - "email": "diego.perini@gmail.com", - "url": "http://www.iport.it/" - } - ], - "name": "nwmatcher", - "repository": { - "type": "git", - "url": "git://github.com/dperini/nwmatcher.git" - }, - "version": "1.4.4" -} diff --git a/node_modules/nwmatcher/src/modules/nwmatcher-cache.js b/node_modules/nwmatcher/src/modules/nwmatcher-cache.js deleted file mode 100644 index b3b40dd..0000000 --- a/node_modules/nwmatcher/src/modules/nwmatcher-cache.js +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) 2007-2018 Diego Perini - * All rights reserved. - * - * Caching/memoization module for NWMatcher - * - * Added capabilities: - * - * - Mutation Events are feature tested and used safely - * - handle caching different document types HTML/XML/SVG - * - store result sets for different selectors / contexts - * - simultaneously control mutation on multiple documents - * - */ - -(function(global) { - - // export the public API for CommonJS implementations, - // for headless JS engines or for standard web browsers - var Dom = - // as CommonJS/NodeJS module - typeof exports == 'object' ? exports : - // create or extend NW namespace - ((global.NW || (global.NW = { })) && - (global.NW.Dom || (global.NW.Dom = { }))), - - Contexts = { }, - Results = { }, - - isEnabled = false, - isExpired = true, - isPaused = false, - - context = global.document, - root = context.documentElement, - - // timing pauses - now = 0, - - // last time cache initialization was called - lastCalled = 0, - - // minimum time allowed between calls to the cache initialization - minCacheRest = 15, //ms - - mutationTest = - function(type, callback) { - var isSupported = false, - root = document.documentElement, - div = document.createElement('div'), - handler = function() { isSupported = true; }; - root.insertBefore(div, root.firstChild); - div.addEventListener(type, handler, true); - if (callback && callback.call) callback(div); - div.removeEventListener(type, handler, true); - root.removeChild(div); - return isSupported; - }, - - // check for Mutation Events, DOMAttrModified should be - // enough to ensure DOMNodeInserted/DOMNodeRemoved exist - HACKED_MUTATION_EVENTS = false, - - NATIVE_MUTATION_EVENTS = root.addEventListener ? - mutationTest('DOMAttrModified', function(e) { e.setAttribute('id', 'nw'); }) : false, - - loadResults = - function(selector, from, doc, root) { - if (isEnabled && !isPaused) { - if (!isExpired) { - if (Results[selector] && Contexts[selector] === from) { - return Results[selector]; - } - } else { - // pause caching while we are getting - // hammered by dom mutations (jdalton) - now = (new Date).getTime(); - if ((now - lastCalled) < minCacheRest) { - isPaused = isExpired = true; - setTimeout(function() { isPaused = false; }, minCacheRest); - } else setCache(true, doc); - lastCalled = now; - } - } - return undefined; - }, - - saveResults = - function(selector, from, doc, data) { - Contexts[selector] = from; - Results[selector] = data; - return; - }, - - /*-------------------------------- CACHING ---------------------------------*/ - - // invoked by mutation events to expire cached parts - mutationWrapper = - function(event) { - var d = event.target.ownerDocument || event.target; - stopMutation(d); - expireCache(d); - }, - - // append mutation events - startMutation = - function(d) { - if (!d.isCaching && d.addEventListener) { - // FireFox/Opera/Safari/KHTML have support for Mutation Events - d.addEventListener('DOMAttrModified', mutationWrapper, true); - d.addEventListener('DOMNodeInserted', mutationWrapper, true); - d.addEventListener('DOMNodeRemoved', mutationWrapper, true); - d.isCaching = true; - } - }, - - // remove mutation events - stopMutation = - function(d) { - if (d.isCaching && d.removeEventListener) { - d.removeEventListener('DOMAttrModified', mutationWrapper, true); - d.removeEventListener('DOMNodeInserted', mutationWrapper, true); - d.removeEventListener('DOMNodeRemoved', mutationWrapper, true); - d.isCaching = false; - } - }, - - // enable/disable context caching system - // @d optional document context (iframe, xml document) - // script loading context will be used as default context - setCache = - function(enable, d) { - if (!!enable) { - isExpired = false; - startMutation(d); - } else { - isExpired = true; - stopMutation(d); - } - isEnabled = !!enable; - }, - - // expire complete cache - // can be invoked by Mutation Events or - // programmatically by other code/scripts - // document context is mandatory no checks - expireCache = - function(d) { - isExpired = true; - Contexts = { }; - Results = { }; - }; - - if (!NATIVE_MUTATION_EVENTS && root.addEventListener && Element && Element.prototype) { - if (mutationTest('DOMNodeInserted', function(e) { e.appendChild(document.createElement('div')); }) && - mutationTest('DOMNodeRemoved', function(e) { e.removeChild(e.appendChild(document.createElement('div'))); })) { - HACKED_MUTATION_EVENTS = true; - Element.prototype._setAttribute = Element.prototype.setAttribute; - Element.prototype.setAttribute = - function(name, val) { - this._setAttribute(name, val); - mutationWrapper({ - target: this, - type: 'DOMAttrModified', - attrName: name, - attrValue: val }); - }; - } - } - - isEnabled = NATIVE_MUTATION_EVENTS || HACKED_MUTATION_EVENTS; - - /*------------------------------- PUBLIC API -------------------------------*/ - - // save results into cache - Dom.saveResults = saveResults; - - // load results from cache - Dom.loadResults = loadResults; - - // expire DOM tree cache - Dom.expireCache = expireCache; - - // enable/disable cache - Dom.setCache = setCache; - -})(this); diff --git a/node_modules/nwmatcher/src/modules/nwmatcher-jquery.js b/node_modules/nwmatcher/src/modules/nwmatcher-jquery.js deleted file mode 100644 index 3f40c5b..0000000 --- a/node_modules/nwmatcher/src/modules/nwmatcher-jquery.js +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2007-2018 Diego Perini - * All rights reserved. - * - * this is just a small example to show - * how an extension for NWMatcher could be - * adapted to handle special jQuery selectors - * - * Child Selectors - * :even, :odd, :eq, :lt, :gt, :first, :last, :nth - * - * Pseudo Selectors - * :has, :button, :header, :input, :checkbox, :radio, :file, :image - * :password, :reset, :submit, :text, :hidden, :visible, :parent - * - */ - -// for structural pseudo-classes extensions -NW.Dom.registerSelector( - 'jquery:child', - /^\:((?:(nth|eq|lt|gt)\(([^()]*)\))|(?:even|odd|first|last))(.*)/i, - (function(global) { - - return function(match, source, selector) { - - var status = true, ACCEPT_NODE = NW.Dom.ACCEPT_NODE; - - switch (match[1].toLowerCase()) { - case 'odd': - source = source.replace(ACCEPT_NODE, 'if((x=x^1)==0){' + ACCEPT_NODE + '}'); - break; - case 'even': - source = source.replace(ACCEPT_NODE, 'if((x=x^1)==1){' + ACCEPT_NODE + '}'); - break; - case 'first': - source = 'n=h.getElementsByTagName(e.nodeName);if(n.length&&n[0]===e){' + source + '}'; - break; - case 'last': - source = 'n=h.getElementsByTagName(e.nodeName);if(n.length&&n[n.length-1]===e){' + source + '}'; - break; - default: - switch (match[2].toLowerCase()) { - case 'nth': - source = 'n=h.getElementsByTagName(e.nodeName);if(n.length&&n[' + match[3] + ']===e){' + source + '}'; - break; - case 'eq': - source = source.replace(ACCEPT_NODE, 'if(x++==' + match[3] + '){' + ACCEPT_NODE + '}'); - break; - case 'lt': - source = source.replace(ACCEPT_NODE, 'if(x++<' + match[3] + '){' + ACCEPT_NODE + '}'); - break; - case 'gt': - source = source.replace(ACCEPT_NODE, 'if(x++>' + match[3] + '){' + ACCEPT_NODE + '}'); - break; - default: - status = false; - break; - } - break; - } - - // compiler will add this to "source" - return { - 'source': source, - 'status': status - }; - - }; - - })(this)); - -// for element pseudo-classes extensions -NW.Dom.registerSelector( - 'jquery:pseudo', - /^\:(has|checkbox|file|image|password|radio|reset|submit|text|button|input|header|hidden|visible|parent)(?:\(\s*(["']*)?([^'"()]*)\2\s*\))?(.*)/i, - (function(global) { - - return function(match, source) { - - var status = true, ACCEPT_NODE = NW.Dom.ACCEPT_NODE; - - switch(match[1].toLowerCase()) { - case 'has': - source = source.replace(ACCEPT_NODE, 'if(e.getElementsByTagName("' + match[3].replace(/^\s|\s$/g, '') + '")[0]){' + ACCEPT_NODE + '}'); - break; - case 'checkbox': - case 'file': - case 'image': - case 'password': - case 'radio': - case 'reset': - case 'submit': - case 'text': - // :checkbox, :file, :image, :password, :radio, :reset, :submit, :text - source = 'if(/^' + match[1] + '$/i.test(e.type)){' + source + '}'; - break; - case 'button': - case 'input': - source = 'if(e.type||/button/i.test(e.nodeName)){' + source + '}'; - break; - case 'header': - source = 'if(/h[1-6]/i.test(e.nodeName)){' + source + '}'; - break; - case 'hidden': - source = 'if(!e.offsetWidth&&!e.offsetHeight){' + source + '}'; - break; - case 'visible': - source = 'if(e.offsetWidth||e.offsetHeight){' + source + '}'; - break; - case 'parent': - source += 'if(e.firstChild){' + source + '}'; - break; - default: - status = false; - break; - } - - // compiler will add this to "source" - return { - 'source': source, - 'status': status - }; - - }; - - })(this)); diff --git a/node_modules/nwmatcher/src/modules/nwmatcher-pseudos.js b/node_modules/nwmatcher/src/modules/nwmatcher-pseudos.js deleted file mode 100644 index a84c286..0000000 --- a/node_modules/nwmatcher/src/modules/nwmatcher-pseudos.js +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright (C) 2007-2018 Diego Perini - * All rights reserved. - * - * CSS3 pseudo-classes extension for NWMatcher - * - * Added capabilities: - * - * - structural pseudo-classes - * - * :root, :empty, - * :nth-child(), nth-of-type(), - * :nth-last-child(), nth-last-of-type(), - * :first-child, :last-child, :only-child - * :first-of-type, :last-of-type, :only-of-type - * - * - negation, language, target and UI element pseudo-classes - * - * :not(), :target, :lang(), :target - * :link, :visited, :active, :focus, :hover, - * :checked, :disabled, :enabled, :selected - */ - -(function(global) { - - var LINK_NODES = { - 'a': 1, 'A': 1, - 'area': 1, 'AREA': 1, - 'link': 1, 'LINK': 1 - }, - - root = document.documentElement, - - contains = 'compareDocumentPosition' in root ? - function(container, element) { - return (container.compareDocumentPosition(element) & 16) == 16; - } : 'contains' in root ? - function(container, element) { - return element.nodeType == 1 && container.contains(element); - } : - function(container, element) { - while ((element = element.parentNode) && element.nodeType == 1) { - if (element === container) return true; - } - return false; - }, - - isLink = - function(element) { - return element.getAttribute('href') && LINK_NODES[element.nodeName]; - }, - - isEmpty = - function(node) { - node = node.firstChild; - while (node) { - if (node.nodeType == 3 || node.nodeName > '@') return false; - node = node.nextSibling; - } - return true; - }, - - nthElement = - function(element, last) { - var count = 1, succ = last ? 'nextSibling' : 'previousSibling'; - while ((element = element[succ])) { - if (element.nodeName > '@') ++count; - } - return count; - }, - - nthOfType = - function(element, last) { - var count = 1, succ = last ? 'nextSibling' : 'previousSibling', type = element.nodeName; - while ((element = element[succ])) { - if (element.nodeName == type) ++count; - } - return count; - }; - - NW.Dom.Snapshot['contains'] = contains; - - NW.Dom.Snapshot['isLink'] = isLink; - NW.Dom.Snapshot['isEmpty'] = isEmpty; - NW.Dom.Snapshot['nthOfType'] = nthOfType; - NW.Dom.Snapshot['nthElement'] = nthElement; - -})(this); - -NW.Dom.registerSelector( - 'nwmatcher:spseudos', - /^\:(root|empty|(?:first|last|only)(?:-child|-of-type)|nth(?:-last)?(?:-child|-of-type)\(\s*(even|odd|(?:[-+]{0,1}\d*n\s*)?[-+]{0,1}\s*\d*)\s*\))?(.*)/i, - (function(global) { - - return function(match, source) { - - var a, n, b, status = true, test, type; - - switch (match[1]) { - - case 'root': - if (match[3]) - source = 'if(e===h||s.contains(h,e)){' + source + '}'; - else - source = 'if(e===h){' + source + '}'; - break; - - case 'empty': - source = 'if(s.isEmpty(e)){' + source + '}'; - break; - - default: - if (match[1] && match[2]) { - - if (match[2] == 'n') { - source = 'if(e!==h){' + source + '}'; - break; - } else if (match[2] == 'even') { - a = 2; - b = 0; - } else if (match[2] == 'odd') { - a = 2; - b = 1; - } else { - b = ((n = match[2].match(/(-?\d+)$/)) ? parseInt(n[1], 10) : 0); - a = ((n = match[2].match(/(-?\d*)n/i)) ? parseInt(n[1], 10) : 0); - if (n && n[1] == '-') a = -1; - } - test = a > 1 ? - (/last/i.test(match[1])) ? '(n-(' + b + '))%' + a + '==0' : - 'n>=' + b + '&&(n-(' + b + '))%' + a + '==0' : a < -1 ? - (/last/i.test(match[1])) ? '(n-(' + b + '))%' + a + '==0' : - 'n<=' + b + '&&(n-(' + b + '))%' + a + '==0' : a === 0 ? - 'n==' + b : a == -1 ? 'n<=' + b : 'n>=' + b; - source = - 'if(e!==h){' + - 'n=s[' + (/-of-type/i.test(match[1]) ? '"nthOfType"' : '"nthElement"') + ']' + - '(e,' + (/last/i.test(match[1]) ? 'true' : 'false') + ');' + - 'if(' + test + '){' + source + '}' + - '}'; - - } else if (match[1]) { - - a = /first/i.test(match[1]) ? 'previous' : 'next'; - n = /only/i.test(match[1]) ? 'previous' : 'next'; - b = /first|last/i.test(match[1]); - type = /-of-type/i.test(match[1]) ? '&&n.nodeName!==e.nodeName' : '&&n.nodeName<"@"'; - source = 'if(e!==h){' + - ( 'n=e;while((n=n.' + a + 'Sibling)' + type + ');if(!n){' + (b ? source : - 'n=e;while((n=n.' + n + 'Sibling)' + type + ');if(!n){' + source + '}') + '}' ) + '}'; - - } else { - - status = false; - - } - break; - } - - return { - 'source': source, - 'status': status - }; - - }; - - })(this)); - -NW.Dom.registerSelector( - 'nwmatcher:dpseudos', - /^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|not\(\s*(:nth(?:-last)?(?:-child|-of-type)\(\s*(?:even|odd|(?:[-+]{0,1}\d*n\s*)?[-+]{0,1}\s*\d*)\s*\)|[^()]*)\s*\))?(.*)/i, - (function(global) { - - var doc = global.document, - Config = NW.Dom.Config, - Tokens = NW.Dom.Tokens, - - reTrimSpace = RegExp('^\\s+|\\s+$', 'g'), - - reSimpleNot = RegExp('^((?!:not)' + - '(' + Tokens.prefixes + '|' + Tokens.identifier + - '|\\([^()]*\\))+|\\[' + Tokens.attributes + '\\])$'); - - return function(match, source) { - - var expr, status = true, test; - - switch (match[1].match(/^\w+/)[0]) { - - case 'not': - expr = match[3].replace(reTrimSpace, ''); - if (Config.SIMPLENOT && !reSimpleNot.test(expr)) { - NW.Dom.emit('Negation pseudo-class only accepts simple selectors "' + selector + '"'); - } else { - if ('compatMode' in doc) { - source = 'if(!' + NW.Dom.compile(expr, '', false) + '(e,s,d,h,g)){' + source + '}'; - } else { - source = 'if(!s.match(e, "' + expr.replace(/\x22/g, '\\"') + '",g)){' + source +'}'; - } - } - break; - - case 'checked': - source = 'if((typeof e.form!=="undefined"&&(/^(?:radio|checkbox)$/i).test(e.type)&&e.checked)' + - (Config.USE_HTML5 ? '||(/^option$/i.test(e.nodeName)&&(e.selected||e.checked))' : '') + - '){' + source + '}'; - break; - - case 'disabled': - source = 'if(((typeof e.form!=="undefined"' + - (Config.USE_HTML5 ? '' : '&&!(/^hidden$/i).test(e.type)') + - ')||s.isLink(e))&&e.disabled===true){' + source + '}'; - break; - - case 'enabled': - source = 'if(((typeof e.form!=="undefined"' + - (Config.USE_HTML5 ? '' : '&&!(/^hidden$/i).test(e.type)') + - ')||s.isLink(e))&&e.disabled===false){' + source + '}'; - break; - - case 'lang': - test = ''; - if (match[2]) test = match[2].substr(0, 2) + '-'; - source = 'do{(n=e.lang||"").toLowerCase();' + - 'if((n==""&&h.lang=="' + match[2].toLowerCase() + '")||' + - '(n&&(n=="' + match[2].toLowerCase() + - '"||n.substr(0,3)=="' + test.toLowerCase() + '")))' + - '{' + source + 'break;}}while((e=e.parentNode)&&e!==g);'; - break; - - case 'target': - source = 'if(e.id==d.location.hash.slice(1)){' + source + '}'; - break; - - case 'link': - source = 'if(s.isLink(e)&&!e.visited){' + source + '}'; - break; - - case 'visited': - source = 'if(s.isLink(e)&&e.visited){' + source + '}'; - break; - - case 'active': - source = 'if(e===d.activeElement){' + source + '}'; - break; - - case 'hover': - source = 'if(e===d.hoverElement){' + source + '}'; - break; - - case 'focus': - source = 'hasFocus' in doc ? - 'if(e===d.activeElement&&d.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number")){' + source + '}' : - 'if(e===d.activeElement&&(e.type||e.href)){' + source + '}'; - break; - - case 'selected': - source = 'if(/^option$/i.test(e.nodeName)&&(e.selected||e.checked)){' + source + '}'; - break; - - default: - status = false; - break; - } - - return { - 'source': source, - 'status': status - }; - - }; - - })(this)); - -NW.Dom.registerSelector( - 'nwmatcher:epseudos', - /^((?:[:]{1,2}(?:after|before|first-letter|first-line))|(?:[:]{2,2}(?:selection|backdrop|placeholder)))?(.*)/i, - (function(global) { - - return function(match, source) { - - var status = true; - - switch (match[1].match(/(\w+)$/)[0]) { - - case 'after': - case 'before': - case 'first-letter': - case 'first-line': - case 'selection': - case 'backdrop': - case 'placeholder': - source = 'if(!(/1|11/).test(e.nodeType)){' + source + '}'; - break; - - default: - status = false; - break; - } - - return { - 'source': source, - 'status': status - }; - - }; - - })(this)); diff --git a/node_modules/nwmatcher/src/modules/nwmatcher-shortcuts.js b/node_modules/nwmatcher/src/modules/nwmatcher-shortcuts.js deleted file mode 100644 index 2f61110..0000000 --- a/node_modules/nwmatcher/src/modules/nwmatcher-shortcuts.js +++ /dev/null @@ -1,35 +0,0 @@ -NW.Dom.shortcuts = (function() { - - // match missing R/L context - var nextID = 0, - reLeftContext = /^[\x20\t\n\r\f]*[>+~]/, - reRightContext = /[>+~][\x20\t\n\r\f]*$/; - - return function(selector, from, alt) { - - // add left context if missing - if (reLeftContext.test(selector)) { - if (from.nodeType == 9) { - selector = '* ' + selector; - } else if (/html|body/i.test(from.nodeName)) { - selector = from.nodeName + ' ' + selector; - } else if (alt) { - selector = NW.Dom.shortcuts(selector, alt); - } else if (from.nodeType == 1 && from.id) { - selector = '#' + from.id + ' ' + selector; - } else { - ++nextID; - selector = '#' + (from.id = 'NW' + nextID) + ' ' + selector; - //NW.Dom.emit('Unable to resolve a context for the shortcut selector "' + selector + '"'); - } - } - - // add right context if missing - if (reRightContext.test(selector)) { - selector += ' *'; - } - - return selector; - }; - -})(); diff --git a/node_modules/nwmatcher/src/modules/nwmatcher-webforms.js b/node_modules/nwmatcher/src/modules/nwmatcher-webforms.js deleted file mode 100644 index 90ef548..0000000 --- a/node_modules/nwmatcher/src/modules/nwmatcher-webforms.js +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2007-2018 Diego Perini - * All rights reserved. - * - * this is just a small example to show - * how an extension for NWMatcher could be - * adapted to handle WebForms/HTML5 selectors - * - * Pseudo Selectors - * :default, :indeterminate, :optional, :required, - * :valid, :invalid, :in-range, :out-of-range, - * :read-only, :read-write - * :has, :matches (not yet in a defined specification) - * - */ - -// for UI pseudo-classes extensions (WebForms/HTML5) -NW.Dom.registerSelector( - 'html5:pseudos', - /^\:(default|indeterminate|optional|required|valid|invalid|in-range|out-of-range|read-only|read-write)(.*)/, - (function(global) { - - return function(match, source) { - - var status = true, - - HTML5PseudoClasses = { - 'default': 4, 'indeterminate': 4, 'invalid': 4, 'valid': 4, - 'optional': 4, 'required': 4, 'read-write': 4, 'read-only': 4 - }; - - switch (match[1]) { - - // HTML5 UI element states (form controls) - case 'default': - // only radio buttons, check boxes and option elements - source = 'if(((typeof e.form!=="undefined"&&(/radio|checkbox/i).test(e.type))||/option/i.test(e.nodeName))&&(e.defaultChecked||e.defaultSelected)){' + source + '}'; - break; - - case 'indeterminate': - // only radio buttons, check boxes and option elements - source = 'if(typeof e.form!=="undefined"&&(/radio|checkbox/i).test(e.type)&&s.select("[checked]",e.form).length===0){' + source + '}'; - break; - - case 'optional': - // only fields for which "required" applies - source = 'if(typeof e.form!=="undefined"&&typeof e.required!="undefined"&&!e.required){' + source + '}'; - break; - - case 'required': - // only fields for which "required" applies - source = 'if(typeof e.form!=="undefined"&&typeof e.required!="undefined"&&e.required){' + source + '}'; - break; - - case 'read-write': - // only fields for which "readOnly" applies - source = 'if(typeof e.form!=="undefined"&&typeof e.readOnly!="undefined"&&!e.readOnly){' + source + '}'; - break; - - case 'read-only': - // only fields for which "readOnly" applies - source = 'if(typeof e.form!=="undefined"&&typeof e.readOnly!="undefined"&&e.readOnly){' + source + '}'; - break; - - case 'invalid': - // only fields for which validity applies - source = 'if(typeof e.form!=="undefined"&&typeof e.validity=="object"&&!e.validity.valid){' + source + '}'; - break; - - case 'valid': - // only fields for which validity applies - source = 'if(typeof e.form!=="undefined"&&typeof e.validity=="object"&&e.validity.valid){' + source + '}'; - break; - - case 'in-range': - // only fields for which validity applies - source = 'if(typeof e.form!=="undefined"&&' + - '(s.getAttribute(e,"min")||s.getAttribute(e,"max"))&&' + - 'typeof e.validity=="object"&&!e.validity.typeMismatch&&' + - '!e.validity.rangeUnderflow&&!e.validity.rangeOverflow){' + source + '}'; - break; - - case 'out-of-range': - // only fields for which validity applies - source = 'if(typeof e.form!=="undefined"&&' + - '(s.getAttribute(e,"min")||s.getAttribute(e,"max"))&&' + - 'typeof e.validity=="object"&&(e.validity.rangeUnderflow||e.validity.rangeOverflow)){' + source + '}'; - break; - - default: - status = false; - break; - - } - - // compiler will add this to "source" - return { - 'source': source, - 'status': status - }; - - }; - - })(this)); diff --git a/node_modules/nwmatcher/src/nwmatcher-base.js b/node_modules/nwmatcher/src/nwmatcher-base.js deleted file mode 100644 index afd1c14..0000000 --- a/node_modules/nwmatcher/src/nwmatcher-base.js +++ /dev/null @@ -1,794 +0,0 @@ -/* - * Copyright (C) 2007-2018 Diego Perini - * All rights reserved. - * - * nwmatcher-base.js - A fast CSS selector engine and matcher - * - * Author: Diego Perini - * Version: 1.4.4 - * Created: 20070722 - * Release: 20180305 - * - * License: - * http://javascript.nwbox.com/NWMatcher/MIT-LICENSE - * Download: - * http://javascript.nwbox.com/NWMatcher/nwmatcher.js - */ - -(function(global, factory) { - - if (typeof module == 'object' && typeof exports == 'object') { - module.exports = factory; - } else if (typeof define === 'function' && define["amd"]) { - define(factory); - } else { - global.NW || (global.NW = { }); - global.NW.Dom = factory(global); - } - -})(this, function(global) { - - var version = 'nwmatcher-1.4.4', - - doc = global.document, - root = doc.documentElement, - - isSingleMatch, - isSingleSelect, - - lastSlice, - lastContext, - lastPosition, - - lastMatcher, - lastSelector, - - lastPartsMatch, - lastPartsSelect, - - prefixes = '(?:[#.:]|::)?', - operators = '([~*^$|!]?={1})', - whitespace = '[\\x20\\t\\n\\r\\f]', - combinators = '\\x20|[>+~](?=[^>+~])', - pseudoparms = '(?:[-+]?\\d*n)?[-+]?\\d*', - skip_groups = '\\[.*\\]|\\(.*\\)|\\{.*\\}', - - any_esc_chr = '\\\\.', - alphalodash = '[_a-zA-Z]', - non_asc_chr = '[^\\x00-\\x9f]', - escaped_chr = '\\\\[^\\n\\r\\f0-9a-fA-F]', - unicode_chr = '\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|' + whitespace + ')?', - - quotedvalue = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"' + "|'[^'\\\\]*(?:\\\\.[^'\\\\]*)*'", - - reSplitGroup = /([^,\\()[\]]+|\[[^[\]]*\]|\[.*\]|\([^()]+\)|\(.*\)|\{[^{}]+\}|\{.*\}|\\.)+/g, - - reTrimSpaces = RegExp('[\\n\\r\\f]|^' + whitespace + '+|' + whitespace + '+$', 'g'), - - reEscapedChars = /\\([0-9a-fA-F]{1,6}[\x20\t\n\r\f]?|.)|([\x22\x27])/g, - - standardValidator, extendedValidator, reValidator, - - attrcheck, attributes, attrmatcher, pseudoclass, - - reOptimizeSelector, reSimpleNot, reSplitToken, - - Optimize, identifier, extensions = '.+', - - Patterns = { - children: RegExp('^' + whitespace + '*\\>' + whitespace + '*(.*)'), - adjacent: RegExp('^' + whitespace + '*\\+' + whitespace + '*(.*)'), - relative: RegExp('^' + whitespace + '*\\~' + whitespace + '*(.*)'), - ancestor: RegExp('^' + whitespace + '+(.*)'), - universal: RegExp('^\\*(.*)') - }, - - Tokens = { - prefixes: prefixes, - identifier: identifier, - attributes: attributes - }, - - QUIRKS_MODE, - XML_DOCUMENT, - - GEBTN = 'getElementsByTagName' in doc, - GEBCN = 'getElementsByClassName' in doc, - - IE_LT_9 = typeof doc.addEventListener != 'function', - - LINK_NODES = { a: 1, A: 1, area: 1, AREA: 1, link: 1, LINK: 1 }, - - ATTR_BOOLEAN = { - checked: 1, disabled: 1, ismap: 1, - multiple: 1, readonly: 1, selected: 1 - }, - - ATTR_DEFAULT = { - value: 'defaultValue', - checked: 'defaultChecked', - selected: 'defaultSelected' - }, - - ATTR_URIDATA = { - action: 2, cite: 2, codebase: 2, data: 2, href: 2, - longdesc: 2, lowsrc: 2, src: 2, usemap: 2 - }, - - HTML_TABLE = { - 'accept': 1, 'accept-charset': 1, 'align': 1, 'alink': 1, 'axis': 1, - 'bgcolor': 1, 'charset': 1, 'checked': 1, 'clear': 1, 'codetype': 1, 'color': 1, - 'compact': 1, 'declare': 1, 'defer': 1, 'dir': 1, 'direction': 1, 'disabled': 1, - 'enctype': 1, 'face': 1, 'frame': 1, 'hreflang': 1, 'http-equiv': 1, 'lang': 1, - 'language': 1, 'link': 1, 'media': 1, 'method': 1, 'multiple': 1, 'nohref': 1, - 'noresize': 1, 'noshade': 1, 'nowrap': 1, 'readonly': 1, 'rel': 1, 'rev': 1, - 'rules': 1, 'scope': 1, 'scrolling': 1, 'selected': 1, 'shape': 1, 'target': 1, - 'text': 1, 'type': 1, 'valign': 1, 'valuetype': 1, 'vlink': 1 - }, - - NATIVE_TRAVERSAL_API = - 'nextElementSibling' in root && - 'previousElementSibling' in root, - - Selectors = { }, - - Operators = { - '=': "n=='%m'", - '^=': "n.indexOf('%m')==0", - '*=': "n.indexOf('%m')>-1", - '|=': "(n+'-').indexOf('%m-')==0", - '~=': "(' '+n+' ').indexOf(' %m ')>-1", - '$=': "n.substr(n.length-'%m'.length)=='%m'" - }, - - concatCall = - function(data, elements, callback) { - var i = -1, element; - while ((element = elements[++i])) { - if (false === callback(data[data.length] = element)) { break; } - } - return data; - }, - - switchContext = - function(from, force) { - var oldDoc = doc; - lastContext = from; - doc = from.ownerDocument || from; - if (force || oldDoc !== doc) { - root = doc.documentElement; - XML_DOCUMENT = doc.createElement('DiV').nodeName == 'DiV'; - QUIRKS_MODE = !XML_DOCUMENT && - typeof doc.compatMode == 'string' ? - doc.compatMode.indexOf('CSS') < 0 : - (function() { - var style = doc.createElement('div').style; - return style && (style.width = 1) && style.width == '1px'; - })(); - - Config.CACHING && Dom.setCache(true, doc); - } - }, - - codePointToUTF16 = - function(codePoint) { - if (codePoint < 1 || codePoint > 0x10ffff || - (codePoint > 0xd7ff && codePoint < 0xe000)) { - return '\\ufffd'; - } - if (codePoint < 0x10000) { - var lowHex = '000' + codePoint.toString(16); - return '\\u' + lowHex.substr(lowHex.length - 4); - } - return '\\u' + (((codePoint - 0x10000) >> 0x0a) + 0xd800).toString(16) + - '\\u' + (((codePoint - 0x10000) % 0x400) + 0xdc00).toString(16); - }, - - stringFromCodePoint = - function(codePoint) { - if (codePoint < 1 || codePoint > 0x10ffff || - (codePoint > 0xd7ff && codePoint < 0xe000)) { - return '\ufffd'; - } - if (codePoint < 0x10000) { - return String.fromCharCode(codePoint); - } - return String.fromCodePoint ? - String.fromCodePoint(codePoint) : - String.fromCharCode( - ((codePoint - 0x10000) >> 0x0a) + 0xd800, - ((codePoint - 0x10000) % 0x400) + 0xdc00); - }, - - convertEscapes = - function(str) { - return str.replace(reEscapedChars, - function(substring, p1, p2) { - return p2 ? '\\' + p2 : - (/^[0-9a-fA-F]/).test(p1) ? codePointToUTF16(parseInt(p1, 16)) : - (/^[\\\x22\x27]/).test(p1) ? substring : - p1; - } - ); - }, - - unescapeIdentifier = - function(str) { - return str.replace(reEscapedChars, - function(substring, p1, p2) { - return p2 ? p2 : - (/^[0-9a-fA-F]/).test(p1) ? stringFromCodePoint(parseInt(p1, 16)) : - (/^[\\\x22\x27]/).test(p1) ? substring : - p1; - } - ); - }, - - byIdRaw = - function(id, elements) { - var i = -1, element; - while ((element = elements[++i])) { - if (element.getAttribute('id') == id) { - break; - } - } - return element || null; - }, - - _byId = !IE_LT_9 ? - function(id, from) { - id = (/\\/).test(id) ? unescapeIdentifier(id) : id; - return from.getElementById && from.getElementById(id) || - byIdRaw(id, from.getElementsByTagName('*')); - } : - function(id, from) { - var element = null; - id = (/\\/).test(id) ? unescapeIdentifier(id) : id; - if (XML_DOCUMENT || from.nodeType != 9) { - return byIdRaw(id, from.getElementsByTagName('*')); - } - if ((element = from.getElementById(id)) && - element.name == id && from.getElementsByName) { - return byIdRaw(id, from.getElementsByName(id)); - } - return element; - }, - - byId = - function(id, from) { - from || (from = doc); - if (lastContext !== from) { switchContext(from); } - return _byId(id, from); - }, - - byTagRaw = - function(tag, from) { - var any = tag == '*', element = from, elements = [ ], next = element.firstChild; - any || (tag = tag.toUpperCase()); - while ((element = next)) { - if (element.tagName > '@' && (any || element.tagName.toUpperCase() == tag)) { - elements[elements.length] = element; - } - if ((next = element.firstChild || element.nextSibling)) continue; - while (!next && (element = element.parentNode) && element !== from) { - next = element.nextSibling; - } - } - return elements; - }, - - getAttribute = !IE_LT_9 ? - function(node, attribute) { - return node.getAttribute(attribute); - } : - function(node, attribute) { - attribute = attribute.toLowerCase(); - if (typeof node[attribute] == 'object') { - return node.attributes[attribute] && - node.attributes[attribute].value; - } - return ( - attribute == 'type' ? node.getAttribute(attribute) : - ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) : - ATTR_BOOLEAN[attribute] ? node.getAttribute(attribute) ? attribute : 'false' : - (node = node.getAttributeNode(attribute)) && node.value); - }, - - hasAttribute = !IE_LT_9 && root.hasAttribute ? - function(node, attribute) { - return node.hasAttribute(attribute); - } : - function(node, attribute) { - var obj = node.getAttributeNode(attribute = attribute.toLowerCase()); - return ATTR_DEFAULT[attribute] && attribute != 'value' ? - node[ATTR_DEFAULT[attribute]] : obj && obj.specified; - }, - - configure = - function(option) { - if (typeof option == 'string') { return !!Config[option]; } - if (typeof option != 'object') { return Config; } - for (var i in option) { - Config[i] = !!option[i]; - if (i == 'SIMPLENOT') { - matchContexts = { }; - matchResolvers = { }; - selectContexts = { }; - selectResolvers = { }; - } - } - setIdentifierSyntax(); - reValidator = RegExp(Config.SIMPLENOT ? - standardValidator : extendedValidator); - return true; - }, - - emit = - function(message) { - if (Config.VERBOSITY) { throw Error(message); } - if (Config.LOGERRORS && console && console.log) { - console.log(message); - } - }, - - Config = { - CACHING: false, - ESCAPECHR: true, - NON_ASCII: true, - SELECTOR3: true, - UNICODE16: true, - SHORTCUTS: false, - SIMPLENOT: true, - SVG_LCASE: false, - UNIQUE_ID: true, - USE_HTML5: true, - VERBOSITY: true, - LOGERRORS: true - }, - - initialize = - function(doc) { - setIdentifierSyntax(); - switchContext(doc, true); - }, - - setIdentifierSyntax = - function() { - - var syntax = '', start = Config['SELECTOR3'] ? '-{2}|' : ''; - - Config['NON_ASCII'] && (syntax += '|' + non_asc_chr); - Config['UNICODE16'] && (syntax += '|' + unicode_chr); - Config['ESCAPECHR'] && (syntax += '|' + escaped_chr); - - syntax += (Config['UNICODE16'] || Config['ESCAPECHR']) ? '' : '|' + any_esc_chr; - - identifier = '-?(?:' + start + alphalodash + syntax + ')(?:-|[0-9]|' + alphalodash + syntax + ')*'; - - attrcheck = '(' + quotedvalue + '|' + identifier + ')'; - attributes = whitespace + '*(' + identifier + '(?::' + identifier + ')?)' + - whitespace + '*(?:' + operators + whitespace + '*' + attrcheck + ')?' + whitespace + '*' + '(i)?' + whitespace + '*'; - attrmatcher = attributes.replace(attrcheck, '([\\x22\\x27]*)((?:\\\\?.)*?)\\3'); - - pseudoclass = '((?:' + - pseudoparms + '|' + quotedvalue + '|' + - prefixes + identifier + '|' + - '\\[' + attributes + '\\]|' + - '\\(.+\\)|' + whitespace + '*|' + - ',)+)'; - - standardValidator = - '(?=[\\x20\\t\\n\\r\\f]*[^>+~(){}<>])' + - '(' + - '\\*' + - '|(?:' + prefixes + identifier + ')' + - '|' + combinators + - '|\\[' + attributes + '\\]' + - '|\\(' + pseudoclass + '\\)' + - '|\\{' + extensions + '\\}' + - '|(?:,|' + whitespace + '*)' + - ')+'; - - reSimpleNot = RegExp('^(' + - '(?!:not)' + - '(' + prefixes + identifier + - '|\\([^()]*\\))+' + - '|\\[' + attributes + '\\]' + - ')$'); - - reSplitToken = RegExp('(' + - prefixes + identifier + '|' + - '\\[' + attributes + '\\]|' + - '\\(' + pseudoclass + '\\)|' + - '\\\\.|[^\\x20\\t\\n\\r\\f>+~])+', 'g'); - - reOptimizeSelector = RegExp(identifier + '|^$'); - - Optimize = { - ID: RegExp('^\\*?#(' + identifier + ')|' + skip_groups), - TAG: RegExp('^(' + identifier + ')|' + skip_groups), - CLASS: RegExp('^\\.(' + identifier + '$)|' + skip_groups) - }; - - Patterns.id = RegExp('^#(' + identifier + ')(.*)'); - Patterns.tagName = RegExp('^(' + identifier + ')(.*)'); - Patterns.className = RegExp('^\\.(' + identifier + ')(.*)'); - Patterns.attribute = RegExp('^\\[' + attrmatcher + '\\](.*)'); - - Tokens.identifier = identifier; - Tokens.attributes = attributes; - - extendedValidator = standardValidator.replace(pseudoclass, '.*'); - - reValidator = RegExp(standardValidator); - }, - - ACCEPT_NODE = 'r[r.length]=c[k];if(f&&false===f(c[k]))break main;else continue main;', - REJECT_NODE = IE_LT_9 ? 'if(e.nodeName<"A")continue;' : '', - TO_UPPER_CASE = IE_LT_9 ? '.toUpperCase()' : '', - - compile = - function(selector, source, mode) { - - var parts = typeof selector == 'string' ? selector.match(reSplitGroup) : selector; - - typeof source == 'string' || (source = ''); - - if (parts.length == 1) { - source += compileSelector(parts[0], mode ? ACCEPT_NODE : 'f&&f(k);return true;', mode); - } else { - var i = -1, seen = { }, token; - while ((token = parts[++i])) { - token = token.replace(reTrimSpaces, ''); - if (!seen[token] && (seen[token] = true)) { - source += compileSelector(token, mode ? ACCEPT_NODE : 'f&&f(k);return true;', mode); - } - } - } - - if (mode) { - return Function('c,s,d,h,g,f', - 'var N,n,x=0,k=-1,e,r=[];main:while((e=c[++k])){' + source + '}return r;'); - } else { - return Function('e,s,d,h,g,f', - 'var N,n,x=0,k=e;' + source + 'return false;'); - } - }, - - compileSelector = - function(selector, source, mode) { - - var k = 0, expr, match, result, status, test, type; - - while (selector) { - - k++; - - if ((match = selector.match(Patterns.universal))) { - expr = ''; - } - - else if ((match = selector.match(Patterns.id))) { - match[1] = (/\\/).test(match[1]) ? convertEscapes(match[1]) : match[1]; - source = 'if(' + (XML_DOCUMENT ? - 's.getAttribute(e,"id")' : - '(e.submit?s.getAttribute(e,"id"):e.id)') + - '=="' + match[1] + '"' + - '){' + source + '}'; - } - - else if ((match = selector.match(Patterns.tagName))) { - test = Config.SVG_LCASE ? '||e.nodeName=="' + match[1].toLowerCase() + '"' : ''; - source = 'if(e.nodeName' + (XML_DOCUMENT ? - '=="' + match[1] + '"' : TO_UPPER_CASE + - '=="' + match[1].toUpperCase() + '"' + test) + - '){' + source + '}'; - } - - else if ((match = selector.match(Patterns.className))) { - match[1] = (/\\/).test(match[1]) ? convertEscapes(match[1]) : match[1]; - match[1] = QUIRKS_MODE ? match[1].toLowerCase() : match[1]; - source = 'if((n=' + (XML_DOCUMENT ? - 'e.getAttribute("class")' : 'e.className') + - ')&&n.length&&(" "+' + (QUIRKS_MODE ? 'n.toLowerCase()' : 'n') + - '.replace(/' + whitespace + '+/g," ")+" ").indexOf(" ' + match[1] + ' ")>-1' + - '){' + source + '}'; - } - - else if ((match = selector.match(Patterns.attribute))) { - expr = match[1].split(':'); - expr = expr.length == 2 ? expr[1] : expr[0] + ''; - - if (match[2] && !Operators[match[2]]) { - emit('Unsupported operator in attribute selectors "' + selector + '"'); - return ''; - } - test = 'false'; - if (match[2] && match[4] && (test = Operators[match[2]])) { - match[4] = (/\\/).test(match[4]) ? convertEscapes(match[4]) : match[4]; - type = match[5] == 'i' || HTML_TABLE[expr.toLowerCase()]; - test = test.replace(/\%m/g, type ? match[4].toLowerCase() : match[4]); - } else if (match[2] == '!=' || match[2] == '=') { - test = 'n' + match[2] + '=""'; - } - source = 'if(n=s.hasAttribute(e,"' + match[1] + '")){' + - (match[2] ? 'n=s.getAttribute(e,"' + match[1] + '")' : '') + - (type && match[2] ? '.toLowerCase();' : ';') + - 'if(' + (match[2] ? test : 'n') + '){' + source + '}}'; - } - - else if ((match = selector.match(Patterns.adjacent))) { - source = NATIVE_TRAVERSAL_API ? - 'var N' + k + '=e;if((e=e.previousElementSibling)){' + source + '}e=N' + k + ';' : - 'var N' + k + '=e;while((e=e.previousSibling)){if(e.nodeType==1){' + source + 'break;}}e=N' + k + ';'; - } - - else if ((match = selector.match(Patterns.relative))) { - source = NATIVE_TRAVERSAL_API ? - 'var N' + k + '=e;while((e=e.previousElementSibling)){' + source + '}e=N' + k + ';' : - 'var N' + k + '=e;while((e=e.previousSibling)){if(e.nodeType==1){' + source + '}}e=N' + k + ';'; - } - - else if ((match = selector.match(Patterns.children))) { - source = 'var N' + k + '=e;if((e=e.parentNode)&&e.nodeType==1){' + source + '}e=N' + k + ';'; - } - - else if ((match = selector.match(Patterns.ancestor))) { - source = 'var N' + k + '=e;while((e=e.parentNode)&&e.nodeType==1){' + source + '}e=N' + k + ';'; - } - - else { - - expr = false; - status = false; - for (expr in Selectors) { - if ((match = selector.match(Selectors[expr].Expression)) && match[1]) { - result = Selectors[expr].Callback(match, source); - if ('match' in result) { match = result.match; } - source = result.source; - status = result.status; - if (status) { break; } - } - } - - if (!status) { - emit('Unknown pseudo-class selector "' + selector + '"'); - return ''; - } - - if (!expr) { - emit('Unknown token in selector "' + selector + '"'); - return ''; - } - - } - - if (!match) { - emit('Invalid syntax in selector "' + selector + '"'); - return ''; - } - - selector = match && match[match.length - 1]; - } - - return source; - }, - - match = - function(element, selector, from, callback) { - - var parts; - - if (!(element && element.nodeType == 1)) { - emit('Invalid element argument'); - return false; - } else if (typeof selector != 'string') { - emit('Invalid selector argument'); - return false; - } else if (lastContext !== from) { - switchContext(from || (from = element.ownerDocument)); - } - - selector = selector. - replace(reTrimSpaces, ''). - replace(/\x00|\\$/g, '\ufffd'); - - Config.SHORTCUTS && (selector = Dom.shortcuts(selector, element, from)); - - if (lastMatcher != selector) { - if ((parts = selector.match(reValidator)) && parts[0] == selector) { - isSingleMatch = (parts = selector.match(reSplitGroup)).length < 2; - lastMatcher = selector; - lastPartsMatch = parts; - } else { - emit('The string "' + selector + '", is not a valid CSS selector'); - return false; - } - } else parts = lastPartsMatch; - - if (!matchResolvers[selector] || matchContexts[selector] !== from) { - matchResolvers[selector] = compile(isSingleMatch ? [selector] : parts, '', false); - matchContexts[selector] = from; - } - - return matchResolvers[selector](element, Snapshot, doc, root, from, callback); - }, - - first = - function(selector, from) { - return select(selector, from, function() { return false; })[0] || null; - }, - - select = - function(selector, from, callback) { - - var i, changed, element, elements, parts, token, original = selector; - - if (arguments.length === 0) { - emit('Not enough arguments'); - return [ ]; - } else if (typeof selector != 'string') { - return [ ]; - } else if (from && !(/1|9|11/).test(from.nodeType)) { - emit('Invalid or illegal context element'); - return [ ]; - } else if (lastContext !== from) { - switchContext(from || (from = doc)); - } - - if (Config.CACHING && (elements = Dom.loadResults(original, from, doc, root))) { - return callback ? concatCall([ ], elements, callback) : elements; - } - - selector = selector. - replace(reTrimSpaces, ''). - replace(/\x00|\\$/g, '\ufffd'); - - Config.SHORTCUTS && (selector = Dom.shortcuts(selector, from)); - - if ((changed = lastSelector != selector)) { - if ((parts = selector.match(reValidator)) && parts[0] == selector) { - isSingleSelect = (parts = selector.match(reSplitGroup)).length < 2; - lastSelector = selector; - lastPartsSelect = parts; - } else { - emit('The string "' + selector + '", is not a valid CSS selector'); - return [ ]; - } - } else parts = lastPartsSelect; - - if (from.nodeType == 11) { - - elements = byTagRaw('*', from); - - } else if (isSingleSelect) { - - if (changed) { - parts = selector.match(reSplitToken); - token = parts[parts.length - 1]; - lastSlice = token.split(':not'); - lastSlice = lastSlice[lastSlice.length - 1]; - lastPosition = selector.length - token.length; - } - - if (Config.UNIQUE_ID && lastSlice && (parts = lastSlice.match(Optimize.ID)) && (token = parts[1])) { - if ((element = _byId(token, from))) { - if (match(element, selector)) { - callback && callback(element); - elements = [element]; - } else elements = [ ]; - } - } - - else if (Config.UNIQUE_ID && (parts = selector.match(Optimize.ID)) && (token = parts[1])) { - if ((element = _byId(token, doc))) { - if ('#' + token == selector) { - callback && callback(element); - elements = [element]; - } else if (/[>+~]/.test(selector)) { - from = element.parentNode; - } else { - from = element; - } - } else elements = [ ]; - } - - if (elements) { - Config.CACHING && Dom.saveResults(original, from, doc, elements); - return elements; - } - - if (!XML_DOCUMENT && GEBTN && lastSlice && (parts = lastSlice.match(Optimize.TAG)) && (token = parts[1])) { - if ((elements = from.getElementsByTagName(token)).length === 0) { return [ ]; } - selector = selector.slice(0, lastPosition) + selector.slice(lastPosition).replace(token, '*'); - } - - else if (!XML_DOCUMENT && GEBCN && lastSlice && (parts = lastSlice.match(Optimize.CLASS)) && (token = parts[1])) { - if ((elements = from.getElementsByClassName(unescapeIdentifier(token))).length === 0) { return [ ]; } - selector = selector.slice(0, lastPosition) + selector.slice(lastPosition).replace('.' + token, - reOptimizeSelector.test(selector.charAt(selector.indexOf(token) - 1)) ? '' : '*'); - } - - } - - if (!elements) { - if (IE_LT_9) { - elements = /^(?:applet|object)$/i.test(from.nodeName) ? from.children : byTagRaw('*', from); - } else { - elements = from.getElementsByTagName('*'); - } - } - - if (!selectResolvers[selector] || selectContexts[selector] !== from) { - selectResolvers[selector] = compile(isSingleSelect ? [selector] : parts, REJECT_NODE, true); - selectContexts[selector] = from; - } - - elements = selectResolvers[selector](elements, Snapshot, doc, root, from, callback); - - Config.CACHING && Dom.saveResults(original, from, doc, elements); - - return elements; - }, - - FN = function(x) { return x; }, - - matchContexts = { }, - matchResolvers = { }, - - selectContexts = { }, - selectResolvers = { }, - - Snapshot = { - byId: _byId, - match: match, - select: select, - getAttribute: getAttribute, - hasAttribute: hasAttribute - }, - - Dom = { - - ACCEPT_NODE: ACCEPT_NODE, - - byId: byId, - match: match, - first: first, - select: select, - compile: compile, - configure: configure, - - setCache: FN, - shortcuts: FN, - loadResults: FN, - saveResults: FN, - - emit: emit, - Config: Config, - Snapshot: Snapshot, - - Operators: Operators, - Selectors: Selectors, - - Tokens: Tokens, - Version: version, - - registerOperator: - function(symbol, resolver) { - Operators[symbol] || (Operators[symbol] = resolver); - }, - - registerSelector: - function(name, rexp, func) { - Selectors[name] || (Selectors[name] = { - Expression: rexp, - Callback: func - }); - } - - }; - - initialize(doc); - - return Dom; -}); diff --git a/node_modules/nwmatcher/src/nwmatcher-noqsa.js b/node_modules/nwmatcher/src/nwmatcher-noqsa.js deleted file mode 100644 index 7e2c38c..0000000 --- a/node_modules/nwmatcher/src/nwmatcher-noqsa.js +++ /dev/null @@ -1,981 +0,0 @@ -/* - * Copyright (C) 2007-2018 Diego Perini - * All rights reserved. - * - * nwmatcher-noqsa.js - A fast CSS selector engine and matcher - * - * Author: Diego Perini - * Version: 1.4.4 - * Created: 20070722 - * Release: 20180305 - * - * License: - * http://javascript.nwbox.com/NWMatcher/MIT-LICENSE - * Download: - * http://javascript.nwbox.com/NWMatcher/nwmatcher.js - */ - -(function(global, factory) { - - if (typeof module == 'object' && typeof exports == 'object') { - module.exports = factory; - } else if (typeof define === 'function' && define["amd"]) { - define(factory); - } else { - global.NW || (global.NW = { }); - global.NW.Dom = factory(global); - } - -})(this, function(global) { - - var version = 'nwmatcher-1.4.4', - - doc = global.document, - root = doc.documentElement, - - isSingleMatch, - isSingleSelect, - - lastSlice, - lastContext, - lastPosition, - - lastMatcher, - lastSelector, - - lastPartsMatch, - lastPartsSelect, - - prefixes = '(?:[#.:]|::)?', - operators = '([~*^$|!]?={1})', - whitespace = '[\\x20\\t\\n\\r\\f]', - combinators = '\\x20|[>+~](?=[^>+~])', - pseudoparms = '(?:[-+]?\\d*n)?[-+]?\\d*', - skip_groups = '\\[.*\\]|\\(.*\\)|\\{.*\\}', - - any_esc_chr = '\\\\.', - alphalodash = '[_a-zA-Z]', - non_asc_chr = '[^\\x00-\\x9f]', - escaped_chr = '\\\\[^\\n\\r\\f0-9a-fA-F]', - unicode_chr = '\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|' + whitespace + ')?', - - quotedvalue = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"' + "|'[^'\\\\]*(?:\\\\.[^'\\\\]*)*'", - - reSplitGroup = /([^,\\()[\]]+|\[[^[\]]*\]|\[.*\]|\([^()]+\)|\(.*\)|\{[^{}]+\}|\{.*\}|\\.)+/g, - - reTrimSpaces = RegExp('[\\n\\r\\f]|^' + whitespace + '+|' + whitespace + '+$', 'g'), - - reEscapedChars = /\\([0-9a-fA-F]{1,6}[\x20\t\n\r\f]?|.)|([\x22\x27])/g, - - standardValidator, extendedValidator, reValidator, - - attrcheck, attributes, attrmatcher, pseudoclass, - - reOptimizeSelector, reSimpleNot, reSplitToken, - - Optimize, identifier, extensions = '.+', - - Patterns = { - spseudos: /^\:(root|empty|(?:first|last|only)(?:-child|-of-type)|nth(?:-last)?(?:-child|-of-type)\(\s?(even|odd|(?:[-+]{0,1}\d*n\s?)?[-+]{0,1}\s?\d*)\s?\))?(.*)/i, - dpseudos: /^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|(?:matches|not)\(\s?(:nth(?:-last)?(?:-child|-of-type)\(\s?(?:even|odd|(?:[-+]{0,1}\d*n\s?)?[-+]{0,1}\s?\d*)\s?\)|[^()]*)\s?\))?(.*)/i, - epseudos: /^((?:[:]{1,2}(?:after|before|first-letter|first-line))|(?:[:]{2,2}(?:selection|backdrop|placeholder)))?(.*)/i, - children: RegExp('^' + whitespace + '?\\>' + whitespace + '?(.*)'), - adjacent: RegExp('^' + whitespace + '?\\+' + whitespace + '?(.*)'), - relative: RegExp('^' + whitespace + '?\\~' + whitespace + '?(.*)'), - ancestor: RegExp('^' + whitespace + '+(.*)'), - universal: RegExp('^\\*(.*)') - }, - - Tokens = { - prefixes: prefixes, - identifier: identifier, - attributes: attributes - }, - - QUIRKS_MODE, - XML_DOCUMENT, - - GEBTN = 'getElementsByTagName' in doc, - GEBCN = 'getElementsByClassName' in doc, - - IE_LT_9 = typeof doc.addEventListener != 'function', - - LINK_NODES = { a: 1, A: 1, area: 1, AREA: 1, link: 1, LINK: 1 }, - - ATTR_BOOLEAN = { - checked: 1, disabled: 1, ismap: 1, - multiple: 1, readonly: 1, selected: 1 - }, - - ATTR_DEFAULT = { - value: 'defaultValue', - checked: 'defaultChecked', - selected: 'defaultSelected' - }, - - ATTR_URIDATA = { - action: 2, cite: 2, codebase: 2, data: 2, href: 2, - longdesc: 2, lowsrc: 2, src: 2, usemap: 2 - }, - - HTML_TABLE = { - 'accept': 1, 'accept-charset': 1, 'align': 1, 'alink': 1, 'axis': 1, - 'bgcolor': 1, 'charset': 1, 'checked': 1, 'clear': 1, 'codetype': 1, 'color': 1, - 'compact': 1, 'declare': 1, 'defer': 1, 'dir': 1, 'direction': 1, 'disabled': 1, - 'enctype': 1, 'face': 1, 'frame': 1, 'hreflang': 1, 'http-equiv': 1, 'lang': 1, - 'language': 1, 'link': 1, 'media': 1, 'method': 1, 'multiple': 1, 'nohref': 1, - 'noresize': 1, 'noshade': 1, 'nowrap': 1, 'readonly': 1, 'rel': 1, 'rev': 1, - 'rules': 1, 'scope': 1, 'scrolling': 1, 'selected': 1, 'shape': 1, 'target': 1, - 'text': 1, 'type': 1, 'valign': 1, 'valuetype': 1, 'vlink': 1 - }, - - NATIVE_TRAVERSAL_API = - 'nextElementSibling' in root && - 'previousElementSibling' in root, - - Selectors = { }, - - Operators = { - '=': "n=='%m'", - '^=': "n.indexOf('%m')==0", - '*=': "n.indexOf('%m')>-1", - '|=': "(n+'-').indexOf('%m-')==0", - '~=': "(' '+n+' ').indexOf(' %m ')>-1", - '$=': "n.substr(n.length-'%m'.length)=='%m'" - }, - - concatCall = - function(data, elements, callback) { - var i = -1, element; - while ((element = elements[++i])) { - if (false === callback(data[data.length] = element)) { break; } - } - return data; - }, - - switchContext = - function(from, force) { - var oldDoc = doc; - lastContext = from; - doc = from.ownerDocument || from; - if (force || oldDoc !== doc) { - root = doc.documentElement; - XML_DOCUMENT = doc.createElement('DiV').nodeName == 'DiV'; - QUIRKS_MODE = !XML_DOCUMENT && - typeof doc.compatMode == 'string' ? - doc.compatMode.indexOf('CSS') < 0 : - (function() { - var style = doc.createElement('div').style; - return style && (style.width = 1) && style.width == '1px'; - })(); - - Config.CACHING && Dom.setCache(true, doc); - } - }, - - codePointToUTF16 = - function(codePoint) { - if (codePoint < 1 || codePoint > 0x10ffff || - (codePoint > 0xd7ff && codePoint < 0xe000)) { - return '\\ufffd'; - } - if (codePoint < 0x10000) { - var lowHex = '000' + codePoint.toString(16); - return '\\u' + lowHex.substr(lowHex.length - 4); - } - return '\\u' + (((codePoint - 0x10000) >> 0x0a) + 0xd800).toString(16) + - '\\u' + (((codePoint - 0x10000) % 0x400) + 0xdc00).toString(16); - }, - - stringFromCodePoint = - function(codePoint) { - if (codePoint < 1 || codePoint > 0x10ffff || - (codePoint > 0xd7ff && codePoint < 0xe000)) { - return '\ufffd'; - } - if (codePoint < 0x10000) { - return String.fromCharCode(codePoint); - } - return String.fromCodePoint ? - String.fromCodePoint(codePoint) : - String.fromCharCode( - ((codePoint - 0x10000) >> 0x0a) + 0xd800, - ((codePoint - 0x10000) % 0x400) + 0xdc00); - }, - - convertEscapes = - function(str) { - return str.replace(reEscapedChars, - function(substring, p1, p2) { - return p2 ? '\\' + p2 : - (/^[0-9a-fA-F]/).test(p1) ? codePointToUTF16(parseInt(p1, 16)) : - (/^[\\\x22\x27]/).test(p1) ? substring : - p1; - } - ); - }, - - unescapeIdentifier = - function(str) { - return str.replace(reEscapedChars, - function(substring, p1, p2) { - return p2 ? p2 : - (/^[0-9a-fA-F]/).test(p1) ? stringFromCodePoint(parseInt(p1, 16)) : - (/^[\\\x22\x27]/).test(p1) ? substring : - p1; - } - ); - }, - - byIdRaw = - function(id, elements) { - var i = -1, element; - while ((element = elements[++i])) { - if (element.getAttribute('id') == id) { - break; - } - } - return element || null; - }, - - _byId = !IE_LT_9 ? - function(id, from) { - id = (/\\/).test(id) ? unescapeIdentifier(id) : id; - return from.getElementById && from.getElementById(id) || - byIdRaw(id, from.getElementsByTagName('*')); - } : - function(id, from) { - var element = null; - id = (/\\/).test(id) ? unescapeIdentifier(id) : id; - if (XML_DOCUMENT || from.nodeType != 9) { - return byIdRaw(id, from.getElementsByTagName('*')); - } - if ((element = from.getElementById(id)) && - element.name == id && from.getElementsByName) { - return byIdRaw(id, from.getElementsByName(id)); - } - return element; - }, - - byId = - function(id, from) { - from || (from = doc); - if (lastContext !== from) { switchContext(from); } - return _byId(id, from); - }, - - byTagRaw = - function(tag, from) { - var any = tag == '*', element = from, elements = [ ], next = element.firstChild; - any || (tag = tag.toUpperCase()); - while ((element = next)) { - if (element.tagName > '@' && (any || element.tagName.toUpperCase() == tag)) { - elements[elements.length] = element; - } - if ((next = element.firstChild || element.nextSibling)) continue; - while (!next && (element = element.parentNode) && element !== from) { - next = element.nextSibling; - } - } - return elements; - }, - - contains = 'compareDocumentPosition' in root ? - function(container, element) { - return (container.compareDocumentPosition(element) & 16) == 16; - } : 'contains' in root ? - function(container, element) { - return container !== element && container.contains(element); - } : - function(container, element) { - while ((element = element.parentNode)) { - if (element === container) return true; - } - return false; - }, - - getAttribute = !IE_LT_9 ? - function(node, attribute) { - return node.getAttribute(attribute); - } : - function(node, attribute) { - attribute = attribute.toLowerCase(); - if (typeof node[attribute] == 'object') { - return node.attributes[attribute] && - node.attributes[attribute].value; - } - return ( - attribute == 'type' ? node.getAttribute(attribute) : - ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) : - ATTR_BOOLEAN[attribute] ? node.getAttribute(attribute) ? attribute : 'false' : - (node = node.getAttributeNode(attribute)) && node.value); - }, - - hasAttribute = !IE_LT_9 && root.hasAttribute ? - function(node, attribute) { - return node.hasAttribute(attribute); - } : - function(node, attribute) { - var obj = node.getAttributeNode(attribute = attribute.toLowerCase()); - return ATTR_DEFAULT[attribute] && attribute != 'value' ? - node[ATTR_DEFAULT[attribute]] : obj && obj.specified; - }, - - isEmpty = - function(node) { - node = node.firstChild; - while (node) { - if (node.nodeType == 3 || node.nodeName > '@') return false; - node = node.nextSibling; - } - return true; - }, - - isLink = - function(element) { - return hasAttribute(element, 'href') && LINK_NODES[element.nodeName]; - }, - - nthElement = - function(element, last) { - var count = 1, succ = last ? 'nextSibling' : 'previousSibling'; - while ((element = element[succ])) { - if (element.nodeName > '@') ++count; - } - return count; - }, - - nthOfType = - function(element, last) { - var count = 1, succ = last ? 'nextSibling' : 'previousSibling', type = element.nodeName; - while ((element = element[succ])) { - if (element.nodeName == type) ++count; - } - return count; - }, - - configure = - function(option) { - if (typeof option == 'string') { return !!Config[option]; } - if (typeof option != 'object') { return Config; } - for (var i in option) { - Config[i] = !!option[i]; - if (i == 'SIMPLENOT') { - matchContexts = { }; - matchResolvers = { }; - selectContexts = { }; - selectResolvers = { }; - } - } - setIdentifierSyntax(); - reValidator = RegExp(Config.SIMPLENOT ? - standardValidator : extendedValidator); - return true; - }, - - emit = - function(message) { - if (Config.VERBOSITY) { throw Error(message); } - if (Config.LOGERRORS && console && console.log) { - console.log(message); - } - }, - - Config = { - CACHING: false, - ESCAPECHR: true, - NON_ASCII: true, - SELECTOR3: true, - UNICODE16: true, - SHORTCUTS: false, - SIMPLENOT: true, - SVG_LCASE: false, - UNIQUE_ID: true, - USE_HTML5: true, - VERBOSITY: true, - LOGERRORS: true - }, - - initialize = - function(doc) { - setIdentifierSyntax(); - switchContext(doc, true); - }, - - setIdentifierSyntax = - function() { - - var syntax = '', start = Config['SELECTOR3'] ? '-{2}|' : ''; - - Config['NON_ASCII'] && (syntax += '|' + non_asc_chr); - Config['UNICODE16'] && (syntax += '|' + unicode_chr); - Config['ESCAPECHR'] && (syntax += '|' + escaped_chr); - - syntax += (Config['UNICODE16'] || Config['ESCAPECHR']) ? '' : '|' + any_esc_chr; - - identifier = '-?(?:' + start + alphalodash + syntax + ')(?:-|[0-9]|' + alphalodash + syntax + ')*'; - - attrcheck = '(' + quotedvalue + '|' + identifier + ')'; - attributes = whitespace + '*(' + identifier + '(?::' + identifier + ')?)' + - whitespace + '*(?:' + operators + whitespace + '*' + attrcheck + ')?' + whitespace + '*' + '(i)?' + whitespace + '*'; - attrmatcher = attributes.replace(attrcheck, '([\\x22\\x27]*)((?:\\\\?.)*?)\\3'); - - pseudoclass = '((?:' + - pseudoparms + '|' + quotedvalue + '|' + - prefixes + identifier + '|' + - '\\[' + attributes + '\\]|' + - '\\(.+\\)|' + whitespace + '*|' + - ',)+)'; - - standardValidator = - '(?=[\\x20\\t\\n\\r\\f]*[^>+~(){}<>])' + - '(' + - '\\*' + - '|(?:' + prefixes + identifier + ')' + - '|' + combinators + - '|\\[' + attributes + '\\]' + - '|\\(' + pseudoclass + '\\)' + - '|\\{' + extensions + '\\}' + - '|(?:,|' + whitespace + '*)' + - ')+'; - - reSimpleNot = RegExp('^(' + - '(?!:not)' + - '(' + prefixes + identifier + - '|\\([^()]*\\))+' + - '|\\[' + attributes + '\\]' + - ')$'); - - reSplitToken = RegExp('(' + - prefixes + identifier + '|' + - '\\[' + attributes + '\\]|' + - '\\(' + pseudoclass + '\\)|' + - '\\\\.|[^\\x20\\t\\n\\r\\f>+~])+', 'g'); - - reOptimizeSelector = RegExp(identifier + '|^$'); - - Optimize = { - ID: RegExp('^\\*?#(' + identifier + ')|' + skip_groups), - TAG: RegExp('^(' + identifier + ')|' + skip_groups), - CLASS: RegExp('^\\.(' + identifier + '$)|' + skip_groups) - }; - - Patterns.id = RegExp('^#(' + identifier + ')(.*)'); - Patterns.tagName = RegExp('^(' + identifier + ')(.*)'); - Patterns.className = RegExp('^\\.(' + identifier + ')(.*)'); - Patterns.attribute = RegExp('^\\[' + attrmatcher + '\\](.*)'); - - Tokens.identifier = identifier; - Tokens.attributes = attributes; - - extendedValidator = standardValidator.replace(pseudoclass, '.*'); - - reValidator = RegExp(standardValidator); - }, - - ACCEPT_NODE = 'r[r.length]=c[k];if(f&&false===f(c[k]))break main;else continue main;', - REJECT_NODE = IE_LT_9 ? 'if(e.nodeName<"A")continue;' : '', - TO_UPPER_CASE = IE_LT_9 ? '.toUpperCase()' : '', - - compile = - function(selector, source, mode) { - - var parts = typeof selector == 'string' ? selector.match(reSplitGroup) : selector; - - typeof source == 'string' || (source = ''); - - if (parts.length == 1) { - source += compileSelector(parts[0], mode ? ACCEPT_NODE : 'f&&f(k);return true;', mode); - } else { - var i = -1, seen = { }, token; - while ((token = parts[++i])) { - token = token.replace(reTrimSpaces, ''); - if (!seen[token] && (seen[token] = true)) { - source += compileSelector(token, mode ? ACCEPT_NODE : 'f&&f(k);return true;', mode); - } - } - } - - if (mode) { - return Function('c,s,d,h,g,f', - 'var N,n,x=0,k=-1,e,r=[];main:while((e=c[++k])){' + source + '}return r;'); - } else { - return Function('e,s,d,h,g,f', - 'var N,n,x=0,k=e;' + source + 'return false;'); - } - }, - - compileSelector = - function(selector, source, mode) { - - var a, b, n, k = 0, expr, match, result, status, test, type; - - while (selector) { - - k++; - - if ((match = selector.match(Patterns.universal))) { - expr = ''; - } - - else if ((match = selector.match(Patterns.id))) { - match[1] = (/\\/).test(match[1]) ? convertEscapes(match[1]) : match[1]; - source = 'if(' + (XML_DOCUMENT ? - 's.getAttribute(e,"id")' : - '(e.submit?s.getAttribute(e,"id"):e.id)') + - '=="' + match[1] + '"' + - '){' + source + '}'; - } - - else if ((match = selector.match(Patterns.tagName))) { - test = Config.SVG_LCASE ? '||e.nodeName=="' + match[1].toLowerCase() + '"' : ''; - source = 'if(e.nodeName' + (XML_DOCUMENT ? - '=="' + match[1] + '"' : TO_UPPER_CASE + - '=="' + match[1].toUpperCase() + '"' + test) + - '){' + source + '}'; - } - - else if ((match = selector.match(Patterns.className))) { - match[1] = (/\\/).test(match[1]) ? convertEscapes(match[1]) : match[1]; - match[1] = QUIRKS_MODE ? match[1].toLowerCase() : match[1]; - source = 'if((n=' + (XML_DOCUMENT ? - 'e.getAttribute("class")' : 'e.className') + - ')&&n.length&&(" "+' + (QUIRKS_MODE ? 'n.toLowerCase()' : 'n') + - '.replace(/' + whitespace + '+/g," ")+" ").indexOf(" ' + match[1] + ' ")>-1' + - '){' + source + '}'; - } - - else if ((match = selector.match(Patterns.attribute))) { - expr = match[1].split(':'); - expr = expr.length == 2 ? expr[1] : expr[0] + ''; - - if (match[2] && !Operators[match[2]]) { - emit('Unsupported operator in attribute selectors "' + selector + '"'); - return ''; - } - test = 'false'; - if (match[2] && match[4] && (test = Operators[match[2]])) { - match[4] = (/\\/).test(match[4]) ? convertEscapes(match[4]) : match[4]; - type = match[5] == 'i' || HTML_TABLE[expr.toLowerCase()]; - test = test.replace(/\%m/g, type ? match[4].toLowerCase() : match[4]); - } else if (match[2] == '!=' || match[2] == '=') { - test = 'n' + match[2] + '=""'; - } - source = 'if(n=s.hasAttribute(e,"' + match[1] + '")){' + - (match[2] ? 'n=s.getAttribute(e,"' + match[1] + '")' : '') + - (type && match[2] ? '.toLowerCase();' : ';') + - 'if(' + (match[2] ? test : 'n') + '){' + source + '}}'; - } - - else if ((match = selector.match(Patterns.adjacent))) { - source = NATIVE_TRAVERSAL_API ? - 'var N' + k + '=e;if((e=e.previousElementSibling)){' + source + '}e=N' + k + ';' : - 'var N' + k + '=e;while((e=e.previousSibling)){if(e.nodeType==1){' + source + 'break;}}e=N' + k + ';'; - } - - else if ((match = selector.match(Patterns.relative))) { - source = NATIVE_TRAVERSAL_API ? - 'var N' + k + '=e;while((e=e.previousElementSibling)){' + source + '}e=N' + k + ';' : - 'var N' + k + '=e;while((e=e.previousSibling)){if(e.nodeType==1){' + source + '}}e=N' + k + ';'; - } - - else if ((match = selector.match(Patterns.children))) { - source = 'var N' + k + '=e;if((e=e.parentNode)&&e.nodeType==1){' + source + '}e=N' + k + ';'; - } - - else if ((match = selector.match(Patterns.ancestor))) { - source = 'var N' + k + '=e;while((e=e.parentNode)&&e.nodeType==1){' + source + '}e=N' + k + ';'; - } - - else if ((match = selector.match(Patterns.spseudos)) && match[1]) { - switch (match[1]) { - case 'root': - if (match[3]) { - source = 'if(e===h||s.contains(h,e)){' + source + '}'; - } else { - source = 'if(e===h){' + source + '}'; - } - break; - case 'empty': - source = 'if(s.isEmpty(e)){' + source + '}'; - break; - default: - if (match[1] && match[2]) { - if (match[2] == 'n') { - source = 'if(e!==h){' + source + '}'; - break; - } else if (match[2] == 'even') { - a = 2; - b = 0; - } else if (match[2] == 'odd') { - a = 2; - b = 1; - } else { - b = ((n = match[2].match(/(-?\d+)$/)) ? parseInt(n[1], 10) : 0); - a = ((n = match[2].match(/(-?\d*)n/i)) ? parseInt(n[1], 10) : 0); - if (n && n[1] == '-') a = -1; - } - test = a > 1 ? - (/last/i.test(match[1])) ? '(n-(' + b + '))%' + a + '==0' : - 'n>=' + b + '&&(n-(' + b + '))%' + a + '==0' : a < -1 ? - (/last/i.test(match[1])) ? '(n-(' + b + '))%' + a + '==0' : - 'n<=' + b + '&&(n-(' + b + '))%' + a + '==0' : a === 0 ? - 'n==' + b : a == -1 ? 'n<=' + b : 'n>=' + b; - source = - 'if(e!==h){' + - 'n=s[' + (/-of-type/i.test(match[1]) ? '"nthOfType"' : '"nthElement"') + ']' + - '(e,' + (/last/i.test(match[1]) ? 'true' : 'false') + ');' + - 'if(' + test + '){' + source + '}' + - '}'; - } else { - a = /first/i.test(match[1]) ? 'previous' : 'next'; - n = /only/i.test(match[1]) ? 'previous' : 'next'; - b = /first|last/i.test(match[1]); - type = /-of-type/i.test(match[1]) ? '&&n.nodeName!=e.nodeName' : '&&n.nodeName<"@"'; - source = 'if(e!==h){' + - ( 'n=e;while((n=n.' + a + 'Sibling)' + type + ');if(!n){' + (b ? source : - 'n=e;while((n=n.' + n + 'Sibling)' + type + ');if(!n){' + source + '}') + '}' ) + '}'; - } - break; - } - } - - else if ((match = selector.match(Patterns.dpseudos)) && match[1]) { - switch (match[1].match(/^\w+/)[0]) { - case 'matches': - expr = match[3].replace(reTrimSpaces, ''); - source = 'if(s.match(e, "' + expr.replace(/\x22/g, '\\"') + '",g)){' + source +'}'; - break; - - case 'not': - expr = match[3].replace(reTrimSpaces, ''); - if (Config.SIMPLENOT && !reSimpleNot.test(expr)) { - emit('Negation pseudo-class only accepts simple selectors "' + selector + '"'); - return ''; - } else { - if ('compatMode' in doc) { - source = 'if(!' + compile(expr, '', false) + '(e,s,d,h,g)){' + source + '}'; - } else { - source = 'if(!s.match(e, "' + expr.replace(/\x22/g, '\\"') + '",g)){' + source +'}'; - } - } - break; - case 'checked': - source = 'if((typeof e.form!=="undefined"&&(/^(?:radio|checkbox)$/i).test(e.type)&&e.checked)' + - (Config.USE_HTML5 ? '||(/^option$/i.test(e.nodeName)&&(e.selected||e.checked))' : '') + - '){' + source + '}'; - break; - case 'disabled': - source = 'if(((typeof e.form!=="undefined"' + - (Config.USE_HTML5 ? '' : '&&!(/^hidden$/i).test(e.type)') + - ')||s.isLink(e))&&e.disabled===true){' + source + '}'; - break; - case 'enabled': - source = 'if(((typeof e.form!=="undefined"' + - (Config.USE_HTML5 ? '' : '&&!(/^hidden$/i).test(e.type)') + - ')||s.isLink(e))&&e.disabled===false){' + source + '}'; - break; - case 'lang': - test = ''; - if (match[2]) test = match[2].substr(0, 2) + '-'; - source = 'do{(n=e.lang||"").toLowerCase();' + - 'if((n==""&&h.lang=="' + match[2].toLowerCase() + '")||' + - '(n&&(n=="' + match[2].toLowerCase() + - '"||n.substr(0,3)=="' + test.toLowerCase() + '")))' + - '{' + source + 'break;}}while((e=e.parentNode)&&e!==g);'; - break; - case 'target': - source = 'if(e.id==d.location.hash.slice(1)){' + source + '}'; - break; - case 'link': - source = 'if(s.isLink(e)&&!e.visited){' + source + '}'; - break; - case 'visited': - source = 'if(s.isLink(e)&&e.visited){' + source + '}'; - break; - case 'active': - source = 'if(e===d.activeElement){' + source + '}'; - break; - case 'hover': - source = 'if(e===d.hoverElement){' + source + '}'; - break; - case 'focus': - source = 'hasFocus' in doc ? - 'if(e===d.activeElement&&d.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number")){' + source + '}' : - 'if(e===d.activeElement&&(e.type||e.href)){' + source + '}'; - break; - case 'selected': - source = 'if(/^option$/i.test(e.nodeName)&&(e.selected||e.checked)){' + source + '}'; - break; - default: - break; - } - } - - else if ((match = selector.match(Patterns.epseudos)) && match[1]) { - source = 'if(!(/1|11/).test(e.nodeType)){' + source + '}'; - } - - else { - - expr = false; - status = false; - for (expr in Selectors) { - if ((match = selector.match(Selectors[expr].Expression)) && match[1]) { - result = Selectors[expr].Callback(match, source); - if ('match' in result) { match = result.match; } - source = result.source; - status = result.status; - if (status) { break; } - } - } - - if (!status) { - emit('Unknown pseudo-class selector "' + selector + '"'); - return ''; - } - - if (!expr) { - emit('Unknown token in selector "' + selector + '"'); - return ''; - } - - } - - if (!match) { - emit('Invalid syntax in selector "' + selector + '"'); - return ''; - } - - selector = match && match[match.length - 1]; - } - - return source; - }, - - match = - function(element, selector, from, callback) { - - var parts; - - if (!(element && element.nodeType == 1)) { - emit('Invalid element argument'); - return false; - } else if (typeof selector != 'string') { - emit('Invalid selector argument'); - return false; - } else if (lastContext !== from) { - switchContext(from || (from = element.ownerDocument)); - } - - selector = selector. - replace(reTrimSpaces, ''). - replace(/\x00|\\$/g, '\ufffd'); - - Config.SHORTCUTS && (selector = Dom.shortcuts(selector, element, from)); - - if (lastMatcher != selector) { - if ((parts = selector.match(reValidator)) && parts[0] == selector) { - isSingleMatch = (parts = selector.match(reSplitGroup)).length < 2; - lastMatcher = selector; - lastPartsMatch = parts; - } else { - emit('The string "' + selector + '", is not a valid CSS selector'); - return false; - } - } else parts = lastPartsMatch; - - if (!matchResolvers[selector] || matchContexts[selector] !== from) { - matchResolvers[selector] = compile(isSingleMatch ? [selector] : parts, '', false); - matchContexts[selector] = from; - } - - return matchResolvers[selector](element, Snapshot, doc, root, from, callback); - }, - - first = - function(selector, from) { - return select(selector, from, function() { return false; })[0] || null; - }, - - select = - function(selector, from, callback) { - - var i, changed, element, elements, parts, token, original = selector; - - if (arguments.length === 0) { - emit('Not enough arguments'); - return [ ]; - } else if (typeof selector != 'string') { - return [ ]; - } else if (from && !(/1|9|11/).test(from.nodeType)) { - emit('Invalid or illegal context element'); - return [ ]; - } else if (lastContext !== from) { - switchContext(from || (from = doc)); - } - - if (Config.CACHING && (elements = Dom.loadResults(original, from, doc, root))) { - return callback ? concatCall([ ], elements, callback) : elements; - } - - selector = selector. - replace(reTrimSpaces, ''). - replace(/\x00|\\$/g, '\ufffd'); - - Config.SHORTCUTS && (selector = Dom.shortcuts(selector, from)); - - if ((changed = lastSelector != selector)) { - if ((parts = selector.match(reValidator)) && parts[0] == selector) { - isSingleSelect = (parts = selector.match(reSplitGroup)).length < 2; - lastSelector = selector; - lastPartsSelect = parts; - } else { - emit('The string "' + selector + '", is not a valid CSS selector'); - return [ ]; - } - } else parts = lastPartsSelect; - - if (from.nodeType == 11) { - - elements = byTagRaw('*', from); - - } else if (isSingleSelect) { - - if (changed) { - parts = selector.match(reSplitToken); - token = parts[parts.length - 1]; - lastSlice = token.split(':not'); - lastSlice = lastSlice[lastSlice.length - 1]; - lastPosition = selector.length - token.length; - } - - if (Config.UNIQUE_ID && lastSlice && (parts = lastSlice.match(Optimize.ID)) && (token = parts[1])) { - if ((element = _byId(token, from))) { - if (match(element, selector)) { - callback && callback(element); - elements = [element]; - } else elements = [ ]; - } - } - - else if (Config.UNIQUE_ID && (parts = selector.match(Optimize.ID)) && (token = parts[1])) { - if ((element = _byId(token, doc))) { - if ('#' + token == selector) { - callback && callback(element); - elements = [element]; - } else if (/[>+~]/.test(selector)) { - from = element.parentNode; - } else { - from = element; - } - } else elements = [ ]; - } - - if (elements) { - Config.CACHING && Dom.saveResults(original, from, doc, elements); - return elements; - } - - if (!XML_DOCUMENT && GEBTN && lastSlice && (parts = lastSlice.match(Optimize.TAG)) && (token = parts[1])) { - if ((elements = from.getElementsByTagName(token)).length === 0) { return [ ]; } - selector = selector.slice(0, lastPosition) + selector.slice(lastPosition).replace(token, '*'); - } - - else if (!XML_DOCUMENT && GEBCN && lastSlice && (parts = lastSlice.match(Optimize.CLASS)) && (token = parts[1])) { - if ((elements = from.getElementsByClassName(unescapeIdentifier(token))).length === 0) { return [ ]; } - selector = selector.slice(0, lastPosition) + selector.slice(lastPosition).replace('.' + token, - reOptimizeSelector.test(selector.charAt(selector.indexOf(token) - 1)) ? '' : '*'); - } - - } - - if (!elements) { - if (IE_LT_9) { - elements = /^(?:applet|object)$/i.test(from.nodeName) ? from.children : byTagRaw('*', from); - } else { - elements = from.getElementsByTagName('*'); - } - } - - if (!selectResolvers[selector] || selectContexts[selector] !== from) { - selectResolvers[selector] = compile(isSingleSelect ? [selector] : parts, REJECT_NODE, true); - selectContexts[selector] = from; - } - - elements = selectResolvers[selector](elements, Snapshot, doc, root, from, callback); - - Config.CACHING && Dom.saveResults(original, from, doc, elements); - - return elements; - }, - - FN = function(x) { return x; }, - - matchContexts = { }, - matchResolvers = { }, - - selectContexts = { }, - selectResolvers = { }, - - Snapshot = { - byId: _byId, - match: match, - select: select, - isLink: isLink, - isEmpty: isEmpty, - contains: contains, - nthOfType: nthOfType, - nthElement: nthElement, - getAttribute: getAttribute, - hasAttribute: hasAttribute - }, - - Dom = { - - ACCEPT_NODE: ACCEPT_NODE, - - byId: byId, - match: match, - first: first, - select: select, - compile: compile, - contains: contains, - configure: configure, - getAttribute: getAttribute, - hasAttribute: hasAttribute, - - setCache: FN, - shortcuts: FN, - loadResults: FN, - saveResults: FN, - - emit: emit, - Config: Config, - Snapshot: Snapshot, - - Operators: Operators, - Selectors: Selectors, - - Tokens: Tokens, - Version: version, - - registerOperator: - function(symbol, resolver) { - Operators[symbol] || (Operators[symbol] = resolver); - }, - - registerSelector: - function(name, rexp, func) { - Selectors[name] || (Selectors[name] = { - Expression: rexp, - Callback: func - }); - } - - }; - - initialize(doc); - - return Dom; -}); diff --git a/node_modules/nwmatcher/src/nwmatcher.js b/node_modules/nwmatcher/src/nwmatcher.js deleted file mode 100644 index 08a0ba5..0000000 --- a/node_modules/nwmatcher/src/nwmatcher.js +++ /dev/null @@ -1,1776 +0,0 @@ -/* - * Copyright (C) 2007-2018 Diego Perini - * All rights reserved. - * - * nwmatcher.js - A fast CSS selector engine and matcher - * - * Author: Diego Perini - * Version: 1.4.4 - * Created: 20070722 - * Release: 20180305 - * - * License: - * http://javascript.nwbox.com/NWMatcher/MIT-LICENSE - * Download: - * http://javascript.nwbox.com/NWMatcher/nwmatcher.js - */ - -(function(global, factory) { - - if (typeof module == 'object' && typeof exports == 'object') { - module.exports = factory; - } else if (typeof define === 'function' && define["amd"]) { - define(factory); - } else { - global.NW || (global.NW = { }); - global.NW.Dom = factory(global); - } - -})(this, function(global) { - - var version = 'nwmatcher-1.4.4', - - // processing context & root element - doc = global.document, - root = doc.documentElement, - - // save utility methods references - slice = [ ].slice, - - // persist previous parsed data - isSingleMatch, - isSingleSelect, - - lastSlice, - lastContext, - lastPosition, - - lastMatcher, - lastSelector, - - lastPartsMatch, - lastPartsSelect, - - // accepted prefix identifiers - // (id, class & pseudo-class) - prefixes = '(?:[#.:]|::)?', - - // accepted attribute operators - operators = '([~*^$|!]?={1})', - - // accepted whitespace characters - whitespace = '[\\x20\\t\\n\\r\\f]', - - // 4 combinators F E, F>E, F+E, F~E - combinators = '\\x20|[>+~](?=[^>+~])', - - // an+b format params for pseudo-classes - pseudoparms = '(?:[-+]?\\d*n)?[-+]?\\d*', - - // skip [ ], ( ), { } brackets groups - skip_groups = '\\[.*\\]|\\(.*\\)|\\{.*\\}', - - // any escaped char - any_esc_chr = '\\\\.', - // alpha chars & low dash - alphalodash = '[_a-zA-Z]', - // non-ascii chars (utf-8) - non_asc_chr = '[^\\x00-\\x9f]', - // escape sequences in strings - escaped_chr = '\\\\[^\\n\\r\\f0-9a-fA-F]', - // Unicode chars including trailing whitespace - unicode_chr = '\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|' + whitespace + ')?', - - // CSS quoted string values - quotedvalue = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"' + "|'[^'\\\\]*(?:\\\\.[^'\\\\]*)*'", - - // regular expression used to skip single/nested brackets groups (round, square, curly) - // used to split comma groups excluding commas inside quotes '' "" or brackets () [] {} - reSplitGroup = /([^,\\()[\]]+|\[[^[\]]*\]|\[.*\]|\([^()]+\)|\(.*\)|\{[^{}]+\}|\{.*\}|\\.)+/g, - - // regular expression to trim extra leading/trailing whitespace in selector strings - // whitespace is any combination of these 5 character [\x20\t\n\r\f] - // http://www.w3.org/TR/css3-selectors/#selector-syntax - reTrimSpaces = RegExp('[\\n\\r\\f]|^' + whitespace + '+|' + whitespace + '+$', 'g'), - - // regular expression used in convertEscapes and unescapeIdentifier - reEscapedChars = /\\([0-9a-fA-F]{1,6}[\x20\t\n\r\f]?|.)|([\x22\x27])/g, - - // for in excess whitespace removal - reWhiteSpace = /[\x20\t\n\r\f]+/g, - - standardValidator, extendedValidator, reValidator, - - attrcheck, attributes, attrmatcher, pseudoclass, - - reOptimizeSelector, reSimpleNot, reSplitToken, - - Optimize, reClass, reSimpleSelector, - - // http://www.w3.org/TR/css3-syntax/#characters - // unicode/ISO 10646 characters \xA0 and higher - // NOTE: Safari 2.0.x crashes with escaped (\\) - // Unicode ranges in regular expressions so we - // use a negated character range class instead - // now assigned at runtime from config options - identifier, - - // placeholder for extensions - extensions = '.+', - - // precompiled Regular Expressions - Patterns = { - // structural pseudo-classes and child selectors - spseudos: /^\:(root|empty|(?:first|last|only)(?:-child|-of-type)|nth(?:-last)?(?:-child|-of-type)\(\s?(even|odd|(?:[-+]{0,1}\d*n\s?)?[-+]{0,1}\s?\d*)\s?\))?(.*)/i, - // uistates + dynamic + negation pseudo-classes - dpseudos: /^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|(?:matches|not)\(\s?(:nth(?:-last)?(?:-child|-of-type)\(\s?(?:even|odd|(?:[-+]{0,1}\d*n\s?)?[-+]{0,1}\s?\d*)\s?\)|[^()]*)\s?\))?(.*)/i, - // pseudo-elements selectors - epseudos: /^((?:[:]{1,2}(?:after|before|first-letter|first-line))|(?:[:]{2,2}(?:selection|backdrop|placeholder)))?(.*)/i, - // E > F - children: RegExp('^' + whitespace + '?\\>' + whitespace + '?(.*)'), - // E + F - adjacent: RegExp('^' + whitespace + '?\\+' + whitespace + '?(.*)'), - // E ~ F - relative: RegExp('^' + whitespace + '?\\~' + whitespace + '?(.*)'), - // E F - ancestor: RegExp('^' + whitespace + '+(.*)'), - // all - universal: RegExp('^\\*(.*)') - }, - - Tokens = { - prefixes: prefixes, - identifier: identifier, - attributes: attributes - }, - - /*----------------------------- FEATURE TESTING ----------------------------*/ - - // detect native methods - isNative = (function() { - var re = / \w+\(/, - isnative = String(({ }).toString).replace(re, ' ('); - return function(method) { - return method && typeof method != 'string' && - isnative == String(method).replace(re, ' ('); - }; - })(), - - // NATIVE_XXXXX true if method exist and is callable - // detect if DOM methods are native in browsers - NATIVE_FOCUS = isNative(doc.hasFocus), - NATIVE_QSAPI = isNative(doc.querySelector), - NATIVE_GEBID = isNative(doc.getElementById), - NATIVE_GEBTN = isNative(root.getElementsByTagName), - NATIVE_GEBCN = isNative(root.getElementsByClassName), - - // detect native getAttribute/hasAttribute methods, - // frameworks extend these to elements, but it seems - // this does not work for XML namespaced attributes, - // used to check both getAttribute/hasAttribute in IE - NATIVE_GET_ATTRIBUTE = isNative(root.getAttribute), - NATIVE_HAS_ATTRIBUTE = isNative(root.hasAttribute), - - // check if slice() can convert nodelist to array - // see http://yura.thinkweb2.com/cft/ - NATIVE_SLICE_PROTO = - (function() { - var isBuggy = false; - try { - isBuggy = !!slice.call(doc.childNodes, 0)[0]; - } catch(e) { } - return isBuggy; - })(), - - // supports the new traversal API - NATIVE_TRAVERSAL_API = - 'nextElementSibling' in root && 'previousElementSibling' in root, - - // BUGGY_XXXXX true if method is feature tested and has known bugs - // detect buggy gEBID - BUGGY_GEBID = NATIVE_GEBID ? - (function() { - var isBuggy = true, x = 'x' + String(+new Date), - a = doc.createElementNS ? 'a' : ''; - (a = doc.createElement(a)).name = x; - root.insertBefore(a, root.firstChild); - isBuggy = !!doc.getElementById(x); - root.removeChild(a); - return isBuggy; - })() : - true, - - // detect IE gEBTN comment nodes bug - BUGGY_GEBTN = NATIVE_GEBTN ? - (function() { - var div = doc.createElement('div'); - div.appendChild(doc.createComment('')); - return !!div.getElementsByTagName('*')[0]; - })() : - true, - - // detect Opera gEBCN second class and/or UTF8 bugs as well as Safari 3.2 - // caching class name results and not detecting when changed, - // tests are based on the jQuery selector test suite - BUGGY_GEBCN = NATIVE_GEBCN ? - (function() { - var isBuggy, div = doc.createElement('div'), test = '\u53f0\u5317'; - - // Opera tests - div.appendChild(doc.createElement('span')). - setAttribute('class', test + 'abc ' + test); - div.appendChild(doc.createElement('span')). - setAttribute('class', 'x'); - - isBuggy = !div.getElementsByClassName(test)[0]; - - // Safari test - div.lastChild.className = test; - return isBuggy || div.getElementsByClassName(test).length != 2; - })() : - true, - - // detect IE bug with dynamic attributes - BUGGY_GET_ATTRIBUTE = NATIVE_GET_ATTRIBUTE ? - (function() { - var input = doc.createElement('input'); - input.setAttribute('value', 5); - return input.defaultValue != 5; - })() : - true, - - // detect IE bug with non-standard boolean attributes - BUGGY_HAS_ATTRIBUTE = NATIVE_HAS_ATTRIBUTE ? - (function() { - var option = doc.createElement('option'); - option.setAttribute('selected', 'selected'); - return !option.hasAttribute('selected'); - })() : - true, - - // detect Safari bug with selected option elements - BUGGY_SELECTED = - (function() { - var select = doc.createElement('select'); - select.appendChild(doc.createElement('option')); - return !select.firstChild.selected; - })(), - - // initialized with the loading context - // and reset for each different context - BUGGY_QUIRKS_GEBCN, - BUGGY_QUIRKS_QSAPI, - - QUIRKS_MODE, - XML_DOCUMENT, - - // detect Opera browser - OPERA = typeof global.opera != 'undefined' && - (/opera/i).test(({ }).toString.call(global.opera)), - - // skip simple selector optimizations for Opera >= 11 - OPERA_QSAPI = OPERA && parseFloat(global.opera.version()) >= 11, - - // check Selector API implementations - RE_BUGGY_QSAPI = NATIVE_QSAPI ? - (function() { - var pattern = [ ], context, element, - - expect = function(selector, element, n) { - var result = false; - context.appendChild(element); - try { result = context.querySelectorAll(selector).length == n; } catch(e) { } - while (context.firstChild) { context.removeChild(context.firstChild); } - return result; - }; - - // certain bugs can only be detected in standard documents - // to avoid writing a live loading document create a fake one - if (doc.implementation && doc.implementation.createDocument) { - // use a shadow document body as context - context = doc.implementation.createDocument('', '', null). - appendChild(doc.createElement('html')). - appendChild(doc.createElement('head')).parentNode. - appendChild(doc.createElement('body')); - } else { - // use an unattached div node as context - context = doc.createElement('div'); - } - - // fix for Safari 8.x and other engines that - // fail querying filtered sibling combinators - element = doc.createElement('div'); - element.innerHTML = '


'; - expect('p#a+*', element, 0) && - pattern.push('\\w+#\\w+.*[+~]'); - - // ^= $= *= operators bugs with empty values (Opera 10 / IE8) - element = doc.createElement('p'); - element.setAttribute('class', ''); - expect('[class^=""]', element, 1) && - pattern.push('[*^$]=[\\x20\\t\\n\\r\\f]*(?:""|' + "'')"); - - // :checked bug with option elements (Firefox 3.6.x) - // it wrongly includes 'selected' options elements - // HTML5 rules says selected options also match - element = doc.createElement('option'); - element.setAttribute('selected', 'selected'); - expect(':checked', element, 0) && - pattern.push(':checked'); - - // :enabled :disabled bugs with hidden fields (Firefox 3.5) - // http://www.w3.org/TR/html5/links.html#selector-enabled - // http://www.w3.org/TR/css3-selectors/#enableddisabled - // not supported by IE8 Query Selector - element = doc.createElement('input'); - element.setAttribute('type', 'hidden'); - expect(':enabled', element, 0) && - pattern.push(':enabled', ':disabled'); - - // :link bugs with hyperlinks matching (Firefox/Safari) - element = doc.createElement('link'); - element.setAttribute('href', 'x'); - expect(':link', element, 1) || - pattern.push(':link'); - - // avoid attribute selectors for IE QSA - if (BUGGY_HAS_ATTRIBUTE) { - // IE fails in reading: - // - original values for input/textarea - // - original boolean values for controls - pattern.push('\\[[\\x20\\t\\n\\r\\f]*(?:checked|disabled|ismap|multiple|readonly|selected|value)'); - } - - return pattern.length ? - RegExp(pattern.join('|')) : - { 'test': function() { return false; } }; - - })() : - true, - - /*----------------------------- LOOKUP OBJECTS -----------------------------*/ - - IE_LT_9 = typeof doc.addEventListener != 'function', - - LINK_NODES = { 'a': 1, 'A': 1, 'area': 1, 'AREA': 1, 'link': 1, 'LINK': 1 }, - - // boolean attributes should return attribute name instead of true/false - ATTR_BOOLEAN = { - 'checked': 1, 'disabled': 1, 'ismap': 1, - 'multiple': 1, 'readonly': 1, 'selected': 1 - }, - - // dynamic attributes that needs to be checked against original HTML value - ATTR_DEFAULT = { - 'value': 'defaultValue', - 'checked': 'defaultChecked', - 'selected': 'defaultSelected' - }, - - // attributes referencing URI data values need special treatment in IE - ATTR_URIDATA = { - 'action': 2, 'cite': 2, 'codebase': 2, 'data': 2, 'href': 2, - 'longdesc': 2, 'lowsrc': 2, 'src': 2, 'usemap': 2 - }, - - // HTML 5 draft specifications - // http://www.whatwg.org/specs/web-apps/current-work/#selectors - HTML_TABLE = { - // NOTE: class name attribute selectors must always be treated using a - // case-sensitive match, this has changed from previous specifications - 'accept': 1, 'accept-charset': 1, 'align': 1, 'alink': 1, 'axis': 1, - 'bgcolor': 1, 'charset': 1, 'checked': 1, 'clear': 1, 'codetype': 1, 'color': 1, - 'compact': 1, 'declare': 1, 'defer': 1, 'dir': 1, 'direction': 1, 'disabled': 1, - 'enctype': 1, 'face': 1, 'frame': 1, 'hreflang': 1, 'http-equiv': 1, 'lang': 1, - 'language': 1, 'link': 1, 'media': 1, 'method': 1, 'multiple': 1, 'nohref': 1, - 'noresize': 1, 'noshade': 1, 'nowrap': 1, 'readonly': 1, 'rel': 1, 'rev': 1, - 'rules': 1, 'scope': 1, 'scrolling': 1, 'selected': 1, 'shape': 1, 'target': 1, - 'text': 1, 'type': 1, 'valign': 1, 'valuetype': 1, 'vlink': 1 - }, - - /*-------------------------- REGULAR EXPRESSIONS ---------------------------*/ - - // placeholder to add functionalities - Selectors = { - // as a simple example this will check - // for chars not in standard ascii table - // - // 'mySpecialSelector': { - // 'Expression': /\u0080-\uffff/, - // 'Callback': mySelectorCallback - // } - // - // 'mySelectorCallback' will be invoked - // only after passing all other standard - // checks and only if none of them worked - }, - - // attribute operators - Operators = { - '=': "n=='%m'", - '^=': "n.indexOf('%m')==0", - '*=': "n.indexOf('%m')>-1", - '|=': "(n+'-').indexOf('%m-')==0", - '~=': "(' '+n+' ').indexOf(' %m ')>-1", - '$=': "n.substr(n.length-'%m'.length)=='%m'" - }, - - /*------------------------------ UTIL METHODS ------------------------------*/ - - // concat elements to data - concatList = - function(data, elements) { - var i = -1, element; - if (!data.length && Array.slice) - return Array.slice(elements); - while ((element = elements[++i])) - data[data.length] = element; - return data; - }, - - // concat elements to data and callback - concatCall = - function(data, elements, callback) { - var i = -1, element; - while ((element = elements[++i])) { - if (false === callback(data[data.length] = element)) { break; } - } - return data; - }, - - // change context specific variables - switchContext = - function(from, force) { - var div, oldDoc = doc; - // save passed context - lastContext = from; - // set new context document - doc = from.ownerDocument || from; - if (force || oldDoc !== doc) { - // set document root - root = doc.documentElement; - // set host environment flags - XML_DOCUMENT = doc.createElement('DiV').nodeName == 'DiV'; - - // In quirks mode css class names are case insensitive. - // In standards mode they are case sensitive. See docs: - // https://developer.mozilla.org/en/Mozilla_Quirks_Mode_Behavior - // http://www.whatwg.org/specs/web-apps/current-work/#selectors - QUIRKS_MODE = !XML_DOCUMENT && - typeof doc.compatMode == 'string' ? - doc.compatMode.indexOf('CSS') < 0 : - (function() { - var style = doc.createElement('div').style; - return style && (style.width = 1) && style.width == '1px'; - })(); - - div = doc.createElement('div'); - div.appendChild(doc.createElement('p')).setAttribute('class', 'xXx'); - div.appendChild(doc.createElement('p')).setAttribute('class', 'xxx'); - - // GEBCN buggy in quirks mode, match count is: - // Firefox 3.0+ [xxx = 1, xXx = 1] - // Opera 10.63+ [xxx = 0, xXx = 2] - BUGGY_QUIRKS_GEBCN = - !XML_DOCUMENT && NATIVE_GEBCN && QUIRKS_MODE && - (div.getElementsByClassName('xxx').length != 2 || - div.getElementsByClassName('xXx').length != 2); - - // QSAPI buggy in quirks mode, match count is: - // At least Chrome 4+, Firefox 3.5+, Opera 10.x+, Safari 4+ [xxx = 1, xXx = 2] - // Safari 3.2 QSA doesn't work with mixedcase in quirksmode [xxx = 1, xXx = 0] - // https://bugs.webkit.org/show_bug.cgi?id=19047 - // must test the attribute selector '[class~=xxx]' - // before '.xXx' or the bug may not present itself - BUGGY_QUIRKS_QSAPI = - !XML_DOCUMENT && NATIVE_QSAPI && QUIRKS_MODE && - (div.querySelectorAll('[class~=xxx]').length != 2 || - div.querySelectorAll('.xXx').length != 2); - - Config.CACHING && Dom.setCache(true, doc); - } - }, - - // convert single codepoint to UTF-16 encoding - codePointToUTF16 = - function(codePoint) { - // out of range, use replacement character - if (codePoint < 1 || codePoint > 0x10ffff || - (codePoint > 0xd7ff && codePoint < 0xe000)) { - return '\\ufffd'; - } - // javascript strings are UTF-16 encoded - if (codePoint < 0x10000) { - var lowHex = '000' + codePoint.toString(16); - return '\\u' + lowHex.substr(lowHex.length - 4); - } - // supplementary high + low surrogates - return '\\u' + (((codePoint - 0x10000) >> 0x0a) + 0xd800).toString(16) + - '\\u' + (((codePoint - 0x10000) % 0x400) + 0xdc00).toString(16); - }, - - // convert single codepoint to string - stringFromCodePoint = - function(codePoint) { - // out of range, use replacement character - if (codePoint < 1 || codePoint > 0x10ffff || - (codePoint > 0xd7ff && codePoint < 0xe000)) { - return '\ufffd'; - } - if (codePoint < 0x10000) { - return String.fromCharCode(codePoint); - } - return String.fromCodePoint ? - String.fromCodePoint(codePoint) : - String.fromCharCode( - ((codePoint - 0x10000) >> 0x0a) + 0xd800, - ((codePoint - 0x10000) % 0x400) + 0xdc00); - }, - - // convert escape sequence in a CSS string or identifier - // to javascript string with javascript escape sequences - convertEscapes = - function(str) { - return str.replace(reEscapedChars, - function(substring, p1, p2) { - // unescaped " or ' - return p2 ? '\\' + p2 : - // javascript strings are UTF-16 encoded - (/^[0-9a-fA-F]/).test(p1) ? codePointToUTF16(parseInt(p1, 16)) : - // \' \" - (/^[\\\x22\x27]/).test(p1) ? substring : - // \g \h \. \# etc - p1; - } - ); - }, - - // convert escape sequence in a CSS string or identifier - // to javascript string with characters representations - unescapeIdentifier = - function(str) { - return str.replace(reEscapedChars, - function(substring, p1, p2) { - // unescaped " or ' - return p2 ? p2 : - // javascript strings are UTF-16 encoded - (/^[0-9a-fA-F]/).test(p1) ? stringFromCodePoint(parseInt(p1, 16)) : - // \' \" - (/^[\\\x22\x27]/).test(p1) ? substring : - // \g \h \. \# etc - p1; - } - ); - }, - - /*------------------------------ DOM METHODS -------------------------------*/ - - // element by id (raw) - // @return reference or null - byIdRaw = - function(id, elements) { - var i = -1, element; - while ((element = elements[++i])) { - if (element.getAttribute('id') == id) { - break; - } - } - return element || null; - }, - - // element by id - // @return reference or null - _byId = !BUGGY_GEBID ? - function(id, from) { - id = (/\\/).test(id) ? unescapeIdentifier(id) : id; - return from.getElementById && from.getElementById(id) || - byIdRaw(id, from.getElementsByTagName('*')); - } : - function(id, from) { - var element = null; - id = (/\\/).test(id) ? unescapeIdentifier(id) : id; - if (XML_DOCUMENT || from.nodeType != 9) { - return byIdRaw(id, from.getElementsByTagName('*')); - } - if ((element = from.getElementById(id)) && - element.name == id && from.getElementsByName) { - return byIdRaw(id, from.getElementsByName(id)); - } - return element; - }, - - // publicly exposed byId - // @return reference or null - byId = - function(id, from) { - from || (from = doc); - if (lastContext !== from) { switchContext(from); } - return _byId(id, from); - }, - - // elements by tag (raw) - // @return array - byTagRaw = - function(tag, from) { - var any = tag == '*', element = from, elements = [ ], next = element.firstChild; - any || (tag = tag.toUpperCase()); - while ((element = next)) { - if (element.tagName > '@' && (any || element.tagName.toUpperCase() == tag)) { - elements[elements.length] = element; - } - if ((next = element.firstChild || element.nextSibling)) continue; - while (!next && (element = element.parentNode) && element !== from) { - next = element.nextSibling; - } - } - return elements; - }, - - // elements by tag - // @return array - _byTag = !BUGGY_GEBTN && NATIVE_SLICE_PROTO ? - function(tag, from) { - return XML_DOCUMENT || from.nodeType == 11 ? byTagRaw(tag, from) : - slice.call(from.getElementsByTagName(tag), 0); - } : - function(tag, from) { - var i = -1, j = i, data = [ ], element, - elements = XML_DOCUMENT || from.nodeType == 11 ? - byTagRaw(tag, from) : from.getElementsByTagName(tag); - if (tag == '*') { - while ((element = elements[++i])) { - if (element.nodeName > '@') { - data[++j] = element; - } - } - } else { - while ((element = elements[++i])) { - data[i] = element; - } - } - return data; - }, - - // publicly exposed byTag - // @return array - byTag = - function(tag, from) { - from || (from = doc); - if (lastContext !== from) { switchContext(from); } - return _byTag(tag, from); - }, - - // publicly exposed byName - // @return array - byName = - function(name, from) { - return select('[name="' + name.replace(/\\([^\\]{1})/g, '$1') + '"]', from); - }, - - // elements by class (raw) - // @return array - byClassRaw = - function(name, from) { - var i = -1, j = i, data = [ ], element, elements = _byTag('*', from), n; - name = ' ' + (QUIRKS_MODE ? name.toLowerCase() : name) + ' '; - while ((element = elements[++i])) { - n = XML_DOCUMENT ? element.getAttribute('class') : element.className; - if (n && n.length && (' ' + (QUIRKS_MODE ? n.toLowerCase() : n). - replace(reWhiteSpace, ' ') + ' ').indexOf(name) > -1) { - data[++j] = element; - } - } - return data; - }, - - // elements by class - // @return array - _byClass = - function(name, from) { - name = QUIRKS_MODE ? name.toLowerCase() : name; - name = (/\\/).test(name) ? unescapeIdentifier(name) : name; - return (BUGGY_GEBCN || BUGGY_QUIRKS_GEBCN || XML_DOCUMENT || !from.getElementsByClassName) ? - byClassRaw(name, from) : slice.call(from.getElementsByClassName(name)); - }, - - // publicly exposed byClass - // @return array - byClass = - function(name, from) { - from || (from = doc); - if (lastContext !== from) { switchContext(from); } - return _byClass(name, from); - }, - - // check element is descendant of container - // @return boolean - contains = 'compareDocumentPosition' in root ? - function(container, element) { - return (container.compareDocumentPosition(element) & 16) == 16; - } : 'contains' in root ? - function(container, element) { - return container !== element && container.contains(element); - } : - function(container, element) { - while ((element = element.parentNode)) { - if (element === container) return true; - } - return false; - }, - - // attribute value - // @return string - getAttribute = !BUGGY_GET_ATTRIBUTE && !IE_LT_9 ? - function(node, attribute) { - return node.getAttribute(attribute); - } : - function(node, attribute) { - attribute = attribute.toLowerCase(); - if (typeof node[attribute] == 'object') { - return node.attributes[attribute] && - node.attributes[attribute].value; - } - return ( - // 'type' can only be read by using native getAttribute - attribute == 'type' ? node.getAttribute(attribute) : - // specific URI data attributes (parameter 2 to fix IE bug) - ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) : - // boolean attributes should return name instead of true/false - ATTR_BOOLEAN[attribute] ? node.getAttribute(attribute) ? attribute : 'false' : - (node = node.getAttributeNode(attribute)) && node.value); - }, - - // attribute presence - // @return boolean - hasAttribute = !BUGGY_HAS_ATTRIBUTE && !IE_LT_9 ? - function(node, attribute) { - return XML_DOCUMENT ? - !!node.getAttribute(attribute) : - node.hasAttribute(attribute); - } : - function(node, attribute) { - // read the node attribute object - var obj = node.getAttributeNode(attribute = attribute.toLowerCase()); - return ATTR_DEFAULT[attribute] && attribute != 'value' ? - node[ATTR_DEFAULT[attribute]] : obj && obj.specified; - }, - - // check node emptyness - // @return boolean - isEmpty = - function(node) { - node = node.firstChild; - while (node) { - if (node.nodeType == 3 || node.nodeName > '@') return false; - node = node.nextSibling; - } - return true; - }, - - // check if element matches the :link pseudo - // @return boolean - isLink = - function(element) { - return hasAttribute(element,'href') && LINK_NODES[element.nodeName]; - }, - - // child position by nodeType - // @return number - nthElement = - function(element, last) { - var count = 1, succ = last ? 'nextSibling' : 'previousSibling'; - while ((element = element[succ])) { - if (element.nodeName > '@') ++count; - } - return count; - }, - - // child position by nodeName - // @return number - nthOfType = - function(element, last) { - var count = 1, succ = last ? 'nextSibling' : 'previousSibling', type = element.nodeName; - while ((element = element[succ])) { - if (element.nodeName == type) ++count; - } - return count; - }, - - /*------------------------------- DEBUGGING --------------------------------*/ - - // get/set (string/object) working modes - configure = - function(option) { - if (typeof option == 'string') { return !!Config[option]; } - if (typeof option != 'object') { return Config; } - for (var i in option) { - Config[i] = !!option[i]; - if (i == 'SIMPLENOT') { - matchContexts = { }; - matchResolvers = { }; - selectContexts = { }; - selectResolvers = { }; - if (!Config[i]) { Config['USE_QSAPI'] = false; } - } else if (i == 'USE_QSAPI') { - Config[i] = !!option[i] && NATIVE_QSAPI; - } - } - setIdentifierSyntax(); - reValidator = RegExp(Config.SIMPLENOT ? - standardValidator : extendedValidator); - return true; - }, - - // control user notifications - emit = - function(message) { - if (Config.VERBOSITY) { throw Error(message); } - if (Config.LOGERRORS && console && console.log) { - console.log(message); - } - }, - - Config = { - - // true to enable caching of result sets, false to disable - CACHING: false, - - // true to allow CSS escaped identifiers, false to disallow - ESCAPECHR: true, - - // true to allow identifiers containing non-ASCII (utf-8) chars - NON_ASCII: true, - - // switch syntax RE, true to use Level 3, false to use Level 2 - SELECTOR3: true, - - // true to allow identifiers containing Unicode (utf-16) chars - UNICODE16: true, - - // by default do not add missing left/right context - // to mangled selector strings like "+div" or "ul>" - // callable Dom.shortcuts method has to be available - SHORTCUTS: false, - - // true to disable complex selectors nested in - // ':not()' pseudo-classes as for specifications - SIMPLENOT: true, - - // true to match lowercase tag names of SVG elements in HTML - SVG_LCASE: false, - - // strict QSA match all non-unique IDs (false) - // speed & libs compat match unique ID (true) - UNIQUE_ID: true, - - // true to follow HTML5 specs handling of ":checked" - // pseudo-class and similar UI states (indeterminate) - USE_HTML5: true, - - // true to use browsers native Query Selector API if available - USE_QSAPI: NATIVE_QSAPI, - - // true to throw exceptions, false to skip throwing exceptions - VERBOSITY: true, - - // true to print console errors or warnings, false to mute them - LOGERRORS: true - - }, - - /*---------------------------- COMPILER METHODS ----------------------------*/ - - // init REs and context - initialize = - function(doc) { - setIdentifierSyntax(); - switchContext(doc, true); - }, - - // set/reset default identifier syntax - // based on user configuration options - // rebuild the validator and other REs - setIdentifierSyntax = - function() { - - var syntax = '', start = Config['SELECTOR3'] ? '-{2}|' : ''; - - Config['NON_ASCII'] && (syntax += '|' + non_asc_chr); - Config['UNICODE16'] && (syntax += '|' + unicode_chr); - Config['ESCAPECHR'] && (syntax += '|' + escaped_chr); - - syntax += (Config['UNICODE16'] || Config['ESCAPECHR']) ? '' : '|' + any_esc_chr; - - identifier = '-?(?:' + start + alphalodash + syntax + ')(?:-|[0-9]|' + alphalodash + syntax + ')*'; - - // build attribute string - attrcheck = '(' + quotedvalue + '|' + identifier + ')'; - attributes = whitespace + '*(' + identifier + '(?::' + identifier + ')?)' + - whitespace + '*(?:' + operators + whitespace + '*' + attrcheck + ')?' + whitespace + '*' + '(i)?' + whitespace + '*'; - attrmatcher = attributes.replace(attrcheck, '([\\x22\\x27]*)((?:\\\\?.)*?)\\3'); - - // build pseudoclass string - pseudoclass = '((?:' + - // an+b parameters or quoted string - pseudoparms + '|' + quotedvalue + '|' + - // id, class, pseudo-class selector - prefixes + identifier + '|' + - // nested HTML attribute selector - '\\[' + attributes + '\\]|' + - // nested pseudo-class selector - '\\(.+\\)|' + whitespace + '*|' + - // nested pseudos/separators - ',)+)'; - - // CSS3: syntax scanner and - // one pass validation only - // using regular expression - standardValidator = - // discard start - '(?=[\\x20\\t\\n\\r\\f]*[^>+~(){}<>])' + - // open match group - '(' + - //universal selector - '\\*' + - // id/class/tag/pseudo-class identifier - '|(?:' + prefixes + identifier + ')' + - // combinator selector - '|' + combinators + - // HTML attribute selector - '|\\[' + attributes + '\\]' + - // pseudo-classes parameters - '|\\(' + pseudoclass + '\\)' + - // dom properties selector (extension) - '|\\{' + extensions + '\\}' + - // selector group separator (comma) - '|(?:,|' + whitespace + '*)' + - // close match group - ')+'; - - // only allow simple selectors nested in ':not()' pseudo-classes - reSimpleNot = RegExp('^(' + - '(?!:not)' + - '(' + prefixes + identifier + - '|\\([^()]*\\))+' + - '|\\[' + attributes + '\\]' + - ')$'); - - // split last, right most, selector group token - reSplitToken = RegExp('(' + - prefixes + identifier + '|' + - '\\[' + attributes + '\\]|' + - '\\(' + pseudoclass + '\\)|' + - '\\\\.|[^\\x20\\t\\n\\r\\f>+~])+', 'g'); - - reOptimizeSelector = RegExp(identifier + '|^$'); - - reSimpleSelector = RegExp( - BUGGY_GEBTN && BUGGY_GEBCN || OPERA ? - '^#?' + identifier + '$' : BUGGY_GEBTN ? - '^[.#]?' + identifier + '$' : BUGGY_GEBCN ? - '^(?:\\*|#' + identifier + ')$' : - '^(?:\\*|[.#]?' + identifier + ')$'); - - // matches class selectors - reClass = RegExp('(?:\\[[\\x20\\t\\n\\r\\f]*class\\b|\\.' + identifier + ')'); - - Optimize = { - ID: RegExp('^\\*?#(' + identifier + ')|' + skip_groups), - TAG: RegExp('^(' + identifier + ')|' + skip_groups), - CLASS: RegExp('^\\.(' + identifier + '$)|' + skip_groups) - }; - - Patterns.id = RegExp('^#(' + identifier + ')(.*)'); - Patterns.tagName = RegExp('^(' + identifier + ')(.*)'); - Patterns.className = RegExp('^\\.(' + identifier + ')(.*)'); - Patterns.attribute = RegExp('^\\[' + attrmatcher + '\\](.*)'); - - Tokens.identifier = identifier; - Tokens.attributes = attributes; - - // validator for complex selectors in ':not()' pseudo-classes - extendedValidator = standardValidator.replace(pseudoclass, '.*'); - - // validator for standard selectors as default - reValidator = RegExp(standardValidator); - }, - - // code string reused to build compiled functions - ACCEPT_NODE = 'r[r.length]=c[k];if(f&&false===f(c[k]))break main;else continue main;', - - // compile a comma separated group of selector - // @mode boolean true for select, false for match - // return a compiled function - compile = - function(selector, source, mode) { - - var parts = typeof selector == 'string' ? selector.match(reSplitGroup) : selector; - - // ensures that source is a string - typeof source == 'string' || (source = ''); - - if (parts.length == 1) { - source += compileSelector(parts[0], mode ? ACCEPT_NODE : 'f&&f(k);return true;', mode); - } else { - // for each selector in the group - var i = -1, seen = { }, token; - while ((token = parts[++i])) { - token = token.replace(reTrimSpaces, ''); - // avoid repeating the same token - // in comma separated group (p, p) - if (!seen[token] && (seen[token] = true)) { - source += compileSelector(token, mode ? ACCEPT_NODE : 'f&&f(k);return true;', mode); - } - } - } - - if (mode) { - // for select method - return Function('c,s,d,h,g,f', - 'var N,n,x=0,k=-1,e,r=[];main:while((e=c[++k])){' + source + '}return r;'); - } else { - // for match method - return Function('e,s,d,h,g,f', - 'var N,n,x=0,k=e;' + source + 'return false;'); - } - }, - - // compile a CSS3 string selector into ad-hoc javascript matching function - // @return string (to be compiled) - compileSelector = - function(selector, source, mode) { - - var a, b, n, k = 0, expr, match, result, status, test, type; - - while (selector) { - - k++; - - // *** Universal selector - // * match all (empty block, do not remove) - if ((match = selector.match(Patterns.universal))) { - // do nothing, handled in the compiler where - // BUGGY_GEBTN return comment nodes (ex: IE) - expr = ''; - } - - // *** ID selector - // #Foo Id case sensitive - else if ((match = selector.match(Patterns.id))) { - // document can contain conflicting elements (id/name) - // prototype selector unit need this method to recover bad HTML forms - match[1] = (/\\/).test(match[1]) ? convertEscapes(match[1]) : match[1]; - source = 'if(' + (XML_DOCUMENT ? - 's.getAttribute(e,"id")' : - '(e.submit?s.getAttribute(e,"id"):e.id)') + - '=="' + match[1] + '"' + - '){' + source + '}'; - } - - // *** Type selector - // Foo Tag (case insensitive) - else if ((match = selector.match(Patterns.tagName))) { - // both tagName and nodeName properties may be upper/lower case - // depending on their creation NAMESPACE in createElementNS() - test = Config.SVG_LCASE ? '||e.nodeName=="' + match[1].toLowerCase() + '"' : ''; - source = 'if(e.nodeName' + (XML_DOCUMENT ? - '=="' + match[1] + '"' : '.toUpperCase()' + - '=="' + match[1].toUpperCase() + '"' + test) + - '){' + source + '}'; - } - - // *** Class selector - // .Foo Class (case sensitive) - else if ((match = selector.match(Patterns.className))) { - // W3C CSS3 specs: element whose "class" attribute has been assigned a - // list of whitespace-separated values, see section 6.4 Class selectors - // and notes at the bottom; explicitly non-normative in this specification. - match[1] = (/\\/).test(match[1]) ? convertEscapes(match[1]) : match[1]; - match[1] = QUIRKS_MODE ? match[1].toLowerCase() : match[1]; - source = 'if((n=' + (XML_DOCUMENT ? - 's.getAttribute(e,"class")' : 'e.className') + - ')&&n.length&&(" "+' + (QUIRKS_MODE ? 'n.toLowerCase()' : 'n') + - '.replace(/' + whitespace + '+/g," ")+" ").indexOf(" ' + match[1] + ' ")>-1' + - '){' + source + '}'; - } - - // *** Attribute selector - // [attr] [attr=value] [attr="value"] [attr='value'] and !=, *=, ~=, |=, ^=, $= - // case sensitivity is treated differently depending on the document type (see map) - else if ((match = selector.match(Patterns.attribute))) { - - // xml namespaced attribute ? - expr = match[1].split(':'); - expr = expr.length == 2 ? expr[1] : expr[0] + ''; - - if (match[2] && !Operators[match[2]]) { - emit('Unsupported operator in attribute selectors "' + selector + '"'); - return ''; - } - - test = 'false'; - - // replace Operators parameter if needed - if (match[2] && match[4] && (test = Operators[match[2]])) { - match[4] = (/\\/).test(match[4]) ? convertEscapes(match[4]) : match[4]; - // case treatment depends on document type - type = match[5] == 'i' || HTML_TABLE[expr.toLowerCase()]; - test = test.replace(/\%m/g, type ? match[4].toLowerCase() : match[4]); - } else if (match[2] == '!=' || match[2] == '=') { - test = 'n' + match[2] + '=""'; - } - - source = 'if(n=s.hasAttribute(e,"' + match[1] + '")){' + - (match[2] ? 'n=s.getAttribute(e,"' + match[1] + '")' : '') + - (type && match[2] ? '.toLowerCase();' : ';') + - 'if(' + (match[2] ? test : 'n') + '){' + source + '}}'; - - } - - // *** Adjacent sibling combinator - // E + F (F adiacent sibling of E) - else if ((match = selector.match(Patterns.adjacent))) { - source = NATIVE_TRAVERSAL_API ? - 'var N' + k + '=e;if((e=e.previousElementSibling)){' + source + '}e=N' + k + ';' : - 'var N' + k + '=e;while((e=e.previousSibling)){if(e.nodeType==1){' + source + 'break;}}e=N' + k + ';'; - } - - // *** General sibling combinator - // E ~ F (F relative sibling of E) - else if ((match = selector.match(Patterns.relative))) { - source = NATIVE_TRAVERSAL_API ? - 'var N' + k + '=e;while((e=e.previousElementSibling)){' + source + '}e=N' + k + ';' : - 'var N' + k + '=e;while((e=e.previousSibling)){if(e.nodeType==1){' + source + '}}e=N' + k + ';'; - } - - // *** Child combinator - // E > F (F children of E) - else if ((match = selector.match(Patterns.children))) { - source = 'var N' + k + '=e;if((e=e.parentNode)&&e.nodeType==1){' + source + '}e=N' + k + ';'; - } - - // *** Descendant combinator - // E F (E ancestor of F) - else if ((match = selector.match(Patterns.ancestor))) { - source = 'var N' + k + '=e;while((e=e.parentNode)&&e.nodeType==1){' + source + '}e=N' + k + ';'; - } - - // *** Structural pseudo-classes - // :root, :empty, - // :first-child, :last-child, :only-child, - // :first-of-type, :last-of-type, :only-of-type, - // :nth-child(), :nth-last-child(), :nth-of-type(), :nth-last-of-type() - else if ((match = selector.match(Patterns.spseudos)) && match[1]) { - - switch (match[1]) { - case 'root': - // element root of the document - if (match[3]) { - source = 'if(e===h||s.contains(h,e)){' + source + '}'; - } else { - source = 'if(e===h){' + source + '}'; - } - break; - - case 'empty': - // element that has no children - source = 'if(s.isEmpty(e)){' + source + '}'; - break; - - default: - if (match[1] && match[2]) { - if (match[2] == 'n') { - source = 'if(e!==h){' + source + '}'; - break; - } else if (match[2] == 'even') { - a = 2; - b = 0; - } else if (match[2] == 'odd') { - a = 2; - b = 1; - } else { - // assumes correct "an+b" format, "b" before "a" to keep "n" values - b = ((n = match[2].match(/(-?\d+)$/)) ? parseInt(n[1], 10) : 0); - a = ((n = match[2].match(/(-?\d*)n/i)) ? parseInt(n[1], 10) : 0); - if (n && n[1] == '-') a = -1; - } - - // build test expression out of structural pseudo (an+b) parameters - // see here: http://www.w3.org/TR/css3-selectors/#nth-child-pseudo - test = a > 1 ? - (/last/i.test(match[1])) ? '(n-(' + b + '))%' + a + '==0' : - 'n>=' + b + '&&(n-(' + b + '))%' + a + '==0' : a < -1 ? - (/last/i.test(match[1])) ? '(n-(' + b + '))%' + a + '==0' : - 'n<=' + b + '&&(n-(' + b + '))%' + a + '==0' : a === 0 ? - 'n==' + b : a == -1 ? 'n<=' + b : 'n>=' + b; - - // 4 cases: 1 (nth) x 4 (child, of-type, last-child, last-of-type) - source = - 'if(e!==h){' + - 'n=s[' + (/-of-type/i.test(match[1]) ? '"nthOfType"' : '"nthElement"') + ']' + - '(e,' + (/last/i.test(match[1]) ? 'true' : 'false') + ');' + - 'if(' + test + '){' + source + '}' + - '}'; - - } else { - // 6 cases: 3 (first, last, only) x 1 (child) x 2 (-of-type) - a = /first/i.test(match[1]) ? 'previous' : 'next'; - n = /only/i.test(match[1]) ? 'previous' : 'next'; - b = /first|last/i.test(match[1]); - - type = /-of-type/i.test(match[1]) ? '&&n.nodeName!=e.nodeName' : '&&n.nodeName<"@"'; - - source = 'if(e!==h){' + - ( 'n=e;while((n=n.' + a + 'Sibling)' + type + ');if(!n){' + (b ? source : - 'n=e;while((n=n.' + n + 'Sibling)' + type + ');if(!n){' + source + '}') + '}' ) + '}'; - } - break; - } - - } - - // *** negation, user action and target pseudo-classes - // *** UI element states and dynamic pseudo-classes - // CSS4 :matches - // CSS3 :not, :checked, :enabled, :disabled, :target - // CSS3 :active, :hover, :focus - // CSS3 :link, :visited - else if ((match = selector.match(Patterns.dpseudos)) && match[1]) { - - switch (match[1].match(/^\w+/)[0]) { - // CSS4 matches pseudo-class - case 'matches': - expr = match[3].replace(reTrimSpaces, ''); - source = 'if(s.match(e, "' + expr.replace(/\x22/g, '\\"') + '",g)){' + source +'}'; - break; - - // CSS3 negation pseudo-class - case 'not': - // compile nested selectors, DO NOT pass the callback parameter - // SIMPLENOT allow disabling complex selectors nested - // in ':not()' pseudo-classes, breaks some test units - expr = match[3].replace(reTrimSpaces, ''); - - if (Config.SIMPLENOT && !reSimpleNot.test(expr)) { - // see above, log error but continue execution - emit('Negation pseudo-class only accepts simple selectors "' + selector + '"'); - return ''; - } else { - if ('compatMode' in doc) { - source = 'if(!' + compile(expr, '', false) + '(e,s,d,h,g)){' + source + '}'; - } else { - source = 'if(!s.match(e, "' + expr.replace(/\x22/g, '\\"') + '",g)){' + source +'}'; - } - } - break; - - // CSS3 UI element states - case 'checked': - // for radio buttons checkboxes (HTML4) and options (HTML5) - source = 'if((typeof e.form!=="undefined"&&(/^(?:radio|checkbox)$/i).test(e.type)&&e.checked)' + - (Config.USE_HTML5 ? '||(/^option$/i.test(e.nodeName)&&(e.selected||e.checked))' : '') + - '){' + source + '}'; - break; - case 'disabled': - // does not consider hidden input fields - source = 'if(((typeof e.form!=="undefined"' + - (Config.USE_HTML5 ? '' : '&&!(/^hidden$/i).test(e.type)') + - ')||s.isLink(e))&&e.disabled===true){' + source + '}'; - break; - case 'enabled': - // does not consider hidden input fields - source = 'if(((typeof e.form!=="undefined"' + - (Config.USE_HTML5 ? '' : '&&!(/^hidden$/i).test(e.type)') + - ')||s.isLink(e))&&e.disabled===false){' + source + '}'; - break; - - // CSS3 lang pseudo-class - case 'lang': - test = ''; - if (match[2]) test = match[2].substr(0, 2) + '-'; - source = 'do{(n=e.lang||"").toLowerCase();' + - 'if((n==""&&h.lang=="' + match[2].toLowerCase() + '")||' + - '(n&&(n=="' + match[2].toLowerCase() + - '"||n.substr(0,3)=="' + test.toLowerCase() + '")))' + - '{' + source + 'break;}}while((e=e.parentNode)&&e!==g);'; - break; - - // CSS3 target pseudo-class - case 'target': - source = 'if(e.id==d.location.hash.slice(1)){' + source + '}'; - break; - - // CSS3 dynamic pseudo-classes - case 'link': - source = 'if(s.isLink(e)&&!e.visited){' + source + '}'; - break; - case 'visited': - source = 'if(s.isLink(e)&&e.visited){' + source + '}'; - break; - - // CSS3 user action pseudo-classes IE & FF3 have native support - // these capabilities may be emulated by some event managers - case 'active': - if (XML_DOCUMENT) break; - source = 'if(e===d.activeElement){' + source + '}'; - break; - case 'hover': - if (XML_DOCUMENT) break; - source = 'if(e===d.hoverElement){' + source + '}'; - break; - case 'focus': - if (XML_DOCUMENT) break; - source = NATIVE_FOCUS ? - 'if(e===d.activeElement&&d.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number")){' + source + '}' : - 'if(e===d.activeElement&&(e.type||e.href)){' + source + '}'; - break; - - // CSS2 selected pseudo-classes, not part of current CSS3 drafts - // the 'selected' property is only available for option elements - case 'selected': - // fix Safari selectedIndex property bug - expr = BUGGY_SELECTED ? '||(n=e.parentNode)&&n.options[n.selectedIndex]===e' : ''; - source = 'if(/^option$/i.test(e.nodeName)&&(e.selected||e.checked' + expr + ')){' + source + '}'; - break; - - default: - break; - } - - } - - else if ((match = selector.match(Patterns.epseudos)) && match[1]) { - source = 'if(!(/1|11/).test(e.nodeType)){' + source + '}'; - } - - else { - - // this is where external extensions are - // invoked if expressions match selectors - expr = false; - status = false; - for (expr in Selectors) { - if ((match = selector.match(Selectors[expr].Expression)) && match[1]) { - result = Selectors[expr].Callback(match, source); - if ('match' in result) { match = result.match; } - source = result.source; - status = result.status; - if (status) { break; } - } - } - - // if an extension fails to parse the selector - // it must return a false boolean in "status" - if (!status) { - // log error but continue execution, don't throw real exceptions - // because blocking following processes maybe is not a good idea - emit('Unknown pseudo-class selector "' + selector + '"'); - return ''; - } - - if (!expr) { - // see above, log error but continue execution - emit('Unknown token in selector "' + selector + '"'); - return ''; - } - - } - - // error if no matches found by the pattern scan - if (!match) { - emit('Invalid syntax in selector "' + selector + '"'); - return ''; - } - - // ensure "match" is not null or empty since - // we do not throw real DOMExceptions above - selector = match && match[match.length - 1]; - } - - return source; - }, - - /*----------------------------- QUERY METHODS ------------------------------*/ - - // match element with selector - // @return boolean - match = - function(element, selector, from, callback) { - - var parts; - - if (!(element && element.nodeType == 1)) { - emit('Invalid element argument'); - return false; - } else if (typeof selector != 'string') { - emit('Invalid selector argument'); - return false; - } else if (from && from.nodeType == 1 && !contains(from, element)) { - return false; - } else if (lastContext !== from) { - // reset context data when it changes - // and ensure context is set to a default - switchContext(from || (from = element.ownerDocument)); - } - - // normalize the selector string, remove [\n\r\f] - // whitespace, replace codepoints 0 with '\ufffd' - // trim non-relevant leading/trailing whitespaces - selector = selector. - replace(reTrimSpaces, ''). - replace(/\x00|\\$/g, '\ufffd'); - - Config.SHORTCUTS && (selector = Dom.shortcuts(selector, element, from)); - - if (lastMatcher != selector) { - // process valid selector strings - if ((parts = selector.match(reValidator)) && parts[0] == selector) { - isSingleMatch = (parts = selector.match(reSplitGroup)).length < 2; - // save passed selector - lastMatcher = selector; - lastPartsMatch = parts; - } else { - emit('The string "' + selector + '", is not a valid CSS selector'); - return false; - } - } else parts = lastPartsMatch; - - // compile matcher resolvers if necessary - if (!matchResolvers[selector] || matchContexts[selector] !== from) { - matchResolvers[selector] = compile(isSingleMatch ? [selector] : parts, '', false); - matchContexts[selector] = from; - } - - return matchResolvers[selector](element, Snapshot, doc, root, from, callback); - }, - - // select only the first element - // matching selector (document ordered) - first = - function(selector, from) { - return select(selector, from, function() { return false; })[0] || null; - }, - - // select elements matching selector - // using new Query Selector API - // or cross-browser client API - // @return array - select = - function(selector, from, callback) { - - var i, changed, element, elements, parts, token, original = selector; - - if (arguments.length === 0) { - emit('Not enough arguments'); - return [ ]; - } else if (typeof selector != 'string') { - return [ ]; - } else if (from && !(/1|9|11/).test(from.nodeType)) { - emit('Invalid or illegal context element'); - return [ ]; - } else if (lastContext !== from) { - // reset context data when it changes - // and ensure context is set to a default - switchContext(from || (from = doc)); - } - - if (Config.CACHING && (elements = Dom.loadResults(original, from, doc, root))) { - return callback ? concatCall([ ], elements, callback) : elements; - } - - // normalize the selector string, remove [\n\r\f] - // whitespace, replace codepoints 0 with '\ufffd' - // trim non-relevant leading/trailing whitespaces - selector = selector. - replace(reTrimSpaces, ''). - replace(/\x00|\\$/g, '\ufffd'); - - if (!OPERA_QSAPI && reSimpleSelector.test(selector)) { - switch (selector.charAt(0)) { - case '#': - if (Config.UNIQUE_ID) { - elements = (element = _byId(selector.slice(1), from)) ? [ element ] : [ ]; - } - break; - case '.': - elements = _byClass(selector.slice(1), from); - break; - default: - elements = _byTag(selector, from); - break; - } - } - - else if (!XML_DOCUMENT && Config.USE_QSAPI && - !(BUGGY_QUIRKS_QSAPI && reClass.test(selector)) && - !RE_BUGGY_QSAPI.test(selector)) { - try { - elements = from.querySelectorAll(selector); - } catch(e) { } - } - - if (elements) { - elements = callback ? concatCall([ ], elements, callback) : - NATIVE_SLICE_PROTO ? slice.call(elements) : concatList([ ], elements); - Config.CACHING && Dom.saveResults(original, from, doc, elements); - return elements; - } - - Config.SHORTCUTS && (selector = Dom.shortcuts(selector, from)); - - if ((changed = lastSelector != selector)) { - // process valid selector strings - if ((parts = selector.match(reValidator)) && parts[0] == selector) { - isSingleSelect = (parts = selector.match(reSplitGroup)).length < 2; - // save passed selector - lastSelector = selector; - lastPartsSelect = parts; - } else { - emit('The string "' + selector + '", is not a valid CSS selector'); - return [ ]; - } - } else parts = lastPartsSelect; - - // commas separators are treated sequentially to maintain order - if (from.nodeType == 11) { - - elements = byTagRaw('*', from); - - } else if (!XML_DOCUMENT && isSingleSelect) { - - if (changed) { - // get right most selector token - parts = selector.match(reSplitToken); - token = parts[parts.length - 1]; - - // only last slice before :not rules - lastSlice = token.split(':not'); - lastSlice = lastSlice[lastSlice.length - 1]; - - // position where token was found - lastPosition = selector.length - token.length; - } - - // ID optimization RTL, to reduce number of elements to visit - if (Config.UNIQUE_ID && lastSlice && (parts = lastSlice.match(Optimize.ID)) && (token = parts[1])) { - if ((element = _byId(token, from))) { - if (match(element, selector)) { - callback && callback(element); - elements = [element]; - } else elements = [ ]; - } - } - - // ID optimization LTR, to reduce selection context searches - else if (Config.UNIQUE_ID && (parts = selector.match(Optimize.ID)) && (token = parts[1])) { - if ((element = _byId(token, doc))) { - if ('#' + token == selector) { - callback && callback(element); - elements = [element]; - } else if (/[>+~]/.test(selector)) { - from = element.parentNode; - } else { - from = element; - } - } else elements = [ ]; - } - - if (elements) { - Config.CACHING && Dom.saveResults(original, from, doc, elements); - return elements; - } - - if (!NATIVE_GEBCN && lastSlice && (parts = lastSlice.match(Optimize.TAG)) && (token = parts[1])) { - if ((elements = _byTag(token, from)).length === 0) { return [ ]; } - selector = selector.slice(0, lastPosition) + selector.slice(lastPosition).replace(token, '*'); - } - - else if (lastSlice && (parts = lastSlice.match(Optimize.CLASS)) && (token = parts[1])) { - if ((elements = _byClass(token, from)).length === 0) { return [ ]; } - selector = selector.slice(0, lastPosition) + selector.slice(lastPosition).replace('.' + token, - reOptimizeSelector.test(selector.charAt(selector.indexOf(token) - 1)) ? '' : '*'); - } - - else if ((parts = selector.match(Optimize.CLASS)) && (token = parts[1])) { - if ((elements = _byClass(token, from)).length === 0) { return [ ]; } - for (i = 0, els = [ ]; elements.length > i; ++i) { - els = concatList(els, elements[i].getElementsByTagName('*')); - } - elements = els; - selector = selector.slice(0, lastPosition) + selector.slice(lastPosition).replace('.' + token, - reOptimizeSelector.test(selector.charAt(selector.indexOf(token) - 1)) ? '' : '*'); - } - - else if (NATIVE_GEBCN && lastSlice && (parts = lastSlice.match(Optimize.TAG)) && (token = parts[1])) { - if ((elements = _byTag(token, from)).length === 0) { return [ ]; } - selector = selector.slice(0, lastPosition) + selector.slice(lastPosition).replace(token, '*'); - } - - } - - if (!elements) { - if (IE_LT_9) { - elements = /^(?:applet|object)$/i.test(from.nodeName) ? from.children : byTagRaw('*', from); - } else { - elements = from.getElementsByTagName('*'); - } - } - // end of prefiltering pass - - // compile selector resolver if necessary - if (!selectResolvers[selector] || selectContexts[selector] !== from) { - selectResolvers[selector] = compile(isSingleSelect ? [selector] : parts, '', true); - selectContexts[selector] = from; - } - - elements = selectResolvers[selector](elements, Snapshot, doc, root, from, callback); - - Config.CACHING && Dom.saveResults(original, from, doc, elements); - - return elements; - }, - - /*-------------------------------- STORAGE ---------------------------------*/ - - // empty function handler - FN = function(x) { return x; }, - - // compiled match functions returning booleans - matchContexts = { }, - matchResolvers = { }, - - // compiled select functions returning collections - selectContexts = { }, - selectResolvers = { }, - - // used to pass methods to compiled functions - Snapshot = { - - // element indexing methods - nthElement: nthElement, - nthOfType: nthOfType, - - // element inspection methods - getAttribute: getAttribute, - hasAttribute: hasAttribute, - - // element selection methods - byClass: _byClass, - byName: byName, - byTag: _byTag, - byId: _byId, - - // helper/check methods - contains: contains, - isEmpty: isEmpty, - isLink: isLink, - - // selection/matching - select: select, - match: match - }, - - /*------------------------------- PUBLIC API -------------------------------*/ - - // code referenced by extensions - Dom = { - - ACCEPT_NODE: ACCEPT_NODE, - - // retrieve element by id attr - byId: byId, - - // retrieve elements by tag name - byTag: byTag, - - // retrieve elements by name attr - byName: byName, - - // retrieve elements by class name - byClass: byClass, - - // read the value of the attribute - // as was in the original HTML code - getAttribute: getAttribute, - - // check for the attribute presence - // as was in the original HTML code - hasAttribute: hasAttribute, - - // element match selector, return boolean true/false - match: match, - - // first element match only, return element or null - first: first, - - // elements matching selector, starting from element - select: select, - - // compile selector into ad-hoc javascript resolver - compile: compile, - - // check that two elements are ancestor/descendant - contains: contains, - - // handle selector engine configuration settings - configure: configure, - - // initialize caching for each document - setCache: FN, - - // load previously collected result set - loadResults: FN, - - // save previously collected result set - saveResults: FN, - - // handle missing context in selector strings - shortcuts: FN, - - // log resolvers errors/warnings - emit: emit, - - // options enabing specific engine functionality - Config: Config, - - // pass methods references to compiled resolvers - Snapshot: Snapshot, - - // operators descriptor - // for attribute operators extensions - Operators: Operators, - - // selectors descriptor - // for pseudo-class selectors extensions - Selectors: Selectors, - - // export validators REs - Tokens: Tokens, - - // export version string - Version: version, - - // add or overwrite user defined operators - registerOperator: - function(symbol, resolver) { - Operators[symbol] || (Operators[symbol] = resolver); - }, - - // add selector patterns for user defined callbacks - registerSelector: - function(name, rexp, func) { - Selectors[name] || (Selectors[name] = { - Expression: rexp, - Callback: func - }); - } - - }; - - /*---------------------------------- INIT ----------------------------------*/ - - // init context specific variables - initialize(doc); - - return Dom; -}); diff --git a/node_modules/nwsapi/LICENSE b/node_modules/nwsapi/LICENSE new file mode 100644 index 0000000..43327e7 --- /dev/null +++ b/node_modules/nwsapi/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2007-2019 Diego Perini (http://www.iport.it/) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/nwsapi/README.md b/node_modules/nwsapi/README.md new file mode 100644 index 0000000..f74b87d --- /dev/null +++ b/node_modules/nwsapi/README.md @@ -0,0 +1,132 @@ +# [NWSAPI](http://dperini.github.io/nwsapi/) + +Fast CSS Selectors API Engine + +![](https://img.shields.io/npm/v/nwsapi.svg?colorB=orange&style=flat) ![](https://img.shields.io/github/tag/dperini/nwsapi.svg?style=flat) ![](https://img.shields.io/npm/dw/nwsapi.svg?style=flat) ![](https://img.shields.io/github/issues/dperini/nwsapi.svg?style=flat) + +NWSAPI is the development progress of [NWMATCHER](https://github.com/dperini/nwmatcher) aiming at [Selectors Level 4](https://www.w3.org/TR/selectors-4/) conformance. It has been completely reworked to be easily extended and maintained. It is a right-to-left selector parser and compiler written in pure Javascript with no external dependencies. It was initially thought as a cross browser library to improve event delegation and web page scraping in various frameworks but it has become a popular replacement of the native CSS selection and matching functionality in newer browsers and headless environments. + +It uses [regular expressions](https://en.wikipedia.org/wiki/Regular_expression) to parse CSS selector strings and [metaprogramming](https://en.wikipedia.org/wiki/Metaprogramming) to transforms these selector strings into Javascript function resolvers. This process is executed only once for each selector string allowing memoization of the function resolvers and achieving unmatched performances. + +## Installation + +To include NWSAPI in a standard web page: + +```html + +``` + +To include NWSAPI in a standard web page and automatically replace the native QSA: + +```html + +``` + +To use NWSAPI with Node.js: + +``` +$ npm install nwsapi +``` + +NWSAPI currently supports browsers (as a global, `NW.Dom`) and headless environments (as a CommonJS module). + + +## Supported Selectors + +Here is a list of all the CSS2/CSS3/CSS4 [Supported selectors](https://github.com/dperini/nwsapi/wiki/CSS-supported-selectors). + + +## Features and Compliance + +You can read more about NWSAPI [features and compliance](https://github.com/dperini/nwsapi/wiki/Features-and-compliance) on the wiki. + + +## API + +### DOM Selection + +#### `ancestor( selector, context, callback )` + +Returns a reference to the nearest ancestor element matching `selector`, starting at `context`. Returns `null` if no element is found. If `callback` is provided, it is invoked for the matched element. + +#### `first( selector, context, callback )` + +Returns a reference to the first element matching `selector`, starting at `context`. Returns `null` if no element matches. If `callback` is provided, it is invoked for the matched element. + +#### `match( selector, element, callback )` + +Returns `true` if `element` matches `selector`, starting at `context`; returns `false` otherwise. If `callback` is provided, it is invoked for the matched element. + +#### `select( selector, context, callback )` + +Returns an array of all the elements matching `selector`, starting at `context`; returns empty `Array` otherwise. If `callback` is provided, it is invoked for each matching element. + + +### DOM Helpers + +#### `byId( id, from )` + +Returns a reference to the first element with ID `id`, optionally filtered to descendants of the element `from`. + +#### `byTag( tag, from )` + +Returns an array of elements having the specified tag name `tag`, optionally filtered to descendants of the element `from`. + +#### `byClass( class, from )` + +Returns an array of elements having the specified class name `class`, optionally filtered to descendants of the element `from`. + + +### Engine Configuration + +#### `configure( options )` + +The following is the list of currently available configuration options, their default values and descriptions, they are boolean flags that can be set to `true` or `false`: + +* `IDS_DUPES`: true - true to allow using multiple elements having the same id, false to disallow +* `LIVECACHE`: true - true for caching both results and resolvers, false for caching only resolvers +* `MIXEDCASE`: true - true to match tag names case insensitive, false to match using case sensitive +* `LOGERRORS`: true - true to print errors and warnings to the console, false to mute both of them + + +### Examples on extending the basic functionalities + +#### `configure( { : [ true | false ] } )` + +Disable logging errors/warnings to console, disallow duplicate ids. Example: + +```js +NW.Dom.configure( { LOGERRORS: false, IDS_DUPES: false } ); +``` +NOTE: NW.Dom.configure() without parameters return the current configuration. + +#### `registerCombinator( symbol, resolver )` + +Registers a new symbol and its matching resolver in the combinators table. Example: + +```js +NW.Dom.registerCombinator( '^', 'e.parentElement' ); +``` + +#### `registerOperator( symbol, resolver )` + +Registers a new symbol and its matching resolver in the attribute operators table. Example: + +```js +NW.Dom.registerOperator( '!=', { p1: '^', p2: '$', p3: 'false' } ); +``` + +#### `registerSelector( name, rexp, func )` + +Registers a new selector, the matching RE and the resolver function, in the selectors table. Example: + +```js +NW.Dom.registerSelector('Controls', /^\:(control)(.*)/i, + (function(global) { + return function(match, source, mode, callback) { + var status = true; + source = 'if(/^(button|input|select|textarea)/i.test(e.nodeName)){' + source + '}'; + return { 'source': source, 'status': status }; + }; + })(this)); +``` diff --git a/node_modules/acorn/dist/.keep b/node_modules/nwsapi/dist/lint.log similarity index 100% rename from node_modules/acorn/dist/.keep rename to node_modules/nwsapi/dist/lint.log diff --git a/node_modules/nwsapi/package.json b/node_modules/nwsapi/package.json new file mode 100644 index 0000000..0534585 --- /dev/null +++ b/node_modules/nwsapi/package.json @@ -0,0 +1,74 @@ +{ + "_from": "nwsapi@^2.0.9", + "_id": "nwsapi@2.1.2", + "_inBundle": false, + "_integrity": "sha512-TQOQNxqEdxVjwgwNZyvKDF0vALmzQKZJEZwE3fZWDb7Ns5Hw6l9PxJTGKOHZGsmf7R6grsOe8lWxI43Clz79zg==", + "_location": "/nwsapi", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "nwsapi@^2.0.9", + "name": "nwsapi", + "escapedName": "nwsapi", + "rawSpec": "^2.0.9", + "saveSpec": null, + "fetchSpec": "^2.0.9" + }, + "_requiredBy": [ + "/jsdom" + ], + "_resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.2.tgz", + "_shasum": "c360ee8745aa318d8a7c8c8095decc4e373338aa", + "_spec": "nwsapi@^2.0.9", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\jsdom", + "author": { + "name": "Diego Perini", + "email": "diego.perini@gmail.com", + "url": "http://www.iport.it/" + }, + "bugs": { + "url": "http://github.com/dperini/nwsapi/issues" + }, + "bundleDependencies": false, + "dependencies": { + "jsdom": "^14.0.0" + }, + "deprecated": false, + "description": "Fast CSS Selectors API Engine", + "devDependencies": { + "eslint": "^4.19.1" + }, + "homepage": "http://javascript.nwbox.com/nwsapi/", + "keywords": [ + "css", + "css3", + "css4", + "matcher", + "selector" + ], + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "http://javascript.nwbox.com/nwsapi/MIT-LICENSE" + } + ], + "main": "./src/nwsapi", + "maintainers": [ + { + "name": "Diego Perini", + "email": "diego.perini@gmail.com", + "url": "http://www.iport.it/" + } + ], + "name": "nwsapi", + "repository": { + "type": "git", + "url": "git://github.com/dperini/nwsapi.git" + }, + "scripts": { + "lint": "eslint ./src/nwsapi.js" + }, + "version": "2.1.2" +} diff --git a/node_modules/nwsapi/src/modules/nwsapi-jquery.js b/node_modules/nwsapi/src/modules/nwsapi-jquery.js new file mode 100644 index 0000000..961cb30 --- /dev/null +++ b/node_modules/nwsapi/src/modules/nwsapi-jquery.js @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2007-2017 Diego Perini + * All rights reserved. + * + * this is just a small example to show + * how an extension for NWMatcher could be + * adapted to handle special jQuery selectors + * + * Child Selectors + * :even, :odd, :eq, :lt, :gt, :first, :last, :nth + * + * Pseudo Selectors + * :has, :button, :header, :input, :checkbox, :radio, :file, :image + * :password, :reset, :submit, :text, :hidden, :visible, :parent + * + */ + +// for structural pseudo-classes extensions +NW.Dom.registerSelector( + 'jquery:child', + /^\:((?:(nth|eq|lt|gt)\(([^()]*)\))|(?:even|odd|first|last))(.*)/i, + (function(global) { + + return function(match, source, mode, callback) { + + var status = true, + macro = mode ? NW.Dom.S_BODY : NW.Dom.M_BODY; + + macro = macro.replace('@', typeof callback == 'function' ? (mode ? NW.Dom.S_TEST : NW.Dom.M_TEST) : ''); + + switch (match[1].toLowerCase()) { + case 'odd': + source = source.replace(macro, 'if((n=n^1)==0){' + macro + '}'); + break; + case 'even': + source = source.replace(macro, 'if((n=n^1)==1){' + macro + '}'); + break; + case 'first': + source = 'n=s.root.getElementsByTagName(e.nodeName);if(n.length&&n[0]===e){' + source + '}'; + break; + case 'last': + source = 'n=s.root.getElementsByTagName(e.nodeName);if(n.length&&n[n.length-1]===e){' + source + '}'; + break; + default: + switch (match[2].toLowerCase()) { + case 'nth': + source = 'n=s.root.getElementsByTagName(e.nodeName);if(n.length&&n[' + match[3] + ']===e){' + source + '}'; + break; + case 'eq': + source = source.replace(macro, 'if(x++==' + match[3] + '){' + macro + '}'); + break; + case 'lt': + source = source.replace(macro, 'if(x++<' + match[3] + '){' + macro + '}'); + break; + case 'gt': + source = source.replace(macro, 'if(x++>' + match[3] + '){' + macro + '}'); + break; + default: + status = false; + break; + } + break; + } + + // compiler will add this to "source" + return { + 'source': source, + 'status': status, + 'modvar': 'x=0' + }; + + }; + + })(this)); + +// for element pseudo-classes extensions +NW.Dom.registerSelector( + 'jquery:pseudo', + /^\:(has|checkbox|file|image|password|radio|reset|submit|text|button|input|header|hidden|visible|parent)(?:\(\s*(["']*)?([^'"()]*)\2\s*\))?(.*)/i, + (function(global) { + + return function(match, source, mode, callback) { + + var status = true, + macro = mode ? NW.Dom.S_BODY : NW.Dom.M_BODY; + + macro = macro.replace('@', typeof callback == 'function' ? (mode ? NW.Dom.S_TEST : NW.Dom.M_TEST) : ''); + + switch(match[1].toLowerCase()) { + case 'has': + source = source.replace(macro, 'if(e.getElementsByTagName("' + match[3].replace(/^\s|\s$/g, '') + '")[0]){' + macro + '}'); + break; + case 'checkbox': + case 'file': + case 'image': + case 'password': + case 'radio': + case 'reset': + case 'submit': + case 'text': + // :checkbox, :file, :image, :password, :radio, :reset, :submit, :text + source = 'if(/^' + match[1] + '$/i.test(e.type)){' + source + '}'; + break; + case 'button': + source = 'if(/^button$/i.test(e.nodeName)){' + source + '}'; + break; + case 'input': + source = 'if(/^(?:button|input|select|textarea)$/i.test(e.nodeName)){' + source + '}'; + break; + case 'header': + source = 'if(/^h[1-6]$/i.test(e.nodeName)){' + source + '}'; + break; + case 'hidden': + source = 'if(!e.offsetWidth&&!e.offsetHeight){' + source + '}'; + break; + case 'visible': + source = 'if(e.offsetWidth||e.offsetHeight){' + source + '}'; + break; + case 'parent': + source = 'if(e.firstChild){' + source + '}'; + break; + default: + status = false; + break; + } + + // compiler will add this to "source" + return { + 'source': source, + 'status': status + }; + + }; + + })(this)); diff --git a/node_modules/nwmatcher/src/modules/nwmatcher-traversal.js b/node_modules/nwsapi/src/modules/nwsapi-traversal.js similarity index 100% rename from node_modules/nwmatcher/src/modules/nwmatcher-traversal.js rename to node_modules/nwsapi/src/modules/nwsapi-traversal.js diff --git a/node_modules/nwsapi/src/nwsapi.js b/node_modules/nwsapi/src/nwsapi.js new file mode 100644 index 0000000..17e198d --- /dev/null +++ b/node_modules/nwsapi/src/nwsapi.js @@ -0,0 +1,1817 @@ +/* + * Copyright (C) 2007-2019 Diego Perini + * All rights reserved. + * + * nwsapi.js - Fast CSS Selectors API Engine + * + * Author: Diego Perini + * Version: 2.1.2 + * Created: 20070722 + * Release: 20190328 + * + * License: + * http://javascript.nwbox.com/nwsapi/MIT-LICENSE + * Download: + * http://javascript.nwbox.com/nwsapi/nwsapi.js + */ + +(function Export(global, factory) { + + 'use strict'; + + if (typeof module == 'object' && typeof exports == 'object') { + module.exports = factory; + } else if (typeof define == 'function' && define['amd']) { + define(factory); + } else { + global.NW || (global.NW = { }); + global.NW.Dom = factory(global, Export); + } + +})(this, function Factory(global, Export) { + + var version = 'nwsapi-2.1.2', + + doc = global.document, + root = doc.documentElement, + + WSP = '[\\x20\\t\\r\\n\\f]', + + CFG = { + // extensions + operators: '[~*^$|]=|=', + combinators: '[\\x20\\t>+~](?=[^>+~])' + }, + + NOT = { + // not enclosed in double/single/parens/square + double_enc: '(?=(?:[^"]*["][^"]*["])*[^"]*$)', + single_enc: "(?=(?:[^']*['][^']*['])*[^']*$)", + parens_enc: '(?![^\\x28]*\\x29)', + square_enc: '(?![^\\x5b]*\\x5d)' + }, + + REX = { + // regular expressions + HasEscapes: RegExp('\\\\'), + HexNumbers: RegExp('^[0-9a-fA-F]'), + EscOrQuote: RegExp('^\\\\|[\\x22\\x27]'), + RegExpChar: RegExp('(?:(?!\\\\)[\\\\^$.*+?()[\\]{}|\\/])', 'g'), + TrimSpaces: RegExp('[\\r\\n\\f]|^' + WSP + '+|' + WSP + '+$', 'g'), + CommaGroup: RegExp('(\\s*,\\s*)' + NOT.square_enc + NOT.parens_enc, 'g'), + SplitGroup: RegExp('((?:\\x28[^\\x29]*\\x29|\\[[^\\]]*\\]|\\\\.|[^,])+)', 'g'), + FixEscapes: RegExp('\\\\([0-9a-fA-F]{1,6}' + WSP + '?|.)|([\\x22\\x27])', 'g'), + CombineWSP: RegExp('[\\n\\r\\f\\x20]+' + NOT.single_enc + NOT.double_enc, 'g'), + TabCharWSP: RegExp('(\\x20?\\t+\\x20?)' + NOT.single_enc + NOT.double_enc, 'g'), + PseudosWSP: RegExp('\\s+([-+])\\s+' + NOT.square_enc, 'g') + }, + + STD = { + combinator: RegExp('\\s?([>+~])\\s?', 'g'), + apimethods: RegExp('^(?:[a-z]+|\\*)\\|', 'i'), + namespaces: RegExp('(\\*|[a-z]+)\\|[-a-z]+', 'i') + }, + + GROUPS = { + // pseudo-classes requiring parameters + linguistic: '(dir|lang)\\x28\\s?([-\\w]{2,})\\s?(?:\\x29|$)', + logicalsel: '(matches|not)\\x28\\s?([^()]*|[^\\x28]*\\x28[^\\x29]*\\x29)\\s?(?:\\x29|$)', + treestruct: '(nth(?:-last)?(?:-child|-of-type))(?:\\x28\\s?(even|odd|(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)?)\\s?(?:\\x29|$))', + // pseudo-classes not requiring parameters + locationpc: '(link|visited|target)\\b', + useraction: '(hover|active|focus|focus-within)\\b', + structural: '(root|empty|(?:(?:first|last|only)(?:-child|-of-type)))\\b', + inputstate: '(enabled|disabled|read-only|read-write|placeholder-shown|default)\\b', + inputvalue: '(checked|indeterminate|required|optional|valid|invalid|in-range|out-of-range)\\b', + pseudo_dbl: '(after|before|first-letter|first-line|-webkit-[-a-zA-Z0-9]{2,})\\b', + pseudo_sng: ':(after|before|first-letter|first-line|selection|placeholder)\\b' + }, + + Patterns = { + // pseudo-classes + treestruct: RegExp('^:(?:' + GROUPS.treestruct + ')(.*)', 'i'), + structural: RegExp('^:(?:' + GROUPS.structural + ')(.*)', 'i'), + linguistic: RegExp('^:(?:' + GROUPS.linguistic + ')(.*)', 'i'), + useraction: RegExp('^:(?:' + GROUPS.useraction + ')(.*)', 'i'), + inputstate: RegExp('^:(?:' + GROUPS.inputstate + ')(.*)', 'i'), + inputvalue: RegExp('^:(?:' + GROUPS.inputvalue + ')(.*)', 'i'), + locationpc: RegExp('^:(?:' + GROUPS.locationpc + ')(.*)', 'i'), + logicalsel: RegExp('^:(?:' + GROUPS.logicalsel + ')(.*)', 'i'), + pseudo_dbl: RegExp('^:(?:' + GROUPS.pseudo_dbl + ')(.*)', 'i'), + pseudo_sng: RegExp('^:(?:' + GROUPS.pseudo_sng + ')(.*)', 'i'), + // combinators symbols + children: RegExp('^' + WSP + '?\\>' + WSP + '?(.*)'), + adjacent: RegExp('^' + WSP + '?\\+' + WSP + '?(.*)'), + relative: RegExp('^' + WSP + '?\\~' + WSP + '?(.*)'), + ancestor: RegExp('^' + WSP + '+(.*)'), + // universal & namespace + universal: RegExp('^\\*(.*)'), + namespace: RegExp('^(\\w+|\\*)?\\|(.*)') + }, + + // regexp to aproximate detection of RTL languages (Arabic) + RTL = RegExp('^[\\u0591-\\u08ff\\ufb1d-\\ufdfd\\ufe70-\\ufefc ]+$'), + + // emulate firefox error strings + qsNotArgs = 'Not enough arguments', + qsInvalid = ' is not a valid selector', + + // detect structural pseudo-classes in selectors + reNthElem = RegExp('(:nth(?:-last)?-child)', 'i'), + reNthType = RegExp('(:nth(?:-last)?-of-type)', 'i'), + + // placeholder for global regexp + reOptimizer, + reValidator, + + // special handling configuration flags + Config = { + IDS_DUPES: true, + LIVECACHE: false, + MIXEDCASE: true, + LOGERRORS: true, + VERBOSITY: true + }, + + NAMESPACE, + QUIRKS_MODE, + HTML_DOCUMENT, + + ATTR_STD_OPS = { + '=': 1, '^=': 1, '$=': 1, '|=': 1, '*=': 1, '~=': 1 + }, + + HTML_TABLE = { + 'accept': 1, 'accept-charset': 1, 'align': 1, 'alink': 1, 'axis': 1, + 'bgcolor': 1, 'charset': 1, 'checked': 1, 'clear': 1, 'codetype': 1, 'color': 1, + 'compact': 1, 'declare': 1, 'defer': 1, 'dir': 1, 'direction': 1, 'disabled': 1, + 'enctype': 1, 'face': 1, 'frame': 1, 'hreflang': 1, 'http-equiv': 1, 'lang': 1, + 'language': 1, 'link': 1, 'media': 1, 'method': 1, 'multiple': 1, 'nohref': 1, + 'noresize': 1, 'noshade': 1, 'nowrap': 1, 'readonly': 1, 'rel': 1, 'rev': 1, + 'rules': 1, 'scope': 1, 'scrolling': 1, 'selected': 1, 'shape': 1, 'target': 1, + 'text': 1, 'type': 1, 'valign': 1, 'valuetype': 1, 'vlink': 1 + }, + + Combinators = { }, + + Selectors = { }, + + Operators = { + '=': { p1: '^', + p2: '$', + p3: 'true' }, + '^=': { p1: '^', + p2: '', + p3: 'true' }, + '$=': { p1: '', + p2: '$', + p3: 'true' }, + '*=': { p1: '', + p2: '', + p3: 'true' }, + '|=': { p1: '^', + p2: '(-|$)', + p3: 'true' }, + '~=': { p1: '(^|\\s)', + p2: '(\\s|$)', + p3: 'true' } + }, + + concatCall = + function(nodes, callback) { + var i = 0, l = nodes.length, list = Array(l); + while (l > i) { + if (false === callback(list[i] = nodes[i])) break; + ++i; + } + return list; + }, + + concatList = + function(list, nodes) { + var i = -1, l = nodes.length; + while (l--) { list[list.length] = nodes[++i]; } + return list; + }, + + documentOrder = + function(a, b) { + if (!hasDupes && a === b) { + hasDupes = true; + return 0; + } + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }, + + hasDupes = false, + + unique = + function(nodes) { + var i = 0, j = -1, l = nodes.length + 1, list = [ ]; + while (--l) { + if (nodes[i++] === nodes[i]) continue; + list[++j] = nodes[i - 1]; + } + hasDupes = false; + return list; + }, + + // check context for mixed content + hasMixedCaseTagNames = + function(context) { + var ns, api = 'getElementsByTagNameNS'; + + // current host context (ownerDocument) + context = context.ownerDocument || context; + + // documentElement (root) element namespace or default html/xhtml namespace + ns = context.documentElement.namespaceURI || 'http://www.w3.org/1999/xhtml'; + + // checking the number of non HTML nodes in the document + return (context[api]('*', '*').length - context[api](ns, '*').length) > 0; + }, + + switchContext = + function(context, force) { + var oldDoc = doc; + doc = context.ownerDocument || context; + if (force || oldDoc !== doc) { + // force a new check for each document change + // performed before the next select operation + root = doc.documentElement; + HTML_DOCUMENT = isHTML(doc); + QUIRKS_MODE = HTML_DOCUMENT && + doc.compatMode.indexOf('CSS') < 0; + NAMESPACE = root && root.namespaceURI; + Snapshot.doc = doc; + Snapshot.root = root; + } + return (Snapshot.from = context); + }, + + // convert single codepoint to UTF-16 encoding + codePointToUTF16 = + function(codePoint) { + // out of range, use replacement character + if (codePoint < 1 || codePoint > 0x10ffff || + (codePoint > 0xd7ff && codePoint < 0xe000)) { + return '\\ufffd'; + } + // javascript strings are UTF-16 encoded + if (codePoint < 0x10000) { + var lowHex = '000' + codePoint.toString(16); + return '\\u' + lowHex.substr(lowHex.length - 4); + } + // supplementary high + low surrogates + return '\\u' + (((codePoint - 0x10000) >> 0x0a) + 0xd800).toString(16) + + '\\u' + (((codePoint - 0x10000) % 0x400) + 0xdc00).toString(16); + }, + + // convert single codepoint to string + stringFromCodePoint = + function(codePoint) { + // out of range, use replacement character + if (codePoint < 1 || codePoint > 0x10ffff || + (codePoint > 0xd7ff && codePoint < 0xe000)) { + return '\ufffd'; + } + if (codePoint < 0x10000) { + return String.fromCharCode(codePoint); + } + return String.fromCodePoint ? + String.fromCodePoint(codePoint) : + String.fromCharCode( + ((codePoint - 0x10000) >> 0x0a) + 0xd800, + ((codePoint - 0x10000) % 0x400) + 0xdc00); + }, + + // convert escape sequence in a CSS string or identifier + // to javascript string with javascript escape sequences + convertEscapes = + function(str) { + return REX.HasEscapes.test(str) ? + str.replace(REX.FixEscapes, + function(substring, p1, p2) { + // unescaped " or ' + return p2 ? '\\' + p2 : + // javascript strings are UTF-16 encoded + REX.HexNumbers.test(p1) ? codePointToUTF16(parseInt(p1, 16)) : + // \' \" + REX.EscOrQuote.test(p1) ? substring : + // \g \h \. \# etc + p1; + } + ) : str; + }, + + // convert escape sequence in a CSS string or identifier + // to javascript string with characters representations + unescapeIdentifier = + function(str) { + return REX.HasEscapes.test(str) ? + str.replace(REX.FixEscapes, + function(substring, p1, p2) { + // unescaped " or ' + return p2 ? p2 : + // javascript strings are UTF-16 encoded + REX.HexNumbers.test(p1) ? stringFromCodePoint(parseInt(p1, 16)) : + // \' \" + REX.EscOrQuote.test(p1) ? substring : + // \g \h \. \# etc + p1; + } + ) : str; + }, + + method = { + '#': 'getElementById', + '*': 'getElementsByTagName', + '.': 'getElementsByClassName' + }, + + compat = { + '#': function(c, n) { REX.HasEscapes.test(n) && (n = unescapeIdentifier(n)); return function(e, f) { return byId(n, c); }; }, + '*': function(c, n) { REX.HasEscapes.test(n) && (n = unescapeIdentifier(n)); return function(e, f) { return byTag(n, c); }; }, + '.': function(c, n) { REX.HasEscapes.test(n) && (n = unescapeIdentifier(n)); return function(e, f) { return byClass(n, c); }; } + }, + + // find duplicate ids using iterative walk + byIdRaw = + function(id, context) { + var node = context, nodes = [ ], next = node.firstElementChild; + while ((node = next)) { + node.id == id && (nodes[nodes.length] = node); + if ((next = node.firstElementChild || node.nextElementSibling)) continue; + while (!next && (node = node.parentElement) && node !== context) { + next = node.nextElementSibling; + } + } + return nodes; + }, + + // context agnostic getElementById + byId = + function(id, context) { + var e, nodes, api = method['#']; + + // duplicates id allowed + if (Config.IDS_DUPES === false) { + if (api in context) { + return (e = context[api](id)) ? [ e ] : none; + } + } else { + if ('all' in context) { + if ((e = context.all[id])) { + if (e.nodeType == 1) return e.getAttribute('id') != id ? [ ] : [ e ]; + else if (id == 'length') return (e = context[api](id)) ? [ e ] : none; + for (i = 0, l = e.length, nodes = [ ]; l > i; ++i) { + if (e[i].id == id) nodes[nodes.length] = e[i]; + } + return nodes && nodes.length ? nodes : [ nodes ]; + } else return none; + } + } + + return byIdRaw(id, context); + }, + + // context agnostic getElementsByTagName + byTag = + function(tag, context) { + var e, nodes, api = method['*']; + // DOCUMENT_NODE (9) & ELEMENT_NODE (1) + if (api in context) { + return context[api](tag); + } else { + // DOCUMENT_FRAGMENT_NODE (11) + if ((e = context.firstElementChild)) { + tag = tag.toLowerCase(); + if (!(e.nextElementSibling || tag == '*' || e.nodeName.toLowerCase() == tag)) { + return e[api](tag); + } else { + nodes = [ ]; + do { + if (tag == '*' || e.nodeName.toLowerCase() == tag) nodes[nodes.length] = e; + concatList(nodes, e[api](tag)); + } while ((e = e.nextElementSibling)); + } + } else nodes = none; + } + return nodes; + }, + + // context agnostic getElementsByClassName + byClass = + function(cls, context) { + var e, nodes, api = method['.'], reCls; + // DOCUMENT_NODE (9) & ELEMENT_NODE (1) + if (api in context) { + return context[api](cls); + } else { + // DOCUMENT_FRAGMENT_NODE (11) + if ((e = context.firstElementChild)) { + reCls = RegExp('(^|\\s)' + cls + '(\\s|$)', QUIRKS_MODE ? 'i' : ''); + if (!(e.nextElementSibling || reCls.test(e.className))) { + return e[api](cls); + } else { + nodes = [ ]; + do { + if (reCls.test(e.className)) nodes[nodes.length] = e; + concatList(nodes, e[api](cls)); + } while ((e = e.nextElementSibling)); + } + } else nodes = none; + } + return nodes; + }, + + // namespace aware hasAttribute + // helper for XML/XHTML documents + hasAttributeNS = + function(e, name) { + var i, l, attr = e.getAttributeNames(); + HTML_DOCUMENT && (name = name.toLowerCase()); + for (i = 0, l = attr.length; l > i; ++i) { + if (name == attr[i].toLowerCase()) return true; + } + return false; + }, + + // fast resolver for the :nth-child() and :nth-last-child() pseudo-classes + nthElement = (function() { + var idx = 0, len = 0, set = 0, parent = undefined, parents = Array(), nodes = Array(); + return function(element, dir) { + // ensure caches are emptied after each run, invoking with dir = 2 + if (dir == 2) { + idx = 0; len = 0; set = 0; nodes.length = 0; + parents.length = 0; parent = undefined; + return -1; + } + var e, i, j, k, l; + if (parent === element.parentElement) { + i = set; j = idx; l = len; + } else { + l = parents.length; + parent = element.parentElement; + for (i = -1, j = 0, k = l - 1; l > j; ++j, --k) { + if (parents[j] === parent) { i = j; break; } + if (parents[k] === parent) { i = k; break; } + } + if (i < 0) { + parents[i = l] = parent; + l = 0; nodes[i] = Array(); + e = parent && parent.firstElementChild || element; + while (e) { nodes[i][l] = e; if (e === element) j = l; e = e.nextElementSibling; ++l; } + set = i; idx = 0; len = l; + if (l < 2) return l; + } else { + l = nodes[i].length; + set = i; + } + } + if (element !== nodes[i][j] && element !== nodes[i][j = 0]) { + for (j = 0, e = nodes[i], k = l - 1; l > j; ++j, --k) { + if (e[j] === element) { break; } + if (e[k] === element) { j = k; break; } + } + } + idx = j + 1; len = l; + return dir ? l - j : idx; + }; + })(), + + // fast resolver for the :nth-of-type() and :nth-last-of-type() pseudo-classes + nthOfType = (function() { + var idx = 0, len = 0, set = 0, parent = undefined, parents = Array(), nodes = Array(); + return function(element, dir) { + // ensure caches are emptied after each run, invoking with dir = 2 + if (dir == 2) { + idx = 0; len = 0; set = 0; nodes.length = 0; + parents.length = 0; parent = undefined; + return -1; + } + var e, i, j, k, l, name = element.nodeName; + if (nodes[set] && nodes[set][name] && parent === element.parentElement) { + i = set; j = idx; l = len; + } else { + l = parents.length; + parent = element.parentElement; + for (i = -1, j = 0, k = l - 1; l > j; ++j, --k) { + if (parents[j] === parent) { i = j; break; } + if (parents[k] === parent) { i = k; break; } + } + if (i < 0 || !nodes[i][name]) { + parents[i = l] = parent; + nodes[i] || (nodes[i] = Object()); + l = 0; nodes[i][name] = Array(); + e = parent && parent.firstElementChild || element; + while (e) { if (e === element) j = l; if (e.nodeName == name) { nodes[i][name][l] = e; ++l; } e = e.nextElementSibling; } + set = i; idx = j; len = l; + if (l < 2) return l; + } else { + l = nodes[i][name].length; + set = i; + } + } + if (element !== nodes[i][name][j] && element !== nodes[i][name][j = 0]) { + for (j = 0, e = nodes[i][name], k = l - 1; l > j; ++j, --k) { + if (e[j] === element) { break; } + if (e[k] === element) { j = k; break; } + } + } + idx = j + 1; len = l; + return dir ? l - j : idx; + }; + })(), + + // check if the document type is HTML + isHTML = + function(node) { + var doc = node.ownerDocument || node; + return doc.nodeType == 9 && + // contentType not in IE <= 11 + 'contentType' in doc ? + doc.contentType.indexOf('/html') > 0 : + doc.createElement('DiV').nodeName == 'DIV'; + }, + + // configure the engine to use special handling + configure = + function(option, clear) { + if (typeof option == 'string') { return !!Config[option]; } + if (typeof option != 'object') { return Config; } + for (var i in option) { + Config[i] = !!option[i]; + } + // clear lambda cache + if (clear) { + matchResolvers = { }; + selectResolvers = { }; + } + setIdentifierSyntax(); + return true; + }, + + // centralized error and exceptions handling + emit = + function(message, proto) { + var err; + if (Config.VERBOSITY) { + if (proto) { + err = new proto(message); + } else { + err = new global.DOMException(message, 'SyntaxError'); + } + throw err; + } + if (Config.LOGERRORS && console && console.log) { + console.log(message); + } + }, + + // execute the engine initialization code + initialize = + function(doc) { + setIdentifierSyntax(); + lastContext = switchContext(doc, true); + }, + + // build validation regexps used by the engine + setIdentifierSyntax = + function() { + + // + // NOTE: SPECIAL CASES IN CSS SYNTAX PARSING RULES + // + // The https://drafts.csswg.org/css-syntax/#typedef-eof-token + // allow mangled|unclosed selector syntax at the end of selectors strings + // + // Literal equivalent hex representations of the characters: " ' ` ] ) + // + // \\x22 = " - double quotes \\x5b = [ - open square bracket + // \\x27 = ' - single quote \\x5d = ] - closed square bracket + // \\x60 = ` - back tick \\x28 = ( - open round parens + // \\x5c = \ - back slash \\x29 = ) - closed round parens + // + // using hex format prevents false matches of opened/closed instances + // pairs, coloring breakage and other editors highlightning problems. + // + + var identifier = + // doesn't start with a digit + '(?=[^0-9])' + + // can start with double dash + '(?:-{2}' + + // may include ascii chars + '|[a-zA-Z0-9-_]' + + // non-ascii chars + '|[^\\x00-\\x9f]' + + // escaped chars + '|\\\\[^\\r\\n\\f0-9a-fA-F]' + + // unicode chars + '|\\\\[0-9a-fA-F]{1,6}(?:\\r\\n|\\s)?' + + // any escaped chars + '|\\\\.' + + ')+', + + pseudonames = '[-\\w]+', + pseudoparms = '(?:[-+]?\\d*)(?:n\\s?[-+]?\\s?\\d*)', + doublequote = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*(?:"|$)', + singlequote = "'[^'\\\\]*(?:\\\\.[^'\\\\]*)*(?:'|$)", + + attrparser = identifier + '|' + doublequote + '|' + singlequote, + + attrvalues = '([\\x22\\x27]?)((?!\\3)*|(?:\\\\?.)*?)(?:\\3|$)', + + attributes = + '\\[' + + // attribute presence + '(?:\\*\\|)?' + + WSP + '?' + + '(' + identifier + '(?::' + identifier + ')?)' + + WSP + '?' + + '(?:' + + '(' + CFG.operators + ')' + WSP + '?' + + '(?:' + attrparser + ')' + + ')?' + + // attribute case sensitivity + WSP + '?' + '(i)?' + WSP + '?' + + '(?:\\]|$)', + + attrmatcher = attributes.replace(attrparser, attrvalues), + + pseudoclass = + '(?:\\x28' + WSP + '*' + + '(?:' + pseudoparms + '?)?|' + + // universal * & + // namespace *|* + '(?:\\*|\\|)|' + + '(?:' + + '(?::' + pseudonames + + '(?:\\x28' + pseudoparms + '?(?:\\x29|$))?|' + + ')|' + + '(?:[.#]?' + identifier + ')|' + + '(?:' + attributes + ')' + + ')+|' + + '(?:' + WSP + '?,' + WSP + '?)|' + + '(?:' + WSP + '?)|' + + '(?:\\x29|$))*', + + standardValidator = + '(?=' + WSP + '?[^>+~(){}<>])' + + '(?:' + + // universal * & + // namespace *|* + '(?:\\*|\\|)|' + + '(?:[.#]?' + identifier + ')+|' + + '(?:' + attributes + ')+|' + + '(?:::?' + pseudonames + pseudoclass + ')|' + + '(?:' + WSP + '?' + CFG.combinators + WSP + '?)|' + + '(?:' + WSP + '?,' + WSP + '?)|' + + '(?:' + WSP + '?)' + + ')+'; + + // the following global RE is used to return the + // deepest nodeName in selector strings and then + // use it to retrieve all possible matching nodes + // that will be filtered by compiled resolvers + reOptimizer = RegExp( + '(?:([.:#*]?)' + + '(' + identifier + ')' + + '(?:' + + ':[-\\w]+|' + + '\\[[^\\]]+(?:\\]|$)|' + + '\\x28[^\\x29]+(?:\\x29|$)' + + ')*)$'); + + // global + reValidator = RegExp(standardValidator, 'g'); + + Patterns.id = RegExp('^#(' + identifier + ')(.*)'); + Patterns.tagName = RegExp('^(' + identifier + ')(.*)'); + Patterns.className = RegExp('^\\.(' + identifier + ')(.*)'); + Patterns.attribute = RegExp('^(?:' + attrmatcher + ')(.*)'); + }, + + F_INIT = '"use strict";return function Resolver(c,f,x,r)', + + S_HEAD = 'var e,n,o,j=r.length-1,k=-1', + M_HEAD = 'var e,n,o', + + S_LOOP = 'main:while((e=c[++k]))', + N_LOOP = 'main:while((e=c.item(++k)))', + M_LOOP = 'e=c;', + + S_BODY = 'r[++j]=c[k];', + N_BODY = 'r[++j]=c.item(k);', + M_BODY = '', + + S_TAIL = 'continue main;', + M_TAIL = 'r=true;', + + S_TEST = 'if(f(c[k])){break main;}', + N_TEST = 'if(f(c.item(k))){break main;}', + M_TEST = 'f(c);', + + S_VARS = [ ], + M_VARS = [ ], + + // compile groups or single selector strings into + // executable functions for matching or selecting + compile = + function(selector, mode, callback) { + var factory, token, head = '', loop = '', macro = '', source = '', vars = ''; + + // 'mode' can be boolean or null + // true = select / false = match + // null to use collection.item() + switch (mode) { + case true: + if (selectLambdas[selector]) { return selectLambdas[selector]; } + macro = S_BODY + (callback ? S_TEST : '') + S_TAIL; + head = S_HEAD; + loop = S_LOOP; + break; + case false: + if (matchLambdas[selector]) { return matchLambdas[selector]; } + macro = M_BODY + (callback ? M_TEST : '') + M_TAIL; + head = M_HEAD; + loop = M_LOOP; + break; + case null: + if (selectLambdas[selector]) { return selectLambdas[selector]; } + macro = N_BODY + (callback ? N_TEST : '') + S_TAIL; + head = S_HEAD; + loop = N_LOOP; + break; + default: + break; + } + + source = compileSelector(selector, macro, mode, callback, false); + + loop += mode || mode === null ? '{' + source + '}' : source; + + if (mode || mode === null && selector.includes(':nth')) { + loop += reNthElem.test(selector) ? 's.nthElement(null, 2);' : ''; + loop += reNthType.test(selector) ? 's.nthOfType(null, 2);' : ''; + } + + if (S_VARS[0] || M_VARS[0]) { + vars = ',' + (S_VARS.join(',') || M_VARS.join(',')); + S_VARS.length = 0; + M_VARS.length = 0; + } + + factory = Function('s', F_INIT + '{' + head + vars + ';' + loop + 'return r;}')(Snapshot); + + return mode || mode === null ? (selectLambdas[selector] = factory) : (matchLambdas[selector] = factory); + }, + + // build conditional code to check components of selector strings + compileSelector = + function(expression, source, mode, callback, not) { + + // N is the negation pseudo-class flag + // D is the default inverted negation flag + var a, b, n, f, i, l, name, nested, NS, + N = not ? '!' : '', D = not ? '' : '!', + compat, expr, match, result, status, symbol, test, + type, selector = expression, selector_string, vars; + + // original 'select' or 'match' selector string before normalization + selector_string = mode ? lastSelected : lastMatched; + + // isolate selector combinators/components and normalize whitespace + selector = selector.replace(STD.combinator, '$1');//.replace(STD.whitespace, ' '); + + while (selector) { + + // get namespace prefix if present or get first char of selector + symbol = STD.apimethods.test(selector) ? '|' : selector[0]; + + switch (symbol) { + + // universal resolver + case '*': + match = selector.match(Patterns.universal); + if (N == '!') { + source = 'if(' + N + 'true' + + '){' + source + '}'; + } + break; + + // id resolver + case '#': + match = selector.match(Patterns.id); + source = 'if(' + N + '(/^' + match[1] + '$/.test(e.getAttribute("id"))' + + ')){' + source + '}'; + break; + + // class name resolver + case '.': + match = selector.match(Patterns.className); + compat = (QUIRKS_MODE ? 'i' : '') + '.test(e.getAttribute("class"))'; + source = 'if(' + N + '(/(^|\\s)' + match[1] + '(\\s|$)/' + compat + + ')){' + source + '}'; + break; + + // tag name resolver + case (/[a-z]/i.test(symbol) ? symbol : undefined): + match = selector.match(Patterns.tagName); + source = 'if(' + N + '(e.nodeName' + + (Config.MIXEDCASE || hasMixedCaseTagNames(doc) ? + '.toLowerCase()=="' + match[1].toLowerCase() + '"' : + '=="' + match[1].toUpperCase() + '"') + + ')){' + source + '}'; + break; + + // namespace resolver + case '|': + match = selector.match(Patterns.namespace); + if (match[1] == '*') { + source = 'if(' + N + 'true){' + source + '}'; + } else if (!match[1]) { + source = 'if(' + N + '(!e.namespaceURI)){' + source + '}'; + } else if (typeof match[1] == 'string' && root.prefix == match[1]) { + source = 'if(' + N + '(e.namespaceURI=="' + NAMESPACE + '")){' + source + '}'; + } else { + emit('\'' + selector_string + '\'' + qsInvalid); + } + break; + + // attributes resolver + case '[': + match = selector.match(Patterns.attribute); + NS = match[0].match(STD.namespaces); + name = match[1]; + expr = name.split(':'); + expr = expr.length == 2 ? expr[1] : expr[0]; + if (match[2] && !(test = Operators[match[2]])) { + emit('\'' + selector_string + '\'' + qsInvalid); + return ''; + } + if (match[4] === '') { + test = match[2] == '~=' ? + { p1: '^\\s', p2: '+$', p3: 'true' } : + match[2] in ATTR_STD_OPS && match[2] != '~=' ? + { p1: '^', p2: '$', p3: 'true' } : test; + } else if (match[2] == '~=' && match[4].includes(' ')) { + // whitespace separated list but value contains space + source = 'if(' + N + 'false){' + source + '}'; + break; + } else if (match[4]) { + match[4] = convertEscapes(match[4]).replace(REX.RegExpChar, '\\$&'); + } + type = HTML_DOCUMENT && HTML_TABLE[expr.toLowerCase()] ? 'i' : ''; + source = 'if(' + N + '(' + + (!match[2] ? (NS ? 's.hasAttributeNS(e,"' + name + '")' : 'e.hasAttribute("' + name + '")') : + !match[4] && ATTR_STD_OPS[match[2]] && match[2] != '~=' ? 'e.getAttribute("' + name + '")==""' : + '(/' + test.p1 + match[4] + test.p2 + '/' + type + ').test(e.getAttribute("' + name + '"))==' + test.p3) + + ')){' + source + '}'; + break; + + // *** General sibling combinator + // E ~ F (F relative sibling of E) + case '~': + match = selector.match(Patterns.relative); + source = 'n=e;while((e=e.previousElementSibling)){' + source + '}e=n;'; + break; + // *** Adjacent sibling combinator + // E + F (F adiacent sibling of E) + case '+': + match = selector.match(Patterns.adjacent); + source = 'n=e;if((e=e.previousElementSibling)){' + source + '}e=n;'; + break; + // *** Descendant combinator + // E F (E ancestor of F) + case '\x09': + case '\x20': + match = selector.match(Patterns.ancestor); + source = 'n=e;while((e=e.parentElement)){' + source + '}e=n;'; + break; + // *** Child combinator + // E > F (F children of E) + case '>': + match = selector.match(Patterns.children); + source = 'n=e;if((e=e.parentElement)){' + source + '}e=n;'; + break; + + // *** user supplied combinators extensions + case (symbol in Combinators ? symbol : undefined): + // for other registered combinators extensions + match[match.length - 1] = '*'; + source = Combinators[symbol](match) + source; + break; + + // *** tree-structural pseudo-classes + // :root, :empty, :first-child, :last-child, :only-child, :first-of-type, :last-of-type, :only-of-type + case ':': + if ((match = selector.match(Patterns.structural))) { + match[1] = match[1].toLowerCase(); + switch (match[1]) { + case 'root': + // there can only be one :root element, so exit the loop once found + source = 'if(' + N + '(e===s.root)){' + source + (mode ? 'break main;' : '') + '}'; + break; + case 'empty': + // matches elements that don't contain elements or text nodes + source = 'n=e.firstChild;while(n&&!(/1|3/).test(n.nodeType)){n=n.nextSibling}if(' + D + 'n){' + source + '}'; + break; + + // *** child-indexed pseudo-classes + // :first-child, :last-child, :only-child + case 'only-child': + source = 'if(' + N + '(!e.nextElementSibling&&!e.previousElementSibling)){' + source + '}'; + break; + case 'last-child': + source = 'if(' + N + '(!e.nextElementSibling)){' + source + '}'; + break; + case 'first-child': + source = 'if(' + N + '(!e.previousElementSibling)){' + source + '}'; + break; + + // *** typed child-indexed pseudo-classes + // :only-of-type, :last-of-type, :first-of-type + case 'only-of-type': + source = 'o=e.nodeName;' + + 'n=e;while((n=n.nextElementSibling)&&n.nodeName!=o);if(!n){' + + 'n=e;while((n=n.previousElementSibling)&&n.nodeName!=o);}if(' + D + 'n){' + source + '}'; + break; + case 'last-of-type': + source = 'n=e;o=e.nodeName;while((n=n.nextElementSibling)&&n.nodeName!=o);if(' + D + 'n){' + source + '}'; + break; + case 'first-of-type': + source = 'n=e;o=e.nodeName;while((n=n.previousElementSibling)&&n.nodeName!=o);if(' + D + 'n){' + source + '}'; + break; + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + } + } + + // *** child-indexed & typed child-indexed pseudo-classes + // :nth-child, :nth-of-type, :nth-last-child, :nth-last-of-type + else if ((match = selector.match(Patterns.treestruct))) { + match[1] = match[1].toLowerCase(); + switch (match[1]) { + case 'nth-child': + case 'nth-of-type': + case 'nth-last-child': + case 'nth-last-of-type': + expr = /-of-type/i.test(match[1]); + if (match[1] && match[2]) { + type = /last/i.test(match[1]); + if (match[2] == 'n') { + source = 'if(' + N + 'true){' + source + '}'; + break; + } else if (match[2] == '1') { + test = type ? 'next' : 'previous'; + source = expr ? 'n=e;o=e.nodeName;' + + 'while((n=n.' + test + 'ElementSibling)&&n.nodeName!=o);if(' + D + 'n){' + source + '}' : + 'if(' + N + '!e.' + test + 'ElementSibling){' + source + '}'; + break; + } else if (match[2] == 'even' || match[2] == '2n0' || match[2] == '2n+0' || match[2] == '2n') { + test = 'n%2==0'; + } else if (match[2] == 'odd' || match[2] == '2n1' || match[2] == '2n+1') { + test = 'n%2==1'; + } else { + f = /n/i.test(match[2]); + n = match[2].split('n'); + a = parseInt(n[0], 10) || 0; + b = parseInt(n[1], 10) || 0; + if (n[0] == '-') { a = -1; } + if (n[0] == '+') { a = +1; } + test = (b ? '(n' + (b > 0 ? '-' : '+') + Math.abs(b) + ')' : 'n') + '%' + a + '==0' ; + test = + a >= +1 ? (f ? 'n>' + (b - 1) + (Math.abs(a) != 1 ? '&&' + test : '') : 'n==' + a) : + a <= -1 ? (f ? 'n<' + (b + 1) + (Math.abs(a) != 1 ? '&&' + test : '') : 'n==' + a) : + a === 0 ? (n[0] ? 'n==' + b : 'n>' + (b - 1)) : 'false'; + } + expr = expr ? 'OfType' : 'Element'; + type = type ? 'true' : 'false'; + source = 'n=s.nth' + expr + '(e,' + type + ');if(' + N + '(' + test + ')){' + source + '}'; + } else { + emit('\'' + selector_string + '\'' + qsInvalid); + } + break; + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + } + } + + // *** logical combination pseudo-classes + // :matches( s1, [ s2, ... ]), :not( s1, [ s2, ... ]) + else if ((match = selector.match(Patterns.logicalsel))) { + match[1] = match[1].toLowerCase(); + switch (match[1]) { + case 'matches': + if (not == true || nested == true) { + emit(':matches() pseudo-class cannot be nested'); + } + nested = true; + expr = match[2].replace(REX.CommaGroup, ',').replace(REX.TrimSpaces, ''); + // check nested compound selectors s1, s2 + expr = match[2].match(REX.SplitGroup); + for (i = 0, l = expr.length; l > i; ++i) { + expr[i] = expr[i].replace(REX.TrimSpaces, ''); + source = 'if(s.match("' + expr[i].replace(/\x22/g, '\\"') + '",e)){' + source + '}'; + } + break; + case 'not': + if (not == true || nested == true) { + emit(':not() pseudo-class cannot be nested'); + } + expr = match[2].replace(REX.CommaGroup, ',').replace(REX.TrimSpaces, ''); + // check nested compound selectors s1, s2 + expr = match[2].match(REX.SplitGroup); + for (i = 0, l = expr.length; l > i; ++i) { + expr[i] = expr[i].replace(REX.TrimSpaces, ''); + source = compileSelector(expr[i], source, false, callback, true); + } + break; + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + } + } + + // *** linguistic pseudo-classes + // :dir( ltr / rtl ), :lang( en ) + else if ((match = selector.match(Patterns.linguistic))) { + match[1] = match[1].toLowerCase(); + switch (match[1]) { + case 'dir': + source = 'var p;if(' + N + '(' + + '(/' + match[2] + '/i.test(e.dir))||(p=s.ancestor("[dir]", e))&&' + + '(/' + match[2] + '/i.test(p.dir))||(e.dir==""||e.dir=="auto")&&' + + '(' + (match[2] == 'ltr' ? '!':'')+ RTL +'.test(e.textContent)))' + + '){' + source + '};'; + break; + case 'lang': + expr = '(?:^|-)' + match[2] + '(?:-|$)'; + source = 'var p;if(' + N + '(' + + '(e.isConnected&&(e.lang==""&&(p=s.ancestor("[lang]",e)))&&' + + '(p.lang=="' + match[2] + '")||/'+ expr +'/i.test(e.lang)))' + + '){' + source + '};'; + break; + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + } + } + + // *** location pseudo-classes + // :link, :visited, :target + else if ((match = selector.match(Patterns.locationpc))) { + match[1] = match[1].toLowerCase(); + switch (match[1]) { + case 'link': + source = 'if(' + N + '(/^a|area|link$/i.test(e.nodeName)&&e.hasAttribute("href"))){' + source + '}'; + break; + case 'visited': + source = 'if(' + N + '(/^a|area|link$/i.test(e.nodeName)&&e.hasAttribute("href")&&e.visited)){' + source + '}'; + break; + case 'target': + source = 'if(' + N + '((s.doc.compareDocumentPosition(e)&16)&&s.doc.location.hash&&e.id==s.doc.location.hash.slice(1))){' + source + '}'; + break; + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + } + } + + // *** user actions pseudo-classes + // :hover, :active, :focus + else if ((match = selector.match(Patterns.useraction))) { + match[1] = match[1].toLowerCase(); + switch (match[1]) { + case 'hover': + source = 'hasFocus' in doc && doc.hasFocus() ? + 'if(' + N + '(e===s.doc.hoverElement)){' + source + '}' : + 'if(' + D + 'true){' + source + '}'; + break; + case 'active': + source = 'hasFocus' in doc && doc.hasFocus() ? + 'if(' + N + '(e===s.doc.activeElement)){' + source + '}' : + 'if(' + D + 'true){' + source + '}'; + break; + case 'focus': + source = 'hasFocus' in doc ? + 'if(' + N + '(e===s.doc.activeElement&&s.doc.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number"))){' + source + '}' : + 'if(' + N + '(e===s.doc.activeElement&&(e.type||e.href))){' + source + '}'; + break; + case 'focus-within': + source = 'hasFocus' in doc ? + 'n=s.doc.activeElement;while(e){if(e===n||e.parentNode===n)break;}' + + 'if(' + N + '(e===n&&s.doc.hasFocus()&&(e.type||e.href||typeof e.tabIndex=="number"))){' + source + '}' : source; + break; + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + } + } + + // *** user interface and form pseudo-classes + // :enabled, :disabled, :read-only, :read-write, :placeholder-shown, :default + else if ((match = selector.match(Patterns.inputstate))) { + match[1] = match[1].toLowerCase(); + switch (match[1]) { + case 'enabled': + source = 'if(' + N + '(("form" in e||/^optgroup$/i.test(e.nodeName))&&"disabled" in e &&e.disabled===false' + + ')){' + source + '}'; + break; + case 'disabled': + // https://www.w3.org/TR/html5/forms.html#enabling-and-disabling-form-controls:-the-disabled-attribute + source = 'if(' + N + '(("form" in e||/^optgroup$/i.test(e.nodeName))&&"disabled" in e&&' + + '(e.disabled===true||(n=s.ancestor("fieldset",e))&&(n=s.first("legend",n))&&!n.contains(e))' + + ')){' + source + '}'; + break; + case 'read-only': + source = + 'if(' + N + '(' + + '(/^textarea$/i.test(e.nodeName)&&(e.readOnly||e.disabled))||' + + '("|password|text|".includes("|"+e.type+"|")&&e.readOnly)' + + ')){' + source + '}'; + break; + case 'read-write': + source = + 'if(' + N + '(' + + '((/^textarea$/i.test(e.nodeName)&&!e.readOnly&&!e.disabled)||' + + '("|password|text|".includes("|"+e.type+"|")&&!e.readOnly&&!e.disabled))||' + + '(e.hasAttribute("contenteditable")||(s.doc.designMode=="on"))' + + ')){' + source + '}'; + break; + case 'placeholder-shown': + source = + 'if(' + N + '(' + + '(/^input|textarea$/i.test(e.nodeName))&&e.hasAttribute("placeholder")&&' + + '("|textarea|password|number|search|email|text|tel|url|".includes("|"+e.type+"|"))&&' + + '(!s.match(":focus",e))' + + ')){' + source + '}'; + break; + case 'default': + source = + 'if(' + N + '("form" in e && e.form)){' + + 'var x=0;n=[];' + + 'if(e.type=="image")n=e.form.getElementsByTagName("input");' + + 'if(e.type=="submit")n=e.form.elements;' + + 'while(n[x]&&e!==n[x]){' + + 'if(n[x].type=="image")break;' + + 'if(n[x].type=="submit")break;' + + 'x++;' + + '}' + + '}' + + 'if(' + N + '(e.form&&(e===n[x]&&"|image|submit|".includes("|"+e.type+"|"))||' + + '((/^option$/i.test(e.nodeName))&&e.defaultSelected)||' + + '(("|radio|checkbox|".includes("|"+e.type+"|"))&&e.defaultChecked)' + + ')){' + source + '}'; + break; + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + } + } + + // *** input pseudo-classes (for form validation) + // :checked, :indeterminate, :valid, :invalid, :in-range, :out-of-range, :required, :optional + else if ((match = selector.match(Patterns.inputvalue))) { + match[1] = match[1].toLowerCase(); + switch (match[1]) { + case 'checked': + source = 'if(' + N + '(/^input$/i.test(e.nodeName)&&' + + '("|radio|checkbox|".includes("|"+e.type+"|")&&e.checked)||' + + '(/^option$/i.test(e.nodeName)&&(e.selected||e.checked))' + + ')){' + source + '}'; + break; + case 'indeterminate': + source = + 'if(' + N + '(/^progress$/i.test(e.nodeName)&&!e.hasAttribute("value"))||' + + '(/^input$/i.test(e.nodeName)&&("checkbox"==e.type&&e.indeterminate)||' + + '("radio"==e.type&&e.name&&!s.first("input[name="+e.name+"]:checked",e.form))' + + ')){' + source + '}'; + break; + case 'required': + source = + 'if(' + N + + '(/^input|select|textarea$/i.test(e.nodeName)&&e.required)' + + '){' + source + '}'; + break; + case 'optional': + source = + 'if(' + N + + '(/^input|select|textarea$/i.test(e.nodeName)&&!e.required)' + + '){' + source + '}'; + break; + case 'invalid': + source = + 'if(' + N + '((' + + '(/^form$/i.test(e.nodeName)&&!e.noValidate)||' + + '(e.willValidate&&!e.formNoValidate))&&!e.checkValidity())||' + + '(/^fieldset$/i.test(e.nodeName)&&s.first(":invalid",e))' + + '){' + source + '}'; + break; + case 'valid': + source = + 'if(' + N + '((' + + '(/^form$/i.test(e.nodeName)&&!e.noValidate)||' + + '(e.willValidate&&!e.formNoValidate))&&e.checkValidity())||' + + '(/^fieldset$/i.test(e.nodeName)&&s.first(":valid",e))' + + '){' + source + '}'; + break; + case 'in-range': + source = + 'if(' + N + + '(/^input$/i.test(e.nodeName))&&' + + '(e.willValidate&&!e.formNoValidate)&&' + + '(!e.validity.rangeUnderflow&&!e.validity.rangeOverflow)&&' + + '("|date|datetime-local|month|number|range|time|week|".includes("|"+e.type+"|"))&&' + + '("range"==e.type||e.getAttribute("min")||e.getAttribute("max"))' + + '){' + source + '}'; + break; + case 'out-of-range': + source = + 'if(' + N + + '(/^input$/i.test(e.nodeName))&&' + + '(e.willValidate&&!e.formNoValidate)&&' + + '(e.validity.rangeUnderflow||e.validity.rangeOverflow)&&' + + '("|date|datetime-local|month|number|range|time|week|".includes("|"+e.type+"|"))&&' + + '("range"==e.type||e.getAttribute("min")||e.getAttribute("max"))' + + '){' + source + '}'; + break; + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + } + } + + // allow pseudo-elements starting with single colon (:) + // :after, :before, :first-letter, :first-line, :placeholder-shown, :-webkit- + else if ((match = selector.match(Patterns.pseudo_sng))) { + source = 'if(' + D + '(/1|11/).test(e.nodeType)){' + source + '}'; + } + + // allow pseudo-elements starting with double colon (::) + // ::after, ::before, ::marker, ::placeholder, ::inactive-selection, ::selection + else if ((match = selector.match(Patterns.pseudo_dbl))) { + source = 'if(' + D + '(/1|11/).test(e.nodeType)){' + source + '}'; + } + + else { + + // reset + expr = false; + status = false; + + // process registered selector extensions + for (expr in Selectors) { + if ((match = selector.match(Selectors[expr].Expression))) { + result = Selectors[expr].Callback(match, source, mode, callback); + if ('match' in result) { match = result.match; } + vars = result.modvar; + if (mode) { + // add extra select() vars + vars && S_VARS.indexOf(vars) < 0 && (S_VARS[S_VARS.length] = vars); + } else { + // add extra match() vars + vars && M_VARS.indexOf(vars) < 0 && (M_VARS[M_VARS.length] = vars); + } + // extension source code + source = result.source; + // extension status code + status = result.status; + // break on status error + if (status) { break; } + } + } + + if (!status) { + emit('unknown pseudo-class selector \'' + selector + '\''); + return ''; + } + + if (!expr) { + emit('unknown token in selector \'' + selector + '\''); + return ''; + } + + } + break; + + default: + emit('\'' + selector_string + '\'' + qsInvalid); + break; + + } + // end of switch symbol + + if (!match) { + emit('\'' + selector_string + '\'' + qsInvalid); + return ''; + } + + // pop last component + selector = match.pop(); + } + // end of while selector + + return source; + }, + + // replace ':scope' pseudo-class with element references + makeref = + function(selectors, element) { + return selectors.replace(/:scope/i, + element.nodeName.toLowerCase() + + (element.id ? '#' + element.id : '') + + (element.className ? '.' + element.classList[0] : '')); + }, + + // equivalent of w3c 'closest' method + ancestor = + function _closest(selectors, element, callback) { + + if ((/:scope/i).test(selectors)) { + selectors = makeref(selectors, element); + } + + while (element) { + if (match(selectors, element, callback)) break; + element = element.parentElement; + } + return element; + }, + + match_assert = + function(f, element, callback) { + for (var i = 0, l = f.length, r = false; l > i; ++i) + f[i](element, callback, null, false) && (r = true); + return r; + }, + + match_collect = + function(selectors, callback) { + for (var i = 0, l = selectors.length, f = [ ]; l > i; ++i) + f[i] = compile(selectors[i], false, callback); + return { factory: f }; + }, + + // equivalent of w3c 'matches' method + match = + function _matches(selectors, element, callback) { + + var expressions, parsed; + + if (element && matchResolvers[selectors]) { + return match_assert(matchResolvers[selectors].factory, element, callback); + } + + lastMatched = selectors; + + // arguments validation + if (arguments.length === 0) { + emit(qsNotArgs, TypeError); + return Config.VERBOSITY ? undefined : false; + } else if (arguments[0] === '') { + emit('\'\'' + qsInvalid); + return Config.VERBOSITY ? undefined : false; + } + + // input NULL or UNDEFINED + if (typeof selectors != 'string') { + selectors = '' + selectors; + } + + if ((/:scope/i).test(selectors)) { + selectors = makeref(selectors, element); + } + + // normalize input string + parsed = selectors. + replace(/\x00|\\$/g, '\ufffd'). + replace(REX.CombineWSP, '\x20'). + replace(REX.PseudosWSP, '$1'). + replace(REX.TabCharWSP, '\t'). + replace(REX.CommaGroup, ','). + replace(REX.TrimSpaces, ''); + + // parse, validate and split possible compound selectors + if ((expressions = parsed.match(reValidator)) && expressions.join('') == parsed) { + expressions = parsed.match(REX.SplitGroup); + if (parsed[parsed.length - 1] == ',') { + emit(qsInvalid); + return Config.VERBOSITY ? undefined : false; + } + } else { + emit('\'' + selectors + '\'' + qsInvalid); + return Config.VERBOSITY ? undefined : false; + } + + matchResolvers[selectors] = match_collect(expressions, callback); + + return match_assert(matchResolvers[selectors].factory, element, callback); + }, + + // equivalent of w3c 'querySelector' method + first = + function _querySelector(selectors, context, callback) { + if (arguments.length === 0) { + emit(qsNotArgs, TypeError); + } + return select(selectors, context, + typeof callback == 'function' ? + function firstMatch(element) { + callback(element); + return false; + } : + function firstMatch() { + return false; + } + )[0] || null; + }, + + // equivalent of w3c 'querySelectorAll' method + select = + function _querySelectorAll(selectors, context, callback) { + + var expressions, nodes, parsed, resolver; + + context || (context = doc); + + if (selectors) { + if ((resolver = selectResolvers[selectors])) { + if (resolver.context === context && resolver.callback === callback) { + nodes = results_from(resolver, context, callback); + Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors) && (resolver.results = nodes); + return typeof callback == 'function' ? + concatCall(nodes, callback) : nodes; + } + } + } + + lastSelected = selectors; + + // arguments validation + if (arguments.length === 0) { + emit(qsNotArgs, TypeError); + return Config.VERBOSITY ? undefined : none; + } else if (arguments[0] === '') { + emit('\'\'' + qsInvalid); + return Config.VERBOSITY ? undefined : none; + } else if (lastContext !== context) { + lastContext = switchContext(context); + } + + // input NULL or UNDEFINED + if (typeof selectors != 'string') { + selectors = '' + selectors; + } + + if ((/:scope/i).test(selectors)) { + selectors = makeref(selectors, context); + } + + // normalize input string + parsed = selectors. + replace(/\x00|\\$/g, '\ufffd'). + replace(REX.CombineWSP, '\x20'). + replace(REX.PseudosWSP, '$1'). + replace(REX.TabCharWSP, '\t'). + replace(REX.CommaGroup, ','). + replace(REX.TrimSpaces, ''); + + // parse, validate and split possible compound selectors + if ((expressions = parsed.match(reValidator)) && expressions.join('') == parsed) { + expressions = parsed.match(REX.SplitGroup); + if (parsed[parsed.length - 1] == ',') { + emit(qsInvalid); + return Config.VERBOSITY ? undefined : false; + } + } else { + emit('\'' + selectors + '\'' + qsInvalid); + return Config.VERBOSITY ? undefined : false; + } + + // save/reuse factory and closure collection + selectResolvers[selectors] = collect(expressions, context, callback); + + nodes = results_from(selectResolvers[selectors], context, callback); + + return typeof callback == 'function' ? + concatCall(nodes, callback) : nodes; + }, + + // optimize selectors avoiding duplicated checks + optimize = + function(selector, token) { + var index = token.index, + length = token[1].length + token[2].length; + return selector.slice(0, index) + + (' >+~'.indexOf(selector.charAt(index - 1)) > -1 ? + (':['.indexOf(selector.charAt(index + length + 1)) > -1 ? + '*' : '') : '') + selector.slice(index + length - (token[1] == '*' ? 1 : 0)); + }, + + results_from = + function(resolver, context, callback) { + var i, k, l, list, nodes = [ ], + f = resolver.factory, h = resolver.htmlset, + n = resolver.nodeset, r = resolver.results; + for (i = 0, k = 0, l = n.length; l > i; ++i) { + list = r && h[i] ? h[i]() : compat[n[i][0]](context, n[i].slice(1))(); + if (f[i] !== null) { + if (r && h[i]) { + if (list.item || validate(resolver, n[i], list)) { + ++k; + } else { + f[i](list, callback, context, nodes); + } + } else { + f[i](list, callback, context, nodes); + } + } else { + if (list.length !== 0) { + list.length == 1 ? + nodes[nodes.length] = list[0] : + concatList(nodes, list); + } + } + if (r && h[i]) { + if (k == l) { nodes = r; } + } else { + if (l > 1 && nodes.length > 1) { + nodes.sort(documentOrder); + hasDupes && (nodes = unique(nodes)); + } + } + } + return nodes; + }, + + // validate memoized HTMLCollection + validate = + function(resolver, n, s) { + var c = 0, i = 0, l = s.length, m; + if (l === 0) { return false; } + m = compat[n[0]](resolver.context, n.slice(1))(); + if (m.item && s.item) { + while (l > i) { if (m.item(i) === s.item(c)) { ++i; ++c; } else return false; } + } else { + while (l > i) { if (m[i] === s[c]) { ++i; ++c;} else return false; } + } + return m.length == c; + }, + + // prepare factory resolvers and closure collections + collect = + function(selectors, context, callback) { + var i, l, token, seen = { }, factory = [ ], htmlset = [ ], nodeset = [ ]; + for (i = 0, l = selectors.length; l > i; ++i) { + if (!seen[selectors[i]] && (seen[selectors[i]] = true)) { + if ((token = selectors[i].match(reOptimizer)) && token[1] != ':') { + Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors[i]) && (htmlset[i] = compat[token[1] || '*'](context, token[2])); + nodeset[i] = (token[1] || '*') + token[2]; + selectors[i] = optimize(selectors[i], token); + } else if (token && token[1] != ':') { + Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors[i]) && (htmlset[i] = compat['*'](context, '*')); + nodeset[i] = '**'; + } else { + nodeset[i] = '**'; + } + factory[i] = selectors[i] == '*' ? null : compile(selectors[i], true, null); + } + } + + return { + callback: callback, + context: context, + factory: factory, + htmlset: htmlset, + nodeset: nodeset, + results: null + }; + }, + + // QSA placeholders to native references + _closest, _matches, _querySelector, _querySelectorAll, + + // overrides QSA methods (only for browsers) + install = + function(all) { + + // save native QSA references + _closest = Element.prototype.closest; + _matches = Element.prototype.matches; + _querySelector = Document.prototype.querySelector; + _querySelectorAll = Document.prototype.querySelectorAll; + + Element.prototype.closest = + function closest() { + var ctor = Object.getPrototypeOf(this).__proto__.__proto__.constructor.name; + if (!('nodeType' in this)) { emit('\'closest\' called on an object that does not implement interface ' + ctor + '.', TypeError); } + return arguments.length < 1 ? ancestor.apply(this, [ ]) : + arguments.length < 2 ? ancestor.apply(this, [ arguments[0], this ]) : + ancestor.apply(this, [ arguments[0], this, typeof arguments[1] == 'function' ? arguments[1] : undefined ]); + }; + + Element.prototype.matches = + function matches() { + var ctor = Object.getPrototypeOf(this).__proto__.__proto__.constructor.name; + if (!('nodeType' in this)) { emit('\'matches\' called on an object that does not implement interface ' + ctor + '.', TypeError); } + return arguments.length < 1 ? match.apply(this, [ ]) : + arguments.length < 2 ? match.apply(this, [ arguments[0], this ]) : + match.apply(this, [ arguments[0], this, typeof arguments[1] == 'function' ? arguments[1] : undefined ]); + }; + + Element.prototype.querySelector = + Document.prototype.querySelector = + DocumentFragment.prototype.querySelector = + function querySelector() { + var ctor = Object.getPrototypeOf(this).__proto__.__proto__.constructor.name; + if (!('nodeType' in this)) { emit('\'querySelector\' called on an object that does not implement interface ' + ctor + '.', TypeError); } + return arguments.length < 1 ? first.apply(this, [ ]) : + arguments.length < 2 ? first.apply(this, [ arguments[0], this ]) : + first.apply(this, [ arguments[0], this, typeof arguments[1] == 'function' ? arguments[1] : undefined ]); + }; + + Element.prototype.querySelectorAll = + Document.prototype.querySelectorAll = + DocumentFragment.prototype.querySelectorAll = + function querySelectorAll() { + var ctor = Object.getPrototypeOf(this).__proto__.__proto__.constructor.name; + if (!('nodeType' in this)) { emit('\'querySelectorAll\' called on an object that does not implement interface ' + ctor + '.', TypeError); } + return arguments.length < 1 ? select.apply(this, [ ]) : + arguments.length < 2 ? select.apply(this, [ arguments[0], this ]) : + select.apply(this, [ arguments[0], this, typeof arguments[1] == 'function' ? arguments[1] : undefined ]); + }; + + if (all) { + document.addEventListener('load', function(e) { + var c, d, r, s, t = e.target; + if (/iframe/i.test(t.nodeName)) { + c = '(' + Export + ')(this, ' + Factory + ');'; d = t.contentDocument; + s = d.createElement('script'); s.textContent = c + 'NW.Dom.install()'; + r = d.documentElement; r.removeChild(r.insertBefore(s, r.firstChild)); + } + }, true); + } + + }, + + // restore QSA methods (only for browsers) + uninstall = + function() { + // reinstates QSA native references + Element.prototype.closest = _closest; + Element.prototype.matches = _matches; + Element.prototype.querySelector = + Document.prototype.querySelector = + DocumentFragment.prototype.querySelector = _querySelector; + Element.prototype.querySelectorAll = + Document.prototype.querySelectorAll = + DocumentFragment.prototype.querySelectorAll = _querySelectorAll; + }, + + // empty set + none = Array(), + + // context + lastContext, + + // selector + lastMatched, + lastSelected, + + // cached lambdas + matchLambdas = { }, + selectLambdas = { }, + + // cached resolvers + matchResolvers = { }, + selectResolvers = { }, + + // passed to resolvers + Snapshot = { + + doc: doc, + from: doc, + root: root, + + byTag: byTag, + + first: first, + match: match, + + ancestor: ancestor, + + nthOfType: nthOfType, + nthElement: nthElement, + + hasAttributeNS: hasAttributeNS + }, + + // public exported methods/objects + Dom = { + + // exported cache objects + + lastMatched: lastMatched, + lastSelected: lastSelected, + + matchLambdas: matchLambdas, + selectLambdas: selectLambdas, + + matchResolvers: matchResolvers, + selectResolvers: selectResolvers, + + // exported compiler macros + + CFG: CFG, + + M_BODY: M_BODY, + S_BODY: S_BODY, + M_TEST: M_TEST, + S_TEST: S_TEST, + + // exported engine methods + + byId: byId, + byTag: byTag, + byClass: byClass, + + match: match, + first: first, + select: select, + closest: ancestor, + + compile: compile, + configure: configure, + + emit: emit, + Config: Config, + Snapshot: Snapshot, + + Version: version, + + install: install, + uninstall: uninstall, + + Operators: Operators, + Selectors: Selectors, + + // register a new selector combinator symbol and its related function resolver + registerCombinator: + function(combinator, resolver) { + var i = 0, l = combinator.length, symbol; + for (; l > i; ++i) { + if (combinator[i] != '=') { + symbol = combinator[i]; + break; + } + } + if (CFG.combinators.indexOf(symbol) < 0) { + CFG.combinators = CFG.combinators.replace('](', symbol + ']('); + CFG.combinators = CFG.combinators.replace('])', symbol + '])'); + Combinators[combinator] = resolver; + setIdentifierSyntax(); + } else { + console.warn('Warning: the \'' + combinator + '\' combinator is already registered.'); + } + }, + + // register a new attribute operator symbol and its related function resolver + registerOperator: + function(operator, resolver) { + var i = 0, l = operator.length, symbol; + for (; l > i; ++i) { + if (operator[i] != '=') { + symbol = operator[i]; + break; + } + } + if (CFG.operators.indexOf(symbol) < 0 && !Operators[operator]) { + CFG.operators = CFG.operators.replace(']=', symbol + ']='); + Operators[operator] = resolver; + setIdentifierSyntax(); + } else { + console.warn('Warning: the \'' + operator + '\' operator is already registered.'); + } + }, + + // register a new selector symbol and its related function resolver + registerSelector: + function(name, rexp, func) { + Selectors[name] || (Selectors[name] = { + Expression: rexp, + Callback: func + }); + } + + }; + + initialize(doc); + + return Dom; + +}); diff --git a/node_modules/oauth-sign/README.md b/node_modules/oauth-sign/README.md index 34c4a85..549cbba 100644 --- a/node_modules/oauth-sign/README.md +++ b/node_modules/oauth-sign/README.md @@ -2,3 +2,10 @@ oauth-sign ========== OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. + +## Supported Method Signatures + +- HMAC-SHA1 +- HMAC-SHA256 +- RSA-SHA1 +- PLAINTEXT \ No newline at end of file diff --git a/node_modules/oauth-sign/index.js b/node_modules/oauth-sign/index.js index dadcba9..6482f77 100644 --- a/node_modules/oauth-sign/index.js +++ b/node_modules/oauth-sign/index.js @@ -1,13 +1,11 @@ var crypto = require('crypto') - , qs = require('querystring') - ; -function sha1 (key, body) { - return crypto.createHmac('sha1', key).update(body).digest('base64') +function sha (key, body, algorithm) { + return crypto.createHmac(algorithm, key).update(body).digest('base64') } function rsa (key, body) { - return crypto.createSign("RSA-SHA1").update(body).sign(key, 'base64'); + return crypto.createSign('RSA-SHA1').update(body).sign(key, 'base64') } function rfc3986 (str) { @@ -17,7 +15,6 @@ function rfc3986 (str) { .replace(/\(/g,'%28') .replace(/\)/g,'%29') .replace(/'/g,'%27') - ; } // Maps object to bi-dimensional array @@ -30,9 +27,9 @@ function map (obj) { if (Array.isArray(val)) for (var i = 0; i < val.length; i++) arr.push([key, val[i]]) - else if (typeof val === "object") + else if (typeof val === 'object') for (var prop in val) - arr.push([key + '[' + prop + ']', val[prop]]); + arr.push([key + '[' + prop + ']', val[prop]]) else arr.push([key, val]) } @@ -86,7 +83,17 @@ function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) token_secret || '' ].map(rfc3986).join('&') - return sha1(key, base) + return sha(key, base, 'sha1') +} + +function hmacsign256 (httpMethod, base_uri, params, consumer_secret, token_secret) { + var base = generateBase(httpMethod, base_uri, params) + var key = [ + consumer_secret || '', + token_secret || '' + ].map(rfc3986).join('&') + + return sha(key, base, 'sha256') } function rsasign (httpMethod, base_uri, params, private_key, token_secret) { @@ -116,21 +123,24 @@ function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_ case 'HMAC-SHA1': method = hmacsign break + case 'HMAC-SHA256': + method = hmacsign256 + break case 'PLAINTEXT': method = plaintext skipArgs = 4 break default: - throw new Error("Signature method not supported: " + signMethod) + throw new Error('Signature method not supported: ' + signMethod) } return method.apply(null, [].slice.call(arguments, skipArgs)) } exports.hmacsign = hmacsign +exports.hmacsign256 = hmacsign256 exports.rsasign = rsasign exports.plaintext = plaintext exports.sign = sign exports.rfc3986 = rfc3986 -exports.generateBase = generateBase - +exports.generateBase = generateBase \ No newline at end of file diff --git a/node_modules/oauth-sign/package.json b/node_modules/oauth-sign/package.json index 8dda400..9fd1df0 100644 --- a/node_modules/oauth-sign/package.json +++ b/node_modules/oauth-sign/package.json @@ -1,27 +1,27 @@ { - "_from": "oauth-sign@~0.8.2", - "_id": "oauth-sign@0.8.2", + "_from": "oauth-sign@~0.9.0", + "_id": "oauth-sign@0.9.0", "_inBundle": false, - "_integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "_integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "_location": "/oauth-sign", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "oauth-sign@~0.8.2", + "raw": "oauth-sign@~0.9.0", "name": "oauth-sign", "escapedName": "oauth-sign", - "rawSpec": "~0.8.2", + "rawSpec": "~0.9.0", "saveSpec": null, - "fetchSpec": "~0.8.2" + "fetchSpec": "~0.9.0" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "_shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", - "_spec": "oauth-sign@~0.8.2", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/request", + "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "_shasum": "47a7b016baa68b5fa0ecf3dee08a85c679ac6455", + "_spec": "oauth-sign@~0.9.0", + "_where": "E:\\projects\\p\\minifyfromhtml\\node_modules\\request", "author": { "name": "Mikeal Rogers", "email": "mikeal.rogers@gmail.com", @@ -52,5 +52,5 @@ "scripts": { "test": "node test.js" }, - "version": "0.8.2" + "version": "0.9.0" } diff --git a/node_modules/object-keys/package.json b/node_modules/object-keys/package.json index 81e99b7..3fa9f30 100644 --- a/node_modules/object-keys/package.json +++ b/node_modules/object-keys/package.json @@ -1,27 +1,32 @@ { - "_from": "object-keys@^1.0.8", + "_args": [ + [ + "object-keys@1.0.11", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "object-keys@1.0.11", "_id": "object-keys@1.0.11", "_inBundle": false, "_integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", "_location": "/object-keys", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "object-keys@^1.0.8", + "raw": "object-keys@1.0.11", "name": "object-keys", "escapedName": "object-keys", - "rawSpec": "^1.0.8", + "rawSpec": "1.0.11", "saveSpec": null, - "fetchSpec": "^1.0.8" + "fetchSpec": "1.0.11" }, "_requiredBy": [ "/define-properties" ], "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "_shasum": "c54601778ad560f1142ce0e01bcca8b56d13426d", - "_spec": "object-keys@^1.0.8", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/define-properties", + "_spec": "1.0.11", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", @@ -30,7 +35,6 @@ "bugs": { "url": "https://github.com/ljharb/object-keys/issues" }, - "bundleDependencies": false, "contributors": [ { "name": "Jordan Harband", @@ -55,7 +59,6 @@ } ], "dependencies": {}, - "deprecated": false, "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", "devDependencies": { "@ljharb/eslint-config": "^6.0.0", diff --git a/node_modules/object.getownpropertydescriptors/package.json b/node_modules/object.getownpropertydescriptors/package.json index 899f7a8..8a6a987 100644 --- a/node_modules/object.getownpropertydescriptors/package.json +++ b/node_modules/object.getownpropertydescriptors/package.json @@ -1,39 +1,42 @@ { - "_from": "object.getownpropertydescriptors@^2.0.3", + "_args": [ + [ + "object.getownpropertydescriptors@2.0.3", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "object.getownpropertydescriptors@2.0.3", "_id": "object.getownpropertydescriptors@2.0.3", "_inBundle": false, "_integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", "_location": "/object.getownpropertydescriptors", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "object.getownpropertydescriptors@^2.0.3", + "raw": "object.getownpropertydescriptors@2.0.3", "name": "object.getownpropertydescriptors", "escapedName": "object.getownpropertydescriptors", - "rawSpec": "^2.0.3", + "rawSpec": "2.0.3", "saveSpec": null, - "fetchSpec": "^2.0.3" + "fetchSpec": "2.0.3" }, "_requiredBy": [ "/util.promisify" ], "_resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "_shasum": "8758c846f5b407adab0f236e0986f14b051caa16", - "_spec": "object.getownpropertydescriptors@^2.0.3", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/util.promisify", + "_spec": "2.0.3", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Jordan Harband" }, "bugs": { "url": "https://github.com/ljharb/object.getownpropertydescriptors/issues" }, - "bundleDependencies": false, "dependencies": { "define-properties": "^1.1.2", "es-abstract": "^1.5.1" }, - "deprecated": false, "description": "ES2017 spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.", "devDependencies": { "@es-shims/api": "^1.2.0", diff --git a/node_modules/object.omit/LICENSE b/node_modules/object.omit/LICENSE deleted file mode 100644 index 842218c..0000000 --- a/node_modules/object.omit/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/object.omit/README.md b/node_modules/object.omit/README.md deleted file mode 100644 index 246efe0..0000000 --- a/node_modules/object.omit/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# object.omit [![NPM version](https://img.shields.io/npm/v/object.omit.svg?style=flat)](https://www.npmjs.com/package/object.omit) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.omit.svg?style=flat)](https://npmjs.org/package/object.omit) [![NPM total downloads](https://img.shields.io/npm/dt/object.omit.svg?style=flat)](https://npmjs.org/package/object.omit) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.omit.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.omit) - -> Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save object.omit -``` - -## Usage - -```js -var omit = require('object.omit'); -``` - -Pass a string `key` to omit: - -```js -omit({a: 'a', b: 'b', c: 'c'}, 'a') -//=> { b: 'b', c: 'c' } -``` - -Pass an array of `keys` to omit: - -```js -omit({a: 'a', b: 'b', c: 'c'}, ['a', 'c']) -//=> { b: 'b' } -``` - -Returns the object if no keys are passed: - -```js -omit({a: 'a', b: 'b', c: 'c'}) -//=> {a: 'a', b: 'b', c: 'c'} -``` - -Returns an empty object if no value is passed. - -```js -omit() -//=> {} -``` - -### Filter function - -An optional filter function may be passed as the last argument, with or without keys passed on the arguments: - -**filter on keys** - -```js -var res = omit({a: 'a', b: 'b', c: 'c'}, function (val, key) { - return key === 'a'; -}); -//=> {a: 'a'} -``` - -**filter on values** - -```js -var fn = function() {}; -var obj = {a: 'a', b: 'b', c: fn}; - -var res = omit(obj, ['a'], function (val, key) { - return typeof val !== 'function'; -}); -//=> {b: 'b'} -``` - -## About - -### Related projects - -* [object.defaults](https://www.npmjs.com/package/object.defaults): Like `extend` but only copies missing properties/values to the target object. | [homepage](https://github.com/jonschlinkert/object.defaults "Like `extend` but only copies missing properties/values to the target object.") -* [object.filter](https://www.npmjs.com/package/object.filter): Create a new object filtered to have only properties for which the callback returns true. | [homepage](https://github.com/jonschlinkert/object.filter "Create a new object filtered to have only properties for which the callback returns true.") -* [object.pick](https://www.npmjs.com/package/object.pick): Returns a filtered copy of an object with only the specified keys, similar to `_.pick… [more](https://github.com/jonschlinkert/object.pick) | [homepage](https://github.com/jonschlinkert/object.pick "Returns a filtered copy of an object with only the specified keys, similar to`_.pick` from lodash / underscore.") -* [object.pluck](https://www.npmjs.com/package/object.pluck): Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with… [more](https://github.com/jonschlinkert/object.pluck) | [homepage](https://github.com/jonschlinkert/object.pluck "Like pluck from underscore / lo-dash, but returns an object composed of specified properties, with values unmodified from those of the original object.") -* [object.reduce](https://www.npmjs.com/package/object.reduce): Reduces an object to a value that is the accumulated result of running each property… [more](https://github.com/jonschlinkert/object.reduce) | [homepage](https://github.com/jonschlinkert/object.reduce "Reduces an object to a value that is the accumulated result of running each property in the object through a callback.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/object.omit/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 27, 2016._ \ No newline at end of file diff --git a/node_modules/object.omit/index.js b/node_modules/object.omit/index.js deleted file mode 100644 index 503a3c3..0000000 --- a/node_modules/object.omit/index.js +++ /dev/null @@ -1,40 +0,0 @@ -/*! - * object.omit - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isObject = require('is-extendable'); -var forOwn = require('for-own'); - -module.exports = function omit(obj, keys) { - if (!isObject(obj)) return {}; - - keys = [].concat.apply([], [].slice.call(arguments, 1)); - var last = keys[keys.length - 1]; - var res = {}, fn; - - if (typeof last === 'function') { - fn = keys.pop(); - } - - var isFunction = typeof fn === 'function'; - if (!keys.length && !isFunction) { - return obj; - } - - forOwn(obj, function(value, key) { - if (keys.indexOf(key) === -1) { - - if (!isFunction) { - res[key] = value; - } else if (fn(value, key, obj)) { - res[key] = value; - } - } - }); - return res; -}; diff --git a/node_modules/object.omit/package.json b/node_modules/object.omit/package.json deleted file mode 100644 index ad10bed..0000000 --- a/node_modules/object.omit/package.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "_from": "object.omit@^2.0.0", - "_id": "object.omit@2.0.1", - "_inBundle": false, - "_integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "_location": "/object.omit", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "object.omit@^2.0.0", - "name": "object.omit", - "escapedName": "object.omit", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "_shasum": "1a9c744829f39dbb858c76ca3579ae2a54ebd1fa", - "_spec": "object.omit@^2.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/object.omit/issues" - }, - "bundleDependencies": false, - "dependencies": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - }, - "deprecated": false, - "description": "Return a copy of an object excluding the given key, or array of keys. Also accepts an optional filter function as the last argument.", - "devDependencies": { - "gulp-format-md": "^0.1.11", - "mocha": "^3.1.2", - "should": "^11.1.1" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/object.omit", - "keywords": [ - "clear", - "delete", - "key", - "object", - "omit", - "property", - "remove", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "object.omit", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/object.omit.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "object.defaults", - "object.filter", - "object.pick", - "object.pluck", - "object.reduce" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "reflinks": [ - "verb", - "verb-generate-readme" - ] - }, - "version": "2.0.1" -} diff --git a/node_modules/optionator/package.json b/node_modules/optionator/package.json index 96f928f..6370f83 100644 --- a/node_modules/optionator/package.json +++ b/node_modules/optionator/package.json @@ -1,27 +1,32 @@ { - "_from": "optionator@^0.8.1", + "_args": [ + [ + "optionator@0.8.2", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "optionator@0.8.2", "_id": "optionator@0.8.2", "_inBundle": false, "_integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "_location": "/optionator", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "optionator@^0.8.1", + "raw": "optionator@0.8.2", "name": "optionator", "escapedName": "optionator", - "rawSpec": "^0.8.1", + "rawSpec": "0.8.2", "saveSpec": null, - "fetchSpec": "^0.8.1" + "fetchSpec": "0.8.2" }, "_requiredBy": [ "/escodegen" ], "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "_shasum": "364c5e409d3f4d6301d6c0b4c05bba50180aeb64", - "_spec": "optionator@^0.8.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/escodegen", + "_spec": "0.8.2", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "George Zahariev", "email": "z@georgezahariev.com" @@ -29,7 +34,6 @@ "bugs": { "url": "https://github.com/gkz/optionator/issues" }, - "bundleDependencies": false, "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.4", @@ -38,7 +42,6 @@ "type-check": "~0.3.2", "wordwrap": "~1.0.0" }, - "deprecated": false, "description": "option parsing and help generation", "devDependencies": { "istanbul": "~0.4.1", diff --git a/node_modules/os-homedir/package.json b/node_modules/os-homedir/package.json index 28c66c7..355b831 100644 --- a/node_modules/os-homedir/package.json +++ b/node_modules/os-homedir/package.json @@ -1,27 +1,32 @@ { - "_from": "os-homedir@^1.0.0", + "_args": [ + [ + "os-homedir@1.0.2", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "os-homedir@1.0.2", "_id": "os-homedir@1.0.2", "_inBundle": false, "_integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "_location": "/os-homedir", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "os-homedir@^1.0.0", + "raw": "os-homedir@1.0.2", "name": "os-homedir", "escapedName": "os-homedir", - "rawSpec": "^1.0.0", + "rawSpec": "1.0.2", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "1.0.2" }, "_requiredBy": [ "/home-or-tmp" ], "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "_shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3", - "_spec": "os-homedir@^1.0.0", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/home-or-tmp", + "_spec": "1.0.2", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/sindresorhus/os-homedir/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Node.js 4 `os.homedir()` ponyfill", "devDependencies": { "ava": "*", diff --git a/node_modules/os-tmpdir/package.json b/node_modules/os-tmpdir/package.json index 36d3b13..63078f9 100644 --- a/node_modules/os-tmpdir/package.json +++ b/node_modules/os-tmpdir/package.json @@ -1,27 +1,32 @@ { - "_from": "os-tmpdir@^1.0.1", + "_args": [ + [ + "os-tmpdir@1.0.2", + "E:\\projects\\p\\minifyfromhtml" + ] + ], + "_from": "os-tmpdir@1.0.2", "_id": "os-tmpdir@1.0.2", "_inBundle": false, "_integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "_location": "/os-tmpdir", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "os-tmpdir@^1.0.1", + "raw": "os-tmpdir@1.0.2", "name": "os-tmpdir", "escapedName": "os-tmpdir", - "rawSpec": "^1.0.1", + "rawSpec": "1.0.2", "saveSpec": null, - "fetchSpec": "^1.0.1" + "fetchSpec": "1.0.2" }, "_requiredBy": [ "/home-or-tmp" ], "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "_shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", - "_spec": "os-tmpdir@^1.0.1", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/home-or-tmp", + "_spec": "1.0.2", + "_where": "E:\\projects\\p\\minifyfromhtml", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -30,8 +35,6 @@ "bugs": { "url": "https://github.com/sindresorhus/os-tmpdir/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "Node.js os.tmpdir() ponyfill", "devDependencies": { "ava": "*", diff --git a/node_modules/parse-glob/LICENSE b/node_modules/parse-glob/LICENSE deleted file mode 100644 index 65f90ac..0000000 --- a/node_modules/parse-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/parse-glob/README.md b/node_modules/parse-glob/README.md deleted file mode 100644 index 000ccd9..0000000 --- a/node_modules/parse-glob/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# parse-glob [![NPM version](https://badge.fury.io/js/parse-glob.svg)](http://badge.fury.io/js/parse-glob) [![Build Status](https://travis-ci.org/jonschlinkert/parse-glob.svg)](https://travis-ci.org/jonschlinkert/parse-glob) - -> Parse a glob pattern into an object of tokens. - -**Changes from v1.0.0 to v3.0.4** - -* all path-related properties are now on the `path` object -* all boolean properties are now on the `is` object -* adds `base` property - -See the [properties](#properties) section for details. - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i parse-glob --save -``` - -* parses 1,000+ glob patterns in 29ms (2.3 GHz Intel Core i7) -* Extensive [unit tests](./test.js) (more than 1,000 lines), covering wildcards, globstars, character classes, brace patterns, extglobs, dotfiles and other complex patterns. - -See the tests for [hundreds of examples](./test.js). - -## Usage - -```js -var parseGlob = require('parse-glob'); -``` - -**Example** - -```js -parseGlob('a/b/c/**/*.{yml,json}'); -``` - -**Returns:** - -```js -{ orig: 'a/b/c/**/*.{yml,json}', - is: - { glob: true, - negated: false, - extglob: false, - braces: true, - brackets: false, - globstar: true, - dotfile: false, - dotdir: false }, - glob: '**/*.{yml,json}', - base: 'a/b/c', - path: - { dirname: 'a/b/c/**/', - basename: '*.{yml,json}', - filename: '*', - extname: '.{yml,json}', - ext: '{yml,json}' } } -``` - -## Properties - -The object returned by parseGlob has the following properties: - -* `orig`: a copy of the original, unmodified glob pattern -* `is`: an object with boolean information about the glob: - - `glob`: true if the pattern actually a glob pattern - - `negated`: true if it's a negation pattern (`!**/foo.js`) - - `extglob`: true if it has extglobs (`@(foo|bar)`) - - `braces`: true if it has braces (`{1..2}` or `.{txt,md}`) - - `brackets`: true if it has POSIX brackets (`[[:alpha:]]`) - - `globstar`: true if the pattern has a globstar (double star, `**`) - - `dotfile`: true if the pattern should match dotfiles - - `dotdir`: true if the pattern should match dot-directories (like `.git`) -* `glob`: the glob pattern part of the string, if any -* `base`: the non-glob part of the string, if any -* `path`: file path segments - - `dirname`: directory - - `basename`: file name with extension - - `filename`: file name without extension - - `extname`: file extension with dot - - `ext`: file extension without dot - -## Related -* [glob-base](https://www.npmjs.com/package/glob-base): Returns an object with the (non-glob) base path and the actual pattern. | [homepage](https://github.com/jonschlinkert/glob-base) -* [glob-parent](https://www.npmjs.com/package/glob-parent): Strips glob magic from a string to provide the parent path | [homepage](https://github.com/es128/glob-parent) -* [glob-path-regex](https://www.npmjs.com/package/glob-path-regex): Regular expression for matching the parts of glob pattern. | [homepage](https://github.com/regexps/glob-path-regex) -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern. | [homepage](https://github.com/jonschlinkert/is-glob) -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/parse-glob/issues/new). - -## Tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2014-2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 22, 2015._ \ No newline at end of file diff --git a/node_modules/parse-glob/index.js b/node_modules/parse-glob/index.js deleted file mode 100644 index 4ab691a..0000000 --- a/node_modules/parse-glob/index.js +++ /dev/null @@ -1,156 +0,0 @@ -/*! - * parse-glob - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var isGlob = require('is-glob'); -var findBase = require('glob-base'); -var extglob = require('is-extglob'); -var dotfile = require('is-dotfile'); - -/** - * Expose `cache` - */ - -var cache = module.exports.cache = {}; - -/** - * Parse a glob pattern into tokens. - * - * When no paths or '**' are in the glob, we use a - * different strategy for parsing the filename, since - * file names can contain braces and other difficult - * patterns. such as: - * - * - `*.{a,b}` - * - `(**|*.js)` - */ - -module.exports = function parseGlob(glob) { - if (cache.hasOwnProperty(glob)) { - return cache[glob]; - } - - var tok = {}; - tok.orig = glob; - tok.is = {}; - - // unescape dots and slashes in braces/brackets - glob = escape(glob); - - var parsed = findBase(glob); - tok.is.glob = parsed.isGlob; - - tok.glob = parsed.glob; - tok.base = parsed.base; - var segs = /([^\/]*)$/.exec(glob); - - tok.path = {}; - tok.path.dirname = ''; - tok.path.basename = segs[1] || ''; - tok.path.dirname = glob.split(tok.path.basename).join('') || ''; - var basename = (tok.path.basename || '').split('.') || ''; - tok.path.filename = basename[0] || ''; - tok.path.extname = basename.slice(1).join('.') || ''; - tok.path.ext = ''; - - if (isGlob(tok.path.dirname) && !tok.path.basename) { - if (!/\/$/.test(tok.glob)) { - tok.path.basename = tok.glob; - } - tok.path.dirname = tok.base; - } - - if (glob.indexOf('/') === -1 && !tok.is.globstar) { - tok.path.dirname = ''; - tok.path.basename = tok.orig; - } - - var dot = tok.path.basename.indexOf('.'); - if (dot !== -1) { - tok.path.filename = tok.path.basename.slice(0, dot); - tok.path.extname = tok.path.basename.slice(dot); - } - - if (tok.path.extname.charAt(0) === '.') { - var exts = tok.path.extname.split('.'); - tok.path.ext = exts[exts.length - 1]; - } - - // unescape dots and slashes in braces/brackets - tok.glob = unescape(tok.glob); - tok.path.dirname = unescape(tok.path.dirname); - tok.path.basename = unescape(tok.path.basename); - tok.path.filename = unescape(tok.path.filename); - tok.path.extname = unescape(tok.path.extname); - - // Booleans - var is = (glob && tok.is.glob); - tok.is.negated = glob && glob.charAt(0) === '!'; - tok.is.extglob = glob && extglob(glob); - tok.is.braces = has(is, glob, '{'); - tok.is.brackets = has(is, glob, '[:'); - tok.is.globstar = has(is, glob, '**'); - tok.is.dotfile = dotfile(tok.path.basename) || dotfile(tok.path.filename); - tok.is.dotdir = dotdir(tok.path.dirname); - return (cache[glob] = tok); -} - -/** - * Returns true if the glob matches dot-directories. - * - * @param {Object} `tok` The tokens object - * @param {Object} `path` The path object - * @return {Object} - */ - -function dotdir(base) { - if (base.indexOf('/.') !== -1) { - return true; - } - if (base.charAt(0) === '.' && base.charAt(1) !== '/') { - return true; - } - return false; -} - -/** - * Returns true if the pattern has the given `ch`aracter(s) - * - * @param {Object} `glob` The glob pattern. - * @param {Object} `ch` The character to test for - * @return {Object} - */ - -function has(is, glob, ch) { - return is && glob.indexOf(ch) !== -1; -} - -/** - * Escape/unescape utils - */ - -function escape(str) { - var re = /\{([^{}]*?)}|\(([^()]*?)\)|\[([^\[\]]*?)\]/g; - return str.replace(re, function (outter, braces, parens, brackets) { - var inner = braces || parens || brackets; - if (!inner) { return outter; } - return outter.split(inner).join(esc(inner)); - }); -} - -function esc(str) { - str = str.split('/').join('__SLASH__'); - str = str.split('.').join('__DOT__'); - return str; -} - -function unescape(str) { - str = str.split('__SLASH__').join('/'); - str = str.split('__DOT__').join('.'); - return str; -} diff --git a/node_modules/parse-glob/package.json b/node_modules/parse-glob/package.json deleted file mode 100644 index e7925e5..0000000 --- a/node_modules/parse-glob/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_from": "parse-glob@^3.0.4", - "_id": "parse-glob@3.0.4", - "_inBundle": false, - "_integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "_location": "/parse-glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "parse-glob@^3.0.4", - "name": "parse-glob", - "escapedName": "parse-glob", - "rawSpec": "^3.0.4", - "saveSpec": null, - "fetchSpec": "^3.0.4" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "_shasum": "b2c376cfb11f35513badd173ef0bb6e3a388391c", - "_spec": "parse-glob@^3.0.4", - "_where": "/home/s2/Documents/Code/minifyfromhtml/node_modules/micromatch", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/parse-glob/issues" - }, - "bundleDependencies": false, - "dependencies": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "deprecated": false, - "description": "Parse a glob pattern into an object of tokens.", - "devDependencies": { - "browserify": "^9.0.3", - "lodash": "^3.3.1", - "mocha": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/parse-glob", - "keywords": [ - "glob", - "match", - "bash", - "expand", - "expansion", - "expression", - "file", - "files", - "filter", - "find", - "glob", - "globbing", - "globs", - "globstar", - "match", - "matcher", - "matches", - "matching", - "path", - "pattern", - "patterns", - "regex", - "regexp", - "regular", - "shell", - "wildcard" - ], - "license": "MIT", - "main": "index.js", - "name": "parse-glob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/parse-glob.git" - }, - "scripts": { - "prepublish": "browserify -o browser.js -e index.js", - "test": "mocha" - }, - "version": "3.0.4" -} diff --git a/node_modules/parse5/LICENSE b/node_modules/parse5/LICENSE deleted file mode 100644 index 120d532..0000000 --- a/node_modules/parse5/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013-2016 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/parse5/README.md b/node_modules/parse5/README.md index 0dc9909..32b53be 100644 --- a/node_modules/parse5/README.md +++ b/node_modules/parse5/README.md @@ -4,31 +4,29 @@

+
+

parse5

+HTML parser and serializer. +
+
+ +
+npm install --save parse5 +
+
+

-HTML parsing/serialization toolset for Node.js. WHATWG HTML Living Standard (aka HTML5)-compliant. + 📖 Documentation 📖 +

+ +--- + +

+ List of parse5 toolset packages

- Build Status - NPM Version - Downloads - Downloads total -

- -

-parse5 provides nearly everything you may need when dealing with HTML. It's the fastest spec-compliant HTML parser -for Node to date. It parses HTML the way the latest version of your browser does. It has proven itself reliable in such projects -as jsdom, Angular2, Polymer and many more. -

- ----- - -

- Documentation -

- -

- Version history + GitHub

@@ -36,5 +34,5 @@ as jsdom, - Issue tracker + Version history

diff --git a/node_modules/parse5/lib/common/doctype.js b/node_modules/parse5/lib/common/doctype.js index ca4a86a..9f5d573 100644 --- a/node_modules/parse5/lib/common/doctype.js +++ b/node_modules/parse5/lib/common/doctype.js @@ -1,156 +1,173 @@ 'use strict'; -var DOCUMENT_MODE = require('./html').DOCUMENT_MODE; +const { DOCUMENT_MODE } = require('./html'); //Const -var VALID_DOCTYPE_NAME = 'html', - QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd', - QUIRKS_MODE_PUBLIC_ID_PREFIXES = [ - '+//silmaril//dtd html pro v0r11 19970101//en', - '-//advasoft ltd//dtd html 3.0 aswedit + extensions//en', - '-//as//dtd html 3.0 aswedit + extensions//en', - '-//ietf//dtd html 2.0 level 1//en', - '-//ietf//dtd html 2.0 level 2//en', - '-//ietf//dtd html 2.0 strict level 1//en', - '-//ietf//dtd html 2.0 strict level 2//en', - '-//ietf//dtd html 2.0 strict//en', - '-//ietf//dtd html 2.0//en', - '-//ietf//dtd html 2.1e//en', - '-//ietf//dtd html 3.0//en', - '-//ietf//dtd html 3.0//en//', - '-//ietf//dtd html 3.2 final//en', - '-//ietf//dtd html 3.2//en', - '-//ietf//dtd html 3//en', - '-//ietf//dtd html level 0//en', - '-//ietf//dtd html level 0//en//2.0', - '-//ietf//dtd html level 1//en', - '-//ietf//dtd html level 1//en//2.0', - '-//ietf//dtd html level 2//en', - '-//ietf//dtd html level 2//en//2.0', - '-//ietf//dtd html level 3//en', - '-//ietf//dtd html level 3//en//3.0', - '-//ietf//dtd html strict level 0//en', - '-//ietf//dtd html strict level 0//en//2.0', - '-//ietf//dtd html strict level 1//en', - '-//ietf//dtd html strict level 1//en//2.0', - '-//ietf//dtd html strict level 2//en', - '-//ietf//dtd html strict level 2//en//2.0', - '-//ietf//dtd html strict level 3//en', - '-//ietf//dtd html strict level 3//en//3.0', - '-//ietf//dtd html strict//en', - '-//ietf//dtd html strict//en//2.0', - '-//ietf//dtd html strict//en//3.0', - '-//ietf//dtd html//en', - '-//ietf//dtd html//en//2.0', - '-//ietf//dtd html//en//3.0', - '-//metrius//dtd metrius presentational//en', - '-//microsoft//dtd internet explorer 2.0 html strict//en', - '-//microsoft//dtd internet explorer 2.0 html//en', - '-//microsoft//dtd internet explorer 2.0 tables//en', - '-//microsoft//dtd internet explorer 3.0 html strict//en', - '-//microsoft//dtd internet explorer 3.0 html//en', - '-//microsoft//dtd internet explorer 3.0 tables//en', - '-//netscape comm. corp.//dtd html//en', - '-//netscape comm. corp.//dtd strict html//en', - '-//o\'reilly and associates//dtd html 2.0//en', - '-//o\'reilly and associates//dtd html extended 1.0//en', - '-//spyglass//dtd html 2.0 extended//en', - '-//sq//dtd html 2.0 hotmetal + extensions//en', - '-//sun microsystems corp.//dtd hotjava html//en', - '-//sun microsystems corp.//dtd hotjava strict html//en', - '-//w3c//dtd html 3 1995-03-24//en', - '-//w3c//dtd html 3.2 draft//en', - '-//w3c//dtd html 3.2 final//en', - '-//w3c//dtd html 3.2//en', - '-//w3c//dtd html 3.2s draft//en', - '-//w3c//dtd html 4.0 frameset//en', - '-//w3c//dtd html 4.0 transitional//en', - '-//w3c//dtd html experimental 19960712//en', - '-//w3c//dtd html experimental 970421//en', - '-//w3c//dtd w3 html//en', - '-//w3o//dtd w3 html 3.0//en', - '-//w3o//dtd w3 html 3.0//en//', - '-//webtechs//dtd mozilla html 2.0//en', - '-//webtechs//dtd mozilla html//en' - ], - QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat([ - '-//w3c//dtd html 4.01 frameset//', - '-//w3c//dtd html 4.01 transitional//' - ]), - QUIRKS_MODE_PUBLIC_IDS = [ - '-//w3o//dtd w3 html strict 3.0//en//', - '-/w3c/dtd html 4.0 transitional/en', - 'html' - ], - LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = [ - '-//W3C//DTD XHTML 1.0 Frameset//', - '-//W3C//DTD XHTML 1.0 Transitional//' - ], - LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat([ - '-//W3C//DTD HTML 4.01 Frameset//', - '-//W3C//DTD HTML 4.01 Transitional//' - ]); +const VALID_DOCTYPE_NAME = 'html'; +const VALID_SYSTEM_ID = 'about:legacy-compat'; +const QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd'; +const QUIRKS_MODE_PUBLIC_ID_PREFIXES = [ + '+//silmaril//dtd html pro v0r11 19970101//en', + '-//advasoft ltd//dtd html 3.0 aswedit + extensions//en', + '-//as//dtd html 3.0 aswedit + extensions//en', + '-//ietf//dtd html 2.0 level 1//en', + '-//ietf//dtd html 2.0 level 2//en', + '-//ietf//dtd html 2.0 strict level 1//en', + '-//ietf//dtd html 2.0 strict level 2//en', + '-//ietf//dtd html 2.0 strict//en', + '-//ietf//dtd html 2.0//en', + '-//ietf//dtd html 2.1e//en', + '-//ietf//dtd html 3.0//en', + '-//ietf//dtd html 3.0//en//', + '-//ietf//dtd html 3.2 final//en', + '-//ietf//dtd html 3.2//en', + '-//ietf//dtd html 3//en', + '-//ietf//dtd html level 0//en', + '-//ietf//dtd html level 0//en//2.0', + '-//ietf//dtd html level 1//en', + '-//ietf//dtd html level 1//en//2.0', + '-//ietf//dtd html level 2//en', + '-//ietf//dtd html level 2//en//2.0', + '-//ietf//dtd html level 3//en', + '-//ietf//dtd html level 3//en//3.0', + '-//ietf//dtd html strict level 0//en', + '-//ietf//dtd html strict level 0//en//2.0', + '-//ietf//dtd html strict level 1//en', + '-//ietf//dtd html strict level 1//en//2.0', + '-//ietf//dtd html strict level 2//en', + '-//ietf//dtd html strict level 2//en//2.0', + '-//ietf//dtd html strict level 3//en', + '-//ietf//dtd html strict level 3//en//3.0', + '-//ietf//dtd html strict//en', + '-//ietf//dtd html strict//en//2.0', + '-//ietf//dtd html strict//en//3.0', + '-//ietf//dtd html//en', + '-//ietf//dtd html//en//2.0', + '-//ietf//dtd html//en//3.0', + '-//metrius//dtd metrius presentational//en', + '-//microsoft//dtd internet explorer 2.0 html strict//en', + '-//microsoft//dtd internet explorer 2.0 html//en', + '-//microsoft//dtd internet explorer 2.0 tables//en', + '-//microsoft//dtd internet explorer 3.0 html strict//en', + '-//microsoft//dtd internet explorer 3.0 html//en', + '-//microsoft//dtd internet explorer 3.0 tables//en', + '-//netscape comm. corp.//dtd html//en', + '-//netscape comm. corp.//dtd strict html//en', + "-//o'reilly and associates//dtd html 2.0//en", + "-//o'reilly and associates//dtd html extended 1.0//en", + '-//spyglass//dtd html 2.0 extended//en', + '-//sq//dtd html 2.0 hotmetal + extensions//en', + '-//sun microsystems corp.//dtd hotjava html//en', + '-//sun microsystems corp.//dtd hotjava strict html//en', + '-//w3c//dtd html 3 1995-03-24//en', + '-//w3c//dtd html 3.2 draft//en', + '-//w3c//dtd html 3.2 final//en', + '-//w3c//dtd html 3.2//en', + '-//w3c//dtd html 3.2s draft//en', + '-//w3c//dtd html 4.0 frameset//en', + '-//w3c//dtd html 4.0 transitional//en', + '-//w3c//dtd html experimental 19960712//en', + '-//w3c//dtd html experimental 970421//en', + '-//w3c//dtd w3 html//en', + '-//w3o//dtd w3 html 3.0//en', + '-//w3o//dtd w3 html 3.0//en//', + '-//webtechs//dtd mozilla html 2.0//en', + '-//webtechs//dtd mozilla html//en' +]; + +const QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat([ + '-//w3c//dtd html 4.01 frameset//', + '-//w3c//dtd html 4.01 transitional//' +]); + +const QUIRKS_MODE_PUBLIC_IDS = ['-//w3o//dtd w3 html strict 3.0//en//', '-/w3c/dtd html 4.0 transitional/en', 'html']; +const LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//W3C//DTD XHTML 1.0 Frameset//', '-//W3C//DTD XHTML 1.0 Transitional//']; + +const LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat([ + '-//W3C//DTD HTML 4.01 Frameset//', + '-//W3C//DTD HTML 4.01 Transitional//' +]); //Utils function enquoteDoctypeId(id) { - var quote = id.indexOf('"') !== -1 ? '\'' : '"'; + const quote = id.indexOf('"') !== -1 ? "'" : '"'; return quote + id + quote; } function hasPrefix(publicId, prefixes) { - for (var i = 0; i < prefixes.length; i++) { - if (publicId.indexOf(prefixes[i]) === 0) + for (let i = 0; i < prefixes.length; i++) { + if (publicId.indexOf(prefixes[i]) === 0) { return true; + } } return false; } - //API -exports.getDocumentMode = function (name, publicId, systemId) { - if (name !== VALID_DOCTYPE_NAME) - return DOCUMENT_MODE.QUIRKS; +exports.isConforming = function(token) { + return ( + token.name === VALID_DOCTYPE_NAME && + token.publicId === null && + (token.systemId === null || token.systemId === VALID_SYSTEM_ID) + ); +}; - if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) +exports.getDocumentMode = function(token) { + if (token.name !== VALID_DOCTYPE_NAME) { return DOCUMENT_MODE.QUIRKS; + } + + const systemId = token.systemId; + + if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) { + return DOCUMENT_MODE.QUIRKS; + } + + let publicId = token.publicId; if (publicId !== null) { publicId = publicId.toLowerCase(); - if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1) + if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1) { return DOCUMENT_MODE.QUIRKS; + } - var prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES; + let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES; - if (hasPrefix(publicId, prefixes)) + if (hasPrefix(publicId, prefixes)) { return DOCUMENT_MODE.QUIRKS; + } - prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES; + prefixes = + systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES; - if (hasPrefix(publicId, prefixes)) + if (hasPrefix(publicId, prefixes)) { return DOCUMENT_MODE.LIMITED_QUIRKS; + } } return DOCUMENT_MODE.NO_QUIRKS; }; -exports.serializeContent = function (name, publicId, systemId) { - var str = '!DOCTYPE '; +exports.serializeContent = function(name, publicId, systemId) { + let str = '!DOCTYPE '; - if (name) + if (name) { str += name; + } - if (publicId !== null) + if (publicId) { str += ' PUBLIC ' + enquoteDoctypeId(publicId); - - else if (systemId !== null) + } else if (systemId) { str += ' SYSTEM'; + } - if (systemId !== null) + if (systemId !== null) { str += ' ' + enquoteDoctypeId(systemId); + } return str; }; diff --git a/node_modules/parse5/lib/common/error-codes.js b/node_modules/parse5/lib/common/error-codes.js new file mode 100644 index 0000000..25f3cfd --- /dev/null +++ b/node_modules/parse5/lib/common/error-codes.js @@ -0,0 +1,65 @@ +'use strict'; + +module.exports = { + controlCharacterInInputStream: 'control-character-in-input-stream', + noncharacterInInputStream: 'noncharacter-in-input-stream', + surrogateInInputStream: 'surrogate-in-input-stream', + nonVoidHtmlElementStartTagWithTrailingSolidus: 'non-void-html-element-start-tag-with-trailing-solidus', + endTagWithAttributes: 'end-tag-with-attributes', + endTagWithTrailingSolidus: 'end-tag-with-trailing-solidus', + unexpectedSolidusInTag: 'unexpected-solidus-in-tag', + unexpectedNullCharacter: 'unexpected-null-character', + unexpectedQuestionMarkInsteadOfTagName: 'unexpected-question-mark-instead-of-tag-name', + invalidFirstCharacterOfTagName: 'invalid-first-character-of-tag-name', + unexpectedEqualsSignBeforeAttributeName: 'unexpected-equals-sign-before-attribute-name', + missingEndTagName: 'missing-end-tag-name', + unexpectedCharacterInAttributeName: 'unexpected-character-in-attribute-name', + unknownNamedCharacterReference: 'unknown-named-character-reference', + missingSemicolonAfterCharacterReference: 'missing-semicolon-after-character-reference', + unexpectedCharacterAfterDoctypeSystemIdentifier: 'unexpected-character-after-doctype-system-identifier', + unexpectedCharacterInUnquotedAttributeValue: 'unexpected-character-in-unquoted-attribute-value', + eofBeforeTagName: 'eof-before-tag-name', + eofInTag: 'eof-in-tag', + missingAttributeValue: 'missing-attribute-value', + missingWhitespaceBetweenAttributes: 'missing-whitespace-between-attributes', + missingWhitespaceAfterDoctypePublicKeyword: 'missing-whitespace-after-doctype-public-keyword', + missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers: + 'missing-whitespace-between-doctype-public-and-system-identifiers', + missingWhitespaceAfterDoctypeSystemKeyword: 'missing-whitespace-after-doctype-system-keyword', + missingQuoteBeforeDoctypePublicIdentifier: 'missing-quote-before-doctype-public-identifier', + missingQuoteBeforeDoctypeSystemIdentifier: 'missing-quote-before-doctype-system-identifier', + missingDoctypePublicIdentifier: 'missing-doctype-public-identifier', + missingDoctypeSystemIdentifier: 'missing-doctype-system-identifier', + abruptDoctypePublicIdentifier: 'abrupt-doctype-public-identifier', + abruptDoctypeSystemIdentifier: 'abrupt-doctype-system-identifier', + cdataInHtmlContent: 'cdata-in-html-content', + incorrectlyOpenedComment: 'incorrectly-opened-comment', + eofInScriptHtmlCommentLikeText: 'eof-in-script-html-comment-like-text', + eofInDoctype: 'eof-in-doctype', + nestedComment: 'nested-comment', + abruptClosingOfEmptyComment: 'abrupt-closing-of-empty-comment', + eofInComment: 'eof-in-comment', + incorrectlyClosedComment: 'incorrectly-closed-comment', + eofInCdata: 'eof-in-cdata', + absenceOfDigitsInNumericCharacterReference: 'absence-of-digits-in-numeric-character-reference', + nullCharacterReference: 'null-character-reference', + surrogateCharacterReference: 'surrogate-character-reference', + characterReferenceOutsideUnicodeRange: 'character-reference-outside-unicode-range', + controlCharacterReference: 'control-character-reference', + noncharacterCharacterReference: 'noncharacter-character-reference', + missingWhitespaceBeforeDoctypeName: 'missing-whitespace-before-doctype-name', + missingDoctypeName: 'missing-doctype-name', + invalidCharacterSequenceAfterDoctypeName: 'invalid-character-sequence-after-doctype-name', + duplicateAttribute: 'duplicate-attribute', + nonConformingDoctype: 'non-conforming-doctype', + missingDoctype: 'missing-doctype', + misplacedDoctype: 'misplaced-doctype', + endTagWithoutMatchingOpenElement: 'end-tag-without-matching-open-element', + closingOfElementWithOpenChildElements: 'closing-of-element-with-open-child-elements', + disallowedContentInNoscriptInHead: 'disallowed-content-in-noscript-in-head', + openElementsLeftAfterEof: 'open-elements-left-after-eof', + abandonedHeadElementChild: 'abandoned-head-element-child', + misplacedStartTagForHeadElement: 'misplaced-start-tag-for-head-element', + nestedNoscriptInHead: 'nested-noscript-in-head', + eofInElementThatCanContainOnlyText: 'eof-in-element-that-can-contain-only-text' +}; diff --git a/node_modules/parse5/lib/common/foreign-content.js b/node_modules/parse5/lib/common/foreign-content.js new file mode 100644 index 0000000..10f008b --- /dev/null +++ b/node_modules/parse5/lib/common/foreign-content.js @@ -0,0 +1,265 @@ +'use strict'; + +const Tokenizer = require('../tokenizer'); +const HTML = require('./html'); + +//Aliases +const $ = HTML.TAG_NAMES; +const NS = HTML.NAMESPACES; +const ATTRS = HTML.ATTRS; + +//MIME types +const MIME_TYPES = { + TEXT_HTML: 'text/html', + APPLICATION_XML: 'application/xhtml+xml' +}; + +//Attributes +const DEFINITION_URL_ATTR = 'definitionurl'; +const ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL'; +const SVG_ATTRS_ADJUSTMENT_MAP = { + attributename: 'attributeName', + attributetype: 'attributeType', + basefrequency: 'baseFrequency', + baseprofile: 'baseProfile', + calcmode: 'calcMode', + clippathunits: 'clipPathUnits', + diffuseconstant: 'diffuseConstant', + edgemode: 'edgeMode', + filterunits: 'filterUnits', + glyphref: 'glyphRef', + gradienttransform: 'gradientTransform', + gradientunits: 'gradientUnits', + kernelmatrix: 'kernelMatrix', + kernelunitlength: 'kernelUnitLength', + keypoints: 'keyPoints', + keysplines: 'keySplines', + keytimes: 'keyTimes', + lengthadjust: 'lengthAdjust', + limitingconeangle: 'limitingConeAngle', + markerheight: 'markerHeight', + markerunits: 'markerUnits', + markerwidth: 'markerWidth', + maskcontentunits: 'maskContentUnits', + maskunits: 'maskUnits', + numoctaves: 'numOctaves', + pathlength: 'pathLength', + patterncontentunits: 'patternContentUnits', + patterntransform: 'patternTransform', + patternunits: 'patternUnits', + pointsatx: 'pointsAtX', + pointsaty: 'pointsAtY', + pointsatz: 'pointsAtZ', + preservealpha: 'preserveAlpha', + preserveaspectratio: 'preserveAspectRatio', + primitiveunits: 'primitiveUnits', + refx: 'refX', + refy: 'refY', + repeatcount: 'repeatCount', + repeatdur: 'repeatDur', + requiredextensions: 'requiredExtensions', + requiredfeatures: 'requiredFeatures', + specularconstant: 'specularConstant', + specularexponent: 'specularExponent', + spreadmethod: 'spreadMethod', + startoffset: 'startOffset', + stddeviation: 'stdDeviation', + stitchtiles: 'stitchTiles', + surfacescale: 'surfaceScale', + systemlanguage: 'systemLanguage', + tablevalues: 'tableValues', + targetx: 'targetX', + targety: 'targetY', + textlength: 'textLength', + viewbox: 'viewBox', + viewtarget: 'viewTarget', + xchannelselector: 'xChannelSelector', + ychannelselector: 'yChannelSelector', + zoomandpan: 'zoomAndPan' +}; + +const XML_ATTRS_ADJUSTMENT_MAP = { + 'xlink:actuate': { prefix: 'xlink', name: 'actuate', namespace: NS.XLINK }, + 'xlink:arcrole': { prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK }, + 'xlink:href': { prefix: 'xlink', name: 'href', namespace: NS.XLINK }, + 'xlink:role': { prefix: 'xlink', name: 'role', namespace: NS.XLINK }, + 'xlink:show': { prefix: 'xlink', name: 'show', namespace: NS.XLINK }, + 'xlink:title': { prefix: 'xlink', name: 'title', namespace: NS.XLINK }, + 'xlink:type': { prefix: 'xlink', name: 'type', namespace: NS.XLINK }, + 'xml:base': { prefix: 'xml', name: 'base', namespace: NS.XML }, + 'xml:lang': { prefix: 'xml', name: 'lang', namespace: NS.XML }, + 'xml:space': { prefix: 'xml', name: 'space', namespace: NS.XML }, + xmlns: { prefix: '', name: 'xmlns', namespace: NS.XMLNS }, + 'xmlns:xlink': { prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS } +}; + +//SVG tag names adjustment map +const SVG_TAG_NAMES_ADJUSTMENT_MAP = (exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = { + altglyph: 'altGlyph', + altglyphdef: 'altGlyphDef', + altglyphitem: 'altGlyphItem', + animatecolor: 'animateColor', + animatemotion: 'animateMotion', + animatetransform: 'animateTransform', + clippath: 'clipPath', + feblend: 'feBlend', + fecolormatrix: 'feColorMatrix', + fecomponenttransfer: 'feComponentTransfer', + fecomposite: 'feComposite', + feconvolvematrix: 'feConvolveMatrix', + fediffuselighting: 'feDiffuseLighting', + fedisplacementmap: 'feDisplacementMap', + fedistantlight: 'feDistantLight', + feflood: 'feFlood', + fefunca: 'feFuncA', + fefuncb: 'feFuncB', + fefuncg: 'feFuncG', + fefuncr: 'feFuncR', + fegaussianblur: 'feGaussianBlur', + feimage: 'feImage', + femerge: 'feMerge', + femergenode: 'feMergeNode', + femorphology: 'feMorphology', + feoffset: 'feOffset', + fepointlight: 'fePointLight', + fespecularlighting: 'feSpecularLighting', + fespotlight: 'feSpotLight', + fetile: 'feTile', + feturbulence: 'feTurbulence', + foreignobject: 'foreignObject', + glyphref: 'glyphRef', + lineargradient: 'linearGradient', + radialgradient: 'radialGradient', + textpath: 'textPath' +}); + +//Tags that causes exit from foreign content +const EXITS_FOREIGN_CONTENT = { + [$.B]: true, + [$.BIG]: true, + [$.BLOCKQUOTE]: true, + [$.BODY]: true, + [$.BR]: true, + [$.CENTER]: true, + [$.CODE]: true, + [$.DD]: true, + [$.DIV]: true, + [$.DL]: true, + [$.DT]: true, + [$.EM]: true, + [$.EMBED]: true, + [$.H1]: true, + [$.H2]: true, + [$.H3]: true, + [$.H4]: true, + [$.H5]: true, + [$.H6]: true, + [$.HEAD]: true, + [$.HR]: true, + [$.I]: true, + [$.IMG]: true, + [$.LI]: true, + [$.LISTING]: true, + [$.MENU]: true, + [$.META]: true, + [$.NOBR]: true, + [$.OL]: true, + [$.P]: true, + [$.PRE]: true, + [$.RUBY]: true, + [$.S]: true, + [$.SMALL]: true, + [$.SPAN]: true, + [$.STRONG]: true, + [$.STRIKE]: true, + [$.SUB]: true, + [$.SUP]: true, + [$.TABLE]: true, + [$.TT]: true, + [$.U]: true, + [$.UL]: true, + [$.VAR]: true +}; + +//Check exit from foreign content +exports.causesExit = function(startTagToken) { + const tn = startTagToken.tagName; + const isFontWithAttrs = + tn === $.FONT && + (Tokenizer.getTokenAttr(startTagToken, ATTRS.COLOR) !== null || + Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null || + Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null); + + return isFontWithAttrs ? true : EXITS_FOREIGN_CONTENT[tn]; +}; + +//Token adjustments +exports.adjustTokenMathMLAttrs = function(token) { + for (let i = 0; i < token.attrs.length; i++) { + if (token.attrs[i].name === DEFINITION_URL_ATTR) { + token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; + break; + } + } +}; + +exports.adjustTokenSVGAttrs = function(token) { + for (let i = 0; i < token.attrs.length; i++) { + const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; + + if (adjustedAttrName) { + token.attrs[i].name = adjustedAttrName; + } + } +}; + +exports.adjustTokenXMLAttrs = function(token) { + for (let i = 0; i < token.attrs.length; i++) { + const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; + + if (adjustedAttrEntry) { + token.attrs[i].prefix = adjustedAttrEntry.prefix; + token.attrs[i].name = adjustedAttrEntry.name; + token.attrs[i].namespace = adjustedAttrEntry.namespace; + } + } +}; + +exports.adjustTokenSVGTagName = function(token) { + const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP[token.tagName]; + + if (adjustedTagName) { + token.tagName = adjustedTagName; + } +}; + +//Integration points +function isMathMLTextIntegrationPoint(tn, ns) { + return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT); +} + +function isHtmlIntegrationPoint(tn, ns, attrs) { + if (ns === NS.MATHML && tn === $.ANNOTATION_XML) { + for (let i = 0; i < attrs.length; i++) { + if (attrs[i].name === ATTRS.ENCODING) { + const value = attrs[i].value.toLowerCase(); + + return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; + } + } + } + + return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE); +} + +exports.isIntegrationPoint = function(tn, ns, attrs, foreignNS) { + if ((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) { + return true; + } + + if ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)) { + return true; + } + + return false; +}; diff --git a/node_modules/parse5/lib/common/foreign_content.js b/node_modules/parse5/lib/common/foreign_content.js deleted file mode 100644 index f03da1a..0000000 --- a/node_modules/parse5/lib/common/foreign_content.js +++ /dev/null @@ -1,260 +0,0 @@ -'use strict'; - -var Tokenizer = require('../tokenizer'), - HTML = require('./html'); - -//Aliases -var $ = HTML.TAG_NAMES, - NS = HTML.NAMESPACES, - ATTRS = HTML.ATTRS; - - -//MIME types -var MIME_TYPES = { - TEXT_HTML: 'text/html', - APPLICATION_XML: 'application/xhtml+xml' -}; - -//Attributes -var DEFINITION_URL_ATTR = 'definitionurl', - ADJUSTED_DEFINITION_URL_ATTR = 'definitionURL', - SVG_ATTRS_ADJUSTMENT_MAP = { - 'attributename': 'attributeName', - 'attributetype': 'attributeType', - 'basefrequency': 'baseFrequency', - 'baseprofile': 'baseProfile', - 'calcmode': 'calcMode', - 'clippathunits': 'clipPathUnits', - 'diffuseconstant': 'diffuseConstant', - 'edgemode': 'edgeMode', - 'filterunits': 'filterUnits', - 'glyphref': 'glyphRef', - 'gradienttransform': 'gradientTransform', - 'gradientunits': 'gradientUnits', - 'kernelmatrix': 'kernelMatrix', - 'kernelunitlength': 'kernelUnitLength', - 'keypoints': 'keyPoints', - 'keysplines': 'keySplines', - 'keytimes': 'keyTimes', - 'lengthadjust': 'lengthAdjust', - 'limitingconeangle': 'limitingConeAngle', - 'markerheight': 'markerHeight', - 'markerunits': 'markerUnits', - 'markerwidth': 'markerWidth', - 'maskcontentunits': 'maskContentUnits', - 'maskunits': 'maskUnits', - 'numoctaves': 'numOctaves', - 'pathlength': 'pathLength', - 'patterncontentunits': 'patternContentUnits', - 'patterntransform': 'patternTransform', - 'patternunits': 'patternUnits', - 'pointsatx': 'pointsAtX', - 'pointsaty': 'pointsAtY', - 'pointsatz': 'pointsAtZ', - 'preservealpha': 'preserveAlpha', - 'preserveaspectratio': 'preserveAspectRatio', - 'primitiveunits': 'primitiveUnits', - 'refx': 'refX', - 'refy': 'refY', - 'repeatcount': 'repeatCount', - 'repeatdur': 'repeatDur', - 'requiredextensions': 'requiredExtensions', - 'requiredfeatures': 'requiredFeatures', - 'specularconstant': 'specularConstant', - 'specularexponent': 'specularExponent', - 'spreadmethod': 'spreadMethod', - 'startoffset': 'startOffset', - 'stddeviation': 'stdDeviation', - 'stitchtiles': 'stitchTiles', - 'surfacescale': 'surfaceScale', - 'systemlanguage': 'systemLanguage', - 'tablevalues': 'tableValues', - 'targetx': 'targetX', - 'targety': 'targetY', - 'textlength': 'textLength', - 'viewbox': 'viewBox', - 'viewtarget': 'viewTarget', - 'xchannelselector': 'xChannelSelector', - 'ychannelselector': 'yChannelSelector', - 'zoomandpan': 'zoomAndPan' - }, - XML_ATTRS_ADJUSTMENT_MAP = { - 'xlink:actuate': {prefix: 'xlink', name: 'actuate', namespace: NS.XLINK}, - 'xlink:arcrole': {prefix: 'xlink', name: 'arcrole', namespace: NS.XLINK}, - 'xlink:href': {prefix: 'xlink', name: 'href', namespace: NS.XLINK}, - 'xlink:role': {prefix: 'xlink', name: 'role', namespace: NS.XLINK}, - 'xlink:show': {prefix: 'xlink', name: 'show', namespace: NS.XLINK}, - 'xlink:title': {prefix: 'xlink', name: 'title', namespace: NS.XLINK}, - 'xlink:type': {prefix: 'xlink', name: 'type', namespace: NS.XLINK}, - 'xml:base': {prefix: 'xml', name: 'base', namespace: NS.XML}, - 'xml:lang': {prefix: 'xml', name: 'lang', namespace: NS.XML}, - 'xml:space': {prefix: 'xml', name: 'space', namespace: NS.XML}, - 'xmlns': {prefix: '', name: 'xmlns', namespace: NS.XMLNS}, - 'xmlns:xlink': {prefix: 'xmlns', name: 'xlink', namespace: NS.XMLNS} - - }; - -//SVG tag names adjustment map -var SVG_TAG_NAMES_ADJUSTMENT_MAP = exports.SVG_TAG_NAMES_ADJUSTMENT_MAP = { - 'altglyph': 'altGlyph', - 'altglyphdef': 'altGlyphDef', - 'altglyphitem': 'altGlyphItem', - 'animatecolor': 'animateColor', - 'animatemotion': 'animateMotion', - 'animatetransform': 'animateTransform', - 'clippath': 'clipPath', - 'feblend': 'feBlend', - 'fecolormatrix': 'feColorMatrix', - 'fecomponenttransfer': 'feComponentTransfer', - 'fecomposite': 'feComposite', - 'feconvolvematrix': 'feConvolveMatrix', - 'fediffuselighting': 'feDiffuseLighting', - 'fedisplacementmap': 'feDisplacementMap', - 'fedistantlight': 'feDistantLight', - 'feflood': 'feFlood', - 'fefunca': 'feFuncA', - 'fefuncb': 'feFuncB', - 'fefuncg': 'feFuncG', - 'fefuncr': 'feFuncR', - 'fegaussianblur': 'feGaussianBlur', - 'feimage': 'feImage', - 'femerge': 'feMerge', - 'femergenode': 'feMergeNode', - 'femorphology': 'feMorphology', - 'feoffset': 'feOffset', - 'fepointlight': 'fePointLight', - 'fespecularlighting': 'feSpecularLighting', - 'fespotlight': 'feSpotLight', - 'fetile': 'feTile', - 'feturbulence': 'feTurbulence', - 'foreignobject': 'foreignObject', - 'glyphref': 'glyphRef', - 'lineargradient': 'linearGradient', - 'radialgradient': 'radialGradient', - 'textpath': 'textPath' -}; - -//Tags that causes exit from foreign content -var EXITS_FOREIGN_CONTENT = Object.create(null); - -EXITS_FOREIGN_CONTENT[$.B] = true; -EXITS_FOREIGN_CONTENT[$.BIG] = true; -EXITS_FOREIGN_CONTENT[$.BLOCKQUOTE] = true; -EXITS_FOREIGN_CONTENT[$.BODY] = true; -EXITS_FOREIGN_CONTENT[$.BR] = true; -EXITS_FOREIGN_CONTENT[$.CENTER] = true; -EXITS_FOREIGN_CONTENT[$.CODE] = true; -EXITS_FOREIGN_CONTENT[$.DD] = true; -EXITS_FOREIGN_CONTENT[$.DIV] = true; -EXITS_FOREIGN_CONTENT[$.DL] = true; -EXITS_FOREIGN_CONTENT[$.DT] = true; -EXITS_FOREIGN_CONTENT[$.EM] = true; -EXITS_FOREIGN_CONTENT[$.EMBED] = true; -EXITS_FOREIGN_CONTENT[$.H1] = true; -EXITS_FOREIGN_CONTENT[$.H2] = true; -EXITS_FOREIGN_CONTENT[$.H3] = true; -EXITS_FOREIGN_CONTENT[$.H4] = true; -EXITS_FOREIGN_CONTENT[$.H5] = true; -EXITS_FOREIGN_CONTENT[$.H6] = true; -EXITS_FOREIGN_CONTENT[$.HEAD] = true; -EXITS_FOREIGN_CONTENT[$.HR] = true; -EXITS_FOREIGN_CONTENT[$.I] = true; -EXITS_FOREIGN_CONTENT[$.IMG] = true; -EXITS_FOREIGN_CONTENT[$.LI] = true; -EXITS_FOREIGN_CONTENT[$.LISTING] = true; -EXITS_FOREIGN_CONTENT[$.MENU] = true; -EXITS_FOREIGN_CONTENT[$.META] = true; -EXITS_FOREIGN_CONTENT[$.NOBR] = true; -EXITS_FOREIGN_CONTENT[$.OL] = true; -EXITS_FOREIGN_CONTENT[$.P] = true; -EXITS_FOREIGN_CONTENT[$.PRE] = true; -EXITS_FOREIGN_CONTENT[$.RUBY] = true; -EXITS_FOREIGN_CONTENT[$.S] = true; -EXITS_FOREIGN_CONTENT[$.SMALL] = true; -EXITS_FOREIGN_CONTENT[$.SPAN] = true; -EXITS_FOREIGN_CONTENT[$.STRONG] = true; -EXITS_FOREIGN_CONTENT[$.STRIKE] = true; -EXITS_FOREIGN_CONTENT[$.SUB] = true; -EXITS_FOREIGN_CONTENT[$.SUP] = true; -EXITS_FOREIGN_CONTENT[$.TABLE] = true; -EXITS_FOREIGN_CONTENT[$.TT] = true; -EXITS_FOREIGN_CONTENT[$.U] = true; -EXITS_FOREIGN_CONTENT[$.UL] = true; -EXITS_FOREIGN_CONTENT[$.VAR] = true; - -//Check exit from foreign content -exports.causesExit = function (startTagToken) { - var tn = startTagToken.tagName; - var isFontWithAttrs = tn === $.FONT && (Tokenizer.getTokenAttr(startTagToken, ATTRS.COLOR) !== null || - Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null || - Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null); - - return isFontWithAttrs ? true : EXITS_FOREIGN_CONTENT[tn]; -}; - -//Token adjustments -exports.adjustTokenMathMLAttrs = function (token) { - for (var i = 0; i < token.attrs.length; i++) { - if (token.attrs[i].name === DEFINITION_URL_ATTR) { - token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; - break; - } - } -}; - -exports.adjustTokenSVGAttrs = function (token) { - for (var i = 0; i < token.attrs.length; i++) { - var adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; - - if (adjustedAttrName) - token.attrs[i].name = adjustedAttrName; - } -}; - -exports.adjustTokenXMLAttrs = function (token) { - for (var i = 0; i < token.attrs.length; i++) { - var adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP[token.attrs[i].name]; - - if (adjustedAttrEntry) { - token.attrs[i].prefix = adjustedAttrEntry.prefix; - token.attrs[i].name = adjustedAttrEntry.name; - token.attrs[i].namespace = adjustedAttrEntry.namespace; - } - } -}; - -exports.adjustTokenSVGTagName = function (token) { - var adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP[token.tagName]; - - if (adjustedTagName) - token.tagName = adjustedTagName; -}; - -//Integration points -function isMathMLTextIntegrationPoint(tn, ns) { - return ns === NS.MATHML && (tn === $.MI || tn === $.MO || tn === $.MN || tn === $.MS || tn === $.MTEXT); -} - -function isHtmlIntegrationPoint(tn, ns, attrs) { - if (ns === NS.MATHML && tn === $.ANNOTATION_XML) { - for (var i = 0; i < attrs.length; i++) { - if (attrs[i].name === ATTRS.ENCODING) { - var value = attrs[i].value.toLowerCase(); - - return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; - } - } - } - - return ns === NS.SVG && (tn === $.FOREIGN_OBJECT || tn === $.DESC || tn === $.TITLE); -} - -exports.isIntegrationPoint = function (tn, ns, attrs, foreignNS) { - if ((!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs)) - return true; - - if ((!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns)) - return true; - - return false; -}; diff --git a/node_modules/parse5/lib/common/html.js b/node_modules/parse5/lib/common/html.js index bd1062e..f33646f 100644 --- a/node_modules/parse5/lib/common/html.js +++ b/node_modules/parse5/lib/common/html.js @@ -1,13 +1,13 @@ 'use strict'; -var NS = exports.NAMESPACES = { +const NS = (exports.NAMESPACES = { HTML: 'http://www.w3.org/1999/xhtml', MATHML: 'http://www.w3.org/1998/Math/MathML', SVG: 'http://www.w3.org/2000/svg', XLINK: 'http://www.w3.org/1999/xlink', XML: 'http://www.w3.org/XML/1998/namespace', XMLNS: 'http://www.w3.org/2000/xmlns/' -}; +}); exports.ATTRS = { TYPE: 'type', @@ -26,7 +26,7 @@ exports.DOCUMENT_MODE = { LIMITED_QUIRKS: 'limited-quirks' }; -var $ = exports.TAG_NAMES = { +const $ = (exports.TAG_NAMES = { A: 'a', ADDRESS: 'address', ANNOTATION_XML: 'annotation-xml', @@ -103,7 +103,6 @@ var $ = exports.TAG_NAMES = { MARQUEE: 'marquee', MATH: 'math', MENU: 'menu', - MENUITEM: 'menuitem', META: 'meta', MGLYPH: 'mglyph', MI: 'mi', @@ -171,102 +170,103 @@ var $ = exports.TAG_NAMES = { WBR: 'wbr', XMP: 'xmp' +}); + +exports.SPECIAL_ELEMENTS = { + [NS.HTML]: { + [$.ADDRESS]: true, + [$.APPLET]: true, + [$.AREA]: true, + [$.ARTICLE]: true, + [$.ASIDE]: true, + [$.BASE]: true, + [$.BASEFONT]: true, + [$.BGSOUND]: true, + [$.BLOCKQUOTE]: true, + [$.BODY]: true, + [$.BR]: true, + [$.BUTTON]: true, + [$.CAPTION]: true, + [$.CENTER]: true, + [$.COL]: true, + [$.COLGROUP]: true, + [$.DD]: true, + [$.DETAILS]: true, + [$.DIR]: true, + [$.DIV]: true, + [$.DL]: true, + [$.DT]: true, + [$.EMBED]: true, + [$.FIELDSET]: true, + [$.FIGCAPTION]: true, + [$.FIGURE]: true, + [$.FOOTER]: true, + [$.FORM]: true, + [$.FRAME]: true, + [$.FRAMESET]: true, + [$.H1]: true, + [$.H2]: true, + [$.H3]: true, + [$.H4]: true, + [$.H5]: true, + [$.H6]: true, + [$.HEAD]: true, + [$.HEADER]: true, + [$.HGROUP]: true, + [$.HR]: true, + [$.HTML]: true, + [$.IFRAME]: true, + [$.IMG]: true, + [$.INPUT]: true, + [$.LI]: true, + [$.LINK]: true, + [$.LISTING]: true, + [$.MAIN]: true, + [$.MARQUEE]: true, + [$.MENU]: true, + [$.META]: true, + [$.NAV]: true, + [$.NOEMBED]: true, + [$.NOFRAMES]: true, + [$.NOSCRIPT]: true, + [$.OBJECT]: true, + [$.OL]: true, + [$.P]: true, + [$.PARAM]: true, + [$.PLAINTEXT]: true, + [$.PRE]: true, + [$.SCRIPT]: true, + [$.SECTION]: true, + [$.SELECT]: true, + [$.SOURCE]: true, + [$.STYLE]: true, + [$.SUMMARY]: true, + [$.TABLE]: true, + [$.TBODY]: true, + [$.TD]: true, + [$.TEMPLATE]: true, + [$.TEXTAREA]: true, + [$.TFOOT]: true, + [$.TH]: true, + [$.THEAD]: true, + [$.TITLE]: true, + [$.TR]: true, + [$.TRACK]: true, + [$.UL]: true, + [$.WBR]: true, + [$.XMP]: true + }, + [NS.MATHML]: { + [$.MI]: true, + [$.MO]: true, + [$.MN]: true, + [$.MS]: true, + [$.MTEXT]: true, + [$.ANNOTATION_XML]: true + }, + [NS.SVG]: { + [$.TITLE]: true, + [$.FOREIGN_OBJECT]: true, + [$.DESC]: true + } }; - -var SPECIAL_ELEMENTS = exports.SPECIAL_ELEMENTS = Object.create(null); - -SPECIAL_ELEMENTS[NS.HTML] = Object.create(null); -SPECIAL_ELEMENTS[NS.HTML][$.ADDRESS] = true; -SPECIAL_ELEMENTS[NS.HTML][$.APPLET] = true; -SPECIAL_ELEMENTS[NS.HTML][$.AREA] = true; -SPECIAL_ELEMENTS[NS.HTML][$.ARTICLE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.ASIDE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.BASE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.BASEFONT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.BGSOUND] = true; -SPECIAL_ELEMENTS[NS.HTML][$.BLOCKQUOTE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.BODY] = true; -SPECIAL_ELEMENTS[NS.HTML][$.BR] = true; -SPECIAL_ELEMENTS[NS.HTML][$.BUTTON] = true; -SPECIAL_ELEMENTS[NS.HTML][$.CAPTION] = true; -SPECIAL_ELEMENTS[NS.HTML][$.CENTER] = true; -SPECIAL_ELEMENTS[NS.HTML][$.COL] = true; -SPECIAL_ELEMENTS[NS.HTML][$.COLGROUP] = true; -SPECIAL_ELEMENTS[NS.HTML][$.DD] = true; -SPECIAL_ELEMENTS[NS.HTML][$.DETAILS] = true; -SPECIAL_ELEMENTS[NS.HTML][$.DIR] = true; -SPECIAL_ELEMENTS[NS.HTML][$.DIV] = true; -SPECIAL_ELEMENTS[NS.HTML][$.DL] = true; -SPECIAL_ELEMENTS[NS.HTML][$.DT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.EMBED] = true; -SPECIAL_ELEMENTS[NS.HTML][$.FIELDSET] = true; -SPECIAL_ELEMENTS[NS.HTML][$.FIGCAPTION] = true; -SPECIAL_ELEMENTS[NS.HTML][$.FIGURE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.FOOTER] = true; -SPECIAL_ELEMENTS[NS.HTML][$.FORM] = true; -SPECIAL_ELEMENTS[NS.HTML][$.FRAME] = true; -SPECIAL_ELEMENTS[NS.HTML][$.FRAMESET] = true; -SPECIAL_ELEMENTS[NS.HTML][$.H1] = true; -SPECIAL_ELEMENTS[NS.HTML][$.H2] = true; -SPECIAL_ELEMENTS[NS.HTML][$.H3] = true; -SPECIAL_ELEMENTS[NS.HTML][$.H4] = true; -SPECIAL_ELEMENTS[NS.HTML][$.H5] = true; -SPECIAL_ELEMENTS[NS.HTML][$.H6] = true; -SPECIAL_ELEMENTS[NS.HTML][$.HEAD] = true; -SPECIAL_ELEMENTS[NS.HTML][$.HEADER] = true; -SPECIAL_ELEMENTS[NS.HTML][$.HGROUP] = true; -SPECIAL_ELEMENTS[NS.HTML][$.HR] = true; -SPECIAL_ELEMENTS[NS.HTML][$.HTML] = true; -SPECIAL_ELEMENTS[NS.HTML][$.IFRAME] = true; -SPECIAL_ELEMENTS[NS.HTML][$.IMG] = true; -SPECIAL_ELEMENTS[NS.HTML][$.INPUT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.LI] = true; -SPECIAL_ELEMENTS[NS.HTML][$.LINK] = true; -SPECIAL_ELEMENTS[NS.HTML][$.LISTING] = true; -SPECIAL_ELEMENTS[NS.HTML][$.MAIN] = true; -SPECIAL_ELEMENTS[NS.HTML][$.MARQUEE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.MENU] = true; -SPECIAL_ELEMENTS[NS.HTML][$.META] = true; -SPECIAL_ELEMENTS[NS.HTML][$.NAV] = true; -SPECIAL_ELEMENTS[NS.HTML][$.NOEMBED] = true; -SPECIAL_ELEMENTS[NS.HTML][$.NOFRAMES] = true; -SPECIAL_ELEMENTS[NS.HTML][$.NOSCRIPT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.OBJECT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.OL] = true; -SPECIAL_ELEMENTS[NS.HTML][$.P] = true; -SPECIAL_ELEMENTS[NS.HTML][$.PARAM] = true; -SPECIAL_ELEMENTS[NS.HTML][$.PLAINTEXT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.PRE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.SCRIPT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.SECTION] = true; -SPECIAL_ELEMENTS[NS.HTML][$.SELECT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.SOURCE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.STYLE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.SUMMARY] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TABLE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TBODY] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TD] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TEMPLATE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TEXTAREA] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TFOOT] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TH] = true; -SPECIAL_ELEMENTS[NS.HTML][$.THEAD] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TITLE] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TR] = true; -SPECIAL_ELEMENTS[NS.HTML][$.TRACK] = true; -SPECIAL_ELEMENTS[NS.HTML][$.UL] = true; -SPECIAL_ELEMENTS[NS.HTML][$.WBR] = true; -SPECIAL_ELEMENTS[NS.HTML][$.XMP] = true; - -SPECIAL_ELEMENTS[NS.MATHML] = Object.create(null); -SPECIAL_ELEMENTS[NS.MATHML][$.MI] = true; -SPECIAL_ELEMENTS[NS.MATHML][$.MO] = true; -SPECIAL_ELEMENTS[NS.MATHML][$.MN] = true; -SPECIAL_ELEMENTS[NS.MATHML][$.MS] = true; -SPECIAL_ELEMENTS[NS.MATHML][$.MTEXT] = true; -SPECIAL_ELEMENTS[NS.MATHML][$.ANNOTATION_XML] = true; - -SPECIAL_ELEMENTS[NS.SVG] = Object.create(null); -SPECIAL_ELEMENTS[NS.SVG][$.TITLE] = true; -SPECIAL_ELEMENTS[NS.SVG][$.FOREIGN_OBJECT] = true; -SPECIAL_ELEMENTS[NS.SVG][$.DESC] = true; diff --git a/node_modules/parse5/lib/common/unicode.js b/node_modules/parse5/lib/common/unicode.js index 8777e97..8d8234f 100644 --- a/node_modules/parse5/lib/common/unicode.js +++ b/node_modules/parse5/lib/common/unicode.js @@ -1,47 +1,109 @@ 'use strict'; +const UNDEFINED_CODE_POINTS = [ + 0xfffe, + 0xffff, + 0x1fffe, + 0x1ffff, + 0x2fffe, + 0x2ffff, + 0x3fffe, + 0x3ffff, + 0x4fffe, + 0x4ffff, + 0x5fffe, + 0x5ffff, + 0x6fffe, + 0x6ffff, + 0x7fffe, + 0x7ffff, + 0x8fffe, + 0x8ffff, + 0x9fffe, + 0x9ffff, + 0xafffe, + 0xaffff, + 0xbfffe, + 0xbffff, + 0xcfffe, + 0xcffff, + 0xdfffe, + 0xdffff, + 0xefffe, + 0xeffff, + 0xffffe, + 0xfffff, + 0x10fffe, + 0x10ffff +]; + exports.REPLACEMENT_CHARACTER = '\uFFFD'; exports.CODE_POINTS = { EOF: -1, NULL: 0x00, TABULATION: 0x09, - CARRIAGE_RETURN: 0x0D, - LINE_FEED: 0x0A, - FORM_FEED: 0x0C, + CARRIAGE_RETURN: 0x0d, + LINE_FEED: 0x0a, + FORM_FEED: 0x0c, SPACE: 0x20, EXCLAMATION_MARK: 0x21, QUOTATION_MARK: 0x22, NUMBER_SIGN: 0x23, AMPERSAND: 0x26, APOSTROPHE: 0x27, - HYPHEN_MINUS: 0x2D, - SOLIDUS: 0x2F, + HYPHEN_MINUS: 0x2d, + SOLIDUS: 0x2f, DIGIT_0: 0x30, DIGIT_9: 0x39, - SEMICOLON: 0x3B, - LESS_THAN_SIGN: 0x3C, - EQUALS_SIGN: 0x3D, - GREATER_THAN_SIGN: 0x3E, - QUESTION_MARK: 0x3F, + SEMICOLON: 0x3b, + LESS_THAN_SIGN: 0x3c, + EQUALS_SIGN: 0x3d, + GREATER_THAN_SIGN: 0x3e, + QUESTION_MARK: 0x3f, LATIN_CAPITAL_A: 0x41, LATIN_CAPITAL_F: 0x46, LATIN_CAPITAL_X: 0x58, - LATIN_CAPITAL_Z: 0x5A, + LATIN_CAPITAL_Z: 0x5a, + RIGHT_SQUARE_BRACKET: 0x5d, GRAVE_ACCENT: 0x60, LATIN_SMALL_A: 0x61, LATIN_SMALL_F: 0x66, LATIN_SMALL_X: 0x78, - LATIN_SMALL_Z: 0x7A, - REPLACEMENT_CHARACTER: 0xFFFD + LATIN_SMALL_Z: 0x7a, + REPLACEMENT_CHARACTER: 0xfffd }; exports.CODE_POINT_SEQUENCES = { - DASH_DASH_STRING: [0x2D, 0x2D], //-- - DOCTYPE_STRING: [0x44, 0x4F, 0x43, 0x54, 0x59, 0x50, 0x45], //DOCTYPE - CDATA_START_STRING: [0x5B, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5B], //[CDATA[ - CDATA_END_STRING: [0x5D, 0x5D, 0x3E], //]]> + DASH_DASH_STRING: [0x2d, 0x2d], //-- + DOCTYPE_STRING: [0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45], //DOCTYPE + CDATA_START_STRING: [0x5b, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5b], //[CDATA[ SCRIPT_STRING: [0x73, 0x63, 0x72, 0x69, 0x70, 0x74], //script - PUBLIC_STRING: [0x50, 0x55, 0x42, 0x4C, 0x49, 0x43], //PUBLIC - SYSTEM_STRING: [0x53, 0x59, 0x53, 0x54, 0x45, 0x4D] //SYSTEM + PUBLIC_STRING: [0x50, 0x55, 0x42, 0x4c, 0x49, 0x43], //PUBLIC + SYSTEM_STRING: [0x53, 0x59, 0x53, 0x54, 0x45, 0x4d] //SYSTEM +}; + +//Surrogates +exports.isSurrogate = function(cp) { + return cp >= 0xd800 && cp <= 0xdfff; +}; + +exports.isSurrogatePair = function(cp) { + return cp >= 0xdc00 && cp <= 0xdfff; +}; + +exports.getSurrogatePairCodePoint = function(cp1, cp2) { + return (cp1 - 0xd800) * 0x400 + 0x2400 + cp2; +}; + +//NOTE: excluding NULL and ASCII whitespace +exports.isControlCodePoint = function(cp) { + return ( + (cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) || + (cp >= 0x7f && cp <= 0x9f) + ); +}; + +exports.isUndefinedCodePoint = function(cp) { + return (cp >= 0xfdd0 && cp <= 0xfdef) || UNDEFINED_CODE_POINTS.indexOf(cp) > -1; }; diff --git a/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js b/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js new file mode 100644 index 0000000..1e30cfc --- /dev/null +++ b/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js @@ -0,0 +1,43 @@ +'use strict'; + +const Mixin = require('../../utils/mixin'); + +class ErrorReportingMixinBase extends Mixin { + constructor(host, opts) { + super(host); + + this.posTracker = null; + this.onParseError = opts.onParseError; + } + + _setErrorLocation(err) { + err.startLine = err.endLine = this.posTracker.line; + err.startCol = err.endCol = this.posTracker.col; + err.startOffset = err.endOffset = this.posTracker.offset; + } + + _reportError(code) { + const err = { + code: code, + startLine: -1, + startCol: -1, + startOffset: -1, + endLine: -1, + endCol: -1, + endOffset: -1 + }; + + this._setErrorLocation(err); + this.onParseError(err); + } + + _getOverriddenMethods(mxn) { + return { + _err(code) { + mxn._reportError(code); + } + }; + } +} + +module.exports = ErrorReportingMixinBase; diff --git a/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js b/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js new file mode 100644 index 0000000..107ec5a --- /dev/null +++ b/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js @@ -0,0 +1,52 @@ +'use strict'; + +const ErrorReportingMixinBase = require('./mixin-base'); +const ErrorReportingTokenizerMixin = require('./tokenizer-mixin'); +const LocationInfoTokenizerMixin = require('../location-info/tokenizer-mixin'); +const Mixin = require('../../utils/mixin'); + +class ErrorReportingParserMixin extends ErrorReportingMixinBase { + constructor(parser, opts) { + super(parser, opts); + + this.opts = opts; + this.ctLoc = null; + this.locBeforeToken = false; + } + + _setErrorLocation(err) { + if (this.ctLoc) { + err.startLine = this.ctLoc.startLine; + err.startCol = this.ctLoc.startCol; + err.startOffset = this.ctLoc.startOffset; + + err.endLine = this.locBeforeToken ? this.ctLoc.startLine : this.ctLoc.endLine; + err.endCol = this.locBeforeToken ? this.ctLoc.startCol : this.ctLoc.endCol; + err.endOffset = this.locBeforeToken ? this.ctLoc.startOffset : this.ctLoc.endOffset; + } + } + + _getOverriddenMethods(mxn, orig) { + return { + _bootstrap(document, fragmentContext) { + orig._bootstrap.call(this, document, fragmentContext); + + Mixin.install(this.tokenizer, ErrorReportingTokenizerMixin, mxn.opts); + Mixin.install(this.tokenizer, LocationInfoTokenizerMixin); + }, + + _processInputToken(token) { + mxn.ctLoc = token.location; + + orig._processInputToken.call(this, token); + }, + + _err(code, options) { + mxn.locBeforeToken = options && options.beforeToken; + mxn._reportError(code); + } + }; + } +} + +module.exports = ErrorReportingParserMixin; diff --git a/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js b/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js new file mode 100644 index 0000000..398c966 --- /dev/null +++ b/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js @@ -0,0 +1,24 @@ +'use strict'; + +const ErrorReportingMixinBase = require('./mixin-base'); +const PositionTrackingPreprocessorMixin = require('../position-tracking/preprocessor-mixin'); +const Mixin = require('../../utils/mixin'); + +class ErrorReportingPreprocessorMixin extends ErrorReportingMixinBase { + constructor(preprocessor, opts) { + super(preprocessor, opts); + + this.posTracker = Mixin.install(preprocessor, PositionTrackingPreprocessorMixin); + this.lastErrOffset = -1; + } + + _reportError(code) { + //NOTE: avoid reporting error twice on advance/retreat + if (this.lastErrOffset !== this.posTracker.offset) { + this.lastErrOffset = this.posTracker.offset; + super._reportError(code); + } + } +} + +module.exports = ErrorReportingPreprocessorMixin; diff --git a/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js b/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js new file mode 100644 index 0000000..219fcab --- /dev/null +++ b/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js @@ -0,0 +1,17 @@ +'use strict'; + +const ErrorReportingMixinBase = require('./mixin-base'); +const ErrorReportingPreprocessorMixin = require('./preprocessor-mixin'); +const Mixin = require('../../utils/mixin'); + +class ErrorReportingTokenizerMixin extends ErrorReportingMixinBase { + constructor(tokenizer, opts) { + super(tokenizer, opts); + + const preprocessorMixin = Mixin.install(tokenizer.preprocessor, ErrorReportingPreprocessorMixin, opts); + + this.posTracker = preprocessorMixin.posTracker; + } +} + +module.exports = ErrorReportingTokenizerMixin; diff --git a/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js b/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js new file mode 100644 index 0000000..765fe77 --- /dev/null +++ b/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js @@ -0,0 +1,35 @@ +'use strict'; + +const Mixin = require('../../utils/mixin'); + +class LocationInfoOpenElementStackMixin extends Mixin { + constructor(stack, opts) { + super(stack); + + this.onItemPop = opts.onItemPop; + } + + _getOverriddenMethods(mxn, orig) { + return { + pop() { + mxn.onItemPop(this.current); + orig.pop.call(this); + }, + + popAllUpToHtmlElement() { + for (let i = this.stackTop; i > 0; i--) { + mxn.onItemPop(this.items[i]); + } + + orig.popAllUpToHtmlElement.call(this); + }, + + remove(element) { + mxn.onItemPop(this.current); + orig.remove.call(this, element); + } + }; + } +} + +module.exports = LocationInfoOpenElementStackMixin; diff --git a/node_modules/parse5/lib/extensions/location-info/parser-mixin.js b/node_modules/parse5/lib/extensions/location-info/parser-mixin.js new file mode 100644 index 0000000..fcf3a40 --- /dev/null +++ b/node_modules/parse5/lib/extensions/location-info/parser-mixin.js @@ -0,0 +1,222 @@ +'use strict'; + +const Mixin = require('../../utils/mixin'); +const Tokenizer = require('../../tokenizer'); +const LocationInfoTokenizerMixin = require('./tokenizer-mixin'); +const LocationInfoOpenElementStackMixin = require('./open-element-stack-mixin'); +const HTML = require('../../common/html'); + +//Aliases +const $ = HTML.TAG_NAMES; + +class LocationInfoParserMixin extends Mixin { + constructor(parser) { + super(parser); + + this.parser = parser; + this.treeAdapter = this.parser.treeAdapter; + this.posTracker = null; + this.lastStartTagToken = null; + this.lastFosterParentingLocation = null; + this.currentToken = null; + } + + _setStartLocation(element) { + let loc = null; + + if (this.lastStartTagToken) { + loc = Object.assign({}, this.lastStartTagToken.location); + loc.startTag = this.lastStartTagToken.location; + } + + this.treeAdapter.setNodeSourceCodeLocation(element, loc); + } + + _setEndLocation(element, closingToken) { + const loc = this.treeAdapter.getNodeSourceCodeLocation(element); + + if (loc) { + if (closingToken.location) { + const ctLoc = closingToken.location; + const tn = this.treeAdapter.getTagName(element); + + // NOTE: For cases like

- First 'p' closes without a closing + // tag and for cases like

- 'p' closes without a closing tag. + const isClosingEndTag = closingToken.type === Tokenizer.END_TAG_TOKEN && tn === closingToken.tagName; + + if (isClosingEndTag) { + loc.endTag = Object.assign({}, ctLoc); + loc.endLine = ctLoc.endLine; + loc.endCol = ctLoc.endCol; + loc.endOffset = ctLoc.endOffset; + } else { + loc.endLine = ctLoc.startLine; + loc.endCol = ctLoc.startCol; + loc.endOffset = ctLoc.startOffset; + } + } + } + } + + _getOverriddenMethods(mxn, orig) { + return { + _bootstrap(document, fragmentContext) { + orig._bootstrap.call(this, document, fragmentContext); + + mxn.lastStartTagToken = null; + mxn.lastFosterParentingLocation = null; + mxn.currentToken = null; + + const tokenizerMixin = Mixin.install(this.tokenizer, LocationInfoTokenizerMixin); + + mxn.posTracker = tokenizerMixin.posTracker; + + Mixin.install(this.openElements, LocationInfoOpenElementStackMixin, { + onItemPop: function(element) { + mxn._setEndLocation(element, mxn.currentToken); + } + }); + }, + + _runParsingLoop(scriptHandler) { + orig._runParsingLoop.call(this, scriptHandler); + + // NOTE: generate location info for elements + // that remains on open element stack + for (let i = this.openElements.stackTop; i >= 0; i--) { + mxn._setEndLocation(this.openElements.items[i], mxn.currentToken); + } + }, + + //Token processing + _processTokenInForeignContent(token) { + mxn.currentToken = token; + orig._processTokenInForeignContent.call(this, token); + }, + + _processToken(token) { + mxn.currentToken = token; + orig._processToken.call(this, token); + + //NOTE: and are never popped from the stack, so we need to updated + //their end location explicitly. + const requireExplicitUpdate = + token.type === Tokenizer.END_TAG_TOKEN && + (token.tagName === $.HTML || (token.tagName === $.BODY && this.openElements.hasInScope($.BODY))); + + if (requireExplicitUpdate) { + for (let i = this.openElements.stackTop; i >= 0; i--) { + const element = this.openElements.items[i]; + + if (this.treeAdapter.getTagName(element) === token.tagName) { + mxn._setEndLocation(element, token); + break; + } + } + } + }, + + //Doctype + _setDocumentType(token) { + orig._setDocumentType.call(this, token); + + const documentChildren = this.treeAdapter.getChildNodes(this.document); + const cnLength = documentChildren.length; + + for (let i = 0; i < cnLength; i++) { + const node = documentChildren[i]; + + if (this.treeAdapter.isDocumentTypeNode(node)) { + this.treeAdapter.setNodeSourceCodeLocation(node, token.location); + break; + } + } + }, + + //Elements + _attachElementToTree(element) { + //NOTE: _attachElementToTree is called from _appendElement, _insertElement and _insertTemplate methods. + //So we will use token location stored in this methods for the element. + mxn._setStartLocation(element); + mxn.lastStartTagToken = null; + orig._attachElementToTree.call(this, element); + }, + + _appendElement(token, namespaceURI) { + mxn.lastStartTagToken = token; + orig._appendElement.call(this, token, namespaceURI); + }, + + _insertElement(token, namespaceURI) { + mxn.lastStartTagToken = token; + orig._insertElement.call(this, token, namespaceURI); + }, + + _insertTemplate(token) { + mxn.lastStartTagToken = token; + orig._insertTemplate.call(this, token); + + const tmplContent = this.treeAdapter.getTemplateContent(this.openElements.current); + + this.treeAdapter.setNodeSourceCodeLocation(tmplContent, null); + }, + + _insertFakeRootElement() { + orig._insertFakeRootElement.call(this); + this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current, null); + }, + + //Comments + _appendCommentNode(token, parent) { + orig._appendCommentNode.call(this, token, parent); + + const children = this.treeAdapter.getChildNodes(parent); + const commentNode = children[children.length - 1]; + + this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location); + }, + + //Text + _findFosterParentingLocation() { + //NOTE: store last foster parenting location, so we will be able to find inserted text + //in case of foster parenting + mxn.lastFosterParentingLocation = orig._findFosterParentingLocation.call(this); + + return mxn.lastFosterParentingLocation; + }, + + _insertCharacters(token) { + orig._insertCharacters.call(this, token); + + const hasFosterParent = this._shouldFosterParentOnInsertion(); + + const parent = + (hasFosterParent && mxn.lastFosterParentingLocation.parent) || + this.openElements.currentTmplContent || + this.openElements.current; + + const siblings = this.treeAdapter.getChildNodes(parent); + + const textNodeIdx = + hasFosterParent && mxn.lastFosterParentingLocation.beforeElement + ? siblings.indexOf(mxn.lastFosterParentingLocation.beforeElement) - 1 + : siblings.length - 1; + + const textNode = siblings[textNodeIdx]; + + //NOTE: if we have location assigned by another token, then just update end position + const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode); + + if (tnLoc) { + tnLoc.endLine = token.location.endLine; + tnLoc.endCol = token.location.endCol; + tnLoc.endOffset = token.location.endOffset; + } else { + this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location); + } + } + }; + } +} + +module.exports = LocationInfoParserMixin; diff --git a/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js b/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js new file mode 100644 index 0000000..3c1ef5f --- /dev/null +++ b/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js @@ -0,0 +1,146 @@ +'use strict'; + +const Mixin = require('../../utils/mixin'); +const Tokenizer = require('../../tokenizer'); +const PositionTrackingPreprocessorMixin = require('../position-tracking/preprocessor-mixin'); + +class LocationInfoTokenizerMixin extends Mixin { + constructor(tokenizer) { + super(tokenizer); + + this.tokenizer = tokenizer; + this.posTracker = Mixin.install(tokenizer.preprocessor, PositionTrackingPreprocessorMixin); + this.currentAttrLocation = null; + this.ctLoc = null; + } + + _getCurrentLocation() { + return { + startLine: this.posTracker.line, + startCol: this.posTracker.col, + startOffset: this.posTracker.offset, + endLine: -1, + endCol: -1, + endOffset: -1 + }; + } + + _attachCurrentAttrLocationInfo() { + this.currentAttrLocation.endLine = this.posTracker.line; + this.currentAttrLocation.endCol = this.posTracker.col; + this.currentAttrLocation.endOffset = this.posTracker.offset; + + const currentToken = this.tokenizer.currentToken; + const currentAttr = this.tokenizer.currentAttr; + + if (!currentToken.location.attrs) { + currentToken.location.attrs = Object.create(null); + } + + currentToken.location.attrs[currentAttr.name] = this.currentAttrLocation; + } + + _getOverriddenMethods(mxn, orig) { + const methods = { + _createStartTagToken() { + orig._createStartTagToken.call(this); + this.currentToken.location = mxn.ctLoc; + }, + + _createEndTagToken() { + orig._createEndTagToken.call(this); + this.currentToken.location = mxn.ctLoc; + }, + + _createCommentToken() { + orig._createCommentToken.call(this); + this.currentToken.location = mxn.ctLoc; + }, + + _createDoctypeToken(initialName) { + orig._createDoctypeToken.call(this, initialName); + this.currentToken.location = mxn.ctLoc; + }, + + _createCharacterToken(type, ch) { + orig._createCharacterToken.call(this, type, ch); + this.currentCharacterToken.location = mxn.ctLoc; + }, + + _createEOFToken() { + orig._createEOFToken.call(this); + this.currentToken.location = mxn._getCurrentLocation(); + }, + + _createAttr(attrNameFirstCh) { + orig._createAttr.call(this, attrNameFirstCh); + mxn.currentAttrLocation = mxn._getCurrentLocation(); + }, + + _leaveAttrName(toState) { + orig._leaveAttrName.call(this, toState); + mxn._attachCurrentAttrLocationInfo(); + }, + + _leaveAttrValue(toState) { + orig._leaveAttrValue.call(this, toState); + mxn._attachCurrentAttrLocationInfo(); + }, + + _emitCurrentToken() { + const ctLoc = this.currentToken.location; + + //NOTE: if we have pending character token make it's end location equal to the + //current token's start location. + if (this.currentCharacterToken) { + this.currentCharacterToken.location.endLine = ctLoc.startLine; + this.currentCharacterToken.location.endCol = ctLoc.startCol; + this.currentCharacterToken.location.endOffset = ctLoc.startOffset; + } + + if (this.currentToken.type === Tokenizer.EOF_TOKEN) { + ctLoc.endLine = ctLoc.startLine; + ctLoc.endCol = ctLoc.startCol; + ctLoc.endOffset = ctLoc.startOffset; + } else { + ctLoc.endLine = mxn.posTracker.line; + ctLoc.endCol = mxn.posTracker.col + 1; + ctLoc.endOffset = mxn.posTracker.offset + 1; + } + + orig._emitCurrentToken.call(this); + }, + + _emitCurrentCharacterToken() { + const ctLoc = this.currentCharacterToken && this.currentCharacterToken.location; + + //NOTE: if we have character token and it's location wasn't set in the _emitCurrentToken(), + //then set it's location at the current preprocessor position. + //We don't need to increment preprocessor position, since character token + //emission is always forced by the start of the next character token here. + //So, we already have advanced position. + if (ctLoc && ctLoc.endOffset === -1) { + ctLoc.endLine = mxn.posTracker.line; + ctLoc.endCol = mxn.posTracker.col; + ctLoc.endOffset = mxn.posTracker.offset; + } + + orig._emitCurrentCharacterToken.call(this); + } + }; + + //NOTE: patch initial states for each mode to obtain token start position + Object.keys(Tokenizer.MODE).forEach(modeName => { + const state = Tokenizer.MODE[modeName]; + + methods[state] = function(cp) { + mxn.ctLoc = mxn._getCurrentLocation(); + orig[state].call(this, cp); + }; + }); + + return methods; + } +} + +module.exports = LocationInfoTokenizerMixin; diff --git a/node_modules/parse5/lib/extensions/location_info/open_element_stack_mixin.js b/node_modules/parse5/lib/extensions/location_info/open_element_stack_mixin.js deleted file mode 100644 index 611db49..0000000 --- a/node_modules/parse5/lib/extensions/location_info/open_element_stack_mixin.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var Mixin = require('../../utils/mixin'), - inherits = require('util').inherits; - -var LocationInfoOpenElementStackMixin = module.exports = function (stack, options) { - Mixin.call(this, stack); - - this.onItemPop = options.onItemPop; -}; - -inherits(LocationInfoOpenElementStackMixin, Mixin); - -LocationInfoOpenElementStackMixin.prototype._getOverriddenMethods = function (mxn, orig) { - return { - pop: function () { - mxn.onItemPop(this.current); - orig.pop.call(this); - }, - - popAllUpToHtmlElement: function () { - for (var i = this.stackTop; i > 0; i--) - mxn.onItemPop(this.items[i]); - - orig.popAllUpToHtmlElement.call(this); - }, - - remove: function (element) { - mxn.onItemPop(this.current); - orig.remove.call(this, element); - } - }; -}; - diff --git a/node_modules/parse5/lib/extensions/location_info/parser_mixin.js b/node_modules/parse5/lib/extensions/location_info/parser_mixin.js deleted file mode 100644 index 7b9ee75..0000000 --- a/node_modules/parse5/lib/extensions/location_info/parser_mixin.js +++ /dev/null @@ -1,213 +0,0 @@ -'use strict'; - -var Mixin = require('../../utils/mixin'), - Tokenizer = require('../../tokenizer'), - LocationInfoTokenizerMixin = require('./tokenizer_mixin'), - PositionTrackingPreprocessorMixin = require('../position_tracking/preprocessor_mixin'), - LocationInfoOpenElementStackMixin = require('./open_element_stack_mixin'), - HTML = require('../../common/html'), - inherits = require('util').inherits; - - -//Aliases -var $ = HTML.TAG_NAMES; - -var LocationInfoParserMixin = module.exports = function (parser) { - Mixin.call(this, parser); - - this.parser = parser; - this.posTracker = null; - this.lastStartTagToken = null; - this.lastFosterParentingLocation = null; - this.currentToken = null; -}; - -inherits(LocationInfoParserMixin, Mixin); - - -LocationInfoParserMixin.prototype._setStartLocation = function (element) { - if (this.lastStartTagToken) { - element.__location = Object.create(this.lastStartTagToken.location); - element.__location.startTag = this.lastStartTagToken.location; - } - else - element.__location = null; -}; - -LocationInfoParserMixin.prototype._setEndLocation = function (element, closingToken) { - var loc = element.__location; - - if (loc) { - if (closingToken.location) { - var ctLoc = closingToken.location, - tn = this.parser.treeAdapter.getTagName(element); - - // NOTE: For cases like

- First 'p' closes without a closing - // tag and for cases like

- 'p' closes without a closing tag. - var isClosingEndTag = closingToken.type === Tokenizer.END_TAG_TOKEN && tn === closingToken.tagName; - - if (isClosingEndTag) { - loc.endTag = Object.create(ctLoc); - loc.endOffset = ctLoc.endOffset; - } - - else - loc.endOffset = ctLoc.startOffset; - } - - else if (closingToken.type === Tokenizer.EOF_TOKEN) - loc.endOffset = this.posTracker.offset; - } -}; - -LocationInfoParserMixin.prototype._getOverriddenMethods = function (mxn, orig) { - return { - _bootstrap: function (document, fragmentContext) { - orig._bootstrap.call(this, document, fragmentContext); - - mxn.lastStartTagToken = null; - mxn.lastFosterParentingLocation = null; - mxn.currentToken = null; - mxn.posTracker = new PositionTrackingPreprocessorMixin(this.tokenizer.preprocessor); - - new LocationInfoTokenizerMixin(this.tokenizer); - - new LocationInfoOpenElementStackMixin(this.openElements, { - onItemPop: function (element) { - mxn._setEndLocation(element, mxn.currentToken); - } - }); - }, - - _runParsingLoop: function (scriptHandler) { - orig._runParsingLoop.call(this, scriptHandler); - - // NOTE: generate location info for elements - // that remains on open element stack - for (var i = this.openElements.stackTop; i >= 0; i--) - mxn._setEndLocation(this.openElements.items[i], mxn.currentToken); - }, - - - //Token processing - _processTokenInForeignContent: function (token) { - mxn.currentToken = token; - orig._processTokenInForeignContent.call(this, token); - }, - - _processToken: function (token) { - mxn.currentToken = token; - orig._processToken.call(this, token); - - //NOTE: and are never popped from the stack, so we need to updated - //their end location explicitly. - var requireExplicitUpdate = token.type === Tokenizer.END_TAG_TOKEN && - (token.tagName === $.HTML || - token.tagName === $.BODY && this.openElements.hasInScope($.BODY)); - - if (requireExplicitUpdate) { - for (var i = this.openElements.stackTop; i >= 0; i--) { - var element = this.openElements.items[i]; - - if (this.treeAdapter.getTagName(element) === token.tagName) { - mxn._setEndLocation(element, token); - break; - } - } - } - }, - - - //Doctype - _setDocumentType: function (token) { - orig._setDocumentType.call(this, token); - - var documentChildren = this.treeAdapter.getChildNodes(this.document), - cnLength = documentChildren.length; - - for (var i = 0; i < cnLength; i++) { - var node = documentChildren[i]; - - if (this.treeAdapter.isDocumentTypeNode(node)) { - node.__location = token.location; - break; - } - } - }, - - - //Elements - _attachElementToTree: function (element) { - //NOTE: _attachElementToTree is called from _appendElement, _insertElement and _insertTemplate methods. - //So we will use token location stored in this methods for the element. - mxn._setStartLocation(element); - mxn.lastStartTagToken = null; - orig._attachElementToTree.call(this, element); - }, - - _appendElement: function (token, namespaceURI) { - mxn.lastStartTagToken = token; - orig._appendElement.call(this, token, namespaceURI); - }, - - _insertElement: function (token, namespaceURI) { - mxn.lastStartTagToken = token; - orig._insertElement.call(this, token, namespaceURI); - }, - - _insertTemplate: function (token) { - mxn.lastStartTagToken = token; - orig._insertTemplate.call(this, token); - - var tmplContent = this.treeAdapter.getTemplateContent(this.openElements.current); - - tmplContent.__location = null; - }, - - _insertFakeRootElement: function () { - orig._insertFakeRootElement.call(this); - this.openElements.current.__location = null; - }, - - //Comments - _appendCommentNode: function (token, parent) { - orig._appendCommentNode.call(this, token, parent); - - var children = this.treeAdapter.getChildNodes(parent), - commentNode = children[children.length - 1]; - - commentNode.__location = token.location; - }, - - //Text - _findFosterParentingLocation: function () { - //NOTE: store last foster parenting location, so we will be able to find inserted text - //in case of foster parenting - mxn.lastFosterParentingLocation = orig._findFosterParentingLocation.call(this); - - return mxn.lastFosterParentingLocation; - }, - - _insertCharacters: function (token) { - orig._insertCharacters.call(this, token); - - var hasFosterParent = this._shouldFosterParentOnInsertion(), - parent = hasFosterParent && mxn.lastFosterParentingLocation.parent || - this.openElements.currentTmplContent || - this.openElements.current, - siblings = this.treeAdapter.getChildNodes(parent), - textNodeIdx = hasFosterParent && mxn.lastFosterParentingLocation.beforeElement ? - siblings.indexOf(mxn.lastFosterParentingLocation.beforeElement) - 1 : - siblings.length - 1, - textNode = siblings[textNodeIdx]; - - //NOTE: if we have location assigned by another token, then just update end position - if (textNode.__location) - textNode.__location.endOffset = token.location.endOffset; - - else - textNode.__location = token.location; - } - }; -}; - diff --git a/node_modules/parse5/lib/extensions/location_info/tokenizer_mixin.js b/node_modules/parse5/lib/extensions/location_info/tokenizer_mixin.js deleted file mode 100644 index 859d690..0000000 --- a/node_modules/parse5/lib/extensions/location_info/tokenizer_mixin.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -var Mixin = require('../../utils/mixin'), - Tokenizer = require('../../tokenizer'), - PositionTrackingPreprocessorMixin = require('../position_tracking/preprocessor_mixin'), - inherits = require('util').inherits; - -var LocationInfoTokenizerMixin = module.exports = function (tokenizer) { - Mixin.call(this, tokenizer); - - this.tokenizer = tokenizer; - this.posTracker = new PositionTrackingPreprocessorMixin(tokenizer.preprocessor); - this.currentAttrLocation = null; - this.currentTokenLocation = null; -}; - -inherits(LocationInfoTokenizerMixin, Mixin); - -LocationInfoTokenizerMixin.prototype._getCurrentLocation = function () { - return { - line: this.posTracker.line, - col: this.posTracker.col, - startOffset: this.posTracker.offset, - endOffset: -1 - }; -}; - -LocationInfoTokenizerMixin.prototype._attachCurrentAttrLocationInfo = function () { - this.currentAttrLocation.endOffset = this.posTracker.offset; - - var currentToken = this.tokenizer.currentToken, - currentAttr = this.tokenizer.currentAttr; - - if (!currentToken.location.attrs) - currentToken.location.attrs = Object.create(null); - - currentToken.location.attrs[currentAttr.name] = this.currentAttrLocation; -}; - -LocationInfoTokenizerMixin.prototype._getOverriddenMethods = function (mxn, orig) { - var methods = { - _createStartTagToken: function () { - orig._createStartTagToken.call(this); - this.currentToken.location = mxn.currentTokenLocation; - }, - - _createEndTagToken: function () { - orig._createEndTagToken.call(this); - this.currentToken.location = mxn.currentTokenLocation; - }, - - _createCommentToken: function () { - orig._createCommentToken.call(this); - this.currentToken.location = mxn.currentTokenLocation; - }, - - _createDoctypeToken: function (initialName) { - orig._createDoctypeToken.call(this, initialName); - this.currentToken.location = mxn.currentTokenLocation; - }, - - _createCharacterToken: function (type, ch) { - orig._createCharacterToken.call(this, type, ch); - this.currentCharacterToken.location = mxn.currentTokenLocation; - }, - - _createAttr: function (attrNameFirstCh) { - orig._createAttr.call(this, attrNameFirstCh); - mxn.currentAttrLocation = mxn._getCurrentLocation(); - }, - - _leaveAttrName: function (toState) { - orig._leaveAttrName.call(this, toState); - mxn._attachCurrentAttrLocationInfo(); - }, - - _leaveAttrValue: function (toState) { - orig._leaveAttrValue.call(this, toState); - mxn._attachCurrentAttrLocationInfo(); - }, - - _emitCurrentToken: function () { - //NOTE: if we have pending character token make it's end location equal to the - //current token's start location. - if (this.currentCharacterToken) - this.currentCharacterToken.location.endOffset = this.currentToken.location.startOffset; - - this.currentToken.location.endOffset = mxn.posTracker.offset + 1; - orig._emitCurrentToken.call(this); - }, - - _emitCurrentCharacterToken: function () { - //NOTE: if we have character token and it's location wasn't set in the _emitCurrentToken(), - //then set it's location at the current preprocessor position. - //We don't need to increment preprocessor position, since character token - //emission is always forced by the start of the next character token here. - //So, we already have advanced position. - if (this.currentCharacterToken && this.currentCharacterToken.location.endOffset === -1) - this.currentCharacterToken.location.endOffset = mxn.posTracker.offset; - - orig._emitCurrentCharacterToken.call(this); - } - }; - - //NOTE: patch initial states for each mode to obtain token start position - Object.keys(Tokenizer.MODE).forEach(function (modeName) { - var state = Tokenizer.MODE[modeName]; - - methods[state] = function (cp) { - mxn.currentTokenLocation = mxn._getCurrentLocation(); - orig[state].call(this, cp); - }; - }); - - return methods; -}; - diff --git a/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js b/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js new file mode 100644 index 0000000..3a07d78 --- /dev/null +++ b/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js @@ -0,0 +1,64 @@ +'use strict'; + +const Mixin = require('../../utils/mixin'); + +class PositionTrackingPreprocessorMixin extends Mixin { + constructor(preprocessor) { + super(preprocessor); + + this.preprocessor = preprocessor; + this.isEol = false; + this.lineStartPos = 0; + this.droppedBufferSize = 0; + + this.offset = 0; + this.col = 0; + this.line = 1; + } + + _getOverriddenMethods(mxn, orig) { + return { + advance() { + const pos = this.pos + 1; + const ch = this.html[pos]; + + //NOTE: LF should be in the last column of the line + if (mxn.isEol) { + mxn.isEol = false; + mxn.line++; + mxn.lineStartPos = pos; + } + + if (ch === '\n' || (ch === '\r' && this.html[pos + 1] !== '\n')) { + mxn.isEol = true; + } + + mxn.col = pos - mxn.lineStartPos + 1; + mxn.offset = mxn.droppedBufferSize + pos; + + return orig.advance.call(this); + }, + + retreat() { + orig.retreat.call(this); + + mxn.isEol = false; + mxn.col = this.pos - mxn.lineStartPos + 1; + }, + + dropParsedChunk() { + const prevPos = this.pos; + + orig.dropParsedChunk.call(this); + + const reduction = prevPos - this.pos; + + mxn.lineStartPos -= reduction; + mxn.droppedBufferSize += reduction; + mxn.offset = mxn.droppedBufferSize + this.pos; + } + }; + } +} + +module.exports = PositionTrackingPreprocessorMixin; diff --git a/node_modules/parse5/lib/extensions/position_tracking/preprocessor_mixin.js b/node_modules/parse5/lib/extensions/position_tracking/preprocessor_mixin.js deleted file mode 100644 index 81995c6..0000000 --- a/node_modules/parse5/lib/extensions/position_tracking/preprocessor_mixin.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -var Mixin = require('../../utils/mixin'), - inherits = require('util').inherits, - UNICODE = require('../../common/unicode'); - -//Aliases -var $ = UNICODE.CODE_POINTS; - -var PositionTrackingPreprocessorMixin = module.exports = function (preprocessor) { - // NOTE: avoid installing tracker twice - if (!preprocessor.__locTracker) { - preprocessor.__locTracker = this; - - Mixin.call(this, preprocessor); - - this.preprocessor = preprocessor; - this.isEol = false; - this.lineStartPos = 0; - this.droppedBufferSize = 0; - - this.col = -1; - this.line = 1; - } - - return preprocessor.__locTracker; -}; - -inherits(PositionTrackingPreprocessorMixin, Mixin); - -Object.defineProperty(PositionTrackingPreprocessorMixin.prototype, 'offset', { - get: function () { - return this.droppedBufferSize + this.preprocessor.pos; - } -}); - -PositionTrackingPreprocessorMixin.prototype._getOverriddenMethods = function (mxn, orig) { - return { - advance: function () { - var cp = orig.advance.call(this); - - //NOTE: LF should be in the last column of the line - if (mxn.isEol) { - mxn.isEol = false; - mxn.line++; - mxn.lineStartPos = mxn.offset; - } - - if (cp === $.LINE_FEED) - mxn.isEol = true; - - mxn.col = mxn.offset - mxn.lineStartPos + 1; - - return cp; - }, - - retreat: function () { - orig.retreat.call(this); - mxn.isEol = false; - - mxn.col = mxn.offset - mxn.lineStartPos + 1; - }, - - dropParsedChunk: function () { - var prevPos = this.pos; - - orig.dropParsedChunk.call(this); - - mxn.droppedBufferSize += prevPos - this.pos; - } - }; -}; diff --git a/node_modules/parse5/lib/index.d.ts b/node_modules/parse5/lib/index.d.ts deleted file mode 100644 index 89e12cc..0000000 --- a/node_modules/parse5/lib/index.d.ts +++ /dev/null @@ -1,1085 +0,0 @@ -/// - -import * as stream from "stream"; -import * as events from "events"; - - -// Markup data -//----------------------------------------------------------------------------------- -declare namespace MarkupData { - interface Location { - /** - * One-based line index - */ - line: number; - /** - * One-based column index - */ - col: number; - /** - * Zero-based first character index - */ - startOffset: number; - /** - * Zero-based last character index - */ - endOffset: number; - } - - interface AttributesLocation { - [attributeName: string]: Location; - } - - interface StartTagLocation extends Location { - /** - * Start tag attributes' location info - */ - attrs: AttributesLocation - } - - interface ElementLocation extends StartTagLocation { - /** - * Element's start tag location info. - */ - startTag: StartTagLocation; - /** - * Element's end tag location info. - */ - endTag: Location; - } -} - -// Options -//----------------------------------------------------------------------------------- -declare namespace Options { - export interface ParserOptions { - /** - * Enables source code location information. When enabled, each node (except the root node) will have a `__location` property. - * If the node is not an empty element, `__location` will be a {@link MarkupData.ElementLocation} object, otherwise it will be {@link MarkupData.Location}. - * If the element was implicitly created by the parser (as part of [tree correction](https://html.spec.whatwg.org/multipage/syntax.html#an-introduction-to-error-handling-and-strange-cases-in-the-parser)), its `__location` property will be `undefined`. - * - * **Default:** `false` - */ - locationInfo?: boolean; - /** - * Specifies the resulting tree format. - * - * **Default:** `treeAdapters.default` - */ - treeAdapter?: AST.TreeAdapter; - } - - export interface SAXParserOptions { - /** - * Enables source code location information for the tokens. - * When enabled, each token event handler will receive {@link MarkupData.Location} (or {@link MarkupData.StartTagLocation}) - * object as its last argument. - */ - locationInfo?: boolean; - } - - export interface SerializerOptions { - /*** - * Specifies input tree format. - * - * **Default:** `treeAdapters.default` - */ - treeAdapter?: AST.TreeAdapter; - } -} - - -// AST -//----------------------------------------------------------------------------------- -declare namespace AST { - /** - * [Document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks). - */ - type DocumentMode = 'no-quirks' | 'quirks' | 'limited-quirks'; - - // Default tree adapter - namespace Default { - /** - * Element attribute. - */ - interface Attribute { - /** - * The name of the attribute. - */ - name: string; - /** - * The value of the attribute. - */ - value: string; - /** - * The namespace of the attribute. - */ - namespace?: string; - /** - * The namespace-related prefix of the attribute. - */ - prefix?: string; - } - - /** - * [Default tree adapter]{@link parse5.treeAdapters} Node interface. - */ - interface Node { - /** - * The name of the node. E.g. {@link Document} will have `nodeName` equal to '#document'`. - */ - nodeName: string; - } - - /** - * [Default tree adapter]{@link parse5.treeAdapters} ParentNode interface. - */ - interface ParentNode { - /** - * Child nodes. - */ - childNodes: Node[]; - } - - /** - * [Default tree adapter]{@link parse5.treeAdapters} DocumentType interface. - */ - export interface DocumentType extends Node { - /** - * The name of the node. - */ - nodeName: '#documentType'; - /** - * Document type name. - */ - name: string; - /** - * Document type public identifier. - */ - publicId: string; - /** - * Document type system identifier. - */ - systemId: string; - } - - /** - * [Default tree adapter]{@link parse5.treeAdapters} Document interface. - */ - export interface Document extends ParentNode { - /** - * The name of the node. - */ - nodeName: '#document'; - /** - * [Document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks). - */ - mode: DocumentMode; - } - - /** - * [Default tree adapter]{@link parse5.treeAdapters} DocumentFragment interface. - */ - export interface DocumentFragment extends ParentNode { - /** - * The name of the node. - */ - nodeName: '#document-fragment'; - } - - /** - * [Default tree adapter]{@link parse5.treeAdapters} Element interface. - */ - export interface Element extends ParentNode { - /** - * The name of the node. Equals to element {@link tagName}. - */ - nodeName: string; - /** - * Element tag name. - */ - tagName: string; - /** - * Element namespace. - */ - namespaceURI: string; - /** - * List of element attributes. - */ - attrs: Attribute[]; - /** - * Parent node. - */ - parentNode: ParentNode; - /** - * Element source code location info. Available if location info is enabled via {@link Options.ParserOptions}. - */ - __location?: MarkupData.ElementLocation; - } - - /** - * [Default tree adapter]{@link parse5.treeAdapters} CommentNode interface. - */ - export interface CommentNode extends Node { - /** - * The name of the node. - */ - nodeName: '#comment'; - /** - * Comment text. - */ - data: string; - /** - * Parent node. - */ - parentNode: ParentNode; - /** - * Comment source code location info. Available if location info is enabled via {@link Options.ParserOptions}. - */ - __location?: MarkupData.Location; - } - - /** - * [Default tree adapter]{@link parse5.treeAdapters} TextNode interface. - */ - export interface TextNode extends Node { - /** - * The name of the node. - */ - nodeName: '#text'; - /** - * Text content. - */ - value: string; - /** - * Parent node. - */ - parentNode: ParentNode; - /** - * Text node source code location info. Available if location info is enabled via {@link Options.ParserOptions}. - */ - __location?: MarkupData.Location; - } - } - - - // htmlparser2 tree adapter - namespace HtmlParser2 { - /** - * [htmlparser2 tree adapter]{@link parse5.treeAdapters} Node interface. - */ - interface Node { - /** - * The type of the node. E.g. {@link Document} will have `type` equal to 'root'`. - */ - type: string; - /** - * [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible node {@link type}. - */ - nodeType: number; - /** - * Parent node. - */ - parent: ParentNode; - /** - * Same as {@link parent}. [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - parentNode: ParentNode; - /** - * Previous sibling. - */ - prev: Node; - /** - * Same as {@link prev}. [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - previousSibling: Node; - /** - * Next sibling. - */ - next: Node; - /** - * Same as {@link next}. [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - nextSibling: Node; - } - - /** - * [htmlparser2 tree adapter]{@link parse5.treeAdapters} ParentNode interface. - */ - interface ParentNode extends Node { - /** - * Child nodes. - */ - children: Node[]; - /** - * Same as {@link children}. [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - childNodes: Node[]; - /** - * First child of the node. - */ - firstChild: Node; - /** - * Last child of the node. - */ - lastChild: Node; - } - - /** - * [htmlparser2 tree adapter]{@link parse5.treeAdapters} DocumentType interface. - */ - export interface DocumentType extends Node { - /** - * The type of the node. - */ - type: 'directive'; - /** - * Node name. - */ - name: '!doctype'; - /** - * Serialized doctype {@link name}, {@link publicId} and {@link systemId}. - */ - data: string; - /** - * Document type name. - */ - 'x-name':string; - /** - * Document type public identifier. - */ - 'x-publicId': string; - /** - * Document type system identifier. - */ - 'x-systemId': string; - } - - /** - * [htmlparser2 tree adapter]{@link parse5.treeAdapters} Document interface. - */ - export interface Document extends ParentNode { - /** - * The type of the node. - */ - type: 'root'; - /** - * The name of the node. - */ - name: 'root'; - /** - * [Document mode](https://dom.spec.whatwg.org/#concept-document-limited-quirks). - */ - 'x-mode': DocumentMode; - } - - /** - * [htmlparser2 tree adapter]{@link parse5.treeAdapters} DocumentFragment interface. - */ - export interface DocumentFragment extends ParentNode { - /** - * The type of the node. - */ - type: 'root'; - /** - * The name of the node. - */ - name: 'root'; - } - - /** - * [htmlparser2 tree adapter]{@link parse5.treeAdapters} Element interface. - */ - export interface Element extends ParentNode { - /** - * The name of the node. Equals to element {@link tagName}. - */ - name: string; - /** - * Element tag name. - */ - tagName: string; - /** - * Element namespace. - */ - namespace: string; - /** - * Element attributes. - */ - attribs: { [name: string]: string }; - /** - * Element attribute namespaces. - */ - 'x-attribsNamespace': { [name: string]: string }; - /** - * Element attribute namespace-related prefixes. - */ - 'x-attribsPrefix': { [name: string]: string }; - /** - * Element source code location info. Available if location info is enabled via {@link Options.ParserOptions}. - */ - __location?: MarkupData.ElementLocation; - } - - /** - * [htmlparser2 tree adapter]{@link parse5.treeAdapters} CommentNode interface. - */ - export interface CommentNode extends Node { - /** - * The name of the node. - */ - name: 'comment'; - /** - * Comment text. - */ - data: string; - /** - * Same as {@link data}. [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - nodeValue: string; - /** - * Comment source code location info. Available if location info is enabled via {@link Options.ParserOptions}. - */ - __location?: MarkupData.Location; - } - - /** - * [htmlparser2 tree adapter]{@link parse5.treeAdapters} TextNode interface. - */ - export interface TextNode extends Node { - /** - * The name of the node. - */ - name: 'text'; - /** - * Text content. - */ - data: string; - /** - * Same as {@link data}. [DOM spec](https://dom.spec.whatwg.org)-compatible alias. - */ - nodeValue: string; - /** - * Comment source code location info. Available if location info is enabled via {@link Options.ParserOptions}. - */ - __location?: MarkupData.Location; - } - } - - - // Unions - // NOTE: we use `Object` in unions to support custom tree adapter implementations. - // TypeScript Handbook suggests to always use `any` instead of `Object`, but in that - // case language service hints `any` as type, instead of actual union name. - /** - * Generic Node interface. - * Cast to the actual AST interface (e.g. {@link parse5.AST.Default.Node}) to get access to the properties. - */ - type Node = Default.Node | HtmlParser2.Node | Object; - /** - * Generic ParentNode interface. - * Cast to the actual AST interface (e.g. {@link parse5.AST.Default.ParentNode}) to get access to the properties. - */ - type ParentNode = Default.ParentNode | HtmlParser2.ParentNode | Object; - /** - * Generic DocumentType interface. - * Cast to the actual AST interface (e.g. {@link parse5.AST.Default.DocumentType}) to get access to the properties. - */ - type DocumentType = Default.DocumentType | HtmlParser2.DocumentType | Object; - /** - * Generic Document interface. - * Cast to the actual AST interface (e.g. {@link parse5.AST.Default.Document}) to get access to the properties. - */ - type Document = Default.Document | HtmlParser2.Document | Object; - /** - * Generic DocumentFragment interface. - * Cast to the actual AST interface (e.g. {@link parse5.AST.Default.DocumentFragment}) to get access to the properties. - */ - type DocumentFragment = Default.DocumentFragment | HtmlParser2.DocumentFragment | Object; - /** - * Generic Element interface. - * Cast to the actual AST interface (e.g. {@link parse5.AST.Default.Element}) to get access to the properties. - */ - type Element = Default.Element | HtmlParser2.Element | Object; - /** - * Generic TextNode interface. - * Cast to the actual AST interface (e.g. {@link parse5.AST.Default.TextNode}) to get access to the properties. - */ - type TextNode = Default.TextNode | HtmlParser2.TextNode | Object; - /** - * Generic CommentNode interface. - * Cast to the actual AST interface (e.g. {@link parse5.AST.Default.CommentNode}) to get access to the properties. - */ - type CommentNode = Default.CommentNode | HtmlParser2.CommentNode | Object; - - - // Tree adapter interface - //----------------------------------------------------------------------------------- - - /** - * Tree adapter is a set of utility functions that provides minimal required abstraction layer beetween parser and a specific AST format. - * Note that `TreeAdapter` is not designed to be a general purpose AST manipulation library. You can build such library - * on top of existing `TreeAdapter` or use one of the existing libraries from npm. - * - * @see [default implementation](https://github.com/inikulin/parse5/blob/master/lib/tree_adapters/default.js) - */ - export interface TreeAdapter { - /** - * Creates a document node. - */ - createDocument(): AST.Document; - /** - * Creates a document fragment node. - */ - createDocumentFragment(): AST.DocumentFragment; - /** - * Creates an element node. - * - * @param tagName - Tag name of the element. - * @param namespaceURI - Namespace of the element. - * @param attrs - Attribute name-value pair array. Foreign attributes may contain `namespace` and `prefix` fields as well. - */ - createElement(tagName: string, namespaceURI: string, attrs: AST.Default.Attribute[]): AST.Element; - /** - * Creates a comment node. - * - * @param data - Comment text. - */ - createCommentNode(data: string): AST.CommentNode; - /** - * Appends a child node to the given parent node. - * - * @param parentNode - Parent node. - * @param newNode - Child node. - */ - appendChild(parentNode: AST.ParentNode, newNode: AST.Node): void; - /** - * Inserts a child node to the given parent node before the given reference node. - * - * @param parentNode - Parent node. - * @param newNode - Child node. - * @param referenceNode - Reference node. - */ - insertBefore(parentNode: AST.ParentNode, newNode: AST.Node, referenceNode: AST.Node): void; - /** - * Sets the `